From 9c93de0cc6fa3c1918f16a1c2c7071ca1919795f Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Tue, 10 Feb 2026 14:57:34 +0800 Subject: [PATCH] =?UTF-8?q?20260210=20=E5=B7=A5=E4=B8=9A=E7=AE=A1=E9=81=93?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E6=B1=87=E6=80=BB=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...trialPipelineInstallationSummaryService.cs | 16 +- .../Fastreport/JGZL/压力管道安装汇总表.frx | 8 +- .../Fastreport/JGZL/压力管道安装质量证明.frx | 7 +- .../JGZL/DocumentDescription.aspx.cs | 16 +- ...ipelineInstallationQualityCertificate.aspx | 7 + ...lineInstallationQualityCertificate.aspx.cs | 14 +- ...llationQualityCertificate.aspx.designer.cs | 27 ++ ...IndustrialPipelineInstallationSummary.aspx | 146 ++++--- ...ustrialPipelineInstallationSummary.aspx.cs | 412 ++++++++++++------ ...pelineInstallationSummary.aspx.designer.cs | 279 ++++++++++-- 10 files changed, 694 insertions(+), 238 deletions(-) diff --git a/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationSummaryService.cs b/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationSummaryService.cs index 7de9137..a5427e8 100644 --- a/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationSummaryService.cs +++ b/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationSummaryService.cs @@ -1,4 +1,5 @@ using Model; +using System.Collections.Generic; using System.Linq; namespace BLL @@ -18,6 +19,11 @@ namespace BLL return Funs.DB.JGZL_IndustrialPipelineInstallationSummary.FirstOrDefault(e => e.SummaryId == Id); } + public static List GetIndustrialPipelineInstallationSummaryByProjectId(string projectId) + { + return (from x in Funs.DB.JGZL_IndustrialPipelineInstallationSummary where x.ProjectId == projectId select x).ToList(); + } + /// /// 添加工业管道安装汇总表 /// @@ -103,16 +109,16 @@ namespace BLL } /// - /// 根据主键删除工业管道安装汇总表 + /// 根据项目Id删除工业管道安装汇总表 /// /// - public static void DeleteIndustrialPipelineInstallationSummaryById(string Id) + public static void DeleteIndustrialPipelineInstallationSummaryByProjectId(string projectId) { SGGLDB db = Funs.DB; - Model.JGZL_IndustrialPipelineInstallationSummary model = db.JGZL_IndustrialPipelineInstallationSummary.FirstOrDefault(e => e.SummaryId == Id); - if (model != null) + var q = (from x in db.JGZL_IndustrialPipelineInstallationSummary where x.ProjectId == projectId select x).ToList(); + if (q.Count>0) { - db.JGZL_IndustrialPipelineInstallationSummary.DeleteOnSubmit(model); + db.JGZL_IndustrialPipelineInstallationSummary.DeleteAllOnSubmit(q); db.SubmitChanges(); } } diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表.frx index 61eae3c..2657bcf 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -75,7 +75,7 @@ namespace FastReport - + @@ -212,8 +212,8 @@ namespace FastReport - - + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx index 73b9009..9972f07 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx @@ -1,7 +1,7 @@  - + - + @@ -21,6 +21,7 @@ + @@ -96,7 +97,7 @@ - + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs index 44a5f96..3843e06 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs @@ -118,10 +118,24 @@ namespace FineUIPro.Web.JGZL } #endregion - + /// + /// 清空文本 + /// + private void EmptyText() + { + txtProjectOverview.Text = string.Empty; + txtCompilationBasis.Text = string.Empty; + txtConstructionUnit.Text = string.Empty; + txtDesigningUnit.Text = string.Empty; + txtTestingUnit.Text = string.Empty; + txtConstructionCompany.Text = string.Empty; + txtMainContent.Text = string.Empty; + txtCopiesNum.Text = string.Empty; + } private void PageData() { + EmptyText(); string projectId = this.tvControlItem.SelectedNodeID; if (!string.IsNullOrEmpty(projectId)) { diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx index 82a0076..34bfec5 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx @@ -108,6 +108,13 @@ + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs index 4df42c1..4dc531d 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs @@ -82,6 +82,7 @@ namespace FineUIPro.Web.JGZL txtInstallationInspection.Text = string.Empty; txtConstructionUnit.Text = string.Empty; txtSpecialEquipmentProductionLicenseCode.Text = string.Empty; + txtRemark.Text = string.Empty; } private void PageData() @@ -144,12 +145,21 @@ namespace FineUIPro.Web.JGZL { this.txtConstructionUnit.Text = "浙江石油化工有限公司"; } + if (!string.IsNullOrEmpty(report.Remark)) + { + this.txtRemark.Text = report.Remark; + } + else + { + this.txtRemark.Text = "GB50517-2023"; + } } else { this.txtInstallationInspection.Text = "浙江省特种设备研究院"; this.txtConstructionUnit.Text = "浙江石油化工有限公司"; this.txtSpecialEquipmentProductionLicenseCode.Text = "TS3833339-2028"; + this.txtRemark.Text = "GB50517-2023"; } } } @@ -339,6 +349,7 @@ namespace FineUIPro.Web.JGZL dt.Columns.Add("InstallationInspection"); dt.Columns.Add("ConstructionUnit"); dt.Columns.Add("SpecialEquipmentProductionLicenseCode"); + dt.Columns.Add("Remark"); var newRow = dt.NewRow(); newRow["CertificateCode"] = report.CertificateCode; @@ -361,6 +372,7 @@ namespace FineUIPro.Web.JGZL newRow["InstallationInspection"] = report.InstallationInspection; newRow["ConstructionUnit"] = report.ConstructionUnit; newRow["SpecialEquipmentProductionLicenseCode"] = report.SpecialEquipmentProductionLicenseCode; + newRow["Remark"] = report.Remark; dt.Rows.Add(newRow); BLL.Common.FastReportService.AddFastreportTable(dt); @@ -575,7 +587,7 @@ namespace FineUIPro.Web.JGZL newReport.LosslessTestingAgency = this.txtLosslessTestingAgency.Text.Trim(); //newReport.SupervisoryAndInspectionAgency = this.txtSupervisoryAndInspectionAgency.Text.Trim(); newReport.ConstructionUnit = this.txtConstructionUnit.Text.Trim(); - //newReport.Remark = this.txtRemark.Text.Trim(); + newReport.Remark = this.txtRemark.Text.Trim(); //newReport.DesignLicenseCode = this.txtDesignLicenseCode.Text.Trim(); //newReport.QualificationCertificateCode = this.txtQualificationCertificateCode.Text.Trim(); //newReport.InstitutionalApprovalCertificate = this.txtInstitutionalApprovalCertificate.Text.Trim(); diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.designer.cs index db33d86..9c6fb3e 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.designer.cs @@ -230,6 +230,33 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.TextBox txtConstructionUnit; + /// + /// lblRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblRemark; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// lbld 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbld; + /// /// txtSpecialEquipmentProductionLicenseCode 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx index e0b2add..c2de478 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx @@ -10,6 +10,8 @@
+ <%-- 隐藏域存储Grid的ClientID,避免JS代码块冲突 --%> + + @@ -47,98 +50,159 @@ + runat="server" BoxFlex="1" DataKeyNames="SummaryId" EnableColumnLines="true" + AllowCellEditing="true" ClicksToEdit="1" DataIDField="SummaryId" AllowSorting="true" + SortDirection="ASC" OnSort="Grid1_Sort" OnPreDataBound="Grid1_PreDataBound" + AllowPaging="false" IsDatabasePaging="true" PageSize="10000" + EnableTextSelection="True" AutoScroll="true"> + + + + + + + + + - - - - - - - - <%-- + + + + + FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="160px"> + + + - + - + + + + + FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px"> + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - --%> - <%-- - --%> + + + + + + - - - @@ -157,30 +221,10 @@ - - - - - - - - diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs index 1bebf4b..df3170a 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs @@ -8,11 +8,62 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; +using Newtonsoft.Json.Linq; +using System.Web.Services; +using Org.BouncyCastle.Asn1.IsisMtt; +using Model; namespace FineUIPro.Web.JGZL { public partial class IndustrialPipelineInstallationSummary : PageBase { + #region 定义项 + /// + /// 主键 + /// + private string SummaryId + { + get + { + return (string)ViewState["SummaryId"]; + } + set + { + ViewState["SummaryId"] = value; + } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + + /// + /// 外键—CertificateId + /// + public string CertificateId + { + get + { + return (string)ViewState["CertificateId"]; + } + set + { + ViewState["CertificateId"] = value; + } + } + #endregion + #region 加载页面 /// /// 加载页面 @@ -34,7 +85,73 @@ namespace FineUIPro.Web.JGZL this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.InitTreeMenu();//加载树 this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; - this.BindGrid(); + + //获取下拉选择项本项目下所有工业管道安装质量证明书信息 + IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.tvControlItem.SelectedNodeID, false); + if (!string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue) && this.drpCertificateCode.SelectedValue != BLL.Const._Null) + { + this.CertificateId = this.drpCertificateCode.SelectedValue; + var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(this.CertificateId); + if (certificate != null) + { + this.txtDeliveryUnit.Text = certificate.DeliveryUnit; + this.txtDeliveryUnitCode.Text = certificate.DeliveryUnitCode; + } + } + + var summary = BLL.IndustrialPipelineInstallationSummaryService.GetIndustrialPipelineInstallationSummaryByProjectId(this.tvControlItem.SelectedNodeID); + if (summary.Count > 0) + { + this.BindGrid(); + } + else + { + JArray teamGroupData = Grid1.GetMergedData(); + List list = new List(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + list.Add(values); + } + + JObject defaultObj = new JObject + { + { "SummaryId", Guid.NewGuid() }, + { "CertificateId", CertificateId }, + { "PipelineCode", "" }, + { "PipelineLevel", "" }, + { "PipelineStartPoint", "" }, + { "PipelineEndPoint", "" }, + { "DesignPressure", "" }, + { "DesignTemperature", "" }, + { "Medium", "" }, + { "Material", "" }, + { "Specifications", "" }, + { "Length", "" }, + { "LayingMethod", "" }, + { "WeldsNum", "" }, + { "LosslessRatio", "" }, + { "VoltageResistantTestMedium", "" }, + { "VoltageResistantTestPressure", "" }, + { "LeakageTestMedium", "" }, + { "LeakageTestPressure", "" }, + { "CleaningMethod", "" }, + { "CorrosionControlMethod", "" }, + { "InsulationMethod", "" }, + { "OperatingTemperature", "" }, + { "VoltageResistantTestDate", "" }, + { "LeakageTestDate", "" }, + { "Remark", "" }, + { + "Delete3", + String.Format("", + GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete)) + } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); + } } } #endregion @@ -93,27 +210,19 @@ namespace FineUIPro.Web.JGZL /// private void BindGrid() { - //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); - string strSql = @"SELECT tbb.CertificateCode,tbb.DeliveryUnit,tbb.DeliveryUnitCode,tba.* - FROM JGZL_IndustrialPipelineInstallationSummary AS tba - LEFT JOIN JGZL_IndustrialPipelineInstallationQualityCertificate AS tbb ON tbb.CertificateId=tba.CertificateId + string strSql = @"SELECT * + FROM JGZL_IndustrialPipelineInstallationSummary WHERE 1=1 "; List listStr = new List(); if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { - strSql += " AND tba.ProjectId = @ProjectId"; + strSql += " AND ProjectId = @ProjectId"; listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); - } - //else - //{ - // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; - // listStr.Add(new SqlParameter("@ProjectId", projectIds)); - //} + } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); // 2.获取当前分页数据 Grid1.RecordCount = tb.Rows.Count; - //tb = GetFilteredTable(Grid1.FilteredData, tb); var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); @@ -239,7 +348,7 @@ namespace FineUIPro.Web.JGZL { var newRow = dt.NewRow(); newRow["Num"] = (i + 1).ToString(); - newRow["PipelineCode"] = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(row["PipelineCode"].ToString()).ISO_IsoNo; + newRow["PipelineCode"] = row["PipelineCode"].ToString(); newRow["PipelineLevel"] = row["PipelineLevel"].ToString(); newRow["DesignPressure"] = row["DesignPressure"].ToString(); newRow["DesignTemperature"] = row["DesignTemperature"].ToString(); @@ -275,14 +384,14 @@ namespace FineUIPro.Web.JGZL string deliveryUnitCode = string.Empty; string certificateId = rows[0]["CertificateId"].ToString(); var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(certificateId); - if (certificate!=null) + if (certificate != null) { certificateCode = certificate.CertificateCode; - deliveryUnit=certificate.DeliveryUnit; + deliveryUnit = certificate.DeliveryUnit; deliveryUnitCode = certificate.DeliveryUnitCode; } Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("CertificateCode", certificateCode); + keyValuePairs.Add("CertificateCode", certificateCode); keyValuePairs.Add("DeliveryUnit", deliveryUnit); keyValuePairs.Add("DeliveryUnitCode", deliveryUnitCode); BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); @@ -311,7 +420,53 @@ namespace FineUIPro.Web.JGZL { if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationSummaryEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + JArray teamGroupData = Grid1.GetMergedData(); + List list = new List(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + list.Add(values); + } + + JObject defaultObj = new JObject + { + { "SummaryId", Guid.NewGuid() }, + { "CertificateId", this.drpCertificateCode.SelectedValue }, + { "ProjectId", this.tvControlItem.SelectedNodeID }, + { "PipelineCode", "" }, + { "PipelineLevel", "" }, + { "PipelineStartPoint", "" }, + { "PipelineEndPoint", "" }, + { "DesignPressure", "" }, + { "DesignTemperature", "" }, + { "Medium", "" }, + { "Material", "" }, + { "Specifications", "" }, + { "Length", "" }, + { "LayingMethod", "" }, + { "WeldsNum", "" }, + { "LosslessRatio", "" }, + { "VoltageResistantTestMedium", "" }, + { "VoltageResistantTestPressure", "" }, + { "LeakageTestMedium", "" }, + { "LeakageTestPressure", "" }, + { "CleaningMethod", "" }, + { "CorrosionControlMethod", "" }, + { "InsulationMethod", "" }, + { "OperatingTemperature", "" }, + { "VoltageResistantTestDate", "" }, + { "LeakageTestDate", "" }, + { "Remark", "" }, + { + "Delete3", + String.Format("", + GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete)) + } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationSummaryEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); } else { @@ -320,139 +475,122 @@ namespace FineUIPro.Web.JGZL } } - /// - /// 双击编辑 - /// - /// - /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + protected void Grid1_PreDataBound(object sender, EventArgs e) { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_IndustrialPipelineInstallationSummaryMenuId, BLL.Const.BtnModify)) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationSummaryEdit.aspx?summaryId={0}", this.Grid1.SelectedRowID, "编辑 - "))); - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } - else - { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } + // 设置LinkButtonField的点击客户端事件 + LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField; + deleteField.OnClientClick = GetDeleteScriptGrid1(); } /// - /// 右键编辑 - /// - /// - /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_IndustrialPipelineInstallationSummaryMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationSummaryEdit.aspx?summaryId={0}", Grid1.SelectedRowID, "维护 - "))); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } - - /// - /// 右键删除 - /// - /// - /// - protected void btnMenuDelete_Click(object sender, EventArgs e) - { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_IndustrialPipelineInstallationSummaryMenuId, Const.BtnDelete)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - - bool isShow = true; - if (Grid1.SelectedRowIndexArray.Length > 1) - { - isShow = false; - } - bool isDelete = false; - foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { - string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - if (judgementDelete(rowID, isShow)) - { - isDelete = true; - BLL.IndustrialPipelineInstallationSummaryService.DeleteIndustrialPipelineInstallationSummaryById(rowID); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工业管道安装汇总表"); - } - } - if (isDelete) - { - ShowNotify("删除成功!", MessageBoxIcon.Success); - } - this.BindGrid(); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } - - #region 判断是否可删除 - /// - /// 判断是否可以删除 + /// 删除提示 /// /// - private bool judgementDelete(string id, bool isShow) + private string GetDeleteScriptGrid1() { - string content = string.Empty; - - if (string.IsNullOrEmpty(content)) - { - return true; - } - else - { - if (isShow) - { - Alert.ShowInTop(content, MessageBoxIcon.Error); - } - return false; - } + return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question, + Grid1.GetDeleteSelectedRowsReference(), String.Empty); } - #endregion - #endregion + #endregion - #region 关闭弹出窗口及刷新页面 + #region 选择质量证明书编号 /// - /// 关闭弹出窗口 + /// 选择质量证明书编号 /// /// /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) + protected void drpCertificateCode_SelectedIndexChanged(object sender, EventArgs e) { - this.InitTreeMenu();//加载树 - this.BindGrid(); + this.txtDeliveryUnit.Text = string.Empty; + this.txtDeliveryUnitCode.Text = string.Empty; + if (!string.IsNullOrWhiteSpace(this.drpCertificateCode.SelectedValue)) + { + //this.CertificateId = this.drpCertificateCode.SelectedValue; + + #region 质量证明书 + var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(this.drpCertificateCode.SelectedValue); + if (certificate != null) + { + this.txtDeliveryUnit.Text = certificate.DeliveryUnit; + this.txtDeliveryUnitCode.Text = certificate.DeliveryUnitCode; + } + #endregion + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, + Const.JGZL_IndustrialPipelineInstallationSummaryMenuId, Const.BtnSave)) + { + saveItem(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + + void saveItem() + { + BLL.IndustrialPipelineInstallationSummaryService.DeleteIndustrialPipelineInstallationSummaryByProjectId(this.tvControlItem.SelectedNodeID); + List detailLists = new List(); + JArray teamGroupData = Grid1.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.JGZL_IndustrialPipelineInstallationSummary newDetail = new Model.JGZL_IndustrialPipelineInstallationSummary + { + SummaryId = values.Value("SummaryId"), + ProjectId = this.tvControlItem.SelectedNodeID, + CertificateId = this.drpCertificateCode.SelectedValue, + PipelineCode = values.Value("PipelineCode"), + PipelineLevel = values.Value("PipelineLevel"), + PipelineStartPoint = values.Value("PipelineStartPoint"), + PipelineEndPoint = values.Value("PipelineEndPoint"), + DesignPressure = values.Value("DesignPressure"), + DesignTemperature = values.Value("DesignTemperature"), + Medium = values.Value("Medium"), + Material = values.Value("Material"), + Specifications = values.Value("Specifications"), + Length = values.Value("Length"), + LayingMethod = values.Value("LayingMethod"), + WeldsNum = values.Value("WeldsNum"), + LosslessRatio = values.Value("LosslessRatio"), + VoltageResistantTestMethod = values.Value("VoltageResistantTestMethod"), + VoltageResistantTestMedium = values.Value("VoltageResistantTestMedium"), + VoltageResistantTestPressure = values.Value("VoltageResistantTestPressure"), + LeakageTestMedium = values.Value("LeakageTestMedium"), + LeakageTestPressure = values.Value("LeakageTestPressure"), + CleaningMethod = values.Value("CleaningMethod"), + CorrosionControlMethod = values.Value("CorrosionControlMethod"), + InsulationMethod = values.Value("InsulationMethod"), + }; + detailLists.Add(newDetail); + } + try + { + if (detailLists.Count > 0) + { + Funs.DB.JGZL_IndustrialPipelineInstallationSummary.InsertAllOnSubmit(detailLists); + } + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } } #endregion } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.designer.cs index c25bb36..74d8a50 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.designer.cs @@ -32,6 +32,15 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.PageManager PageManager1; + /// + /// hidGridClientID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.HiddenField hidGridClientID; + /// /// Panel1 控件。 /// @@ -113,6 +122,15 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Button btnAdd; + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + /// /// btnPrint 控件。 /// @@ -131,6 +149,231 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.Grid Grid1; + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// drpCertificateCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCertificateCode; + + /// + /// txtDeliveryUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDeliveryUnit; + + /// + /// txtDeliveryUnitCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDeliveryUnitCode; + + /// + /// txtIsoNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIsoNo; + + /// + /// txtPipelineLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineLevel; + + /// + /// txtPipelineStartPoint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineStartPoint; + + /// + /// txtPipelineEndPoint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineEndPoint; + + /// + /// txtDesignPressure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDesignPressure; + + /// + /// txtDesignTemperature 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDesignTemperature; + + /// + /// txtMedium 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMedium; + + /// + /// txtMaterial 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMaterial; + + /// + /// txtSpecifications 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSpecifications; + + /// + /// txtLength 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLength; + + /// + /// txtLayingMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLayingMethod; + + /// + /// txtWeldsNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWeldsNum; + + /// + /// txtLosslessRatio 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLosslessRatio; + + /// + /// txtVoltageResistantTestMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVoltageResistantTestMethod; + + /// + /// txtVoltageResistantTestMedium 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVoltageResistantTestMedium; + + /// + /// txtVoltageResistantTestPressure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVoltageResistantTestPressure; + + /// + /// txtLeakageTestMedium 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLeakageTestMedium; + + /// + /// txtLeakageTestPressure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLeakageTestPressure; + + /// + /// txtCleaningMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCleaningMethod; + + /// + /// txtCorrosionControlMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCorrosionControlMethod; + + /// + /// txtInsulationMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInsulationMethod; + /// /// ToolbarSeparator1 控件。 /// @@ -158,15 +401,6 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.DropDownList ddlPageSize; - /// - /// Window1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window1; - /// /// WindowPrint 控件。 /// @@ -175,32 +409,5 @@ namespace FineUIPro.Web.JGZL /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowPrint; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; } }