diff --git a/DataBase/版本日志/HJGLDB_DS_2026-09-11_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-09-11_bwj.sql new file mode 100644 index 0000000..768f126 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-09-11_bwj.sql @@ -0,0 +1,134 @@ +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule) +values('087420E0-A459-4CD7-A1B6-A7A5E001ABF8','ҵܵװ֤飨졢','JGZL/ModRepairQualityCertificate.aspx',51,'2A84FA58-8B20-48ED-A621-3EC98CF4AD28','3') +go +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('A353742E-6493-406E-9B64-79EE7017FD2B','087420E0-A459-4CD7-A1B6-A7A5E001ABF8','',1) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('E8B0D71E-D59E-4245-B8F9-5364AC4F157A','087420E0-A459-4CD7-A1B6-A7A5E001ABF8','޸',2) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('4716B9AF-E7A3-44EF-95AA-E16257D7FF3B','087420E0-A459-4CD7-A1B6-A7A5E001ABF8','ɾ',3) +insert into ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('2F03A48C-4F5C-409D-BADD-8B2EC8346C0D','087420E0-A459-4CD7-A1B6-A7A5E001ABF8','',4) + +go + +CREATE TABLE [dbo].[JGZL_ModRepairQualityCertificate]( + [QualityCertificateId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NOT NULL, + [QualityCertificateCode] [nvarchar](50) NULL, + [ConUnit] [nvarchar](50) NULL, + [ConUnitUSCC] [nvarchar](50) NULL, + [LicenseCode] [nvarchar](100) NULL, + [LicenseScope] [nvarchar](100) NULL, + [NotificationCode] [nvarchar](50) NULL, + [ISO_ID] [nvarchar](2000) NULL, + [PipelineCode] [nvarchar](2000) NULL, + [PipeLength] [nvarchar](50) NULL, + [PipeCategory] [nvarchar](50) NULL, + [ConCategory] [nvarchar](50) NULL, + [UseUnit] [nvarchar](50) NULL, + [UseUSCC] [nvarchar](50) NULL, + [UseAddress] [nvarchar](100) NULL, + [DesignUnit] [nvarchar](50) NULL, + [DesignDate] [datetime] NULL, + [DesignLicenseCode] [nvarchar](50) NULL, + [ModRepairProject] [nvarchar](500) NULL, + [Remark] [nvarchar](500) NULL, + [CompletionDate] [datetime] NULL, + [QC_Inspector] [nvarchar](50) NULL, + [QA_Engineer] [nvarchar](50) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + CONSTRAINT [PK_JGZL_ModRepairQualityCertificate] PRIMARY KEY CLUSTERED +( + [QualityCertificateId] 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_ModRepairQualityCertificate] WITH CHECK ADD CONSTRAINT [FK_JGZL_ModRepairQualityCertificate_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[JGZL_ModRepairQualityCertificate] CHECK CONSTRAINT [FK_JGZL_ModRepairQualityCertificate_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_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'QualityCertificateId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @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_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'QualityCertificateCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'ConUnit' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͳһô' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'ConUnitUSCC' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѹܵװ֤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'LicenseCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ɷΧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'LicenseScope' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֪' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'NotificationCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ߺ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @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_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'PipeLength' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'PipeCategory' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩ𣨡 شά άޣ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'ConCategory' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʹõλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'UseUnit' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͳһô' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'UseUSCC' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʹõص' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'UseAddress' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƶλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'DesignUnit' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'DesignDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'DesignLicenseCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'شάĿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'ModRepairProject' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'˵' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'Remark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'CompletionDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʼԱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'QC_Inspector' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֤ʦ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'QA_Engineer' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'CompileMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate', @level2type=N'COLUMN',@level2name=N'CompileDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѹܵά֤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JGZL_ModRepairQualityCertificate' +GO + + diff --git a/HJGL_DS/BLL/BLL.csproj b/HJGL_DS/BLL/BLL.csproj index f7325b5..f1367b3 100644 --- a/HJGL_DS/BLL/BLL.csproj +++ b/HJGL_DS/BLL/BLL.csproj @@ -267,6 +267,7 @@ + @@ -359,4 +360,4 @@ --> - + \ No newline at end of file diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index 2833397..fd17d98 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -1890,6 +1890,11 @@ namespace BLL /// public const string JGZL_IndustrialPipelineInstallationQualityCertificateMenuId = "F5833B38-65DF-4236-A676-EE75F9487061"; + /// + /// 工业管道安装质量证明书(改造、修理) + /// + public const string JGZL_ModRepairQualityCertificateMenuId = "087420E0-A459-4CD7-A1B6-A7A5E001ABF8"; + /// /// 工业管道安装汇总表 /// @@ -2524,6 +2529,11 @@ namespace BLL /// public const string JGZL_IndustrialPipelineInstallationQualityCertificateUrl = "File\\Word\\JGZL\\工业管道安装质量证明书导出模板.docx"; + /// + /// 工业管道安装质量证明书(改造、修理)导出模板 + /// + public const string JGZL_ModRepairQualityCertificateUrl = "File\\Word\\JGZL\\工业管道安装质量证明书(改造、修理)导出模板.docx"; + /// /// 压力管道安装质量证明2020导出模板 /// diff --git a/HJGL_DS/BLL/JGZL/ModRepairQualityCertificateService.cs b/HJGL_DS/BLL/JGZL/ModRepairQualityCertificateService.cs new file mode 100644 index 0000000..77c1d46 --- /dev/null +++ b/HJGL_DS/BLL/JGZL/ModRepairQualityCertificateService.cs @@ -0,0 +1,121 @@ +using FastReport.DevComponents.DotNetBar; +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 压力管道改造维修质量证明书 + /// + public class ModRepairQualityCertificateService + { + /// + /// 根据项目Id、编号获取压力管道改造维修质量证明书 + /// + /// 项目Id + /// 编号 + /// + public static Model.JGZL_ModRepairQualityCertificate GetModRepairQualityCertificateByProjectId(string projectId,string qualityCertificateId) + { + return Funs.DB.JGZL_ModRepairQualityCertificate.FirstOrDefault(e => e.ProjectId == projectId && e.QualityCertificateId == qualityCertificateId); + } + + /// + /// 添加压力管道改造维修质量证明书 + /// + /// + public static void AddModRepairQualityCertificate(Model.JGZL_ModRepairQualityCertificate modRepairQualityCertificate) + { + SGGLDB db = Funs.DB; + Model.JGZL_ModRepairQualityCertificate newModRepairQualityCertificate = new JGZL_ModRepairQualityCertificate(); + newModRepairQualityCertificate.QualityCertificateId = modRepairQualityCertificate.QualityCertificateId; + newModRepairQualityCertificate.ProjectId = modRepairQualityCertificate.ProjectId; + newModRepairQualityCertificate.QualityCertificateCode = modRepairQualityCertificate.QualityCertificateCode; + newModRepairQualityCertificate.ConUnit = modRepairQualityCertificate.ConUnit; + newModRepairQualityCertificate.ConUnitUSCC = modRepairQualityCertificate.ConUnitUSCC; + newModRepairQualityCertificate.LicenseCode = modRepairQualityCertificate.LicenseCode; + newModRepairQualityCertificate.LicenseScope = modRepairQualityCertificate.LicenseScope; + newModRepairQualityCertificate.NotificationCode = modRepairQualityCertificate.NotificationCode; + newModRepairQualityCertificate.ISO_ID= modRepairQualityCertificate.ISO_ID; + newModRepairQualityCertificate.PipelineCode = modRepairQualityCertificate.PipelineCode; + newModRepairQualityCertificate.PipeLength = modRepairQualityCertificate.PipeLength; + newModRepairQualityCertificate.PipeCategory = modRepairQualityCertificate.PipeCategory; + newModRepairQualityCertificate.ConCategory = modRepairQualityCertificate.ConCategory; + newModRepairQualityCertificate.UseUnit = modRepairQualityCertificate.UseUnit; + newModRepairQualityCertificate.UseUSCC = modRepairQualityCertificate.UseUSCC; + newModRepairQualityCertificate.UseAddress = modRepairQualityCertificate.UseAddress; + newModRepairQualityCertificate.DesignUnit = modRepairQualityCertificate.DesignUnit; + newModRepairQualityCertificate.DesignDate = modRepairQualityCertificate.DesignDate; + newModRepairQualityCertificate.DesignLicenseCode = modRepairQualityCertificate.DesignLicenseCode; + newModRepairQualityCertificate.ModRepairProject = modRepairQualityCertificate.ModRepairProject; + newModRepairQualityCertificate.Remark = modRepairQualityCertificate.Remark; + newModRepairQualityCertificate.CompletionDate = modRepairQualityCertificate.CompletionDate; + newModRepairQualityCertificate.QC_Inspector = modRepairQualityCertificate.QC_Inspector; + newModRepairQualityCertificate.QA_Engineer = modRepairQualityCertificate.QA_Engineer; + newModRepairQualityCertificate.CompileMan = modRepairQualityCertificate.CompileMan; + newModRepairQualityCertificate.CompileDate = modRepairQualityCertificate.CompileDate; + db.JGZL_ModRepairQualityCertificate.InsertOnSubmit(newModRepairQualityCertificate); + db.SubmitChanges(); + } + + /// + /// 修改压力管道改造维修质量证明书 + /// + /// + public static void UpdateModRepairQualityCertificate(Model.JGZL_ModRepairQualityCertificate modRepairQualityCertificate) + { + SGGLDB db = Funs.DB; + Model.JGZL_ModRepairQualityCertificate newModRepairQualityCertificate = db.JGZL_ModRepairQualityCertificate.FirstOrDefault(e => e.QualityCertificateId == modRepairQualityCertificate.QualityCertificateId); + if (newModRepairQualityCertificate != null) + { + newModRepairQualityCertificate.QualityCertificateCode = modRepairQualityCertificate.QualityCertificateCode; + newModRepairQualityCertificate.ConUnit = modRepairQualityCertificate.ConUnit; + newModRepairQualityCertificate.ConUnitUSCC = modRepairQualityCertificate.ConUnitUSCC; + newModRepairQualityCertificate.LicenseCode = modRepairQualityCertificate.LicenseCode; + newModRepairQualityCertificate.LicenseScope = modRepairQualityCertificate.LicenseScope; + newModRepairQualityCertificate.NotificationCode = modRepairQualityCertificate.NotificationCode; + newModRepairQualityCertificate.ISO_ID = modRepairQualityCertificate.ISO_ID; + newModRepairQualityCertificate.PipelineCode = modRepairQualityCertificate.PipelineCode; + newModRepairQualityCertificate.PipeLength = modRepairQualityCertificate.PipeLength; + newModRepairQualityCertificate.PipeCategory = modRepairQualityCertificate.PipeCategory; + newModRepairQualityCertificate.ConCategory = modRepairQualityCertificate.ConCategory; + newModRepairQualityCertificate.UseUnit = modRepairQualityCertificate.UseUnit; + newModRepairQualityCertificate.UseUSCC = modRepairQualityCertificate.UseUSCC; + newModRepairQualityCertificate.UseAddress = modRepairQualityCertificate.UseAddress; + newModRepairQualityCertificate.DesignUnit = modRepairQualityCertificate.DesignUnit; + newModRepairQualityCertificate.DesignDate = modRepairQualityCertificate.DesignDate; + newModRepairQualityCertificate.DesignLicenseCode = modRepairQualityCertificate.DesignLicenseCode; + newModRepairQualityCertificate.ModRepairProject = modRepairQualityCertificate.ModRepairProject; + newModRepairQualityCertificate.Remark = modRepairQualityCertificate.Remark; + newModRepairQualityCertificate.CompletionDate = modRepairQualityCertificate.CompletionDate; + newModRepairQualityCertificate.QC_Inspector = modRepairQualityCertificate.QC_Inspector; + newModRepairQualityCertificate.QA_Engineer = modRepairQualityCertificate.QA_Engineer; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除压力管道改造维修质量证明书 + /// + /// + public static void DeleteModRepairQualityCertificateById(string qualityCertificateId) + { + SGGLDB db = Funs.DB; + Model.JGZL_ModRepairQualityCertificate qualityCertificate = db.JGZL_ModRepairQualityCertificate.FirstOrDefault(e => e.QualityCertificateId == qualityCertificateId); + if (qualityCertificate != null) + { + db.JGZL_ModRepairQualityCertificate.DeleteOnSubmit(qualityCertificate); + db.SubmitChanges(); + } + } + + public static List GetLists(string projectId) + { + return (from x in Funs.DB.JGZL_ModRepairQualityCertificate where x.ProjectId == projectId orderby x.QualityCertificateCode select x).ToList(); + } + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工业管道安装质量证明书(改造、修理).frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工业管道安装质量证明书(改造、修理).frx new file mode 100644 index 0000000..ba878d1 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/工业管道安装质量证明书(改造、修理).frx @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/File/Word/JGZL/工业管道安装质量证明书(改造、修理)导出模板.docx b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/工业管道安装质量证明书(改造、修理)导出模板.docx new file mode 100644 index 0000000..5d6c5b3 Binary files /dev/null and b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/工业管道安装质量证明书(改造、修理)导出模板.docx differ diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index db18818..1f937f8 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1408,6 +1408,7 @@ + @@ -7089,6 +7090,13 @@ InsulationAcceptanceRecordEdit.aspx + + ModRepairQualityCertificate.aspx + ASPXCodeBehind + + + ModRepairQualityCertificate.aspx + PressureTestOfPipelineSystemConfirmationRecord.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user index e3436b8..6e29203 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -2,7 +2,7 @@ true - Release|Any CPU + Debug|Any CPU diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx b/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx new file mode 100644 index 0000000..e37c8ec --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx @@ -0,0 +1,260 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModRepairQualityCertificate.aspx.cs" Inherits="FineUIPro.Web.JGZL.ModRepairQualityCertificate" %> + + + + + + + 工业管道安装质量证明书 (改造、修理) + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --%> + + + + + <%----%> + + <%-- + + + + + --%> + + <%----%> + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx.cs new file mode 100644 index 0000000..bcad019 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx.cs @@ -0,0 +1,880 @@ +using Aspose.Words; +using BLL; +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 ModRepairQualityCertificate : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + private string QualityCertificateId + { + get + { + return (string)ViewState["QualityCertificateId"]; + } + set + { + ViewState["QualityCertificateId"] = 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; + + this.drpQualityCertificateCode.DataTextField = "QualityCertificateCode"; + this.drpQualityCertificateCode.DataValueField = "QualityCertificateId"; + this.drpQualityCertificateCode.DataSource = BLL.ModRepairQualityCertificateService.GetLists(this.tvControlItem.SelectedNodeID); + this.drpQualityCertificateCode.DataBind(); + + this.drpIsoId.DataTextField = "ISO_IsoNo"; + this.drpIsoId.DataValueField = "ISO_ID"; + this.drpIsoId.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.tvControlItem.SelectedNodeID); + this.drpIsoId.DataBind(); + //Funs.FineUIPleaseSelect(this.drpIsoId); + + //管道类别 + //this.drpPipelineLevel.DataTextField = "ISC_IsoName"; + //this.drpPipelineLevel.DataValueField = "ISC_IsoName"; + //this.drpPipelineLevel.DataSource = BLL.HJGL_PW_IsoInfoService.GetPipelineLevelList(this.drpProjectId.SelectedValue); + //this.drpPipelineLevel.DataBind(); + PageData(); + //BindGrid(); + + + } + } + #endregion + + private void EmptyText() + { + this.QualityCertificateId = string.Empty; + txtQualityCertificateCode.Text = string.Empty; + txtConUnit.Text = string.Empty; + txtConUnitUSCC.Text = string.Empty; + txtLicenseCode.Text = string.Empty; + txtLicenseScope.Text = string.Empty; + txtNotificationCode.Text = string.Empty; + drpIsoId.SelectedValue = string.Empty; + txtPipeLength.Text = string.Empty; + txtPipeCategory.Text = string.Empty; + cblConCategory.SelectedValueArray = null; + txtUseUnit.Text = string.Empty; + txtUseUSCC.Text = string.Empty; + txtUseAddress.Text = string.Empty; + txtDesignUnit.Text = string.Empty; + txtDesignDate.Text = string.Empty; + txtDesignLicenseCode.Text = string.Empty; + txtModRepairProject.Text = string.Empty; + txtCompletionDate.Text = string.Empty; + txtQC_Inspector.Text = string.Empty; + txtQA_Engineer.Text = string.Empty; + } + + private void PageData() + { + EmptyText(); + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + var pro = BLL.Base_ProjectService.GetProjectByProjectId(projectId); + if (pro != null) + { + var report = BLL.ModRepairQualityCertificateService.GetModRepairQualityCertificateByProjectId(projectId, drpQualityCertificateCode.SelectedValue); + if (report != null) + { + this.QualityCertificateId = report.QualityCertificateId; + this.txtQualityCertificateCode.Text = report.QualityCertificateCode; + this.txtConUnit.Text = report.ConUnit; + this.txtConUnitUSCC.Text = report.ConUnitUSCC; + this.txtLicenseCode.Text = report.LicenseCode; + this.txtLicenseScope.Text = report.LicenseScope; + this.txtNotificationCode.Text = report.NotificationCode; + if (!string.IsNullOrEmpty(report.ISO_ID)) + { + this.drpIsoId.SelectedValueArray = report.ISO_ID.Split(','); + } + this.txtPipeLength.Text = report.PipeLength; + this.txtPipeCategory.Text = report.PipeCategory; + this.cblConCategory.SelectedValueArray = report.ConCategory.Split(','); + this.txtUseUnit.Text = report.UseUnit; + this.txtUseUSCC.Text = report.UseUSCC; + this.txtUseAddress.Text = report.UseAddress; + this.txtDesignUnit.Text = report.DesignUnit; + this.txtDesignDate.Text = report.DesignDate.HasValue ? string.Format("{0:yyyy.MM.dd}", report.DesignDate) : ""; + this.txtDesignLicenseCode.Text = report.DesignLicenseCode; + this.txtModRepairProject.Text = report.ModRepairProject; + this.txtCompletionDate.Text = report.CompletionDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.CompletionDate) : ""; + this.txtQC_Inspector.Text = report.QC_Inspector; + this.txtQA_Engineer.Text = report.QA_Engineer; + } + else + { + this.QualityCertificateId = string.Empty; + //this.txtInstallationInspection.Text = "浙江省特种设备研究院"; + //this.txtConstructionUnit.Text = "浙江石油化工有限公司"; + //this.txtSpecialEquipmentProductionLicenseCode.Text = "TS3833339-2028"; + ////this.txtRemark.Text = "GB50517-2023"; + //this.txtPipelineLength.Text = BLL.HJGL_PW_IsoInfoService.GetPipeLineLengthList(this.tvControlItem.SelectedNodeID).Value.ToString(".##"); + } + } + } + } + + #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") + { + //this.BindGrid(); + PageData(); + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + //private void BindGrid() + //{ + // //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1"); + // string strSql = @"SELECT * from JGZL_ModRepairQualityCertificate 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 分页排序 + #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(); + PageData(); + //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(); + var report = BLL.ModRepairQualityCertificateService.GetModRepairQualityCertificateByProjectId(projectId, this.drpQualityCertificateCode.SelectedValue); + if (report != null) + { + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("QualityCertificateCode"); + dt.Columns.Add("ConUnit"); + dt.Columns.Add("ConUnitUSCC"); + dt.Columns.Add("LicenseCode"); + dt.Columns.Add("LicenseScope"); + dt.Columns.Add("NotificationCode"); + dt.Columns.Add("PipelineCode"); + dt.Columns.Add("PipeLength"); + dt.Columns.Add("PipeCategory"); + //dt.Columns.Add("ConCategory"); + dt.Columns.Add("UseUnit"); + dt.Columns.Add("UseUSCC"); + dt.Columns.Add("UseAddress"); + dt.Columns.Add("DesignUnit"); + dt.Columns.Add("DesignDate"); + dt.Columns.Add("DesignLicenseCode"); + dt.Columns.Add("ModRepairProject"); + dt.Columns.Add("Remark"); + dt.Columns.Add("CompletionDate"); + dt.Columns.Add("QC_Inspector"); + dt.Columns.Add("QA_Engineer"); + + var newRow = dt.NewRow(); + newRow["QualityCertificateCode"] = report.QualityCertificateCode; + newRow["ConUnit"] = report.ConUnit; + newRow["ConUnitUSCC"] = report.ConUnitUSCC; + newRow["LicenseCode"] = report.LicenseCode; + newRow["LicenseScope"] = report.LicenseScope; + newRow["NotificationCode"] = report.NotificationCode; + newRow["PipelineCode"] = report.PipelineCode; + newRow["PipeLength"] = report.PipeLength; + newRow["PipeCategory"] = report.PipeCategory; + //string conCategory = string.Empty; + //if (report.ConCategory == "改造") + //{ + // conCategory = "☒改造 ☐重大维修 ☐维修"; + //} + //else if (report.ConCategory == "重大维修") + //{ + // conCategory = "☐改造 ☒重大维修 ☐维修"; + //} + //else if (report.ConCategory == "维修") + //{ + // conCategory = "☐改造 ☐重大维修 ☒维修"; + //} + //else + //{ + // conCategory = "☐改造 ☐重大维修 ☐维修"; + //} + //newRow["ConCategory"] = conCategory; + newRow["UseUnit"] = report.UseUnit; + newRow["UseUSCC"] = report.UseUSCC; + newRow["UseAddress"] = report.UseAddress; + newRow["DesignUnit"] = report.DesignUnit; + string designDate = report.DesignDate.HasValue ? string.Format("{0:yyyy.MM.dd}", report.DesignDate) : ""; + newRow["DesignDate"] = designDate; + newRow["DesignLicenseCode"] = report.DesignLicenseCode; + newRow["ModRepairProject"] = report.ModRepairProject; + newRow["Remark"] = report.Remark; + string completionDate = report.CompletionDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.CompletionDate) : ""; + newRow["CompletionDate"] = completionDate; + newRow["QC_Inspector"] = report.QC_Inspector; + newRow["QA_Engineer"] = report.QA_Engineer; + dt.Rows.Add(newRow); + + BLL.Common.FastReportService.AddFastreportTable(dt); + + bool chkGaiZao = report.ConCategory == "改造"; + bool chkZhongDaWeiXiu = report.ConCategory == "重大维修"; + bool chkWeiXiu = report.ConCategory == "维修"; + + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("chkGaiZao", chkGaiZao.ToString()); + keyValuePairs.Add("chkZhongDaWeiXiu", chkZhongDaWeiXiu.ToString()); + keyValuePairs.Add("chkWeiXiu", chkWeiXiu.ToString()); + 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; + } + } + #endregion + + #region 维护 + /// + /// 增加 + /// + /// + /// + protected void btnAdd_Click(object sender, EventArgs e) + { + EmptyText(); + //if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + //{ + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ModRepairQualityCertificateEdit.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_ModRepairQualityCertificateMenuId, BLL.Const.BtnModify)) + // { + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + // { + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ModRepairQualityCertificateEdit.aspx?qualityCertificateId={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_ModRepairQualityCertificateMenuId, BLL.Const.BtnModify)) + // { + // if (Grid1.SelectedRowIndexArray.Length == 0) + // { + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + // } + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ModRepairQualityCertificateEdit.aspx?qualityCertificateId={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_ModRepairQualityCertificateMenuId, 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.ModRepairQualityCertificateService.DeleteModRepairQualityCertificateById(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; + + // if (string.IsNullOrEmpty(content)) + // { + // return true; + // } + // else + // { + // if (isShow) + // { + // Alert.ShowInTop(content, MessageBoxIcon.Error); + // } + // return false; + // } + //} + #endregion + #endregion + + #region 关闭弹出窗口及刷新页面 + /// + /// 关闭弹出窗口 + /// + /// + /// + //protected void Window1_Close(object sender, WindowCloseEventArgs e) + //{ + // this.InitTreeMenu();//加载树 + // this.BindGrid(); + //} + #endregion + + #region 保存 + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ModRepairQualityCertificateMenuId, Const.BtnSave)) + { + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + if (string.IsNullOrEmpty(this.drpIsoId.SelectedValue)) + { + Alert.ShowInTop("请选择管线号!", MessageBoxIcon.Warning); + return; + } + Model.JGZL_ModRepairQualityCertificate newReport = new Model.JGZL_ModRepairQualityCertificate(); + newReport.QualityCertificateCode = this.txtQualityCertificateCode.Text.Trim(); + newReport.ConUnit = this.txtConUnit.Text.Trim(); + newReport.ConUnitUSCC = this.txtConUnitUSCC.Text.Trim(); + newReport.LicenseCode = this.txtLicenseCode.Text.Trim(); + newReport.LicenseScope = this.txtLicenseScope.Text.Trim(); + newReport.NotificationCode = this.txtNotificationCode.Text.Trim(); + List isoLists = this.drpIsoId.SelectedValueArray.ToList(); + string ids = string.Empty; + string names = string.Empty; + foreach (var isoId in isoLists) + { + ids += isoId + ","; + names += BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(isoId).ISO_IsoNo + ","; + } + if (!string.IsNullOrEmpty(ids)) + { + ids = ids.Substring(0, ids.LastIndexOf(",")); + } + if (!string.IsNullOrEmpty(names)) + { + names = names.Substring(0, names.LastIndexOf(",")); + } + newReport.ISO_ID = ids; + newReport.PipelineCode = names; + newReport.PipeLength = this.txtPipeLength.Text.Trim(); + newReport.PipeCategory = this.txtPipeCategory.Text.Trim(); + newReport.ConCategory = this.cblConCategory.SelectedValueArray[0]; + newReport.UseUnit = this.txtUseUnit.Text.Trim(); + newReport.UseUSCC = this.txtUseUSCC.Text.Trim(); + newReport.UseAddress = this.txtUseAddress.Text.Trim(); + newReport.DesignUnit = this.txtDesignUnit.Text.Trim(); + newReport.DesignDate = Funs.GetNewDateTime(this.txtDesignDate.Text.Trim()); + newReport.DesignLicenseCode = this.txtDesignLicenseCode.Text.Trim(); + newReport.ModRepairProject = this.txtModRepairProject.Text.Trim(); + newReport.Remark = this.lblRemark.Text.Trim(); + newReport.CompletionDate = Funs.GetNewDateTime(this.txtCompletionDate.Text.Trim()); + newReport.QC_Inspector = this.txtQC_Inspector.Text.Trim(); + newReport.QA_Engineer = this.txtQA_Engineer.Text.Trim(); + if (!string.IsNullOrEmpty(this.QualityCertificateId)) + { + newReport.QualityCertificateId = this.QualityCertificateId; + BLL.ModRepairQualityCertificateService.UpdateModRepairQualityCertificate(newReport); + } + else + { + newReport.ProjectId = projectId; + newReport.CompileMan = this.CurrUser.UserId; + newReport.CompileDate = DateTime.Now; + newReport.QualityCertificateId = SQLHelper.GetNewID(typeof(Model.JGZL_ModRepairQualityCertificate)); + this.QualityCertificateId = newReport.QualityCertificateId; + BLL.ModRepairQualityCertificateService.AddModRepairQualityCertificate(newReport); + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + + this.drpQualityCertificateCode.Items.Clear(); + this.drpQualityCertificateCode.DataTextField = "QualityCertificateCode"; + this.drpQualityCertificateCode.DataValueField = "QualityCertificateId"; + this.drpQualityCertificateCode.DataSource = BLL.ModRepairQualityCertificateService.GetLists(this.tvControlItem.SelectedNodeID); + this.drpQualityCertificateCode.DataBind(); + this.drpQualityCertificateCode.SelectedValue = this.QualityCertificateId; + + PageData(); + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + 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; + + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + var report = BLL.ModRepairQualityCertificateService.GetModRepairQualityCertificateByProjectId(projectId, this.drpQualityCertificateCode.SelectedValue); + if (report != null) + { + initTemplatePath = Const.JGZL_ModRepairQualityCertificateUrl; + uploadfilepath = rootPath + initTemplatePath; + + newUrl = uploadfilepath.Replace("工业管道安装质量证明书(改造、修理)导出模板", "工业管道安装质量证明书(改造、修理)"); + if (File.Exists(newUrl)) + { + File.Delete(newUrl); + } + File.Copy(uploadfilepath, newUrl); + Document doc = new Aspose.Words.Document(uploadfilepath); + + Bookmark certificateCode = doc.Range.Bookmarks["CertificateCode"]; + if (certificateCode != null) + { + certificateCode.Text = report.QualityCertificateCode; + } + Bookmark conUnit = doc.Range.Bookmarks["ConUnit"]; + if (conUnit != null) + { + conUnit.Text = report.ConUnit; + } + Bookmark conUnitUSCC = doc.Range.Bookmarks["ConUnitUSCC"]; + if (conUnitUSCC != null) + { + conUnitUSCC.Text = report.ConUnitUSCC; + } + Bookmark licenseCode = doc.Range.Bookmarks["LicenseCode"]; + if (licenseCode != null) + { + licenseCode.Text = report.LicenseCode; + } + Bookmark licenseScope = doc.Range.Bookmarks["LicenseScope"]; + if (licenseScope != null) + { + licenseScope.Text = report.LicenseScope; + } + Bookmark notificationCode = doc.Range.Bookmarks["NotificationCode"]; + if (notificationCode != null) + { + notificationCode.Text = report.NotificationCode; + } + Bookmark pipelineCode = doc.Range.Bookmarks["PipelineCode"]; + if (pipelineCode != null) + { + pipelineCode.Text = report.PipelineCode; + } + Bookmark pipeLength = doc.Range.Bookmarks["PipeLength"]; + if (pipeLength != null) + { + pipeLength.Text = report.PipeLength; + } + Bookmark pipeCategory = doc.Range.Bookmarks["PipeCategory"]; + if (pipeCategory != null) + { + pipeCategory.Text = report.PipeCategory; + } + Bookmark conCategory = doc.Range.Bookmarks["ConCategory"]; + if (conCategory != null) + { + string category = string.Empty; + if (report.ConCategory == "改造") + { + category = "☑改造 □重大维修 □维修"; + } + else if (report.ConCategory == "重大维修") + { + category = "□改造 ☑重大维修 □维修"; + } + else if (report.ConCategory == "维修") + { + category = "□改造 □重大维修 ☑维修"; + } + else + { + category = "□改造 □重大维修 □维修"; + } + conCategory.Text = category; + } + Bookmark useUnit = doc.Range.Bookmarks["UseUnit"]; + if (useUnit != null) + { + useUnit.Text = report.UseUnit; + } + Bookmark useUSCC = doc.Range.Bookmarks["UseUSCC"]; + if (useUSCC != null) + { + useUSCC.Text = report.UseUSCC; + } + Bookmark useAddress = doc.Range.Bookmarks["UseAddress"]; + if (useAddress != null) + { + useAddress.Text = report.UseAddress; + } + Bookmark designUnit = doc.Range.Bookmarks["DesignUnit"]; + if (designUnit != null) + { + designUnit.Text = report.DesignUnit; + } + Bookmark designDate = doc.Range.Bookmarks["DesignDate"]; + if (designDate != null) + { + designDate.Text = report.DesignDate.HasValue ? string.Format("{0:yyyy.MM.dd}", report.DesignDate) : ""; + } + Bookmark designLicenseCode = doc.Range.Bookmarks["DesignLicenseCode"]; + if (designLicenseCode != null) + { + designLicenseCode.Text = report.DesignLicenseCode; + } + Bookmark modRepairProject = doc.Range.Bookmarks["ModRepairProject"]; + if (modRepairProject != null) + { + modRepairProject.Text = report.ModRepairProject; + } + Bookmark remark = doc.Range.Bookmarks["Remark"]; + if (remark != null) + { + remark.Text = report.Remark; + } + Bookmark completionDate = doc.Range.Bookmarks["CompletionDate"]; + if (completionDate != null) + { + completionDate.Text = report.CompletionDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.CompletionDate) : ""; + } + Bookmark inspector = doc.Range.Bookmarks["QC_Inspector"]; + if (inspector != null) + { + inspector.Text = report.QC_Inspector; + } + Bookmark engineer = doc.Range.Bookmarks["QA_Engineer"]; + if (engineer != null) + { + engineer.Text = report.QA_Engineer; + } + + 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; + } + } + #endregion + + #region DropDonwList下拉选择事件 + /// + /// 管线下拉选择事件 + /// + /// + /// + protected void drpIsoId_SelectedIndexChanged(object sender, EventArgs e) + { + this.txtPipeLength.Text = string.Empty; + decimal? lineLength = 0; + List isoLists = this.drpIsoId.SelectedValueArray.ToList(); + if (isoLists.Count > 0) + { + foreach (var isoId in isoLists) + { + var iso = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(isoId); + if (iso != null) + { + if (iso.PipeLineLength.HasValue) + { + lineLength += iso.PipeLineLength; + } + } + } + this.txtPipeLength.Text = lineLength.Value.ToString("#.00"); + } + } + + /// + /// 编号下拉选择 + /// + /// + /// + protected void drpQualityCertificateCode_SelectedIndexChanged(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.drpQualityCertificateCode.SelectedValue)) + { + PageData(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx.designer.cs new file mode 100644 index 0000000..5ce5531 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/JGZL/ModRepairQualityCertificate.aspx.designer.cs @@ -0,0 +1,395 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JGZL +{ + + + public partial class ModRepairQualityCertificate + { + + /// + /// 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; + + /// + /// drpQualityCertificateCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpQualityCertificateCode; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtQualityCertificateCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtQualityCertificateCode; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label4; + + /// + /// txtConUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConUnit; + + /// + /// txtConUnitUSCC 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConUnitUSCC; + + /// + /// txtLicenseCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLicenseCode; + + /// + /// txtLicenseScope 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLicenseScope; + + /// + /// txtNotificationCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtNotificationCode; + + /// + /// drpIsoId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIsoId; + + /// + /// txtPipeLength 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipeLength; + + /// + /// txtPipeCategory 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipeCategory; + + /// + /// cblConCategory 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBoxList cblConCategory; + + /// + /// txtUseUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseUnit; + + /// + /// txtUseUSCC 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseUSCC; + + /// + /// txtUseAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUseAddress; + + /// + /// txtDesignUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDesignUnit; + + /// + /// txtDesignDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtDesignDate; + + /// + /// txtDesignLicenseCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDesignLicenseCode; + + /// + /// txtModRepairProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtModRepairProject; + + /// + /// lblRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblRemark; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtCompletionDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompletionDate; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label2; + + /// + /// txtQC_Inspector 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtQC_Inspector; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtQA_Engineer 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtQA_Engineer; + + /// + /// WindowPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowPrint; + } +} diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 3c98f31..557f12f 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -67,7 +67,7 @@ - + diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index fe85845..449453e 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -446,6 +446,9 @@ namespace Model partial void InsertJGZL_MeasuringInstruments(JGZL_MeasuringInstruments instance); partial void UpdateJGZL_MeasuringInstruments(JGZL_MeasuringInstruments instance); partial void DeleteJGZL_MeasuringInstruments(JGZL_MeasuringInstruments instance); + partial void InsertJGZL_ModRepairQualityCertificate(JGZL_ModRepairQualityCertificate instance); + partial void UpdateJGZL_ModRepairQualityCertificate(JGZL_ModRepairQualityCertificate instance); + partial void DeleteJGZL_ModRepairQualityCertificate(JGZL_ModRepairQualityCertificate instance); partial void InsertJGZL_NDTPerson(JGZL_NDTPerson instance); partial void UpdateJGZL_NDTPerson(JGZL_NDTPerson instance); partial void DeleteJGZL_NDTPerson(JGZL_NDTPerson instance); @@ -2121,6 +2124,14 @@ namespace Model } } + public System.Data.Linq.Table JGZL_ModRepairQualityCertificate + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table JGZL_NDTPerson { get @@ -5008,6 +5019,8 @@ namespace Model private EntitySet _JGZL_MeasuringInstruments; + private EntitySet _JGZL_ModRepairQualityCertificate; + private EntitySet _JGZL_NDTPerson; private EntitySet _JGZL_PipeFittingInspectionRecord; @@ -5201,6 +5214,7 @@ namespace Model this._JGZL_MaterialIdentificationInspectionRecord = new EntitySet(new Action(this.attach_JGZL_MaterialIdentificationInspectionRecord), new Action(this.detach_JGZL_MaterialIdentificationInspectionRecord)); this._JGZL_MaterialQualityCertificateDoc = new EntitySet(new Action(this.attach_JGZL_MaterialQualityCertificateDoc), new Action(this.detach_JGZL_MaterialQualityCertificateDoc)); this._JGZL_MeasuringInstruments = new EntitySet(new Action(this.attach_JGZL_MeasuringInstruments), new Action(this.detach_JGZL_MeasuringInstruments)); + this._JGZL_ModRepairQualityCertificate = new EntitySet(new Action(this.attach_JGZL_ModRepairQualityCertificate), new Action(this.detach_JGZL_ModRepairQualityCertificate)); this._JGZL_NDTPerson = new EntitySet(new Action(this.attach_JGZL_NDTPerson), new Action(this.detach_JGZL_NDTPerson)); this._JGZL_PipeFittingInspectionRecord = new EntitySet(new Action(this.attach_JGZL_PipeFittingInspectionRecord), new Action(this.detach_JGZL_PipeFittingInspectionRecord)); this._JGZL_PipelineInstallationInspectionRecord = new EntitySet(new Action(this.attach_JGZL_PipelineInstallationInspectionRecord), new Action(this.detach_JGZL_PipelineInstallationInspectionRecord)); @@ -6578,6 +6592,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_ModRepairQualityCertificate_Base_Project", Storage="_JGZL_ModRepairQualityCertificate", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JGZL_ModRepairQualityCertificate + { + get + { + return this._JGZL_ModRepairQualityCertificate; + } + set + { + this._JGZL_ModRepairQualityCertificate.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_NDTPerson_Base_Project", Storage="_JGZL_NDTPerson", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet JGZL_NDTPerson { @@ -7763,6 +7790,18 @@ namespace Model entity.Base_Project = null; } + private void attach_JGZL_ModRepairQualityCertificate(JGZL_ModRepairQualityCertificate entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JGZL_ModRepairQualityCertificate(JGZL_ModRepairQualityCertificate entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_JGZL_NDTPerson(JGZL_NDTPerson entity) { this.SendPropertyChanging(); @@ -92900,6 +92939,709 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JGZL_ModRepairQualityCertificate")] + public partial class JGZL_ModRepairQualityCertificate : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _QualityCertificateId; + + private string _ProjectId; + + private string _QualityCertificateCode; + + private string _ConUnit; + + private string _ConUnitUSCC; + + private string _LicenseCode; + + private string _LicenseScope; + + private string _NotificationCode; + + private string _ISO_ID; + + private string _PipelineCode; + + private string _PipeLength; + + private string _PipeCategory; + + private string _ConCategory; + + private string _UseUnit; + + private string _UseUSCC; + + private string _UseAddress; + + private string _DesignUnit; + + private System.Nullable _DesignDate; + + private string _DesignLicenseCode; + + private string _ModRepairProject; + + private string _Remark; + + private System.Nullable _CompletionDate; + + private string _QC_Inspector; + + private string _QA_Engineer; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnQualityCertificateIdChanging(string value); + partial void OnQualityCertificateIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnQualityCertificateCodeChanging(string value); + partial void OnQualityCertificateCodeChanged(); + partial void OnConUnitChanging(string value); + partial void OnConUnitChanged(); + partial void OnConUnitUSCCChanging(string value); + partial void OnConUnitUSCCChanged(); + partial void OnLicenseCodeChanging(string value); + partial void OnLicenseCodeChanged(); + partial void OnLicenseScopeChanging(string value); + partial void OnLicenseScopeChanged(); + partial void OnNotificationCodeChanging(string value); + partial void OnNotificationCodeChanged(); + partial void OnISO_IDChanging(string value); + partial void OnISO_IDChanged(); + partial void OnPipelineCodeChanging(string value); + partial void OnPipelineCodeChanged(); + partial void OnPipeLengthChanging(string value); + partial void OnPipeLengthChanged(); + partial void OnPipeCategoryChanging(string value); + partial void OnPipeCategoryChanged(); + partial void OnConCategoryChanging(string value); + partial void OnConCategoryChanged(); + partial void OnUseUnitChanging(string value); + partial void OnUseUnitChanged(); + partial void OnUseUSCCChanging(string value); + partial void OnUseUSCCChanged(); + partial void OnUseAddressChanging(string value); + partial void OnUseAddressChanged(); + partial void OnDesignUnitChanging(string value); + partial void OnDesignUnitChanged(); + partial void OnDesignDateChanging(System.Nullable value); + partial void OnDesignDateChanged(); + partial void OnDesignLicenseCodeChanging(string value); + partial void OnDesignLicenseCodeChanged(); + partial void OnModRepairProjectChanging(string value); + partial void OnModRepairProjectChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnCompletionDateChanging(System.Nullable value); + partial void OnCompletionDateChanged(); + partial void OnQC_InspectorChanging(string value); + partial void OnQC_InspectorChanged(); + partial void OnQA_EngineerChanging(string value); + partial void OnQA_EngineerChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JGZL_ModRepairQualityCertificate() + { + this._Base_Project = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityCertificateId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string QualityCertificateId + { + get + { + return this._QualityCertificateId; + } + set + { + if ((this._QualityCertificateId != value)) + { + this.OnQualityCertificateIdChanging(value); + this.SendPropertyChanging(); + this._QualityCertificateId = value; + this.SendPropertyChanged("QualityCertificateId"); + this.OnQualityCertificateIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + 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="_QualityCertificateCode", DbType="NVarChar(50)")] + public string QualityCertificateCode + { + get + { + return this._QualityCertificateCode; + } + set + { + if ((this._QualityCertificateCode != value)) + { + this.OnQualityCertificateCodeChanging(value); + this.SendPropertyChanging(); + this._QualityCertificateCode = value; + this.SendPropertyChanged("QualityCertificateCode"); + this.OnQualityCertificateCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConUnit", DbType="NVarChar(50)")] + public string ConUnit + { + get + { + return this._ConUnit; + } + set + { + if ((this._ConUnit != value)) + { + this.OnConUnitChanging(value); + this.SendPropertyChanging(); + this._ConUnit = value; + this.SendPropertyChanged("ConUnit"); + this.OnConUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConUnitUSCC", DbType="NVarChar(50)")] + public string ConUnitUSCC + { + get + { + return this._ConUnitUSCC; + } + set + { + if ((this._ConUnitUSCC != value)) + { + this.OnConUnitUSCCChanging(value); + this.SendPropertyChanging(); + this._ConUnitUSCC = value; + this.SendPropertyChanged("ConUnitUSCC"); + this.OnConUnitUSCCChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LicenseCode", DbType="NVarChar(100)")] + public string LicenseCode + { + get + { + return this._LicenseCode; + } + set + { + if ((this._LicenseCode != value)) + { + this.OnLicenseCodeChanging(value); + this.SendPropertyChanging(); + this._LicenseCode = value; + this.SendPropertyChanged("LicenseCode"); + this.OnLicenseCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LicenseScope", DbType="NVarChar(100)")] + public string LicenseScope + { + get + { + return this._LicenseScope; + } + set + { + if ((this._LicenseScope != value)) + { + this.OnLicenseScopeChanging(value); + this.SendPropertyChanging(); + this._LicenseScope = value; + this.SendPropertyChanged("LicenseScope"); + this.OnLicenseScopeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NotificationCode", DbType="NVarChar(50)")] + public string NotificationCode + { + get + { + return this._NotificationCode; + } + set + { + if ((this._NotificationCode != value)) + { + this.OnNotificationCodeChanging(value); + this.SendPropertyChanging(); + this._NotificationCode = value; + this.SendPropertyChanged("NotificationCode"); + this.OnNotificationCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ISO_ID", DbType="NVarChar(2000)")] + public string ISO_ID + { + get + { + return this._ISO_ID; + } + set + { + if ((this._ISO_ID != value)) + { + this.OnISO_IDChanging(value); + this.SendPropertyChanging(); + this._ISO_ID = value; + this.SendPropertyChanged("ISO_ID"); + this.OnISO_IDChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(2000)")] + 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="_PipeLength", DbType="NVarChar(50)")] + public string PipeLength + { + get + { + return this._PipeLength; + } + set + { + if ((this._PipeLength != value)) + { + this.OnPipeLengthChanging(value); + this.SendPropertyChanging(); + this._PipeLength = value; + this.SendPropertyChanged("PipeLength"); + this.OnPipeLengthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeCategory", DbType="NVarChar(50)")] + public string PipeCategory + { + get + { + return this._PipeCategory; + } + set + { + if ((this._PipeCategory != value)) + { + this.OnPipeCategoryChanging(value); + this.SendPropertyChanging(); + this._PipeCategory = value; + this.SendPropertyChanged("PipeCategory"); + this.OnPipeCategoryChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConCategory", DbType="NVarChar(50)")] + public string ConCategory + { + get + { + return this._ConCategory; + } + set + { + if ((this._ConCategory != value)) + { + this.OnConCategoryChanging(value); + this.SendPropertyChanging(); + this._ConCategory = value; + this.SendPropertyChanged("ConCategory"); + this.OnConCategoryChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UseUnit", DbType="NVarChar(50)")] + public string UseUnit + { + get + { + return this._UseUnit; + } + set + { + if ((this._UseUnit != value)) + { + this.OnUseUnitChanging(value); + this.SendPropertyChanging(); + this._UseUnit = value; + this.SendPropertyChanged("UseUnit"); + this.OnUseUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UseUSCC", DbType="NVarChar(50)")] + public string UseUSCC + { + get + { + return this._UseUSCC; + } + set + { + if ((this._UseUSCC != value)) + { + this.OnUseUSCCChanging(value); + this.SendPropertyChanging(); + this._UseUSCC = value; + this.SendPropertyChanged("UseUSCC"); + this.OnUseUSCCChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UseAddress", DbType="NVarChar(100)")] + public string UseAddress + { + get + { + return this._UseAddress; + } + set + { + if ((this._UseAddress != value)) + { + this.OnUseAddressChanging(value); + this.SendPropertyChanging(); + this._UseAddress = value; + this.SendPropertyChanged("UseAddress"); + this.OnUseAddressChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignUnit", DbType="NVarChar(50)")] + public string DesignUnit + { + get + { + return this._DesignUnit; + } + set + { + if ((this._DesignUnit != value)) + { + this.OnDesignUnitChanging(value); + this.SendPropertyChanging(); + this._DesignUnit = value; + this.SendPropertyChanged("DesignUnit"); + this.OnDesignUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDate", DbType="DateTime")] + public System.Nullable DesignDate + { + get + { + return this._DesignDate; + } + set + { + if ((this._DesignDate != value)) + { + this.OnDesignDateChanging(value); + this.SendPropertyChanging(); + this._DesignDate = value; + this.SendPropertyChanged("DesignDate"); + this.OnDesignDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignLicenseCode", DbType="NVarChar(50)")] + public string DesignLicenseCode + { + get + { + return this._DesignLicenseCode; + } + set + { + if ((this._DesignLicenseCode != value)) + { + this.OnDesignLicenseCodeChanging(value); + this.SendPropertyChanging(); + this._DesignLicenseCode = value; + this.SendPropertyChanged("DesignLicenseCode"); + this.OnDesignLicenseCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ModRepairProject", DbType="NVarChar(500)")] + public string ModRepairProject + { + get + { + return this._ModRepairProject; + } + set + { + if ((this._ModRepairProject != value)) + { + this.OnModRepairProjectChanging(value); + this.SendPropertyChanging(); + this._ModRepairProject = value; + this.SendPropertyChanged("ModRepairProject"); + this.OnModRepairProjectChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletionDate", DbType="DateTime")] + public System.Nullable CompletionDate + { + get + { + return this._CompletionDate; + } + set + { + if ((this._CompletionDate != value)) + { + this.OnCompletionDateChanging(value); + this.SendPropertyChanging(); + this._CompletionDate = value; + this.SendPropertyChanged("CompletionDate"); + this.OnCompletionDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QC_Inspector", DbType="NVarChar(50)")] + public string QC_Inspector + { + get + { + return this._QC_Inspector; + } + set + { + if ((this._QC_Inspector != value)) + { + this.OnQC_InspectorChanging(value); + this.SendPropertyChanging(); + this._QC_Inspector = value; + this.SendPropertyChanged("QC_Inspector"); + this.OnQC_InspectorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QA_Engineer", DbType="NVarChar(50)")] + public string QA_Engineer + { + get + { + return this._QA_Engineer; + } + set + { + if ((this._QA_Engineer != value)) + { + this.OnQA_EngineerChanging(value); + this.SendPropertyChanging(); + this._QA_Engineer = value; + this.SendPropertyChanged("QA_Engineer"); + this.OnQA_EngineerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_ModRepairQualityCertificate_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_ModRepairQualityCertificate.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JGZL_ModRepairQualityCertificate.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_NDTPerson")] public partial class JGZL_NDTPerson : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/HJGL_DS/WebAPI/WebAPI.csproj.user b/HJGL_DS/WebAPI/WebAPI.csproj.user index 8cd7f1f..ef14066 100644 --- a/HJGL_DS/WebAPI/WebAPI.csproj.user +++ b/HJGL_DS/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@ - Release|Any CPU + Debug|Any CPU FolderProfile true