diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx
index 6d83600f..cf8356d9 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx
@@ -28,9 +28,21 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
<%--
diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs
index dbaec460..9de02d03 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs
@@ -18,11 +18,36 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
if (!IsPostBack)
{
+ //测试阶段,仅hfnbd账号使用
+ if (this.CurrUser.UserId == BLL.Const.hfnbdId)
+ {
+ this.fr1.Hidden = false;
+ this.fr2.Hidden = false;
+ }
GetButtonPower();
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
//UserService.InitUserNameProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
+
+ //单位工程
+ var q = (from x in Funs.DB.WBS_DivisionDivide
+ join y in Funs.DB.WBS_UnitWork on x.UnitWorkId equals y.UnitWorkId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && (y.SuperUnitWork == null || y.SuperUnitWork == "0")
+ select new
+ {
+ y.UnitWorkId,
+ UnitWorkName = y.UnitWorkCode + "-" + y.UnitWorkName
+ }).Distinct().ToList();
+ this.drpUnitWorkId.DataTextField = "UnitWorkName";
+ this.drpUnitWorkId.DataValueField = "UnitWorkId";
+ this.drpUnitWorkId.DataSource = q;
+ this.drpUnitWorkId.DataBind();
+ Funs.FineUIPleaseSelect(this.drpUnitWorkId);
+ Funs.FineUIPleaseSelect(this.drpBranch);
+ Funs.FineUIPleaseSelect(this.drpProEngineering);
+
this.hdInspectionNoticeId.Text = Request.Params["inspectionId"];
if (!string.IsNullOrEmpty(Request.Params["View"]))
{
@@ -46,6 +71,79 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
this.drpAcceptanceCheckMan.SelectedValueArray = inspectionManagement.AcceptanceCheckMan.Split(',');
}
+ //单位工程、分部工程、分项工程
+ if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId))
+ {
+ this.drpUnitWorkId.SelectedValue = inspectionManagement.UnitWorkId;
+ if (!string.IsNullOrEmpty(inspectionManagement.Branch))
+ {
+ //分部工程
+ var a = (from x in Funs.DB.WBS_DivisionDivide
+ join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && x.UnitWorkId == this.drpUnitWorkId.SelectedValue
+ && y.ParentId == null
+ select new
+ {
+ y.DivisionId,
+ y.BranchEngineeringName
+ }).Distinct().ToList();
+ this.drpBranch.DataTextField = "BranchEngineeringName";
+ this.drpBranch.DataValueField = "DivisionId";
+ this.drpBranch.DataSource = a;
+ this.drpBranch.DataBind();
+ Funs.FineUIPleaseSelect(this.drpBranch);
+ this.drpBranch.SelectedIndex = 0;
+
+ this.drpBranch.SelectedValue = inspectionManagement.Branch;
+
+ if (!string.IsNullOrEmpty(inspectionManagement.ControlPointType))
+ {
+ //分项工程
+ var b = (from x in Funs.DB.WBS_DivisionDivide
+ join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && x.UnitWorkId == this.drpUnitWorkId.SelectedValue
+ && y.ParentId == this.drpBranch.SelectedValue
+ && y.ParentId != null
+ select new
+ {
+ y.DivisionId,
+ y.ProEngineeringName,
+ y.SubBranchEngineeringName
+ }).Distinct().ToList();
+ if (b.Where(w => w.SubBranchEngineeringName == null).Count() > 0)
+ {
+ this.drpProEngineering.DataTextField = "ProEngineeringName";
+ this.drpProEngineering.DataValueField = "DivisionId";
+ this.drpProEngineering.DataSource = b;
+ }
+ else
+ {
+ var c = (from x in Funs.DB.WBS_DivisionDivide
+ join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
+ join z in Funs.DB.Division_SubProjects on y.ParentId equals z.DivisionId
+ join w in Funs.DB.Division_SubProjects on z.ParentId equals w.DivisionId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && x.UnitWorkId == this.drpUnitWorkId.SelectedValue
+ && z.ParentId == this.drpBranch.SelectedValue
+ select new
+ {
+ y.DivisionId,
+ y.ProEngineeringName
+ }).Distinct().ToList();
+ this.drpProEngineering.DataTextField = "ProEngineeringName";
+ this.drpProEngineering.DataValueField = "DivisionId";
+ this.drpProEngineering.DataSource = c;
+ }
+ this.drpProEngineering.DataBind();
+ Funs.FineUIPleaseSelect(this.drpProEngineering);
+ this.drpProEngineering.SelectedIndex = 0;
+
+ this.drpProEngineering.SelectedValue = inspectionManagement.ControlPointType;
+ }
+ }
+ }
this.txtNoticeCode.Text = inspectionManagement.NoticeCode;
this.Grid1.DataSource = BLL.InspectionManagementDetailService.GetInspectionDetails(this.hdInspectionNoticeId.Text.Trim());
this.Grid1.DataBind();
@@ -58,7 +156,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
if (requestArg.StartsWith("ReloadGrid$"))
{
this.hdItemsString.Text = requestArg.Substring("ReloadGrid$".Length);
- Window1_Close(null,null);
+ Window1_Close(null, null);
}
}
}
@@ -72,7 +170,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
///
protected void btnSave_Click(object sender, EventArgs e)
{
- if (this.drpUnit.SelectedValue==BLL.Const._Null)
+ if (this.drpUnit.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请先选择施工分包商!", MessageBoxIcon.Warning);
return;
@@ -112,6 +210,19 @@ namespace FineUIPro.Web.CQMS.ProcessControl
CheckManIds = CheckManIds.Substring(0, CheckManIds.LastIndexOf(","));
}
inspectionManagement.AcceptanceCheckMan = CheckManIds;
+
+ if (this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
+ {
+ inspectionManagement.UnitWorkId = this.drpUnitWorkId.SelectedValue;
+ }
+ if (this.drpBranch.SelectedValue != BLL.Const._Null)
+ {
+ inspectionManagement.Branch = this.drpBranch.SelectedValue;
+ }
+ if (this.drpProEngineering.SelectedValue != BLL.Const._Null)
+ {
+ inspectionManagement.ControlPointType = this.drpProEngineering.SelectedValue;
+ }
//inspectionManagement.AcceptanceCheckMan = this.txtAcceptanceCheckMan.Text.Trim();
if (string.IsNullOrEmpty(Request.Params["inspectionId"]))
{
@@ -146,7 +257,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
//编号不能重复
var InspectionManagementModel = Funs.DB.ProcessControl_InspectionManagement.FirstOrDefault(x => x.NoticeCode == this.txtNoticeCode.Text.Trim()
- && x.InspectionId!= Request.Params["inspectionId"]);
+ && x.InspectionId != Request.Params["inspectionId"]);
if (InspectionManagementModel != null)
{
ShowNotify("共检通知单编号已存在,不能重复!", MessageBoxIcon.Warning);
@@ -192,6 +303,12 @@ namespace FineUIPro.Web.CQMS.ProcessControl
}
#endregion
+ #region Grid1行内事件
+ ///
+ /// Grid1行内事件
+ ///
+ ///
+ ///
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
string itemId = Grid1.DataKeys[e.RowIndex][0].ToString();
@@ -210,6 +327,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
Grid1.DataBind();
}
}
+ #endregion
#region 搜索
///
@@ -250,7 +368,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
{
detail.CreateDate = Convert.ToDateTime(createDate);
}
-
+
details.Add(detail);
}
return details;
@@ -400,5 +518,88 @@ namespace FineUIPro.Web.CQMS.ProcessControl
return name;
}
#endregion
+
+ #region DropDownList下拉选择事件
+ ///
+ /// 单位工程下拉选择事件
+ ///
+ ///
+ ///
+ protected void drpUnitWorkId_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.drpBranch.Items.Clear();
+ if (this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
+ {
+ var q = (from x in Funs.DB.WBS_DivisionDivide
+ join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && x.UnitWorkId == this.drpUnitWorkId.SelectedValue
+ && y.ParentId == null
+ select new
+ {
+ y.DivisionId,
+ y.BranchEngineeringName
+ }).Distinct().ToList();
+ this.drpBranch.DataTextField = "BranchEngineeringName";
+ this.drpBranch.DataValueField = "DivisionId";
+ this.drpBranch.DataSource = q;
+ this.drpBranch.DataBind();
+ Funs.FineUIPleaseSelect(this.drpBranch);
+ }
+ this.drpBranch.SelectedIndex = 0;
+ }
+
+ ///
+ /// 分部工程下拉选择事件
+ ///
+ ///
+ ///
+ protected void drpBranch_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.drpProEngineering.Items.Clear();
+ if (this.drpBranch.SelectedValue != BLL.Const._Null)
+ {
+ var q = (from x in Funs.DB.WBS_DivisionDivide
+ join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && x.UnitWorkId == this.drpUnitWorkId.SelectedValue
+ && y.ParentId == this.drpBranch.SelectedValue
+ && y.ParentId != null
+ select new
+ {
+ y.DivisionId,
+ y.ProEngineeringName,
+ y.SubBranchEngineeringName
+ }).Distinct().ToList();
+ if (q.Where(w => w.SubBranchEngineeringName == null).Count() > 0)
+ {
+ this.drpProEngineering.DataTextField = "ProEngineeringName";
+ this.drpProEngineering.DataValueField = "DivisionId";
+ this.drpProEngineering.DataSource = q;
+ }
+ else
+ {
+ var a = (from x in Funs.DB.WBS_DivisionDivide
+ join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
+ join z in Funs.DB.Division_SubProjects on y.ParentId equals z.DivisionId
+ join w in Funs.DB.Division_SubProjects on z.ParentId equals w.DivisionId
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && x.UnitWorkId == this.drpUnitWorkId.SelectedValue
+ && z.ParentId == this.drpBranch.SelectedValue
+ select new
+ {
+ y.DivisionId,
+ y.ProEngineeringName
+ }).Distinct().ToList();
+ this.drpProEngineering.DataTextField = "ProEngineeringName";
+ this.drpProEngineering.DataValueField = "DivisionId";
+ this.drpProEngineering.DataSource = a;
+ }
+ this.drpProEngineering.DataBind();
+ Funs.FineUIPleaseSelect(this.drpProEngineering);
+ }
+ this.drpProEngineering.SelectedIndex = 0;
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.designer.cs
index 90502fd5..483cbd12 100644
--- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.CQMS.ProcessControl
-{
-
-
- public partial class InspectionNoticeEdit
- {
-
+namespace FineUIPro.Web.CQMS.ProcessControl {
+
+
+ public partial class InspectionNoticeEdit {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// drpUnit 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
///
/// drpCNProfessionalId 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpCNProfessionalId;
-
+
///
/// txtNoticeCode 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtNoticeCode;
-
+
///
/// txtAcceptanceSite 控件。
///
@@ -76,7 +74,61 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtAcceptanceSite;
-
+
+ ///
+ /// fr1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow fr1;
+
+ ///
+ /// drpUnitWorkId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitWorkId;
+
+ ///
+ /// drpBranch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpBranch;
+
+ ///
+ /// fr2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow fr2;
+
+ ///
+ /// drpProEngineering 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpProEngineering;
+
+ ///
+ /// Lable1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Lable1;
+
///
/// drpAcceptanceCheckMan 控件。
///
@@ -85,7 +137,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpAcceptanceCheckMan;
-
+
///
/// Label1 控件。
///
@@ -94,7 +146,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label Label1;
-
+
///
/// btnAttach 控件。
///
@@ -103,7 +155,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAttach;
-
+
///
/// Panel2 控件。
///
@@ -112,7 +164,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel2;
-
+
///
/// Grid1 控件。
///
@@ -121,7 +173,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Toolbar4 控件。
///
@@ -130,7 +182,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar4;
-
+
///
/// btnNew 控件。
///
@@ -139,7 +191,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// Label2 控件。
///
@@ -148,7 +200,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label2;
-
+
///
/// Label3 控件。
///
@@ -157,7 +209,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label3;
-
+
///
/// Label5 控件。
///
@@ -166,7 +218,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label5;
-
+
///
/// Label4 控件。
///
@@ -175,7 +227,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label Label4;
-
+
///
/// Toolbar1 控件。
///
@@ -184,7 +236,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// hdItemsString 控件。
///
@@ -193,7 +245,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdItemsString;
-
+
///
/// hdInspectionNoticeId 控件。
///
@@ -202,7 +254,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdInspectionNoticeId;
-
+
///
/// btnSave 控件。
///
@@ -211,7 +263,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// Window1 控件。
///
@@ -220,7 +272,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// WindowAtt 控件。
///
diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config
index f50b26d3..9fc55c34 100644
--- a/SGGL/FineUIPro.Web/Web.config
+++ b/SGGL/FineUIPro.Web/Web.config
@@ -12,7 +12,7 @@
-
+