diff --git a/HJGL_DS/BLL/JGZL/SpecialEquipmentMaintenanceService.cs b/HJGL_DS/BLL/JGZL/SpecialEquipmentMaintenanceService.cs index fa905da..7f9e1cf 100644 --- a/HJGL_DS/BLL/JGZL/SpecialEquipmentMaintenanceService.cs +++ b/HJGL_DS/BLL/JGZL/SpecialEquipmentMaintenanceService.cs @@ -18,11 +18,21 @@ namespace BLL return Funs.DB.JGZL_SpecialEquipmentMaintenance.FirstOrDefault(e => e.MaintenanceId == maintenanceId); } - /// - /// 增加特种设备安装改造维修告知书 - /// - /// - public static void AddSpecialEquipmentMaintenance(Model.JGZL_SpecialEquipmentMaintenance maintenance) + /// + /// 根据项目Id获取设备安装改造维修告知书 + /// + /// + /// + public static Model.JGZL_SpecialEquipmentMaintenance GetSpecialEquipmentMaintenanceByProjectId(string projectId) + { + return Funs.DB.JGZL_SpecialEquipmentMaintenance.FirstOrDefault(e => e.MaintenanceId == projectId); + } + + /// + /// 增加特种设备安装改造维修告知书 + /// + /// + public static void AddSpecialEquipmentMaintenance(Model.JGZL_SpecialEquipmentMaintenance maintenance) { SGGLDB db = Funs.DB; Model.JGZL_SpecialEquipmentMaintenance newMaintenance = new Model.JGZL_SpecialEquipmentMaintenance(); diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/交工技术文件说明.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/交工技术文件说明.frx index 6eae90a..a730338 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/交工技术文件说明.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/交工技术文件说明.frx @@ -1,5 +1,27 @@  - + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + } +} + @@ -26,7 +48,7 @@ - + @@ -55,20 +77,20 @@ - - + + - - + + - - + + - - + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx index 4eea0e5..b1918b7 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx @@ -1,7 +1,7 @@  - + - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/特种设备安装改造维修告知书.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/特种设备安装改造维修告知书.frx index 4cf7e25..977cc72 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/特种设备安装改造维修告知书.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/特种设备安装改造维修告知书.frx @@ -1,7 +1,7 @@  - + - + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs index 4295614..e7c3d79 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/AcceptanceCertificate.aspx.cs @@ -164,7 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.cs index d92d1e8..a380f4d 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/AnticorrosionEngineeringInspectionRecord.aspx.cs @@ -175,7 +175,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/BlowingCleaning.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/BlowingCleaning.aspx.cs index f1669f5..ee39e1d 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/BlowingCleaning.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/BlowingCleaning.aspx.cs @@ -164,7 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.cs index 2a74025..c9f1fb4 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/CommencementReport.aspx.cs @@ -166,7 +166,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ConDrawingVerification.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/ConDrawingVerification.aspx.cs index d9cec4b..332c838 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/ConDrawingVerification.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/ConDrawingVerification.aspx.cs @@ -164,7 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ConcealedWorksInspectionRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/ConcealedWorksInspectionRecord.aspx.cs index e2f51aa..3940e43 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/ConcealedWorksInspectionRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/ConcealedWorksInspectionRecord.aspx.cs @@ -164,8 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); - this.BindGrid(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs index daf3ea6..18fc44a 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/Contact.aspx.cs @@ -164,7 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/Cover.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/Cover.aspx.cs index 610baaa..85052b9 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/Cover.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/Cover.aspx.cs @@ -118,7 +118,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } #endregion diff --git a/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs index 0ae6796..44a5f96 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/DocumentDescription.aspx.cs @@ -112,7 +112,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + PageData(); } #endregion diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ElectrostaticGrounding.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/ElectrostaticGrounding.aspx.cs index ed8a73f..a53b9f3 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/ElectrostaticGrounding.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/ElectrostaticGrounding.aspx.cs @@ -188,7 +188,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/FileDirectory.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/FileDirectory.aspx.cs index 1de6f8c..9502f3a 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/FileDirectory.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/FileDirectory.aspx.cs @@ -157,7 +157,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } #endregion diff --git a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs index 75f1b94..6a53185 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/HandoverCertificate.aspx.cs @@ -164,7 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs index 5cf046b..dfb6455 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs @@ -164,8 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); - this.BindGrid(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs index 7085efb..e85896f 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs @@ -167,8 +167,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); - this.BindGrid(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/LeakTestOfPipelineSystemRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/LeakTestOfPipelineSystemRecord.aspx.cs index 1b6c623..7affa70 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/LeakTestOfPipelineSystemRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/LeakTestOfPipelineSystemRecord.aspx.cs @@ -175,7 +175,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.cs index 00962cf..1e2631e 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/MaterialIdentificationInspectionRecord.aspx.cs @@ -179,7 +179,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/MeasuringInstruments.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/MeasuringInstruments.aspx.cs index 179467c..d52c212 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/MeasuringInstruments.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/MeasuringInstruments.aspx.cs @@ -164,7 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.cs index 1dc5240..2de737c 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/NDTPerson.aspx.cs @@ -164,7 +164,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PipelineTotalTrust.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/PipelineTotalTrust.aspx.cs index bb08a92..f5286af 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PipelineTotalTrust.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/PipelineTotalTrust.aspx.cs @@ -176,6 +176,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PipelineWeldJointTrust.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/PipelineWeldJointTrust.aspx.cs index 01bdf66..8d182e7 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PipelineWeldJointTrust.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/PipelineWeldJointTrust.aspx.cs @@ -174,6 +174,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.cs index a11a49c..5c5eefb 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.cs @@ -176,6 +176,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemRecord.aspx.cs index bacf7a3..c32df50 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemRecord.aspx.cs @@ -176,6 +176,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/QualifiedWelder.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/QualifiedWelder.aspx.cs index 76191eb..45554c2 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/QualifiedWelder.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/QualifiedWelder.aspx.cs @@ -91,6 +91,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } #endregion diff --git a/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx b/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx index 7795c5e..21d13a4 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx @@ -39,14 +39,99 @@ - + + + <%----%> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- - + --%> - + --%> - + <%-- - + --%> - + --%> diff --git a/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.cs index 4a74dca..f6362d8 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.cs @@ -8,11 +8,29 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; +using FineUIPro.Web.common.BaseInfo; namespace FineUIPro.Web.JGZL { public partial class SpecialEquipmentMaintenance : PageBase { + #region 定义变量 + /// + /// 主键 + /// + private string MaintenanceId + { + get + { + return (string)ViewState["MaintenanceId"]; + } + set + { + ViewState["MaintenanceId"] = value; + } + } + #endregion + #region 加载页面 /// /// 加载页面 @@ -23,7 +41,7 @@ namespace FineUIPro.Web.JGZL { if (!IsPostBack) { - this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + //this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.drpProjectId.DataTextField = "ProjectCode"; this.drpProjectId.DataValueField = "ProjectId"; @@ -34,11 +52,154 @@ namespace FineUIPro.Web.JGZL this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.InitTreeMenu();//加载树 this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; - this.BindGrid(); + //this.BindGrid(); + PageData(); } } #endregion + private void PageData() + { + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + var pro = BLL.Base_ProjectService.GetProjectByProjectId(projectId); + if (pro != null) + { + var report = BLL.SpecialEquipmentMaintenanceService.GetSpecialEquipmentMaintenanceByProjectId(projectId); + if (report != null) + { + this.MaintenanceId = report.MaintenanceId; + if (!string.IsNullOrEmpty(report.MaintenanceCode)) + { + this.txtMaintenanceCode.Text = report.MaintenanceCode; + } + else + { + this.txtMaintenanceCode.Text = "0XXX-91330921MA2A2R3F6G-2026"; + } + if (!string.IsNullOrEmpty(report.ConUnit)) + { + this.txtConUnit.Text = report.ConUnit; + } + else + { + this.txtConUnit.Text = "浙江鼎盛石化工程有限公司"; + } + if (!string.IsNullOrEmpty(report.EquipmentName)) + { + this.txtEquipmentName.Text = report.EquipmentName; + } + else + { + this.txtEquipmentName.Text = "压力管道(" + pro.ProjectName + ")"; + } + this.txtEquipmentModel.Text = report.EquipmentModel; + if (!string.IsNullOrEmpty(report.EquipmentCode)) + { + this.txtEquipmentCode.Text = report.EquipmentCode; + } + else + { + this.txtEquipmentCode.Text = "/"; + } + if (!string.IsNullOrEmpty(report.ManufacturingNumber)) + { + this.txtManufacturingNumber.Text = report.ManufacturingNumber; + } + else + { + this.txtManufacturingNumber.Text = "/"; + } + if (!string.IsNullOrEmpty(report.ManufacturingUnit)) + { + this.txtManufacturingUnit.Text = report.ManufacturingUnit; + } + else + { + this.txtManufacturingUnit.Text = "/"; + } + if (!string.IsNullOrEmpty(report.ManufacturingLicenseNumber)) + { + this.txtManufacturingLicenseNumber.Text = report.ManufacturingLicenseNumber; + } + else + { + this.txtManufacturingLicenseNumber.Text = "/"; + } + if (!string.IsNullOrEmpty(report.EquipmentLocation)) + { + this.txtEquipmentLocation.Text = report.EquipmentLocation; + } + else + { + this.txtEquipmentLocation.Text = pro.ProjectName; + } + this.txtConstructionDate.Text = report.ConstructionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.ConstructionDate) : string.Format("{0:yyyy-MM-dd}", pro.StartDate); + this.drpConstructionCategory.SelectedValue = report.ConstructionCategory; + if (!string.IsNullOrEmpty(report.LicenseNumber)) + { + this.txtLicenseNumber.Text = report.LicenseNumber; + } + else + { + this.txtLicenseNumber.Text = "TS3833339-2028"; + } + this.txtLicenseValidityDate.Text = report.LicenseValidityDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.LicenseValidityDate) : string.Format("{0:yyyy-MM-dd}", "2028-8-20"); + this.txtConContactMan.Text = report.ConContactMan; + this.txtConTelephone.Text = report.ConTelephone; + this.txtConFax.Text = report.ConFax; + if (!string.IsNullOrEmpty(report.ConAddress)) + { + this.txtConAddress.Text = report.ConAddress; + } + else + { + this.txtConAddress.Text = "浙江省舟山市岱山县经济技术开发区徐福大道988号810室(岱西片区)"; + } + this.txtConEmail.Text = report.ConEmail; + if (!string.IsNullOrEmpty(report.UseUnit)) + { + this.txtUseUnit.Text = report.UseUnit; + } + else + { + this.txtUseUnit.Text = "浙江石油化工有限公司"; + } + this.txtUseContactMan.Text = report.UseContactMan; + this.txtUseTelephone.Text = report.UseTelephone; + this.txtUseFax.Text = report.UseFax; + if (!string.IsNullOrEmpty(report.UseAddress)) + { + this.txtUseAddress.Text = report.UseAddress; + } + else + { + this.txtUseAddress.Text = "浙江省舟山市定海区临城街道翁山路555号大宗商品交易中心5201室(自贸试验区内)"; + } + this.txtUseEmail.Text = report.UseEmail; + } + else + { + this.txtMaintenanceCode.Text = "0XXX-91330921MA2A2R3F6G-2026"; + this.txtConUnit.Text = "浙江鼎盛石化工程有限公司"; + this.txtEquipmentCode.Text = "/"; + this.txtManufacturingNumber.Text = "/"; + this.txtManufacturingUnit.Text = "/"; + this.txtManufacturingLicenseNumber.Text = "/"; + this.txtEquipmentName.Text = "压力管道(" + pro.ProjectName + ")"; + this.txtEquipmentLocation.Text = pro.ProjectName; + this.txtConstructionDate.Text = pro.StartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", pro.StartDate) : ""; + this.txtLicenseNumber.Text = "TS3833339-2028"; + this.txtLicenseValidityDate.Text = string.Format("{0:yyyy-MM-dd}", "2028-8-20"); + this.txtConAddress.Text = "浙江省舟山市岱山县经济技术开发区徐福大道988号810室(岱西片区)"; + this.txtUseUnit.Text = "浙江石油化工有限公司"; + this.txtUseAddress.Text = "浙江省舟山市定海区临城街道翁山路555号大宗商品交易中心5201室(自贸试验区内)"; + } + } + } + } + #region 加载树项目 /// /// 加载树 @@ -82,7 +243,8 @@ namespace FineUIPro.Web.JGZL { if (this.tvControlItem.SelectedNodeID != "0") { - this.BindGrid(); + this.PageData(); + //this.BindGrid(); } } #endregion @@ -91,30 +253,30 @@ namespace FineUIPro.Web.JGZL /// /// 数据绑定 /// - private void BindGrid() - { - //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); - string strSql = @"SELECT * from JGZL_SpecialEquipmentMaintenance where 1=1"; - List listStr = new List(); - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - 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(); - } + //private void BindGrid() + //{ + // //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); + // string strSql = @"SELECT * from JGZL_SpecialEquipmentMaintenance where 1=1"; + // List listStr = new List(); + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // 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(); + //} #endregion #region 分页排序 @@ -124,10 +286,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) - { - BindGrid(); - } + //protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + //{ + // BindGrid(); + //} #endregion #region 排序 @@ -136,10 +298,10 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Grid1_Sort(object sender, GridSortEventArgs e) - { - BindGrid(); - } + //protected void Grid1_Sort(object sender, GridSortEventArgs e) + //{ + // BindGrid(); + //} #endregion #region 分页选择下拉改变事件 @@ -148,11 +310,11 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); - BindGrid(); - } + //protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + //{ + // Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + // BindGrid(); + //} #endregion #endregion @@ -164,7 +326,9 @@ namespace FineUIPro.Web.JGZL /// protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.InitTreeMenu(); + PageData(); } /// @@ -174,7 +338,7 @@ namespace FineUIPro.Web.JGZL /// protected void TextBox_TextChanged(object sender, EventArgs e) { - this.BindGrid(); + //this.BindGrid(); } #endregion @@ -186,88 +350,88 @@ namespace FineUIPro.Web.JGZL /// protected void btnPrint_Click(object sender, EventArgs e) { - string id = this.Grid1.SelectedRowID; - if (!string.IsNullOrEmpty(id)) + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) { string initTemplatePath = ""; string rootPath = Server.MapPath("~/"); BLL.Common.FastReportService.ResetData(); - var specialEquipmentMaintenance = BLL.SpecialEquipmentMaintenanceService.GetSpecialEquipmentMaintenance(id); - if (specialEquipmentMaintenance != null) + //var specialEquipmentMaintenance = BLL.SpecialEquipmentMaintenanceService.GetSpecialEquipmentMaintenanceByProjectId(projectId); + //if (specialEquipmentMaintenance != null) + //{ + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("MaintenanceCode"); + dt.Columns.Add("ConUnit"); + dt.Columns.Add("EquipmentName"); + dt.Columns.Add("EquipmentModel"); + dt.Columns.Add("EquipmentCode"); + dt.Columns.Add("ManufacturingNumber"); + dt.Columns.Add("ManufacturingUnit"); + dt.Columns.Add("ManufacturingLicenseNumber"); + dt.Columns.Add("EquipmentLocation"); + dt.Columns.Add("ConstructionDate"); + dt.Columns.Add("ConstructionCategory"); + dt.Columns.Add("LicenseNumber"); + dt.Columns.Add("LicenseValidityDate"); + dt.Columns.Add("ConContactMan"); + dt.Columns.Add("ConTelephone"); + dt.Columns.Add("ConFax"); + dt.Columns.Add("ConAddress"); + dt.Columns.Add("ConEmail"); + dt.Columns.Add("UseUnit"); + dt.Columns.Add("UseContactMan"); + dt.Columns.Add("UseTelephone"); + dt.Columns.Add("UseFax"); + dt.Columns.Add("UseAddress"); + dt.Columns.Add("UseEmail"); + + var newRow = dt.NewRow(); + newRow["MaintenanceCode"] = this.txtMaintenanceCode.Text; + newRow["ConUnit"] = this.txtConUnit.Text; + newRow["EquipmentName"] = this.txtEquipmentName.Text; + newRow["EquipmentModel"] = this.txtEquipmentModel.Text; + newRow["EquipmentCode"] = this.txtEquipmentCode.Text; + newRow["ManufacturingNumber"] = this.txtManufacturingNumber.Text; + newRow["ManufacturingUnit"] = this.txtManufacturingUnit.Text; + newRow["ManufacturingLicenseNumber"] = this.txtManufacturingLicenseNumber.Text; + newRow["EquipmentLocation"] = this.txtEquipmentLocation.Text; + string constructionDate = string.Format("{0:yyyy年MM月dd}", this.txtConstructionDate.Text); + newRow["ConstructionDate"] = constructionDate; + newRow["ConstructionCategory"] = this.drpConstructionCategory.SelectedText; + newRow["LicenseNumber"] = this.txtLicenseNumber.Text; + string licenseValidityDate = string.Format("{0:yyyy年MM月dd}", this.txtLicenseValidityDate.Text); + newRow["LicenseValidityDate"] = licenseValidityDate; + newRow["ConContactMan"] = this.txtConContactMan.Text; + newRow["ConTelephone"] = this.txtConTelephone.Text; + newRow["ConFax"] = this.txtConFax.Text; + newRow["ConAddress"] = this.txtConAddress.Text; + newRow["ConEmail"] = this.txtConEmail.Text; + newRow["UseUnit"] = this.txtUseUnit.Text; + newRow["UseContactMan"] = this.txtUseContactMan.Text; + newRow["UseTelephone"] = this.txtUseTelephone.Text; + newRow["UseFax"] = this.txtUseFax.Text; + newRow["UseAddress"] = this.txtUseAddress.Text; + newRow["UseEmail"] = this.txtUseEmail.Text; + + dt.Rows.Add(newRow); + BLL.Common.FastReportService.AddFastreportTable(dt); + + Dictionary keyValuePairs = new Dictionary(); + //keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\特种设备安装改造维修告知书.frx"; + if (File.Exists(rootPath + initTemplatePath)) { - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("MaintenanceCode"); - dt.Columns.Add("ConUnit"); - dt.Columns.Add("EquipmentName"); - dt.Columns.Add("EquipmentModel"); - dt.Columns.Add("EquipmentCode"); - dt.Columns.Add("ManufacturingNumber"); - dt.Columns.Add("ManufacturingUnit"); - dt.Columns.Add("ManufacturingLicenseNumber"); - dt.Columns.Add("EquipmentLocation"); - dt.Columns.Add("ConstructionDate"); - dt.Columns.Add("ConstructionCategory"); - dt.Columns.Add("LicenseNumber"); - dt.Columns.Add("LicenseValidityDate"); - dt.Columns.Add("ConContactMan"); - dt.Columns.Add("ConTelephone"); - dt.Columns.Add("ConFax"); - dt.Columns.Add("ConAddress"); - dt.Columns.Add("ConEmail"); - dt.Columns.Add("UseUnit"); - dt.Columns.Add("UseContactMan"); - dt.Columns.Add("UseTelephone"); - dt.Columns.Add("UseFax"); - dt.Columns.Add("UseAddress"); - dt.Columns.Add("UseEmail"); - - var newRow = dt.NewRow(); - newRow["MaintenanceCode"] = specialEquipmentMaintenance.MaintenanceCode; - newRow["ConUnit"] = specialEquipmentMaintenance.ConUnit; - newRow["EquipmentName"] = specialEquipmentMaintenance.EquipmentName; - newRow["EquipmentModel"] = specialEquipmentMaintenance.EquipmentModel; - newRow["EquipmentCode"] = specialEquipmentMaintenance.EquipmentCode; - newRow["ManufacturingNumber"] = specialEquipmentMaintenance.ManufacturingNumber; - newRow["ManufacturingUnit"] = specialEquipmentMaintenance.ManufacturingUnit; - newRow["ManufacturingLicenseNumber"] = specialEquipmentMaintenance.ManufacturingLicenseNumber; - newRow["EquipmentLocation"] = specialEquipmentMaintenance.EquipmentLocation; - string constructionDate = string.Format("{0:yyyy年MM月dd}", specialEquipmentMaintenance.ConstructionDate); - newRow["ConstructionDate"] = constructionDate; - newRow["ConstructionCategory"] = specialEquipmentMaintenance.ConstructionCategory; - newRow["LicenseNumber"] = specialEquipmentMaintenance.LicenseNumber; - string licenseValidityDate = string.Format("{0:yyyy年MM月dd}", specialEquipmentMaintenance.LicenseValidityDate); - newRow["LicenseValidityDate"] = licenseValidityDate; - newRow["ConContactMan"] = specialEquipmentMaintenance.ConContactMan; - newRow["ConTelephone"] = specialEquipmentMaintenance.ConTelephone; - newRow["ConFax"] = specialEquipmentMaintenance.ConFax; - newRow["ConAddress"] = specialEquipmentMaintenance.ConAddress; - newRow["ConEmail"] = specialEquipmentMaintenance.ConEmail; - newRow["UseUnit"] = specialEquipmentMaintenance.UseUnit; - newRow["UseContactMan"] = specialEquipmentMaintenance.UseContactMan; - newRow["UseTelephone"] = specialEquipmentMaintenance.UseTelephone; - newRow["UseFax"] = specialEquipmentMaintenance.UseFax; - newRow["UseAddress"] = specialEquipmentMaintenance.UseAddress; - newRow["UseEmail"] = specialEquipmentMaintenance.UseEmail; - - dt.Rows.Add(newRow); - BLL.Common.FastReportService.AddFastreportTable(dt); - - Dictionary keyValuePairs = new Dictionary(); - //keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); - BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\特种设备安装改造维修告知书.frx"; - if (File.Exists(rootPath + initTemplatePath)) - { - PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); - } + PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); } + //} } else { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); return; } } @@ -279,139 +443,139 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void btnAdd_Click(object sender, EventArgs e) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialEquipmentMaintenanceEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } + //protected void btnAdd_Click(object sender, EventArgs e) + //{ + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialEquipmentMaintenanceEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + // } + // else + // { + // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + // return; + // } + //} /// /// 双击编辑 /// /// /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_SpecialEquipmentMaintenanceMenuId, BLL.Const.BtnModify)) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialEquipmentMaintenanceEdit.aspx?maintenanceId={0}", this.Grid1.SelectedRowID, "编辑 - "))); - } - else - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - } - else - { - Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); - return; - } - } - else - { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + //protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_SpecialEquipmentMaintenanceMenuId, BLL.Const.BtnModify)) + // { + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialEquipmentMaintenanceEdit.aspx?maintenanceId={0}", this.Grid1.SelectedRowID, "编辑 - "))); + // } + // else + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // } + // else + // { + // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + // return; + // } + // } + // else + // { + // ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + // } + //} /// /// 右键编辑 /// /// /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_SpecialEquipmentMaintenanceMenuId, BLL.Const.BtnModify)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialEquipmentMaintenanceEdit.aspx?maintenanceId={0}", Grid1.SelectedRowID, "维护 - "))); - } - else - { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - } - } + //protected void btnMenuEdit_Click(object sender, EventArgs e) + //{ + // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_SpecialEquipmentMaintenanceMenuId, BLL.Const.BtnModify)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialEquipmentMaintenanceEdit.aspx?maintenanceId={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_SpecialEquipmentMaintenanceMenuId, Const.BtnDelete)) - { - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - return; - } + //protected void btnMenuDelete_Click(object sender, EventArgs e) + //{ + // if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_SpecialEquipmentMaintenanceMenuId, 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.SpecialEquipmentMaintenanceService.DeleteSpecialEquipmentMaintenanceById(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); - } - } + // 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.SpecialEquipmentMaintenanceService.DeleteSpecialEquipmentMaintenanceById(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) - { - string content = string.Empty; + //private bool judgementDelete(string id, bool isShow) + //{ + // string content = string.Empty; - if (string.IsNullOrEmpty(content)) - { - return true; - } - else - { - if (isShow) - { - Alert.ShowInTop(content, MessageBoxIcon.Error); - } - return false; - } - } + // if (string.IsNullOrEmpty(content)) + // { + // return true; + // } + // else + // { + // if (isShow) + // { + // Alert.ShowInTop(content, MessageBoxIcon.Error); + // } + // return false; + // } + //} #endregion #endregion @@ -421,10 +585,80 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) + //protected void Window1_Close(object sender, WindowCloseEventArgs e) + //{ + // this.InitTreeMenu();//加载树 + // this.BindGrid(); + //} + #endregion + + #region 提交按钮 + /// + /// 提交按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) { - this.InitTreeMenu();//加载树 - this.BindGrid(); + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_SpecialEquipmentMaintenanceMenuId, Const.BtnSave)) + { + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + Model.JGZL_SpecialEquipmentMaintenance newReport = new Model.JGZL_SpecialEquipmentMaintenance(); + newReport.MaintenanceCode = this.txtMaintenanceCode.Text.Trim(); + newReport.ConUnit = this.txtConUnit.Text.Trim(); + newReport.EquipmentName = this.txtEquipmentName.Text.Trim(); + newReport.EquipmentModel = this.txtEquipmentModel.Text.Trim(); + newReport.EquipmentCode = this.txtEquipmentCode.Text.Trim(); + newReport.ManufacturingNumber = this.txtManufacturingNumber.Text.Trim(); + newReport.ManufacturingUnit = this.txtManufacturingUnit.Text.Trim(); + newReport.ManufacturingLicenseNumber = this.txtManufacturingLicenseNumber.Text.Trim(); + newReport.EquipmentLocation = this.txtEquipmentLocation.Text.Trim(); + newReport.ConstructionDate = Funs.GetNewDateTime(this.txtConstructionDate.Text.Trim()); + newReport.ConstructionCategory = this.drpConstructionCategory.SelectedValue; + newReport.LicenseNumber = this.txtLicenseNumber.Text.Trim(); + newReport.LicenseValidityDate = Funs.GetNewDateTime(this.txtLicenseValidityDate.Text); + newReport.ConContactMan = this.txtConContactMan.Text.Trim(); + newReport.ConTelephone = this.txtConTelephone.Text.Trim(); + newReport.ConFax = this.txtConFax.Text.Trim(); + newReport.ConAddress = this.txtConAddress.Text.Trim(); + newReport.ConEmail = this.txtConEmail.Text.Trim(); + newReport.UseUnit = this.txtUseUnit.Text.Trim(); + newReport.UseContactMan = this.txtUseContactMan.Text.Trim(); + newReport.UseTelephone = this.txtUseTelephone.Text.Trim(); + newReport.UseFax = this.txtUseFax.Text.Trim(); + newReport.UseAddress = this.txtUseAddress.Text.Trim(); + newReport.UseEmail = this.txtUseEmail.Text.Trim(); + + if (!string.IsNullOrEmpty(this.MaintenanceId)) + { + newReport.MaintenanceId = this.MaintenanceId; + BLL.SpecialEquipmentMaintenanceService.UpdateSpecialEquipmentMaintenance(newReport); + } + else + { + newReport.ProjectId = projectId; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.MaintenanceId = SQLHelper.GetNewID(typeof(Model.JGZL_SpecialEquipmentMaintenance)); + this.MaintenanceId = newReport.MaintenanceId; + BLL.SpecialEquipmentMaintenanceService.AddSpecialEquipmentMaintenance(newReport); + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + //PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } } #endregion } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.designer.cs index bde404a..c1eb7b8 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/SpecialEquipmentMaintenance.aspx.designer.cs @@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.ToolbarFill ToolbarFill1; /// - /// btnAdd 控件。 + /// btnSave 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnAdd; + protected global::FineUIPro.Button btnSave; /// /// btnPrint 控件。 @@ -123,49 +123,229 @@ namespace FineUIPro.Web.JGZL protected global::FineUIPro.Button btnPrint; /// - /// Grid1 控件。 + /// SimpleForm1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Grid Grid1; + protected global::FineUIPro.Form SimpleForm1; /// - /// ToolbarSeparator1 控件。 + /// txtConUnit 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + protected global::FineUIPro.TextBox txtConUnit; /// - /// ToolbarText1 控件。 + /// txtMaintenanceCode 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.ToolbarText ToolbarText1; + protected global::FineUIPro.TextBox txtMaintenanceCode; /// - /// ddlPageSize 控件。 + /// txtEquipmentName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList ddlPageSize; + protected global::FineUIPro.TextBox txtEquipmentName; /// - /// Window1 控件。 + /// txtEquipmentModel 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Window Window1; + protected global::FineUIPro.TextBox txtEquipmentModel; + + /// + /// txtEquipmentCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentCode; + + /// + /// txtManufacturingNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtManufacturingNumber; + + /// + /// txtManufacturingUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtManufacturingUnit; + + /// + /// txtManufacturingLicenseNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtManufacturingLicenseNumber; + + /// + /// txtEquipmentLocation 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentLocation; + + /// + /// txtConstructionDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtConstructionDate; + + /// + /// drpConstructionCategory 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpConstructionCategory; + + /// + /// txtLicenseNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLicenseNumber; + + /// + /// txtLicenseValidityDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtLicenseValidityDate; + + /// + /// txtConContactMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConContactMan; + + /// + /// txtConTelephone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConTelephone; + + /// + /// txtConFax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConFax; + + /// + /// txtConAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConAddress; + + /// + /// txtConEmail 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConEmail; + + /// + /// txtUseUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseUnit; + + /// + /// txtUseContactMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseContactMan; + + /// + /// txtUseTelephone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseTelephone; + + /// + /// txtUseFax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseFax; + + /// + /// txtUseAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseAddress; + + /// + /// txtUseEmail 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseEmail; /// /// WindowPrint 控件。 @@ -175,32 +355,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; } } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/SteelPipeCheckRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/SteelPipeCheckRecord.aspx.cs index ea4c0d4..9b9982d 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/SteelPipeCheckRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/SteelPipeCheckRecord.aspx.cs @@ -175,6 +175,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/TeamWeldingInspection.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/TeamWeldingInspection.aspx.cs index 4148c1c..8bb35da 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/TeamWeldingInspection.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/TeamWeldingInspection.aspx.cs @@ -215,6 +215,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx.cs index beae201..95a8e38 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx.cs @@ -225,6 +225,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } #endregion diff --git a/HJGL_DS/FineUIPro.Web/JGZL/TestResultsSummary.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/TestResultsSummary.aspx.cs index a789fdd..8835744 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/TestResultsSummary.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/TestResultsSummary.aspx.cs @@ -171,6 +171,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.cs index 9f883ed..ca8b7f6 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.cs @@ -194,6 +194,7 @@ namespace FineUIPro.Web.JGZL protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } ///