20230721 标准规范辨识修改

This commit is contained in:
杨红卫 2023-07-21 18:17:30 +08:00
parent df904cd642
commit cfb16a4268
4 changed files with 186 additions and 12 deletions

View File

@ -0,0 +1,44 @@
ALTER VIEW [dbo].[View_InformationProject_ConstructionStandardSelectedItem]
/*±ê×¼¹æ·¶±æÊ¶Ñ¡ÔñÏîÁбíÊÓͼ*/
AS
SELECT Item.ConstructionStandardSelectedItemId,
Item.ConstructionStandardIdentifyId,
Item.StandardId,
Identify.ProjectId,
List.StandardGrade,
List.StandardNo,
List.StandardName,
List.AttachUrl,
List.IsSelected1,
List.IsSelected2,
List.IsSelected3,
List.IsSelected4,
List.IsSelected5,
List.IsSelected6,
List.IsSelected7,
List.IsSelected8,
List.IsSelected9,
List.IsSelected10,
List.IsSelected11,
List.IsSelected12,
List.IsSelected13,
List.IsSelected14,
List.IsSelected15,
List.IsSelected16,
List.IsSelected17,
List.IsSelected18,
List.IsSelected19,
List.IsSelected20,
List.IsSelected21,
List.IsSelected22,
List.IsSelected23,
List.IsSelected90
FROM dbo.Law_HSSEStandardsList AS List
LEFT JOIN dbo.InformationProject_ConstructionStandardSelectedItem AS Item ON List.StandardId =Item.StandardId
LEFT JOIN dbo.InformationProject_ConstructionStandardIdentify AS Identify ON Item.ConstructionStandardIdentifyId =Identify.ConstructionStandardIdentifyId
GO

View File

@ -10,7 +10,7 @@
<head runat="server"> <head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑标准规范辨识</title> <title>编辑标准规范辨识</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" /> <link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
@ -37,9 +37,9 @@
</f:CheckBox> </f:CheckBox>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" > <f:Toolbar ID="Toolbar1" Position="Top" runat="server">
<Items> <Items>
<f:TextBox ID="txtConstructionStandardIdentifyCode" runat="server" Label="编号" LabelAlign="Right" <f:TextBox ID="txtConstructionStandardIdentifyCode" runat="server" Label="编号" LabelAlign="Right"
MaxLength="30" Readonly="true" Width="400px"> MaxLength="30" Readonly="true" Width="400px">
</f:TextBox> </f:TextBox>
<f:TextBox ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" MaxLength="150" Width="400px"> <f:TextBox ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" MaxLength="150" Width="400px">
@ -49,10 +49,10 @@
</Toolbars> </Toolbars>
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="false" ShowHeader="false" Title="标准规范辨识" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="false" ShowHeader="false" Title="标准规范辨识" EnableCollapse="true"
IsDatabasePaging="true" PageSize="10" AllowPaging="true" runat="server" BoxFlex="1" IsDatabasePaging="true" PageSize="20" AllowPaging="true" runat="server" BoxFlex="1"
DataKeyNames="StandardId" DataIDField="StandardId" AllowCellEditing="true" DataKeyNames="StandardId" DataIDField="StandardId" AllowCellEditing="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="true" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="true"
EnableColumnLines="true" EnableCheckBoxSelect="true"> EnableColumnLines="true" EnableCheckBoxSelect="true">
<Columns> <Columns>
<f:RenderField Width="100px" ColumnID="StandardGrade" DataField="StandardGrade" FieldType="String" <f:RenderField Width="100px" ColumnID="StandardGrade" DataField="StandardGrade" FieldType="String"
HeaderText="标准级别" HeaderTextAlign="Center" TextAlign="Left"> HeaderText="标准级别" HeaderTextAlign="Center" TextAlign="Left">

View File

@ -143,13 +143,56 @@ namespace FineUIPro.Web.HSSE.InformationProject
/// </summary> /// </summary>
private void BindGrid() private void BindGrid()
{ {
var q = from x in Funs.DB.View_InformationProject_ConstructionStandardSelectedItem IQueryable<Model.View_InformationProject_ConstructionStandardSelectedItem> q;
where x.StandardName != null if (this.ckbAll.Checked)
select x;
if (!this.ckbAll.Checked)
{ {
q = q.Where(e => e.ConstructionStandardIdentifyId == this.ConstructionStandardIdentifyId); q = from x in Funs.DB.Law_HSSEStandardsList
join y in Funs.DB.InformationProject_ConstructionStandardSelectedItem on x.StandardId equals y.StandardId
join z in Funs.DB.InformationProject_ConstructionStandardIdentify on y.ConstructionStandardIdentifyId equals z.ConstructionStandardIdentifyId
where x.StandardName != null && z.ProjectId == this.CurrUser.LoginProjectId
select new Model.View_InformationProject_ConstructionStandardSelectedItem
{
ConstructionStandardSelectedItemId =y.ConstructionStandardSelectedItemId,
ConstructionStandardIdentifyId = y.ConstructionStandardIdentifyId,
ProjectId = this.CurrUser.LoginProjectId,
StandardId = x.StandardId,
StandardGrade = x.StandardGrade,
StandardNo = x.StandardNo,
StandardName = x.StandardName,
AttachUrl = x.AttachUrl,
IsSelected1 = x.IsSelected1,
IsSelected2 = x.IsSelected2,
IsSelected3 = x.IsSelected3,
IsSelected4 = x.IsSelected4,
IsSelected5 = x.IsSelected5,
IsSelected6 = x.IsSelected6,
IsSelected7 = x.IsSelected7,
IsSelected8 = x.IsSelected8,
IsSelected9 = x.IsSelected9,
IsSelected10 = x.IsSelected10,
IsSelected11 = x.IsSelected11,
IsSelected12 = x.IsSelected12,
IsSelected13 = x.IsSelected13,
IsSelected14 = x.IsSelected14,
IsSelected15 = x.IsSelected15,
IsSelected16 = x.IsSelected16,
IsSelected17 = x.IsSelected17,
IsSelected18 = x.IsSelected18,
IsSelected19 = x.IsSelected19,
IsSelected20 = x.IsSelected20,
IsSelected21 = x.IsSelected21,
IsSelected22 = x.IsSelected22,
IsSelected23 = x.IsSelected23,
IsSelected90 = x.IsSelected90
};
} }
else
{
q = from x in Funs.DB.View_InformationProject_ConstructionStandardSelectedItem
where x.ConstructionStandardIdentifyId == this.ConstructionStandardIdentifyId
select x;
}
if (!string.IsNullOrEmpty(this.txtStandardGrade.Text.Trim())) if (!string.IsNullOrEmpty(this.txtStandardGrade.Text.Trim()))
{ {
q = q.Where(e => e.StandardGrade.Contains(this.txtStandardGrade.Text.Trim())); q = q.Where(e => e.StandardGrade.Contains(this.txtStandardGrade.Text.Trim()));

View File

@ -10804,6 +10804,8 @@ namespace Model
private EntityRef<Person_Persons> _Person_Persons; private EntityRef<Person_Persons> _Person_Persons;
private EntitySet<ActionPlan_ActionPlanListApprove> _ActionPlan_ActionPlanListApprove;
#region #region
partial void OnLoaded(); partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -10842,6 +10844,7 @@ namespace Model
{ {
this._Base_Project = default(EntityRef<Base_Project>); this._Base_Project = default(EntityRef<Base_Project>);
this._Person_Persons = default(EntityRef<Person_Persons>); this._Person_Persons = default(EntityRef<Person_Persons>);
this._ActionPlan_ActionPlanListApprove = new EntitySet<ActionPlan_ActionPlanListApprove>(new Action<ActionPlan_ActionPlanListApprove>(this.attach_ActionPlan_ActionPlanListApprove), new Action<ActionPlan_ActionPlanListApprove>(this.detach_ActionPlan_ActionPlanListApprove));
OnCreated(); OnCreated();
} }
@ -11201,6 +11204,19 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ActionPlan_ActionPlanListApprove_ActionPlan_ActionPlanList", Storage="_ActionPlan_ActionPlanListApprove", ThisKey="ActionPlanListId", OtherKey="ActionPlanListId", DeleteRule="NO ACTION")]
public EntitySet<ActionPlan_ActionPlanListApprove> ActionPlan_ActionPlanListApprove
{
get
{
return this._ActionPlan_ActionPlanListApprove;
}
set
{
this._ActionPlan_ActionPlanListApprove.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
@ -11220,6 +11236,18 @@ namespace Model
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
} }
} }
private void attach_ActionPlan_ActionPlanListApprove(ActionPlan_ActionPlanListApprove entity)
{
this.SendPropertyChanging();
entity.ActionPlan_ActionPlanList = this;
}
private void detach_ActionPlan_ActionPlanListApprove(ActionPlan_ActionPlanListApprove entity)
{
this.SendPropertyChanging();
entity.ActionPlan_ActionPlanList = null;
}
} }
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ActionPlan_ActionPlanListApprove")] [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ActionPlan_ActionPlanListApprove")]
@ -11252,6 +11280,8 @@ namespace Model
private System.Nullable<int> _IsPushOa; private System.Nullable<int> _IsPushOa;
private EntityRef<ActionPlan_ActionPlanList> _ActionPlan_ActionPlanList;
private EntityRef<Person_Persons> _Person_Persons; private EntityRef<Person_Persons> _Person_Persons;
#region #region
@ -11286,6 +11316,7 @@ namespace Model
public ActionPlan_ActionPlanListApprove() public ActionPlan_ActionPlanListApprove()
{ {
this._ActionPlan_ActionPlanList = default(EntityRef<ActionPlan_ActionPlanList>);
this._Person_Persons = default(EntityRef<Person_Persons>); this._Person_Persons = default(EntityRef<Person_Persons>);
OnCreated(); OnCreated();
} }
@ -11321,6 +11352,10 @@ namespace Model
{ {
if ((this._ActionPlanListId != value)) if ((this._ActionPlanListId != value))
{ {
if (this._ActionPlan_ActionPlanList.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnActionPlanListIdChanging(value); this.OnActionPlanListIdChanging(value);
this.SendPropertyChanging(); this.SendPropertyChanging();
this._ActionPlanListId = value; this._ActionPlanListId = value;
@ -11534,6 +11569,40 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ActionPlan_ActionPlanListApprove_ActionPlan_ActionPlanList", Storage="_ActionPlan_ActionPlanList", ThisKey="ActionPlanListId", OtherKey="ActionPlanListId", IsForeignKey=true)]
public ActionPlan_ActionPlanList ActionPlan_ActionPlanList
{
get
{
return this._ActionPlan_ActionPlanList.Entity;
}
set
{
ActionPlan_ActionPlanList previousValue = this._ActionPlan_ActionPlanList.Entity;
if (((previousValue != value)
|| (this._ActionPlan_ActionPlanList.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._ActionPlan_ActionPlanList.Entity = null;
previousValue.ActionPlan_ActionPlanListApprove.Remove(this);
}
this._ActionPlan_ActionPlanList.Entity = value;
if ((value != null))
{
value.ActionPlan_ActionPlanListApprove.Add(this);
this._ActionPlanListId = value.ActionPlanListId;
}
else
{
this._ActionPlanListId = default(string);
}
this.SendPropertyChanged("ActionPlan_ActionPlanList");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ActionPlan_ActionPlanListApprove_Person_Persons", Storage="_Person_Persons", ThisKey="ApproveMan", OtherKey="PersonId", IsForeignKey=true)] [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ActionPlan_ActionPlanListApprove_Person_Persons", Storage="_Person_Persons", ThisKey="ApproveMan", OtherKey="PersonId", IsForeignKey=true)]
public Person_Persons Person_Persons public Person_Persons Person_Persons
{ {
@ -276119,6 +276188,8 @@ namespace Model
private string _StandardId; private string _StandardId;
private string _ProjectId;
private string _StandardGrade; private string _StandardGrade;
private string _StandardNo; private string _StandardNo;
@ -276179,7 +276250,7 @@ namespace Model
{ {
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionStandardSelectedItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionStandardSelectedItemId", DbType="NVarChar(50)")]
public string ConstructionStandardSelectedItemId public string ConstructionStandardSelectedItemId
{ {
get get
@ -276227,6 +276298,22 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
this._ProjectId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StandardGrade", DbType="NChar(12)")] [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StandardGrade", DbType="NChar(12)")]
public string StandardGrade public string StandardGrade
{ {