diff --git a/HJGL/.vs/HJGL/v17/.suo b/HJGL/.vs/HJGL/v17/.suo index c930b27..ce5bfdc 100644 Binary files a/HJGL/.vs/HJGL/v17/.suo and b/HJGL/.vs/HJGL/v17/.suo differ diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx index 59e7343..f900181 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx @@ -3,7 +3,7 @@ - 热处理委托及数据录入 + PMI处理委托 @@ -12,7 +12,7 @@ @@ -179,8 +179,8 @@ - diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx.cs index e8d8c56..b173156 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; namespace FineUIPro.Web.WeldingProcess.PMI { @@ -280,8 +281,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI { this.SetTextTemp(); string window = String.Format("PMIDelegationEdit.aspx", string.Empty, "新增 - ") ; - PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.PMIDelegationId) - + Window1.GetShowReference(window)); + PageContext.RegisterStartupScript(Window2.GetSaveStateReference(this.PMIDelegationId) + + Window2.GetShowReference(window)); } else { @@ -303,8 +304,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI if (trustManage != null) { string window = String.Format("PMIDelegationEdit.aspx?PMIDelegationId={0}", this.PMIDelegationId, "编辑 - "); - PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.PMIDelegationId) - + Window1.GetShowReference(window)); + PageContext.RegisterStartupScript(Window2.GetSaveStateReference(this.PMIDelegationId) + + Window2.GetShowReference(window)); } else { diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx.designer.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx.designer.cs index 688c98f..59cf686 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx.designer.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegation.aspx.designer.cs @@ -303,12 +303,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI protected global::FineUIPro.DropDownList ddlPageSize; /// - /// Window1 控件。 + /// Window2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Window Window1; + protected global::FineUIPro.Window Window2; } } diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx index a31a5ac..138bc7c 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx @@ -4,7 +4,7 @@ - 编辑热处理委托及数据录入 + 编辑PMI处理委托 @@ -14,8 +14,8 @@ + Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="<%$ Resources:Lan,PMIDelegationTrust %>" + TitleToolTip="<%$ Resources:Lan,PMIDelegationTrust %>" AutoScroll="true"> diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx.cs index e418624..51470fe 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDelegationEdit.aspx.cs @@ -196,7 +196,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI } ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.PMIDelegationId)); + PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.PMIDelegationId) + + ActiveWindow.GetHideReference()); } else { @@ -326,10 +327,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI var item = GetHotProessTrustItem.FirstOrDefault(x => x.WeldJointId == rowID); if (item != null) { - if (string.IsNullOrEmpty(this.PMIDelegationId)) //新增记录可直接删除 - { - GetHotProessTrustItem.Remove(item); - } + GetHotProessTrustItem.Remove(item); } } BindGrid(GetHotProessTrustItem); diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMISelectList.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMISelectList.aspx.cs index a2e1580..1693b43 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMISelectList.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMISelectList.aspx.cs @@ -120,31 +120,52 @@ namespace FineUIPro.Web.WeldingProcess.PMI /// private void BindGrid() { - string sql = @"SELECT WeldJointId,ProjectId,PipelineId,WeldJointCode,WPQCode,DetectionType, - convert(int,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJointNo, - dbo.Fun_GetParseString(WeldJointCode) AS PreJotNo, - PipingClassCode,PipeSegment,JointAttribute,PageNum, - ComponentsCode1,ComponentsCode2,Is_hjName,IsHotProessStr,Material1Code,Material2Code, - WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode, - WeldingMethodCode,WeldSilkId,WeldMatCode,WeldingDate,WeldingDailyCode,DoneDin, - BackingWelderCode,CoverWelderCode,SystemNumber,TestPackageNo,Remark, - MaterialCode,WeldingDate, - (CASE WHEN IsCancel=1 THEN '是' ELSE '否' END) AS IsCancel,isPMI - FROM View_Pipeline_WeldJoint WHERE isPMI=1 "; + var listData = (from a in Funs.DB.PMI_Delegation.AsQueryable() + join + b in Funs.DB.PMI_DelegationDetails.AsQueryable() on + a.Id equals b.PMIId + select b.JointId + ).Distinct().ToList(); - List paramsList = new List(); + // string sql = @"SELECT WeldJointId,ProjectId,PipelineId,WeldJointCode,WPQCode,DetectionType, + // convert(int,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJointNo, + //dbo.Fun_GetParseString(WeldJointCode) AS PreJotNo, + // PipingClassCode,PipeSegment,JointAttribute,PageNum, + // ComponentsCode1,ComponentsCode2,Is_hjName,IsHotProessStr,Material1Code,Material2Code, + // WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode, + // WeldingMethodCode,WeldSilkId,WeldMatCode,WeldingDate,WeldingDailyCode,DoneDin, + // BackingWelderCode,CoverWelderCode,SystemNumber,TestPackageNo,Remark, + // MaterialCode,WeldingDate, + // (CASE WHEN IsCancel=1 THEN '是' ELSE '否' END) AS IsCancel,isPMI + // FROM View_Pipeline_WeldJoint WHERE isPMI=1 "; + + + // List paramsList = new List(); + // if (!string.IsNullOrEmpty(this.txtJointNo.Text)) + // { + // sql += @" and WeldJointCode=@WeldJointCode"; + // paramsList.Add(new SqlParameter("@WeldJointCode", txtJointNo.Text.Trim())); + // } + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // sql += @" and PipelineId=@PipelineId "; + // paramsList.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID)); + // } + // var dt = SQLHelper.GetDataTableRunText(sql, paramsList.ToArray()); + var query = Funs.DB.View_Pipeline_WeldJoint.Where(t => t.IsPMI == true); + if (listData.Count > 0) + { + query = query.Where(t => !listData.Contains(t.WeldJointId)); + } if (!string.IsNullOrEmpty(this.txtJointNo.Text)) { - sql += @" and WeldJointCode=@WeldJointCode"; - paramsList.Add(new SqlParameter("@WeldJointCode", txtJointNo.Text.Trim())); + query = query.Where(t => t.WeldJointCode == this.txtJointNo.Text); } if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { - sql += @" and PipelineId=@PipelineId "; - paramsList.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID)); + query = query.Where(t => t.PipelineId == this.tvControlItem.SelectedNodeID); } - var dt = SQLHelper.GetDataTableRunText(sql, paramsList.ToArray()); - Grid1.DataSource = dt; + Grid1.DataSource = query.ToList(); Grid1.DataBind(); } #endregion