diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionDivideList.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionDivideList.aspx index fe926e6f..5be33799 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionDivideList.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionDivideList.aspx @@ -18,7 +18,7 @@ - + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionDivideList.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionDivideList.aspx.cs index 952f78fc..416f991a 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionDivideList.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionDivideList.aspx.cs @@ -25,11 +25,11 @@ namespace FineUIPro.Web.CQMS.WBS.Control { BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWork, this.CurrUser.LoginProjectId, true); - var subProjectLists = from x in Funs.DB.Division_SubProjects where x.ProjectId==this.CurrUser.LoginProjectId && x.ParentId==null select x; - this.drpBranchEngineering.DataTextField = "BranchEngineeringName"; - this.drpBranchEngineering.DataValueField = "DivisionId"; - this.drpBranchEngineering.DataSource = subProjectLists; - this.drpBranchEngineering.DataBind(); + //var subProjectLists = from x in Funs.DB.Division_SubProjects where x.ProjectId==this.CurrUser.LoginProjectId && x.ParentId==null select x; + //this.drpBranchEngineering.DataTextField = "BranchEngineeringName"; + //this.drpBranchEngineering.DataValueField = "DivisionId"; + //this.drpBranchEngineering.DataSource = subProjectLists; + //this.drpBranchEngineering.DataBind(); Funs.FineUIPleaseSelect(this.drpBranchEngineering); BindGrid(); @@ -49,7 +49,7 @@ namespace FineUIPro.Web.CQMS.WBS.Control strSql += " AND (UnitWorkId =@unitWorkId or SuperUnitWork=@unitWorkId) "; listStr.Add(new SqlParameter("@unitWorkId", this.drpUnitWork.SelectedValue)); } - if (this.drpBranchEngineering.SelectedValue!=BLL.Const._Null) + if (this.drpBranchEngineering.SelectedValue != BLL.Const._Null) { strSql += " AND (DivisionId = @divisionId or ParentId=@divisionId) "; listStr.Add(new SqlParameter("@divisionId", this.drpBranchEngineering.SelectedValue)); @@ -57,7 +57,7 @@ namespace FineUIPro.Web.CQMS.WBS.Control strSql += " ORDER BY SupUnitWorkCode,ChildUnitWorkCode,Sort,DivisionLevel "; SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - + Grid1.RecordCount = tb.Rows.Count; //tb = GetFilteredTable(Grid1.FilteredData, tb); //var table = this.GetPagedDataTable(Grid1, tb); @@ -100,7 +100,7 @@ namespace FineUIPro.Web.CQMS.WBS.Control } if (this.drpBranchEngineering.SelectedValue != BLL.Const._Null) { - lists = lists.Where(x => x.DivisionId == this.drpBranchEngineering.SelectedValue || x.ParentId==this.drpBranchEngineering.SelectedValue); + lists = lists.Where(x => x.DivisionId == this.drpBranchEngineering.SelectedValue || x.ParentId == this.drpBranchEngineering.SelectedValue); } lists = lists.OrderBy(x => x.SupUnitWorkCode).ThenBy(x => x.ChildUnitWorkCode).ThenBy(x => x.Sort).ThenBy(x => x.DivisionLevel); @@ -139,7 +139,7 @@ namespace FineUIPro.Web.CQMS.WBS.Control row = sheet.CreateRow(i); // 添加数据 cell = row.CreateCell(0); - cell.CellStyle = cellStyle; + cell.CellStyle = cellStyle; cell.SetCellValue(item.SupUnitWorkCode);//单位工程编码 cell = row.CreateCell(1); @@ -208,5 +208,33 @@ namespace FineUIPro.Web.CQMS.WBS.Control } } #endregion + + /// + /// 单位工程下拉选择 + /// + /// + /// + protected void drpUnitWork_SelectedIndexChanged(object sender, EventArgs e) + { + this.drpBranchEngineering.Items.Clear(); + if (this.drpUnitWork.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpUnitWork.SelectedValue)) + { + var q = (from x in Funs.DB.View_WBS_DivisionDivide + where x.ProjectId == this.CurrUser.LoginProjectId + && x.UnitWorkId == this.drpUnitWork.SelectedValue + && x.ParentId==null + select new + { + x.DivisionId, + x.BranchEngineeringName + }).Distinct().ToList(); + this.drpBranchEngineering.DataTextField = "BranchEngineeringName"; + this.drpBranchEngineering.DataValueField = "DivisionId"; + this.drpBranchEngineering.DataSource = q; + this.drpBranchEngineering.DataBind(); + Funs.FineUIPleaseSelect(this.drpBranchEngineering); + this.drpBranchEngineering.SelectedIndex = 0; + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionSubProjectsNewEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionSubProjectsNewEdit.aspx.cs index 1b14544c..75832afa 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionSubProjectsNewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/Control/DivisionSubProjectsNewEdit.aspx.cs @@ -235,11 +235,11 @@ namespace FineUIPro.Web.CQMS.WBS.Control } else { - var sub = BLL.SubProjectsService.GetSubProjectsById(this.ParentId); - if (sub.DivisionLevel == 1) - { + //var sub = BLL.SubProjectsService.GetSubProjectsById(this.ParentId); + //if (sub.DivisionLevel == 1) + //{ newSubProjects.DivisionLevel = 2; - } + //} newSubProjects.ProEngineeringName = this.txtProEngineeringName.Text.Trim(); newSubProjects.DivisionId = SQLHelper.GetNewID(typeof(Model.Division_SubProjects)); this.DivisionId = newSubProjects.DivisionId; @@ -264,15 +264,15 @@ namespace FineUIPro.Web.CQMS.WBS.Control } else { - var sub = BLL.SubProjectsService.GetSubProjectsById(this.ParentId); - if (sub.DivisionLevel == 1) - { - newSubProjects.DivisionLevel = 2; - } - else if (sub.DivisionLevel==2) - { + //var sub = BLL.SubProjectsService.GetSubProjectsById(this.ParentId); + //if (sub.DivisionLevel == 1) + //{ + // newSubProjects.DivisionLevel = 2; + //} + //else if (sub.DivisionLevel==2) + //{ newSubProjects.DivisionLevel = 3; - } + //} newSubProjects.DivisionId = SQLHelper.GetNewID(typeof(Model.Division_SubProjects)); this.DivisionId = newSubProjects.DivisionId; BLL.SubProjectsService.AddSubProjects(newSubProjects); diff --git a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml index c90f11c5..cefc9ef0 100644 --- a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml +++ b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml @@ -8,9 +8,10 @@ - + + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 6e92da83..49c9e2ca 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -19101,8 +19101,6 @@ namespace Model private EntitySet _JDGL_QuantityList; - private EntitySet _ProcessControl_InspectionManagement; - private EntitySet _WBS_Division; #region 可扩展性方法定义 @@ -19137,7 +19135,6 @@ namespace Model this._DataBase_StartWorkReport = new EntitySet(new Action(this.attach_DataBase_StartWorkReport), new Action(this.detach_DataBase_StartWorkReport)); this._Doc_DocManage = new EntitySet(new Action(this.attach_Doc_DocManage), new Action(this.detach_Doc_DocManage)); this._JDGL_QuantityList = new EntitySet(new Action(this.attach_JDGL_QuantityList), new Action(this.detach_JDGL_QuantityList)); - this._ProcessControl_InspectionManagement = new EntitySet(new Action(this.attach_ProcessControl_InspectionManagement), new Action(this.detach_ProcessControl_InspectionManagement)); this._WBS_Division = new EntitySet(new Action(this.attach_WBS_Division), new Action(this.detach_WBS_Division)); OnCreated(); } @@ -19430,19 +19427,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ProcessControl_InspectionManagement_Base_CNProfessional", Storage="_ProcessControl_InspectionManagement", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")] - public EntitySet ProcessControl_InspectionManagement - { - get - { - return this._ProcessControl_InspectionManagement; - } - set - { - this._ProcessControl_InspectionManagement.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_Division_Base_CNProfessional", Storage="_WBS_Division", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")] public EntitySet WBS_Division { @@ -19668,18 +19652,6 @@ namespace Model entity.Base_CNProfessional = null; } - private void attach_ProcessControl_InspectionManagement(ProcessControl_InspectionManagement entity) - { - this.SendPropertyChanging(); - entity.Base_CNProfessional = this; - } - - private void detach_ProcessControl_InspectionManagement(ProcessControl_InspectionManagement entity) - { - this.SendPropertyChanging(); - entity.Base_CNProfessional = null; - } - private void attach_WBS_Division(WBS_Division entity) { this.SendPropertyChanging(); @@ -286737,8 +286709,6 @@ namespace Model private string _ChildBranch; - private EntityRef _Base_CNProfessional; - private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -286805,7 +286775,6 @@ namespace Model public ProcessControl_InspectionManagement() { - this._Base_CNProfessional = default(EntityRef); this._Base_Project = default(EntityRef); this._Base_Unit = default(EntityRef); this._Sys_User = default(EntityRef); @@ -286893,10 +286862,6 @@ namespace Model { if ((this._CNProfessionalId != value)) { - if (this._Base_CNProfessional.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnCNProfessionalIdChanging(value); this.SendPropertyChanging(); this._CNProfessionalId = value; @@ -287314,40 +287279,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ProcessControl_InspectionManagement_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] - public Base_CNProfessional Base_CNProfessional - { - get - { - return this._Base_CNProfessional.Entity; - } - set - { - Base_CNProfessional previousValue = this._Base_CNProfessional.Entity; - if (((previousValue != value) - || (this._Base_CNProfessional.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Base_CNProfessional.Entity = null; - previousValue.ProcessControl_InspectionManagement.Remove(this); - } - this._Base_CNProfessional.Entity = value; - if ((value != null)) - { - value.ProcessControl_InspectionManagement.Add(this); - this._CNProfessionalId = value.CNProfessionalId; - } - else - { - this._CNProfessionalId = default(string); - } - this.SendPropertyChanged("Base_CNProfessional"); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ProcessControl_InspectionManagement_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project {