diff --git a/DataBase/版本日志/HJGLDB_DS_2026-09-18_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-09-18_bwj.sql new file mode 100644 index 0000000..25a0594 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-09-18_bwj.sql @@ -0,0 +1,126 @@ + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule) +values('BC7616E5-E6B2-4C32-A3C4-8B2877B73DD0','¹¤ҵ¹ܵÀ°²װ»ã×ܱí£¨ÖÛɽÌؼìԺҪÇó±í£©','JGZL/IndustrialInstallationSummaryZhoushan.aspx',52,'2A84FA58-8B20-48ED-A621-3EC98CF4AD28','3') +go +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('7D9788EA-5015-4C75-9345-6413C5CE31B7','BC7616E5-E6B2-4C32-A3C4-8B2877B73DD0','Ôö¼Ó',1) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('4F1EFB19-F2B0-45FA-A23D-E099B0F349C6','BC7616E5-E6B2-4C32-A3C4-8B2877B73DD0','Ð޸Ä',2) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('987AB25A-D7ED-4955-B871-21CD85B75282','BC7616E5-E6B2-4C32-A3C4-8B2877B73DD0','ɾ³ý',3) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('868F695F-2963-49AE-A479-4E6BCB90B061','BC7616E5-E6B2-4C32-A3C4-8B2877B73DD0','Ìύ',4) +go + + +CREATE TABLE [dbo].[JGZL_IndustrialInstallationSummaryZhoushan]( + [SummaryId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [InstallationName] [nvarchar](50) NULL, + [TestPackageCode] [nvarchar](50) NULL, + [PipelineName] [nvarchar](50) NULL, + [PipelineCode] [nvarchar](50) NULL, + [PipelineLevel] [nvarchar](50) NULL, + [Material] [nvarchar](50) NULL, + [Medium] [nvarchar](50) NULL, + [Diameter] [decimal](18, 2) NULL, + [WallThickness] [decimal](18, 2) NULL, + [PipelineLength] [decimal](18, 2) NULL, + [WeldJointsCount] [int] NULL, + [PipeFittings] [int] NULL, + [StartPoint] [nvarchar](50) NULL, + [EndPoint] [nvarchar](50) NULL, + [DesignTemperature] [decimal](18, 2) NULL, + [DesignPressure] [decimal](18, 2) NULL, + [OperatingTemperature] [decimal](18, 2) NULL, + [OperatingPressure] [decimal](18, 2) NULL, + [PressureTestMedium] [nvarchar](50) NULL, + [PressureTestPressure] [decimal](18, 2) NULL, + [TestDate] [datetime] NULL, + CONSTRAINT [PK_JGZL_IndustrialInstallationSummaryZhoushan] PRIMARY KEY CLUSTERED +( + [SummaryId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[JGZL_IndustrialInstallationSummaryZhoushan] WITH CHECK ADD CONSTRAINT [FK_JGZL_IndustrialInstallationSummaryZhoushan_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[JGZL_IndustrialInstallationSummaryZhoushan] CHECK CONSTRAINT [FK_JGZL_IndustrialInstallationSummaryZhoushan_Base_Project] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ö÷¼ü' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'SummaryId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ÏîĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'װÖ㨹ܵÀ£©Ãû³Æ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'InstallationName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ÊÔѹ°ü±àºÅ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'TestPackageCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ܵÀÃû³Æ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'PipelineName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ܵÀ±àºÅ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'PipelineCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ܵÀ¼¶±ð' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'PipelineLevel' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'²ÄÖÊ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'Material' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'½éÖÊ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'Medium' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹«³Æֱ¾¶£¨mm£©' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'Diameter' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹«³Ʊںñ£¨mm£©' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'WallThickness' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ܵÀ³¤¶ȣ¨m£©' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'PipelineLength' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'º¸¿Ú×ÜÊý£¨¸ö£©' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'WeldJointsCount' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ܼþÊýÁ¿£¨¸ö£©' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'PipeFittings' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Æðµã' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'StartPoint' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Öյã' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'EndPoint' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Éè¼ÆÎ¶È(¡æ)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'DesignTemperature' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Éè¼ÆѹÁ¦(MPa)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'DesignPressure' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'²Ù×÷ζȡæ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'OperatingTemperature' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'²Ù×÷ѹÁ¦Mpa' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'OperatingPressure' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѹÁ¦ÊÔÑé½éÖÊ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'PressureTestMedium' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѹÁ¦ÊÔÑéѹÁ¦Mpa' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'PressureTestPressure' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ÊÔѹʱ¼ä' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan', @level2type=N'COLUMN',@level2name=N'TestDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѹÁ¦¹ܵÀ°²װ»ã×ܱí£¨ÖÛɽÌؼìԺҪÇó±í£©' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_IndustrialInstallationSummaryZhoushan' +GO + + diff --git a/HJGL_DS/BLL/BLL.csproj b/HJGL_DS/BLL/BLL.csproj index 8a53395..82fcd1f 100644 --- a/HJGL_DS/BLL/BLL.csproj +++ b/HJGL_DS/BLL/BLL.csproj @@ -264,6 +264,7 @@ + diff --git a/HJGL_DS/BLL/JGZL/IndustrialInstallationSummaryZhoushanService.cs b/HJGL_DS/BLL/JGZL/IndustrialInstallationSummaryZhoushanService.cs new file mode 100644 index 0000000..3625278 --- /dev/null +++ b/HJGL_DS/BLL/JGZL/IndustrialInstallationSummaryZhoushanService.cs @@ -0,0 +1,76 @@ +using Model; +using Org.BouncyCastle.Bcpg.OpenPgp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 压力管道安装汇总表(舟山特检院要求表) + /// + public class IndustrialInstallationSummaryZhoushanService + { + /// + /// 根据项目Id获取压力管道安装汇总表(舟山特检院要求表) + /// + /// + /// + public static List GetInstallationSummaryZhoushanByProjectId(string projectId) + { + return (from x in Funs.DB.JGZL_IndustrialInstallationSummaryZhoushan where x.ProjectId == projectId select x).ToList(); + } + + /// + /// 增加 + /// + /// + public static void AddIndustrialInstallationSummaryZhoushan(Model.JGZL_IndustrialInstallationSummaryZhoushan zs) + { + SGGLDB db = Funs.DB; + Model.JGZL_IndustrialInstallationSummaryZhoushan newZS = new JGZL_IndustrialInstallationSummaryZhoushan(); + newZS.SummaryId = zs.SummaryId; + newZS.ProjectId= zs.ProjectId; + newZS.InstallationName= zs.InstallationName; + newZS.TestPackageCode = zs.TestPackageCode; + newZS.PipelineName = zs.PipelineName; + newZS.PipelineCode = zs.PipelineCode; + newZS.PipelineLevel = zs.PipelineLevel; + newZS.Material = zs.Material; + newZS.Medium= zs.Medium; + newZS.Diameter= zs.Diameter; + newZS.WallThickness= zs.WallThickness; + newZS.PipelineLength = zs.PipelineLength; + newZS.WeldJointsCount= zs.WeldJointsCount; + newZS.PipeFittings= zs.PipeFittings; + newZS.StartPoint= zs.StartPoint; + newZS.EndPoint= zs.EndPoint; + newZS.DesignTemperature= zs.DesignTemperature; + newZS.DesignPressure= zs.DesignPressure; + newZS.OperatingTemperature= zs.OperatingTemperature; + newZS.OperatingPressure = zs.OperatingPressure; + newZS.PressureTestPressure= zs.PressureTestPressure; + newZS.PressureTestMedium = zs.PressureTestMedium; + newZS.TestDate= zs.TestDate; + db.JGZL_IndustrialInstallationSummaryZhoushan.InsertOnSubmit(newZS); + db.SubmitChanges(); + } + + /// + /// 根据项目Id删除压力管道安装汇总表(舟山特检院要求表) + /// + /// + public static void DeleteIndustrialInstallationSummaryZhoushanByProjectId(string projectId) + { + SGGLDB db = Funs.DB; + var q = (from x in db.JGZL_IndustrialInstallationSummaryZhoushan where x.ProjectId == projectId select x).ToList(); + if (q.Count>0) + { + db.JGZL_IndustrialInstallationSummaryZhoushan.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 abe1c64..45f5bdb 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; @@ -39,7 +39,7 @@ namespace FastReport } - + @@ -65,9 +65,9 @@ namespace FastReport - - - + + + @@ -182,10 +182,8 @@ namespace FastReport - - - + @@ -233,8 +231,8 @@ namespace FastReport - - + + @@ -283,7 +281,7 @@ namespace FastReport - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/焊条烘烤记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/焊条烘烤记录.frx index d76e438..f609261 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/焊条烘烤记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/焊条烘烤记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -39,7 +39,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index ea2bfce..4538f69 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1404,6 +1404,7 @@ + @@ -7063,6 +7064,13 @@ FileDirectory.aspx + + IndustrialInstallationSummaryZhoushan.aspx + ASPXCodeBehind + + + IndustrialInstallationSummaryZhoushan.aspx + IndustrialPipelineInstallationSummary2020.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx index 0b405c8..c2a733b 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx @@ -20,17 +20,19 @@ + OnSort="Grid1_Sort" EnableTextSelection="True" AllowPaging="true" IsDatabasePaging="true" PageSize="50" + OnPageIndexChange="Grid1_PageIndexChange" > - - + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx.cs index 321ea67..887b4f0 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx.cs @@ -30,6 +30,8 @@ namespace FineUIPro.Web.HJGL.MaterialManage this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectList("1"); this.drpProjectId.DataBind(); Funs.FineUIPleaseSelect(this.drpProjectId); + + BLL.UnitStoreService.InitUnitStoreDropDownList(drpUnitStore, null, true); BindGrid(); } } @@ -82,13 +84,18 @@ namespace FineUIPro.Web.HJGL.MaterialManage strSql += " AND BakeRecords.BakeDate <= @endDate"; listStr.Add(new SqlParameter("@endDate", this.txtEndDate.Text.Trim())); } + if (this.drpUnitStore.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpUnitStore.SelectedValue)) + { + strSql += " AND BakeRecords.UnitStoreId = @UnitStoreId"; + listStr.Add(new SqlParameter("@UnitStoreId", this.drpUnitStore.SelectedValue)); + } strSql += " order by BakeRecords.BakeDate desc"; SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; - //var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = tb; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; Grid1.DataBind(); } #endregion @@ -107,6 +114,19 @@ namespace FineUIPro.Web.HJGL.MaterialManage } #endregion + #region 页索引改变事件 + /// + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + #endregion + #region 提交 /// /// 确定按钮 diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx.designer.cs index c38596d..a5670d6 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/ElectrodeBakeRecordNewSelect.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.MaterialManage { - - - public partial class ElectrodeBakeRecordNewSelect { - +namespace FineUIPro.Web.HJGL.MaterialManage +{ + + + public partial class ElectrodeBakeRecordNewSelect + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelCenterRegion 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Grid1 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar3 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// drpProjectId 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProjectId; - + /// /// txtStartDate 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStartDate; - + /// /// Label1 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// txtEndDate 控件。 /// @@ -101,7 +103,16 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndDate; - + + /// + /// drpUnitStore 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitStore; + /// /// txtBrand 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtBrand; - + /// /// btnSearch 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// ToolbarFill1 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSure 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSure; - + /// /// Window2 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx new file mode 100644 index 0000000..93fce2a --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx @@ -0,0 +1,279 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="IndustrialInstallationSummaryZhoushan.aspx.cs" Inherits="FineUIPro.Web.JGZL.IndustrialInstallationSummaryZhoushan" %> + + + + + + + 压力管道安装汇总表(舟山特检院要求表) + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx.cs new file mode 100644 index 0000000..0378575 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx.cs @@ -0,0 +1,826 @@ +using Aspose.Words; +using Aspose.Words.Tables; +using BLL; +using Model; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.JGZL +{ + public partial class IndustrialInstallationSummaryZhoushan : 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 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + + this.drpProjectId.DataTextField = "ProjectCode"; + this.drpProjectId.DataValueField = "ProjectId"; + this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + this.drpProjectId.DataBind(); + Funs.FineUIPleaseSelect(this.drpProjectId); + + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.InitTreeMenu();//加载树 + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + + ////获取下拉选择项本项目下所有工业管道安装质量证明书信息 + //IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.tvControlItem.SelectedNodeID, "1", 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; + // } + //} + DataIsoInfo(); + BindGrid(); + } + } + #endregion + + private void DataIsoInfo() + { + + var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.tvControlItem.SelectedNodeID); + if (isoInfo.Count > 0) + { + + } + } + + #region 加载树项目 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + TreeNode rootNode = new TreeNode(); + rootNode.Text = "项目"; + rootNode.ToolTip = "项目"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + this.tvControlItem.Nodes.Add(rootNode); + + List projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + if (this.drpProjectId.SelectedValue != BLL.Const._Null) + { + projects = projects.Where(e => e.ProjectId == this.drpProjectId.SelectedValue).ToList(); + } + foreach (var item in projects) + { + TreeNode rootProjectNode = new TreeNode();//定义根节点 + rootProjectNode.Text = item.ProjectCode; + rootProjectNode.NodeID = item.ProjectId; + rootProjectNode.EnableClickEvent = true; + rootProjectNode.Expanded = true; + rootProjectNode.ToolTip = item.ProjectName; + rootProjectNode.CommandName = "项目名称"; + rootNode.Nodes.Add(rootProjectNode); + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (this.tvControlItem.SelectedNodeID != "0") + { + DataIsoInfo(); + this.BindGrid(); + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + private void BindGrid() + { + string strSql = @"select SummaryId, CertificateId, ProjectId, PipelineCode, PipelineLevel, PipelineStartPoint, PipelineEndPoint, +CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL(18,6)), 'G29') + ELSE DesignPressure + END AS DesignPressure, + CASE WHEN ISNUMERIC(DesignTemperature)=1 THEN FORMAT(CAST(DesignTemperature AS DECIMAL(18,6)), 'G29') + ELSE DesignTemperature + END AS DesignTemperature, + Medium, Material, Specifications, + CASE WHEN ISNUMERIC(Length)=1 THEN FORMAT(CAST(Length AS DECIMAL(18,6)), 'G29') + ELSE Length + END AS Length, + LayingMethod, WeldsNum, LosslessRatio, + VoltageResistantTestMethod, VoltageResistantTestMedium, VoltageResistantTestPressure, + LeakageTestMedium, LeakageTestPressure, CleaningMethod, CorrosionControlMethod, InsulationMethod, + Remark, CompileMan, CompileDate, Reviewer, RevieweDate, OperatingTemperature, VoltageResistantTestDate, + LeakageTestDate,FromType from JGZL_IndustrialPipelineInstallationSummary + WHERE FromType='1' "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + strSql += " AND ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + } + if (!string.IsNullOrEmpty(this.txtIsoNoS.Text)) + { + strSql += " AND PipelineCode like @PipelineCode"; + listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtIsoNoS.Text + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // 2.获取当前分页数据 + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页排序 + #region 页索引改变事件 + /// + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + #region 分页选择下拉改变事件 + /// + /// 分页选择下拉改变事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + #endregion + + #region 查询 + /// + ///查询 + /// + /// + /// + protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + this.InitTreeMenu(); + DataIsoInfo(); + BindGrid(); + } + + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + string projectId = this.tvControlItem.SelectedNodeID; + + if (projectId != null) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationSummary where ProjectId = @ProjectId and FromType='1'"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", projectId)); + if (!string.IsNullOrEmpty(this.txtIsoNoS.Text)) + { + strSql += " And PipelineCode like @pipeLineCode"; + listStr.Add(new SqlParameter("@pipeLineCode", "%" + this.txtIsoNoS.Text + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + if (tb.Rows.Count > 0) + { + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("Num"); + dt.Columns.Add("PipelineCode"); + dt.Columns.Add("PipelineLevel"); + dt.Columns.Add("DesignPressure"); + dt.Columns.Add("DesignTemperature"); + dt.Columns.Add("OperatingTemperature"); + dt.Columns.Add("Medium"); + dt.Columns.Add("Material"); + dt.Columns.Add("Specifications"); + dt.Columns.Add("Length"); + dt.Columns.Add("LayingMethod"); + dt.Columns.Add("WeldsNum"); + dt.Columns.Add("LosslessRatio"); + dt.Columns.Add("VoltageResistantTestMedium"); + dt.Columns.Add("VoltageResistantTestPressure"); + dt.Columns.Add("VoltageResistantTestDate"); + dt.Columns.Add("LeakageTestMedium"); + dt.Columns.Add("LeakageTestPressure"); + dt.Columns.Add("LeakageTestDate"); + dt.Columns.Add("CleaningMethod"); + dt.Columns.Add("CorrosionControlMethod"); + dt.Columns.Add("InsulationMethod"); + dt.Columns.Add("PipelineStartPoint"); + dt.Columns.Add("PipelineEndPoint"); + dt.Columns.Add("Remark"); + + DataRow[] rows = tb.DefaultView.ToTable().Select(); + int i = 0; + foreach (var row in rows) + { + var newRow = dt.NewRow(); + newRow["Num"] = (i + 1).ToString(); + newRow["PipelineCode"] = row["PipelineCode"].ToString(); + newRow["PipelineLevel"] = row["PipelineLevel"].ToString(); + newRow["DesignPressure"] = row["DesignPressure"].ToString(); + newRow["DesignTemperature"] = row["DesignTemperature"].ToString(); + newRow["OperatingTemperature"] = row["OperatingTemperature"].ToString(); + newRow["Medium"] = row["Medium"].ToString(); + newRow["Material"] = row["Material"].ToString(); + newRow["Specifications"] = row["Specifications"].ToString(); + newRow["Length"] = row["Length"].ToString(); + newRow["LayingMethod"] = row["LayingMethod"].ToString(); + newRow["WeldsNum"] = row["WeldsNum"].ToString(); + newRow["LosslessRatio"] = row["LosslessRatio"].ToString(); + newRow["VoltageResistantTestMedium"] = row["VoltageResistantTestMedium"].ToString(); + newRow["VoltageResistantTestPressure"] = row["VoltageResistantTestPressure"].ToString(); + string VoltageResistantTestDate = string.Format("{0:yyyy.MM.dd}", row["VoltageResistantTestDate"]); + newRow["VoltageResistantTestDate"] = VoltageResistantTestDate; + newRow["LeakageTestMedium"] = row["LeakageTestMedium"].ToString(); + newRow["LeakageTestPressure"] = row["LeakageTestPressure"].ToString(); + string LeakageTestDate = string.Format("{0:yyyy.MM.dd}", row["LeakageTestDate"]); + newRow["LeakageTestDate"] = LeakageTestDate; + newRow["CleaningMethod"] = row["CleaningMethod"].ToString(); + newRow["CorrosionControlMethod"] = row["CorrosionControlMethod"].ToString(); + newRow["InsulationMethod"] = row["InsulationMethod"].ToString(); + newRow["PipelineStartPoint"] = row["PipelineStartPoint"].ToString(); + newRow["PipelineEndPoint"] = row["PipelineEndPoint"].ToString(); + newRow["Remark"] = row["Remark"].ToString(); + dt.Rows.Add(newRow); + i++; + } + BLL.Common.FastReportService.AddFastreportTable(dt); + + string certificateCode = string.Empty; + string deliveryUnit = string.Empty; + string deliveryUnitCode = string.Empty; + string certificateId = rows[0]["CertificateId"].ToString(); + var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(certificateId); + if (certificate != null) + { + certificateCode = certificate.CertificateCode; + deliveryUnit = certificate.DeliveryUnit; + deliveryUnitCode = certificate.DeliveryUnitCode; + } + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("CertificateCode", certificateCode); + keyValuePairs.Add("DeliveryUnit", deliveryUnit); + keyValuePairs.Add("DeliveryUnitCode", deliveryUnitCode); + 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))); + } + } + else + { + Alert.ShowInTop("没有要打印的数据!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + #endregion + + #region 维护 + /// + /// 增加 + /// + /// + /// + protected void btnAdd_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(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", "" }, + { "FromType", "1" }, + { + "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 + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + + protected void Grid1_PreDataBound(object sender, EventArgs e) + { + // 设置LinkButtonField的点击客户端事件 + LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField; + deleteField.OnClientClick = GetDeleteScriptGrid1(); + } + + /// + /// 删除提示 + /// + /// + private string GetDeleteScriptGrid1() + { + return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question, + Grid1.GetDeleteSelectedRowsReference(), String.Empty); + } + #endregion + + #region 选择质量证明书编号 + /// + /// 选择质量证明书编号 + /// + /// + /// + protected void drpCertificateCode_SelectedIndexChanged(object sender, EventArgs e) + { + //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)) + { + //if (string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue)) + //{ + // Alert.ShowInTop("请选择质量证明书编号!", MessageBoxIcon.Warning); + // return; + //} + saveItem(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + + void saveItem() + { + BLL.IndustrialPipelineInstallationSummaryService.DeleteIndustrialPipelineInstallationSummaryByProjectId(this.tvControlItem.SelectedNodeID, "1"); + 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"), + FromType = "1" + }; + detailLists.Add(newDetail); + } + try + { + if (detailLists.Count > 0) + { + Funs.DB.JGZL_IndustrialPipelineInstallationSummary.InsertAllOnSubmit(detailLists); + } + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + + //每页显示的固定数据行数 + int rowsPerPage = 4; + + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationSummary where ProjectId = @ProjectId and FromType='1'"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", projectId)); + if (!string.IsNullOrEmpty(this.txtIsoNoS.Text)) + { + strSql += " And PipelineCode like @pipeLineCode"; + listStr.Add(new SqlParameter("@pipeLineCode", "%" + this.txtIsoNoS.Text + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + if (tb.Rows.Count > 0) + { + initTemplatePath = Const.JGZL_IndustrialPipelineInstallationSummaryUrl; + uploadfilepath = rootPath + initTemplatePath; + + newUrl = uploadfilepath.Replace("工业管道安装汇总表导出模板", "工业管道安装汇总表(安装)"); + if (File.Exists(newUrl)) + { + File.Delete(newUrl); + } + File.Copy(uploadfilepath, newUrl); + //更新书签内容 + Document doc = new Aspose.Words.Document(newUrl); + DocumentBuilder builder = new DocumentBuilder(doc); + + Aspose.Words.Tables.Table table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, 0, true); + + string certificateCode = string.Empty; + string deliveryUnit = string.Empty; + string deliveryUnitCode = string.Empty; + string certificateId = tb.Rows[0]["CertificateId"].ToString(); + var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(certificateId); + if (certificate != null) + { + certificateCode = certificate.CertificateCode; + deliveryUnit = certificate.DeliveryUnit; + deliveryUnitCode = certificate.DeliveryUnitCode; + } + + Bookmark bookmark1 = doc.Range.Bookmarks["certificateCode"]; + if (bookmark1 != null) + { + bookmark1.Text = certificateCode; + } + Bookmark bookmark2 = doc.Range.Bookmarks["deliveryUnit"]; + if (bookmark2 != null) + { + bookmark2.Text = deliveryUnit; + } + Bookmark bookmark3 = doc.Range.Bookmarks["deliveryUnitCode"]; + if (bookmark3 != null) + { + bookmark3.Text = deliveryUnitCode; + } + + // 设置表头行重复显示 + table.Rows[0].RowFormat.HeadingFormat = true; + table.Rows[1].RowFormat.HeadingFormat = true; + table.Rows[2].RowFormat.HeadingFormat = true; + + // 先记录页尾行,并从表格中移除 + //Row footerRow = table.Rows[table.Rows.Count - 1]; + //table.Rows.RemoveAt(table.Rows.Count - 1); + + for (int i = 0; i < tb.Rows.Count; i++) + { + //创建行 + Aspose.Words.Tables.Row row = new Aspose.Words.Tables.Row(doc); + row.Cells.Add(CreateCell(tb.Rows[i]["PipelineCode"].ToString(), doc, 32.3, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["PipelineLevel"].ToString(), doc, 33.7, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["PipelineStartPoint"].ToString(), doc, 31.75, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["PipelineEndPoint"].ToString(), doc, 32, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["DesignPressure"].ToString(), doc, 40, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["DesignTemperature"].ToString(), doc, 36, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["Medium"].ToString(), doc, 30.6, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["Material"].ToString(), doc, 31.47, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["Specifications"].ToString(), doc, 32.3, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["Length"].ToString(), doc, 30, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["LayingMethod"].ToString(), doc, 31.49, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["WeldsNum"].ToString(), doc, 30, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["LosslessRatio"].ToString(), doc, 39, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["VoltageResistantTestMethod"].ToString(), doc, 32.3, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["VoltageResistantTestMedium"].ToString(), doc, 28.6, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["VoltageResistantTestPressure"].ToString(), doc, 38, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["LeakageTestMedium"].ToString(), doc, 37.4, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["LeakageTestPressure"].ToString(), doc, 41.67, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["CleaningMethod"].ToString(), doc, 34.3, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["CorrosionControlMethod"].ToString(), doc, 31.2, "", "")); + row.Cells.Add(CreateCell(tb.Rows[i]["InsulationMethod"].ToString(), doc, 43.9, "", "")); + + table.Rows.Insert(i + 3, row); + } + // 计算并插入空白行,填满整页 + // 计算总数据行数 + int totalDataRows = tb.Rows.Count; + // 计算需要补充的空白行数量 + int remainder = totalDataRows % rowsPerPage; + int needBlankRows = remainder == 0 ? 0 : rowsPerPage - remainder; + + // 插入空白行(和数据行格式保持一致,仅内容为空) + for (int i = 0; i < needBlankRows - 1; i++) + { + Aspose.Words.Tables.Row blankRow = new Aspose.Words.Tables.Row(doc); + // 空白行的单元格宽度和数据行保持一致 + blankRow.Cells.Add(CreateCell("", doc, 32.3, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 33.7, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 31.75, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 32, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 40, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 36, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 30.6, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 31.47, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 32.3, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 30, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 31.49, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 30, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 39, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 32.3, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 28.6, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 38, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 37.4, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 41.67, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 34.3, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 31.2, "", "")); + blankRow.Cells.Add(CreateCell("", doc, 43.9, "", "")); + + // 插入到表格最后一行 + table.Rows.Add(blankRow); + } + //把页尾行重新加回表格最后 + //table.Rows.Add(footerRow); + + //自动设置表格样式 + table.AutoFit(AutoFitBehavior.FixedColumnWidths); + table.Alignment = TableAlignment.Center; + + doc.Save(newUrl); + + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(newUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + } + else + { + Alert.ShowInTop("没有要导出的数据!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + + public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "", string CenterPage = "", string cellUnitLeft = "") + { + Cell cell = new Cell(doc); + Paragraph p = new Paragraph(doc); + if (!string.IsNullOrEmpty(cellMerge)) + { + if (cellMerge == "0") + { + cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.First;//竖直方向合并的第一个单元格 + } + else + { + cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;//竖直方向合并的第一个单元格 + } + + } + else + { + cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + } + if (!string.IsNullOrEmpty(CenterPage)) + { + //序号 + value = " " + value; + } + if (!string.IsNullOrEmpty(cellUnitLeft)) + { + p.ParagraphFormat.Alignment = ParagraphAlignment.Left;//表格中字体居左 + } + else + { + p.ParagraphFormat.Alignment = ParagraphAlignment.Center;//表格中字体居中 + } + + + p.AppendChild(new Run(doc, value)); + + cell.CellFormat.Width = cellWidth; + + cell.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center; + + cell.CellFormat.Borders.LineWidth = 0.75; + + cell.AppendChild(p); + return cell; + } + + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx.designer.cs new file mode 100644 index 0000000..5a5477e --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialInstallationSummaryZhoushan.aspx.designer.cs @@ -0,0 +1,467 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class IndustrialInstallationSummaryZhoushan + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectId; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtIsoNoS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIsoNoS; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// txtInstallationName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInstallationName; + + /// + /// txtTestPackageCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTestPackageCode; + + /// + /// ToolbarFill2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill2; + + /// + /// txtPipelineName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineName; + + /// + /// txtPipelineCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineCode; + + /// + /// txtPipelineLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineLevel; + + /// + /// txtMaterial 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMaterial; + + /// + /// txtMedium 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMedium; + + /// + /// txtDiameter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDiameter; + + /// + /// txtWallThickness 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWallThickness; + + /// + /// txtPipelineLength 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtPipelineLength; + + /// + /// txtWeldJointsCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWeldJointsCount; + + /// + /// txtPipelineStartPoint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineStartPoint; + + /// + /// txtPipelineEndPoint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineEndPoint; + + /// + /// txtDesignPressure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDesignPressure; + + /// + /// txtDesignTemperature 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDesignTemperature; + + /// + /// 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 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// WindowPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowPrint; + } +} diff --git a/HJGL_DS/FineUIPro.Web/JGZL/WeldingRodBaking.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/WeldingRodBaking.aspx.cs index e6fda69..e637fc6 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/WeldingRodBaking.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/WeldingRodBaking.aspx.cs @@ -229,7 +229,7 @@ namespace FineUIPro.Web.JGZL BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); BLL.Common.FastReportService.AddFastreportTable(dt); - initTemplatePath = "File\\Fastreport\\JGZL\\焊条烘烤记录.frx"; + initTemplatePath = "File\\Fastreport\\焊条烘烤记录.frx"; if (File.Exists(rootPath + initTemplatePath)) { diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index 8f1b68e..2247f2c 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -419,6 +419,9 @@ namespace Model partial void InsertJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); partial void UpdateJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); partial void DeleteJGZL_HandoverCertificate(JGZL_HandoverCertificate instance); + partial void InsertJGZL_IndustrialInstallationSummaryZhoushan(JGZL_IndustrialInstallationSummaryZhoushan instance); + partial void UpdateJGZL_IndustrialInstallationSummaryZhoushan(JGZL_IndustrialInstallationSummaryZhoushan instance); + partial void DeleteJGZL_IndustrialInstallationSummaryZhoushan(JGZL_IndustrialInstallationSummaryZhoushan instance); partial void InsertJGZL_IndustrialPipelineInstallationQualityCertificate(JGZL_IndustrialPipelineInstallationQualityCertificate instance); partial void UpdateJGZL_IndustrialPipelineInstallationQualityCertificate(JGZL_IndustrialPipelineInstallationQualityCertificate instance); partial void DeleteJGZL_IndustrialPipelineInstallationQualityCertificate(JGZL_IndustrialPipelineInstallationQualityCertificate instance); @@ -2058,6 +2061,14 @@ namespace Model } } + public System.Data.Linq.Table JGZL_IndustrialInstallationSummaryZhoushan + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table JGZL_IndustrialPipelineInstallationQualityCertificate { get @@ -5027,6 +5038,8 @@ namespace Model private EntitySet _JGZL_HandoverCertificate; + private EntitySet _JGZL_IndustrialInstallationSummaryZhoushan; + private EntitySet _JGZL_IndustrialPipelineInstallationQualityCertificate; private EntitySet _JGZL_IndustrialPipelineInstallationSummary; @@ -5231,6 +5244,7 @@ namespace Model this._JGZL_ElectrostaticGrounding = new EntitySet(new Action(this.attach_JGZL_ElectrostaticGrounding), new Action(this.detach_JGZL_ElectrostaticGrounding)); this._JGZL_FileDirectory = new EntitySet(new Action(this.attach_JGZL_FileDirectory), new Action(this.detach_JGZL_FileDirectory)); this._JGZL_HandoverCertificate = new EntitySet(new Action(this.attach_JGZL_HandoverCertificate), new Action(this.detach_JGZL_HandoverCertificate)); + this._JGZL_IndustrialInstallationSummaryZhoushan = new EntitySet(new Action(this.attach_JGZL_IndustrialInstallationSummaryZhoushan), new Action(this.detach_JGZL_IndustrialInstallationSummaryZhoushan)); this._JGZL_IndustrialPipelineInstallationQualityCertificate = new EntitySet(new Action(this.attach_JGZL_IndustrialPipelineInstallationQualityCertificate), new Action(this.detach_JGZL_IndustrialPipelineInstallationQualityCertificate)); this._JGZL_IndustrialPipelineInstallationSummary = new EntitySet(new Action(this.attach_JGZL_IndustrialPipelineInstallationSummary), new Action(this.detach_JGZL_IndustrialPipelineInstallationSummary)); this._JGZL_InsulationAcceptanceRecord = new EntitySet(new Action(this.attach_JGZL_InsulationAcceptanceRecord), new Action(this.detach_JGZL_InsulationAcceptanceRecord)); @@ -6526,6 +6540,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_IndustrialInstallationSummaryZhoushan_Base_Project", Storage="_JGZL_IndustrialInstallationSummaryZhoushan", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JGZL_IndustrialInstallationSummaryZhoushan + { + get + { + return this._JGZL_IndustrialInstallationSummaryZhoushan; + } + set + { + this._JGZL_IndustrialInstallationSummaryZhoushan.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_IndustrialPipelineInstallationQualityCertificate_Base_Project", Storage="_JGZL_IndustrialPipelineInstallationQualityCertificate", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet JGZL_IndustrialPipelineInstallationQualityCertificate { @@ -7744,6 +7771,18 @@ namespace Model entity.Base_Project = null; } + private void attach_JGZL_IndustrialInstallationSummaryZhoushan(JGZL_IndustrialInstallationSummaryZhoushan entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JGZL_IndustrialInstallationSummaryZhoushan(JGZL_IndustrialInstallationSummaryZhoushan entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_JGZL_IndustrialPipelineInstallationQualityCertificate(JGZL_IndustrialPipelineInstallationQualityCertificate entity) { this.SendPropertyChanging(); @@ -88788,6 +88827,637 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_IndustrialInstallationSummaryZhoushan")] + public partial class JGZL_IndustrialInstallationSummaryZhoushan : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SummaryId; + + private string _ProjectId; + + private string _InstallationName; + + private string _TestPackageCode; + + private string _PipelineName; + + private string _PipelineCode; + + private string _PipelineLevel; + + private string _Material; + + private string _Medium; + + private System.Nullable _Diameter; + + private System.Nullable _WallThickness; + + private System.Nullable _PipelineLength; + + private System.Nullable _WeldJointsCount; + + private System.Nullable _PipeFittings; + + private string _StartPoint; + + private string _EndPoint; + + private System.Nullable _DesignTemperature; + + private System.Nullable _DesignPressure; + + private System.Nullable _OperatingTemperature; + + private System.Nullable _OperatingPressure; + + private string _PressureTestMedium; + + private System.Nullable _PressureTestPressure; + + private System.Nullable _TestDate; + + private EntityRef _Base_Project; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSummaryIdChanging(string value); + partial void OnSummaryIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnInstallationNameChanging(string value); + partial void OnInstallationNameChanged(); + partial void OnTestPackageCodeChanging(string value); + partial void OnTestPackageCodeChanged(); + partial void OnPipelineNameChanging(string value); + partial void OnPipelineNameChanged(); + partial void OnPipelineCodeChanging(string value); + partial void OnPipelineCodeChanged(); + partial void OnPipelineLevelChanging(string value); + partial void OnPipelineLevelChanged(); + partial void OnMaterialChanging(string value); + partial void OnMaterialChanged(); + partial void OnMediumChanging(string value); + partial void OnMediumChanged(); + partial void OnDiameterChanging(System.Nullable value); + partial void OnDiameterChanged(); + partial void OnWallThicknessChanging(System.Nullable value); + partial void OnWallThicknessChanged(); + partial void OnPipelineLengthChanging(System.Nullable value); + partial void OnPipelineLengthChanged(); + partial void OnWeldJointsCountChanging(System.Nullable value); + partial void OnWeldJointsCountChanged(); + partial void OnPipeFittingsChanging(System.Nullable value); + partial void OnPipeFittingsChanged(); + partial void OnStartPointChanging(string value); + partial void OnStartPointChanged(); + partial void OnEndPointChanging(string value); + partial void OnEndPointChanged(); + partial void OnDesignTemperatureChanging(System.Nullable value); + partial void OnDesignTemperatureChanged(); + partial void OnDesignPressureChanging(System.Nullable value); + partial void OnDesignPressureChanged(); + partial void OnOperatingTemperatureChanging(System.Nullable value); + partial void OnOperatingTemperatureChanged(); + partial void OnOperatingPressureChanging(System.Nullable value); + partial void OnOperatingPressureChanged(); + partial void OnPressureTestMediumChanging(string value); + partial void OnPressureTestMediumChanged(); + partial void OnPressureTestPressureChanging(System.Nullable value); + partial void OnPressureTestPressureChanged(); + partial void OnTestDateChanging(System.Nullable value); + partial void OnTestDateChanged(); + #endregion + + public JGZL_IndustrialInstallationSummaryZhoushan() + { + this._Base_Project = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SummaryId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SummaryId + { + get + { + return this._SummaryId; + } + set + { + if ((this._SummaryId != value)) + { + this.OnSummaryIdChanging(value); + this.SendPropertyChanging(); + this._SummaryId = value; + this.SendPropertyChanged("SummaryId"); + this.OnSummaryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InstallationName", DbType="NVarChar(50)")] + public string InstallationName + { + get + { + return this._InstallationName; + } + set + { + if ((this._InstallationName != value)) + { + this.OnInstallationNameChanging(value); + this.SendPropertyChanging(); + this._InstallationName = value; + this.SendPropertyChanged("InstallationName"); + this.OnInstallationNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackageCode", DbType="NVarChar(50)")] + public string TestPackageCode + { + get + { + return this._TestPackageCode; + } + set + { + if ((this._TestPackageCode != value)) + { + this.OnTestPackageCodeChanging(value); + this.SendPropertyChanging(); + this._TestPackageCode = value; + this.SendPropertyChanged("TestPackageCode"); + this.OnTestPackageCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineName", DbType="NVarChar(50)")] + public string PipelineName + { + get + { + return this._PipelineName; + } + set + { + if ((this._PipelineName != value)) + { + this.OnPipelineNameChanging(value); + this.SendPropertyChanging(); + this._PipelineName = value; + this.SendPropertyChanged("PipelineName"); + this.OnPipelineNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(50)")] + public string PipelineCode + { + get + { + return this._PipelineCode; + } + set + { + if ((this._PipelineCode != value)) + { + this.OnPipelineCodeChanging(value); + this.SendPropertyChanging(); + this._PipelineCode = value; + this.SendPropertyChanged("PipelineCode"); + this.OnPipelineCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineLevel", DbType="NVarChar(50)")] + public string PipelineLevel + { + get + { + return this._PipelineLevel; + } + set + { + if ((this._PipelineLevel != value)) + { + this.OnPipelineLevelChanging(value); + this.SendPropertyChanging(); + this._PipelineLevel = value; + this.SendPropertyChanged("PipelineLevel"); + this.OnPipelineLevelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(50)")] + public string Material + { + get + { + return this._Material; + } + set + { + if ((this._Material != value)) + { + this.OnMaterialChanging(value); + this.SendPropertyChanging(); + this._Material = value; + this.SendPropertyChanged("Material"); + this.OnMaterialChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Medium", DbType="NVarChar(50)")] + public string Medium + { + get + { + return this._Medium; + } + set + { + if ((this._Medium != value)) + { + this.OnMediumChanging(value); + this.SendPropertyChanging(); + this._Medium = value; + this.SendPropertyChanged("Medium"); + this.OnMediumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Diameter", DbType="Decimal(18,2)")] + public System.Nullable Diameter + { + get + { + return this._Diameter; + } + set + { + if ((this._Diameter != value)) + { + this.OnDiameterChanging(value); + this.SendPropertyChanging(); + this._Diameter = value; + this.SendPropertyChanged("Diameter"); + this.OnDiameterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WallThickness", DbType="Decimal(18,2)")] + public System.Nullable WallThickness + { + get + { + return this._WallThickness; + } + set + { + if ((this._WallThickness != value)) + { + this.OnWallThicknessChanging(value); + this.SendPropertyChanging(); + this._WallThickness = value; + this.SendPropertyChanged("WallThickness"); + this.OnWallThicknessChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineLength", DbType="Decimal(18,2)")] + public System.Nullable PipelineLength + { + get + { + return this._PipelineLength; + } + set + { + if ((this._PipelineLength != value)) + { + this.OnPipelineLengthChanging(value); + this.SendPropertyChanging(); + this._PipelineLength = value; + this.SendPropertyChanged("PipelineLength"); + this.OnPipelineLengthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointsCount", DbType="Int")] + public System.Nullable WeldJointsCount + { + get + { + return this._WeldJointsCount; + } + set + { + if ((this._WeldJointsCount != value)) + { + this.OnWeldJointsCountChanging(value); + this.SendPropertyChanging(); + this._WeldJointsCount = value; + this.SendPropertyChanged("WeldJointsCount"); + this.OnWeldJointsCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeFittings", DbType="Int")] + public System.Nullable PipeFittings + { + get + { + return this._PipeFittings; + } + set + { + if ((this._PipeFittings != value)) + { + this.OnPipeFittingsChanging(value); + this.SendPropertyChanging(); + this._PipeFittings = value; + this.SendPropertyChanged("PipeFittings"); + this.OnPipeFittingsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartPoint", DbType="NVarChar(50)")] + public string StartPoint + { + get + { + return this._StartPoint; + } + set + { + if ((this._StartPoint != value)) + { + this.OnStartPointChanging(value); + this.SendPropertyChanging(); + this._StartPoint = value; + this.SendPropertyChanged("StartPoint"); + this.OnStartPointChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndPoint", DbType="NVarChar(50)")] + public string EndPoint + { + get + { + return this._EndPoint; + } + set + { + if ((this._EndPoint != value)) + { + this.OnEndPointChanging(value); + this.SendPropertyChanging(); + this._EndPoint = value; + this.SendPropertyChanged("EndPoint"); + this.OnEndPointChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignTemperature", DbType="Decimal(18,2)")] + public System.Nullable DesignTemperature + { + get + { + return this._DesignTemperature; + } + set + { + if ((this._DesignTemperature != value)) + { + this.OnDesignTemperatureChanging(value); + this.SendPropertyChanging(); + this._DesignTemperature = value; + this.SendPropertyChanged("DesignTemperature"); + this.OnDesignTemperatureChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignPressure", DbType="Decimal(18,2)")] + public System.Nullable DesignPressure + { + get + { + return this._DesignPressure; + } + set + { + if ((this._DesignPressure != value)) + { + this.OnDesignPressureChanging(value); + this.SendPropertyChanging(); + this._DesignPressure = value; + this.SendPropertyChanged("DesignPressure"); + this.OnDesignPressureChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatingTemperature", DbType="Decimal(18,2)")] + public System.Nullable OperatingTemperature + { + get + { + return this._OperatingTemperature; + } + set + { + if ((this._OperatingTemperature != value)) + { + this.OnOperatingTemperatureChanging(value); + this.SendPropertyChanging(); + this._OperatingTemperature = value; + this.SendPropertyChanged("OperatingTemperature"); + this.OnOperatingTemperatureChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatingPressure", DbType="Decimal(18,2)")] + public System.Nullable OperatingPressure + { + get + { + return this._OperatingPressure; + } + set + { + if ((this._OperatingPressure != value)) + { + this.OnOperatingPressureChanging(value); + this.SendPropertyChanging(); + this._OperatingPressure = value; + this.SendPropertyChanged("OperatingPressure"); + this.OnOperatingPressureChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PressureTestMedium", DbType="NVarChar(50)")] + public string PressureTestMedium + { + get + { + return this._PressureTestMedium; + } + set + { + if ((this._PressureTestMedium != value)) + { + this.OnPressureTestMediumChanging(value); + this.SendPropertyChanging(); + this._PressureTestMedium = value; + this.SendPropertyChanged("PressureTestMedium"); + this.OnPressureTestMediumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PressureTestPressure", DbType="Decimal(18,2)")] + public System.Nullable PressureTestPressure + { + get + { + return this._PressureTestPressure; + } + set + { + if ((this._PressureTestPressure != value)) + { + this.OnPressureTestPressureChanging(value); + this.SendPropertyChanging(); + this._PressureTestPressure = value; + this.SendPropertyChanged("PressureTestPressure"); + this.OnPressureTestPressureChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestDate", DbType="DateTime")] + public System.Nullable TestDate + { + get + { + return this._TestDate; + } + set + { + if ((this._TestDate != value)) + { + this.OnTestDateChanging(value); + this.SendPropertyChanging(); + this._TestDate = value; + this.SendPropertyChanged("TestDate"); + this.OnTestDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_IndustrialInstallationSummaryZhoushan_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JGZL_IndustrialInstallationSummaryZhoushan.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JGZL_IndustrialInstallationSummaryZhoushan.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_IndustrialPipelineInstallationQualityCertificate")] public partial class JGZL_IndustrialPipelineInstallationQualityCertificate : INotifyPropertyChanging, INotifyPropertyChanged {