diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-31-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-31-bwj.sql new file mode 100644 index 00000000..f087d1e5 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-05-31-bwj.sql @@ -0,0 +1,229 @@ +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('F5585C62-1F12-4073-8733-C0826FB692DB','߻','',190,'0','Menu_CQMS',0,0,1) +go +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('1D3CAAD1-690B-4F30-9E3E-6B31D0CF60FA','Ŀƻ','CQMS/QualityPlanning/ProjectQualityPlan.aspx',10,'F5585C62-1F12-4073-8733-C0826FB692DB','Menu_CQMS',0,1,1) +go + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('8DEF71B6-6097-44A6-AFE0-84AB92DD7455','1D3CAAD1-690B-4F30-9E3E-6B31D0CF60FA','',1) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('BAD25B64-2D8F-4B30-B137-7986FF523473','1D3CAAD1-690B-4F30-9E3E-6B31D0CF60FA','޸',2) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('71B220CB-07CE-4DAF-8517-5BBDF22D4BBD','1D3CAAD1-690B-4F30-9E3E-6B31D0CF60FA','ɾ',3) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('40EBFB1C-F001-4594-BC7C-86EBFEF5FA13','1D3CAAD1-690B-4F30-9E3E-6B31D0CF60FA','',4) + go +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('46E6F0A6-A6A2-4904-9B69-CD91342D7DF8','ƶ','CQMS/QualityPlanning/QualityManagementSys.aspx',20,'F5585C62-1F12-4073-8733-C0826FB692DB','Menu_CQMS',0,1,1) +go + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('7ADC74D8-FDED-49CA-B8C9-C01A7D9A187A','46E6F0A6-A6A2-4904-9B69-CD91342D7DF8','',1) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('3C62B9BD-03B1-4A70-AFA3-F7EC65AFE851','46E6F0A6-A6A2-4904-9B69-CD91342D7DF8','޸',2) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('FBC917B6-1477-4ABB-AE6B-4ED7F9F484D7','46E6F0A6-A6A2-4904-9B69-CD91342D7DF8','ɾ',3) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('6DC9D9A7-92C9-4F04-9001-214ED0DE992F','46E6F0A6-A6A2-4904-9B69-CD91342D7DF8','',4) + go +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('6769098A-53D7-4585-87CC-2DADBCBC2C74','Ŀʩܽ嵥','CQMS/QualityPlanning/ConExperienceSummary.aspx',30,'F5585C62-1F12-4073-8733-C0826FB692DB','Menu_CQMS',0,1,1) +go + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('B1933915-149F-4A3C-9DA0-410C53C55DA4','6769098A-53D7-4585-87CC-2DADBCBC2C74','',1) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('6B198C01-41CC-4CE0-8DB4-74AC278E9E7B','6769098A-53D7-4585-87CC-2DADBCBC2C74','޸',2) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('AC64DDB9-8E3B-40F3-9CF0-0F83CA4C959A','6769098A-53D7-4585-87CC-2DADBCBC2C74','ɾ',3) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('AA27DD51-31A8-496A-9F6D-7117AA94A4EF','6769098A-53D7-4585-87CC-2DADBCBC2C74','',4) + go +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('B340205A-8857-4D0D-9E4C-41D91A417A77','֯','CQMS/QualityPlanning/Organizational.aspx',40,'F5585C62-1F12-4073-8733-C0826FB692DB','Menu_CQMS',0,1,1) +go + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('1AF561F4-5EE1-43BA-B171-9FB7A4AF9BDC','B340205A-8857-4D0D-9E4C-41D91A417A77','鿴',1) + go + +CREATE TABLE [dbo].[QualityPlanning_ProjectQualityPlan]( + [ProjectQualityPlanId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [FileCode] [nvarchar](50) NULL, + [FileName] [nvarchar](100) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [Auditor] [nvarchar](50) NULL, + [Approver] [nvarchar](50) NULL, + [ApprovalDate] [datetime] NULL, + CONSTRAINT [PK_QualityPlanning_ProjectQualityPlan] PRIMARY KEY CLUSTERED +( + [ProjectQualityPlanId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[QualityPlanning_ProjectQualityPlan] WITH CHECK ADD CONSTRAINT [FK_QualityPlanning_ProjectQualityPlan_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[QualityPlanning_ProjectQualityPlan] CHECK CONSTRAINT [FK_QualityPlanning_ProjectQualityPlan_Base_Project] +GO + +ALTER TABLE [dbo].[QualityPlanning_ProjectQualityPlan] WITH CHECK ADD CONSTRAINT [FK_QualityPlanning_ProjectQualityPlan_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[QualityPlanning_ProjectQualityPlan] CHECK CONSTRAINT [FK_QualityPlanning_ProjectQualityPlan_Sys_User] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ProjectQualityPlan', @level2type=N'COLUMN',@level2name=N'ProjectQualityPlanId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ProjectQualityPlan', @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'QualityPlanning_ProjectQualityPlan', @level2type=N'COLUMN',@level2name=N'FileCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ļ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ProjectQualityPlan', @level2type=N'COLUMN',@level2name=N'FileName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ProjectQualityPlan', @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'QualityPlanning_ProjectQualityPlan', @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'QualityPlanning_ProjectQualityPlan', @level2type=N'COLUMN',@level2name=N'Auditor' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'׼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ProjectQualityPlan', @level2type=N'COLUMN',@level2name=N'Approver' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'׼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ProjectQualityPlan', @level2type=N'COLUMN',@level2name=N'ApprovalDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ProjectQualityPlan' +GO + + + + +CREATE TABLE [dbo].[QualityPlanning_QualityManagementSys]( + [QualityManagementSysId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [FileCode] [nvarchar](50) NULL, + [FileName] [nvarchar](100) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [Auditor] [nvarchar](50) NULL, + [Approver] [nvarchar](50) NULL, + [ApprovalDate] [datetime] NULL, + CONSTRAINT [PK_QualityPlanning_QualityManagementSys] PRIMARY KEY CLUSTERED +( + [QualityManagementSysId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[QualityPlanning_QualityManagementSys] WITH CHECK ADD CONSTRAINT [FK_QualityPlanning_QualityManagementSys_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[QualityPlanning_QualityManagementSys] CHECK CONSTRAINT [FK_QualityPlanning_QualityManagementSys_Base_Project] +GO + +ALTER TABLE [dbo].[QualityPlanning_QualityManagementSys] WITH CHECK ADD CONSTRAINT [FK_QualityPlanning_QualityManagementSys_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[QualityPlanning_QualityManagementSys] CHECK CONSTRAINT [FK_QualityPlanning_QualityManagementSys_Sys_User] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_QualityManagementSys', @level2type=N'COLUMN',@level2name=N'QualityManagementSysId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_QualityManagementSys', @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'QualityPlanning_QualityManagementSys', @level2type=N'COLUMN',@level2name=N'FileCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ļ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_QualityManagementSys', @level2type=N'COLUMN',@level2name=N'FileName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_QualityManagementSys', @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'QualityPlanning_QualityManagementSys', @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'QualityPlanning_QualityManagementSys', @level2type=N'COLUMN',@level2name=N'Auditor' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'׼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_QualityManagementSys', @level2type=N'COLUMN',@level2name=N'Approver' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'׼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_QualityManagementSys', @level2type=N'COLUMN',@level2name=N'ApprovalDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƶ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_QualityManagementSys' +GO + + +CREATE TABLE [dbo].[QualityPlanning_ConExperienceSummary]( + [ConExperienceSummaryId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [FileName] [nvarchar](100) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + CONSTRAINT [PK_QualityPlanning_ConExperienceSummary] PRIMARY KEY CLUSTERED +( + [ConExperienceSummaryId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[QualityPlanning_ConExperienceSummary] WITH CHECK ADD CONSTRAINT [FK_QualityPlanning_ConExperienceSummary_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[QualityPlanning_ConExperienceSummary] CHECK CONSTRAINT [FK_QualityPlanning_ConExperienceSummary_Base_Project] +GO + +ALTER TABLE [dbo].[QualityPlanning_ConExperienceSummary] WITH CHECK ADD CONSTRAINT [FK_QualityPlanning_ConExperienceSummary_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[QualityPlanning_ConExperienceSummary] CHECK CONSTRAINT [FK_QualityPlanning_ConExperienceSummary_Sys_User] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ConExperienceSummary', @level2type=N'COLUMN',@level2name=N'ConExperienceSummaryId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ConExperienceSummary', @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'QualityPlanning_ConExperienceSummary', @level2type=N'COLUMN',@level2name=N'FileName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QualityPlanning_ConExperienceSummary', @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'QualityPlanning_ConExperienceSummary', @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'QualityPlanning_ConExperienceSummary' +GO + +alter table Comprehensive_GeneralPlanApproval alter column PlanName nvarchar(300) +go + + +create view View_ProjectUserWorkPost +as +select ProjectUserId,ProjectUser.UserId,ProjectUser.UnitId,ProjectUser.ProjectId,UserName,WorkPostName +from Project_ProjectUser ProjectUser +LEFT JOIN Sys_User AS Users ON ProjectUser.UserId = Users.UserId +LEFT JOIN SitePerson_Person AS Person ON ProjectUser.ProjectId =Person.ProjectId AND Users.IdentityCard = Person.IdentityCard +LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId +GO diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 6ef3d483..b1ab29fd 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -279,6 +279,9 @@ + + + diff --git a/SGGL/BLL/CQMS/QualityPlanning/ConExperienceSummaryService.cs b/SGGL/BLL/CQMS/QualityPlanning/ConExperienceSummaryService.cs new file mode 100644 index 00000000..869bc3b6 --- /dev/null +++ b/SGGL/BLL/CQMS/QualityPlanning/ConExperienceSummaryService.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 类似项目施工经验总结清单 + /// + public class ConExperienceSummaryService + { + /// + /// 根据主键获取类似项目施工经验总结清单 + /// + /// + /// + public static Model.QualityPlanning_ConExperienceSummary GetConExperienceSummaryById(string conId) + { + return Funs.DB.QualityPlanning_ConExperienceSummary.FirstOrDefault(e => e.ConExperienceSummaryId == conId); + } + + /// + /// 添加类似项目施工经验总结清单 + /// + /// + public static void AddConExperienceSummary(Model.QualityPlanning_ConExperienceSummary con) + { + Model.QualityPlanning_ConExperienceSummary newCon = new Model.QualityPlanning_ConExperienceSummary() + { + ConExperienceSummaryId = con.ConExperienceSummaryId, + ProjectId = con.ProjectId, + FileName = con.FileName, + CompileMan = con.CompileMan, + CompileDate = con.CompileDate + }; + Funs.DB.QualityPlanning_ConExperienceSummary.InsertOnSubmit(newCon); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改类似项目施工经验总结清单 + /// + /// + public static void UpdateExperienceSummary(Model.QualityPlanning_ConExperienceSummary con) + { + Model.QualityPlanning_ConExperienceSummary newCon = Funs.DB.QualityPlanning_ConExperienceSummary.FirstOrDefault(e => e.ConExperienceSummaryId == con.ConExperienceSummaryId); + if (newCon != null) + { + newCon.FileName = con.FileName; + newCon.CompileMan = con.CompileMan; + newCon.CompileDate = con.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除类似项目施工经验总结清单 + /// + /// + public static void DeleteConExperienceSummaryById(string conId) + { + Model.QualityPlanning_ConExperienceSummary con = Funs.DB.QualityPlanning_ConExperienceSummary.FirstOrDefault(e => e.ConExperienceSummaryId == conId); + if (con != null) + { + Funs.DB.QualityPlanning_ConExperienceSummary.DeleteOnSubmit(con); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/CQMS/QualityPlanning/ProjectQualityPlanService.cs b/SGGL/BLL/CQMS/QualityPlanning/ProjectQualityPlanService.cs new file mode 100644 index 00000000..b63534b4 --- /dev/null +++ b/SGGL/BLL/CQMS/QualityPlanning/ProjectQualityPlanService.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 项目质量计划 + /// + public class ProjectQualityPlanService + { + /// + /// 根据主键获取项目质量计划 + /// + /// + /// + public static Model.QualityPlanning_ProjectQualityPlan GetProjectQualityPlanById(string projectQualityPlanId) + { + return Funs.DB.QualityPlanning_ProjectQualityPlan.FirstOrDefault(e => e.ProjectQualityPlanId == projectQualityPlanId); + } + + /// + /// 添加项目质量计划 + /// + /// + public static void AddProjectQualityPlan(Model.QualityPlanning_ProjectQualityPlan projectQualityPlan) + { + Model.QualityPlanning_ProjectQualityPlan newProjectQualityPlan = new Model.QualityPlanning_ProjectQualityPlan() + { + ProjectQualityPlanId = projectQualityPlan.ProjectQualityPlanId, + ProjectId = projectQualityPlan.ProjectId, + FileCode = projectQualityPlan.FileCode, + FileName = projectQualityPlan.FileName, + CompileMan = projectQualityPlan.CompileMan, + CompileDate = projectQualityPlan.CompileDate, + Auditor = projectQualityPlan.Auditor, + Approver = projectQualityPlan.Approver, + ApprovalDate = projectQualityPlan.ApprovalDate, + }; + Funs.DB.QualityPlanning_ProjectQualityPlan.InsertOnSubmit(newProjectQualityPlan); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改项目质量计划 + /// + /// + public static void UpdateProjectQualityPlan(Model.QualityPlanning_ProjectQualityPlan projectQualityPlan) + { + Model.QualityPlanning_ProjectQualityPlan newProjectQualityPlan = Funs.DB.QualityPlanning_ProjectQualityPlan.FirstOrDefault(e => e.ProjectQualityPlanId == projectQualityPlan.ProjectQualityPlanId); + if (newProjectQualityPlan != null) + { + newProjectQualityPlan.FileCode = projectQualityPlan.FileCode; + newProjectQualityPlan.FileName = projectQualityPlan.FileName; + newProjectQualityPlan.CompileMan = projectQualityPlan.CompileMan; + newProjectQualityPlan.CompileDate = projectQualityPlan.CompileDate; + newProjectQualityPlan.Auditor = projectQualityPlan.Auditor; + newProjectQualityPlan.Approver = projectQualityPlan.Approver; + newProjectQualityPlan.ApprovalDate = projectQualityPlan.ApprovalDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除项目质量计划 + /// + /// + public static void DeleteProjectQualityPlanById(string projectQualityPlanId) + { + Model.QualityPlanning_ProjectQualityPlan projectQualityPlan = Funs.DB.QualityPlanning_ProjectQualityPlan.FirstOrDefault(e => e.ProjectQualityPlanId == projectQualityPlanId); + if (projectQualityPlan != null) + { + Funs.DB.QualityPlanning_ProjectQualityPlan.DeleteOnSubmit(projectQualityPlan); + Funs.DB.SubmitChanges(); + } + } + } +} \ No newline at end of file diff --git a/SGGL/BLL/CQMS/QualityPlanning/QualityManagementSysService.cs b/SGGL/BLL/CQMS/QualityPlanning/QualityManagementSysService.cs new file mode 100644 index 00000000..33ad1967 --- /dev/null +++ b/SGGL/BLL/CQMS/QualityPlanning/QualityManagementSysService.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 质量管理制度 + /// + public class QualityManagementSysService + { + /// + /// 根据主键获取质量管理制度 + /// + /// + /// + public static Model.QualityPlanning_QualityManagementSys GetQualityManagementSysById(string qualityManagementSysId) + { + return Funs.DB.QualityPlanning_QualityManagementSys.FirstOrDefault(e => e.QualityManagementSysId == qualityManagementSysId); + } + + /// + /// 添加质量管理制度 + /// + /// + public static void AddQualityManagementSys(Model.QualityPlanning_QualityManagementSys sys) + { + Model.QualityPlanning_QualityManagementSys newSys = new Model.QualityPlanning_QualityManagementSys() + { + QualityManagementSysId = sys.QualityManagementSysId, + ProjectId = sys.ProjectId, + FileCode = sys.FileCode, + FileName = sys.FileName, + CompileMan = sys.CompileMan, + CompileDate = sys.CompileDate, + Auditor = sys.Auditor, + Approver = sys.Approver, + ApprovalDate = sys.ApprovalDate, + }; + Funs.DB.QualityPlanning_QualityManagementSys.InsertOnSubmit(newSys); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改质量管理制度 + /// + /// + public static void UpdateQualityManagementSys(Model.QualityPlanning_QualityManagementSys sys) + { + Model.QualityPlanning_QualityManagementSys newSys = Funs.DB.QualityPlanning_QualityManagementSys.FirstOrDefault(e => e.QualityManagementSysId == sys.QualityManagementSysId); + if (newSys != null) + { + newSys.FileCode = sys.FileCode; + newSys.FileName = sys.FileName; + newSys.CompileMan = sys.CompileMan; + newSys.CompileDate = sys.CompileDate; + newSys.Auditor = sys.Auditor; + newSys.Approver = sys.Approver; + newSys.ApprovalDate = sys.ApprovalDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除质量管理制度 + /// + /// + public static void DeleteQualityManagementSys(string sysId) + { + Model.QualityPlanning_QualityManagementSys sys = Funs.DB.QualityPlanning_QualityManagementSys.FirstOrDefault(e => e.QualityManagementSysId == sysId); + if (sys != null) + { + Funs.DB.QualityPlanning_QualityManagementSys.DeleteOnSubmit(sys); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 35d4ddf2..8187e114 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -615,6 +615,16 @@ namespace BLL /// 本部安全质量工程师 /// public static string SGSecurityQAEngineer = "0aefd378-cba6-4838-bdec-2d53897ab27f"; + + /// + /// 仓库管理员 + /// + public const string Warehouseman = "5127d9f7-2765-4388-a313-3112cc7cb543"; + + /// + /// 开车工程师 + /// + public const string CarEngineer = "89F8AA0B-77ED-4B17-B697-EFF7259C790B"; #endregion #region 报表流程定义 @@ -3319,6 +3329,21 @@ namespace BLL /// public const string ConTechnologyDisclosureTemUrl = "File\\Excel\\DataIn\\施工技术交底管理导入模板.xls"; + /// + /// 项目质量计划导入模板原始虚拟路径 + /// + public const string ProjectQualityPlanTemUrl = "File\\Excel\\DataIn\\项目质量计划导入模板.xls"; + + /// + /// 质量管理制度导入模板原始虚拟路径 + /// + public const string QualityManagementSysTemUrl = "File\\Excel\\DataIn\\质量管理制度导入模板.xls"; + + /// + /// 类似项目施工经验总结清单原始虚拟路径 + /// + public const string ConExperienceSummaryTemUrl = "File\\Excel\\DataIn\\类似项目施工经验总结清单导入模板.xls"; + #region 导出模板 /// /// 质量专项检查模板文件原始虚拟路径 @@ -3904,6 +3929,28 @@ namespace BLL #endregion #region 五环质量 + #region 质量策划 + /// + /// 项目质量计划 + /// + public const string ProjectQualityPlanMenuId = "1D3CAAD1-690B-4F30-9E3E-6B31D0CF60FA"; + + /// + /// 质量管理制度 + /// + public const string QualityManagementSysMenuId = "46E6F0A6-A6A2-4904-9B69-CD91342D7DF8"; + + /// + /// 类似项目施工经验总结清单 + /// + public const string ConExperienceSummaryMenuId = "6769098A-53D7-4585-87CC-2DADBCBC2C74"; + + /// + /// 质量管理组织机构 + /// + public const string OrganizationalMenuId = "B340205A-8857-4D0D-9E4C-41D91A417A77"; + #endregion + /// /// 建筑工程ID /// diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs index 9d6a40c2..32f1d91d 100644 --- a/SGGL/BLL/SysManage/UserService.cs +++ b/SGGL/BLL/SysManage/UserService.cs @@ -624,7 +624,7 @@ namespace BLL join y in db.Project_ProjectUser on x.UserId equals y.UserId where y.ProjectId == projectId && x.UnitId == unitId && x.IsPost == true && y.IsPost == true && x.UserId != notCopyManId - orderby x.UserName + orderby x.UserName select x).ToList(); } else @@ -633,7 +633,7 @@ namespace BLL join y in db.Project_ProjectUser on x.UserId equals y.UserId where y.ProjectId == projectId && x.IsPost == true && y.IsPost == true && x.UserId != notCopyManId - orderby x.UserName + orderby x.UserName select x).ToList(); } @@ -1610,5 +1610,15 @@ namespace BLL return list; } } + + public static List GetUserNameListsByWorkPostName(string projectId, string workPostName) + { + return (from x in Funs.DB.View_ProjectUserWorkPost where x.ProjectId == projectId && x.WorkPostName == workPostName select x.UserName).ToList(); + } + + public static List GetUserNameListsByUnitIdWorkPostName(string projectId,string unitId, string workPostName) + { + return (from x in Funs.DB.View_ProjectUserWorkPost where x.ProjectId == projectId && x.UnitId== unitId && x.WorkPostName == workPostName select x.UserName).ToList(); + } } } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx index 13fa0c32..38f208c9 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx @@ -1,4 +1,4 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GeneralPlanApprovalDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.GeneralPlanApprovalDataIn" %> +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GeneralPlanApprovalDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.GeneralPlanApprovalDataIn" ValidateRequest="false" %> diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx index 173618dd..e6cc4aba 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx @@ -1,4 +1,4 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GeneralPlanApprovalEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.GeneralPlanApprovalEdit" %> +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GeneralPlanApprovalEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.GeneralPlanApprovalEdit" ValidateRequest="false" %> diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs index 12819210..5742b999 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs @@ -108,7 +108,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive generalPlanApproval.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; } generalPlanApproval.PlanCode = this.txtPlanCode.Text.Trim(); - generalPlanApproval.PlanName = this.txtPlanName.Text.Trim(); + generalPlanApproval.PlanName = this.txtPlanName.Text.Trim().ToString(); if (!string.IsNullOrEmpty(this.txtApprovalDate.Text)) { generalPlanApproval.ApprovalDate = Convert.ToDateTime(this.txtApprovalDate.Text); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs index 0ab3bba4..f5199e0c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs @@ -330,7 +330,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } - var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null))); + var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs index 775f42c2..a30b51b8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs @@ -296,6 +296,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive inspectionMachone.IsCheckOK = this.rblIsCheckOK.SelectedValue == "true" ? true : false; inspectionMachone.LeaveDate = Funs.GetNewDateTime(this.txtLeaveDate.Text); inspectionMachone.UnitsCount = Funs.GetNewInt(this.txtUnitsCount.Text.Trim()); + inspectionMachone.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) { inspectionMachone.AuditMan = drpAudit.SelectedValue; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs index d17a66e0..8e70cfe5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs @@ -395,6 +395,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); } nCRManagement.ReceiveUnit = unitIds; + nCRManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim()); if (string.IsNullOrEmpty(this.NCRManagementId)) { if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs index a4669f34..12b89e6b 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs @@ -2410,9 +2410,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew u.UnitId, u.UnitName }; - var AllList = query.ToList();//项目数 + var AllList = query.Where(x => x.IsReply == true).ToList();//项目数 //本月数 - var monethCount = query.Where(x => (x.ReceiveDate >= Convert.ToDateTime(startDate) && x.ReceiveDate <= Convert.ToDateTime(endDate))); + var monethCount = query.Where(x => x.IsReply == true && (x.ReceiveDate >= Convert.ToDateTime(startDate) && x.ReceiveDate <= Convert.ToDateTime(endDate))); var yzCount = query.Where(x => x.IsReply == true && x.RetrunWuhuangCopies != null && (x.ReceiveDate >= Convert.ToDateTime(startDate) && x.ReceiveDate <= Convert.ToDateTime(endDate)));//本月业主/ 监理返回数量 int totalReturnCount = query.Where(x => x.IsReply == true && x.RetrunWuhuangCopies != null).Count();//总的已返回数量 var NoBackCount = AllList.Count() - totalReturnCount;//累计未返回数量 diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs index eded5ab3..5a8c65dd 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs @@ -2402,7 +2402,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew u.UnitId, u.UnitName }; - var AllList = query.ToList();//项目数 + var AllList = query.Where(x => x.IsReply == true).ToList();//项目数 //本月数 var monethCount = query.Where(x => (x.ReceiveDate >= Convert.ToDateTime(startDate) && x.ReceiveDate <= Convert.ToDateTime(endDate))); var yzCount = query.Where(x => x.IsReply == true && x.RetrunWuhuangCopies != null && (x.ReceiveDate >= Convert.ToDateTime(startDate) && x.ReceiveDate <= Convert.ToDateTime(endDate)));//本月业主/ 监理返回数量 diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx new file mode 100644 index 00000000..3c90961a --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx @@ -0,0 +1,119 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConExperienceSummary.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.ConExperienceSummary" %> + + + + + + + 类似项目施工经验总结清单 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + <%-- + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx.cs new file mode 100644 index 00000000..2493b0ea --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx.cs @@ -0,0 +1,350 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class ConExperienceSummary : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"SELECT p.ConExperienceSummaryId, + p.ProjectId, + p.FileName, + p.CompileMan, + p.CompileDate, + u.UserName AS CompileManName" + + @" FROM QualityPlanning_ConExperienceSummary AS p" + + @" LEFT JOIN Sys_User AS u ON u.UserId = p.CompileMan" + + @" WHERE p.ProjectId=@projectId "; + List listStr = new List(); + listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + //if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim())) + //{ + // strSql += " AND p.FileCode LIKE @fileCode"; + // listStr.Add(new SqlParameter("@fileCode", "%" + this.txtFileCode.Text.Trim() + "%")); + //} + if (!string.IsNullOrEmpty(this.txtFileName.Text.Trim())) + { + strSql += " AND p.FileName LIKE @fileName"; + listStr.Add(new SqlParameter("@fileName", "%" + this.txtFileName.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 增加 + /// + /// 新增按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConExperienceSummaryEdit.aspx", "编辑 - "))); + } + #endregion + + #region 编辑 + /// + /// 右键编辑 + /// + /// + /// + protected void btnMenuModify_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConExperienceSummaryEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - "))); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + btnMenuModify_Click(sender, e); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var con = BLL.ConExperienceSummaryService.GetConExperienceSummaryById(rowID); + if (con != null) + { + BLL.ConExperienceSummaryService.DeleteConExperienceSummaryById(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ConExperienceSummaryDataIn.aspx", "导入 - "))); + } + #endregion + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = Const.ConExperienceSummaryTemUrl; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + uploadfilepath = rootPath + initTemplatePath; + + var lists = (from x in Funs.DB.QualityPlanning_ConExperienceSummary + where x.ProjectId == this.CurrUser.LoginProjectId + select x); + //if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim())) + //{ + // lists = lists.Where(x => x.FileCode.Contains(this.txtFileCode.Text.Trim())); + //} + if (!string.IsNullOrEmpty(this.txtFileName.Text.Trim())) + { + lists = lists.Where(x => x.FileName.Contains(this.txtFileName.Text.Trim())); + } + lists = lists.OrderByDescending(x => x.CompileDate); + if (lists != null) + { + string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId); + newUrl = uploadfilepath.Replace("类似项目施工经验总结清单导入模板", "类似项目施工经验总结清单(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")"); + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); + workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); + } + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle(); + cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 + var font = workbook.CreateFont(); + font.FontHeightInPoints = 11; + cellStyle.SetFont(font); + + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + NPOI.SS.UserModel.IRow row = sheet.GetRow(0); + NPOI.SS.UserModel.ICell cell; + int i = 2; + foreach (var item in lists) + { + // 第二步:创建新数据行 + row = sheet.CreateRow(i); + // 添加数据 + //cell = row.CreateCell(0); + //cell.CellStyle = cellStyle; + //cell.SetCellValue(item.FileCode);//文件编号 + + cell = row.CreateCell(0); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.FileName);//文件名称 + + //cell = row.CreateCell(2); + //cell.CellStyle = cellStyle; + //cell.SetCellValue(BLL.UserService.GetUserNameByUserId(item.CompileMan));//编制人 + + //cell = row.CreateCell(3); + //cell.CellStyle = cellStyle; + //cell.SetCellValue(item.Auditor);//审核人 + + //cell = row.CreateCell(4); + //cell.CellStyle = cellStyle; + //cell.SetCellValue(item.Approver);//批准人 + + //cell = row.CreateCell(5); + //cell.CellStyle = cellStyle; + //cell.SetCellValue(item.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ApprovalDate) : "");//批准日期 + + i++; + } + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + 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); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ConExperienceSummaryMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx.designer.cs new file mode 100644 index 00000000..e328af77 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummary.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class ConExperienceSummary { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtFileCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileCode; + + /// + /// txtFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileName; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// lbtnFileUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuModify; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx new file mode 100644 index 00000000..1722a5a2 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConExperienceSummaryDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.ConExperienceSummaryDataIn" %> + + + + + + + 导入类似项目施工经验总结清单 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx.cs new file mode 100644 index 00000000..ff56a805 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx.cs @@ -0,0 +1,438 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class ConExperienceSummaryDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 1); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var oldViewInfos = from x in Funs.DB.QualityPlanning_ConExperienceSummary + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + //var users = from x in Funs.DB.Project_ProjectUser + // join y in Funs.DB.Sys_User on x.UserId equals y.UserId + // where x.ProjectId == this.CurrUser.LoginProjectId + // select y; + + for (int i = 1; i < ir; i++) + { + Model.QualityPlanning_ConExperienceSummary oldViewInfo = new Model.QualityPlanning_ConExperienceSummary(); + //string row0 = pds.Rows[i][0].ToString().Trim(); + //if (string.IsNullOrEmpty(row0)) + //{ + // result += (i + 2).ToString() + "," + "文件编号" + "," + "此项为必填项!" + "|"; + //} + string row0 = pds.Rows[i][0].ToString().Trim(); + if (string.IsNullOrEmpty(row0)) + { + result += (i + 2).ToString() + "," + "文件名称" + "," + "此项为必填项!" + "|"; + } + //string row2 = pds.Rows[i][2].ToString().Trim(); + //if (!string.IsNullOrEmpty(row2)) + //{ + // var u = users.Where(x => x.UserName == row2).FirstOrDefault(); + // if (u == null) + // { + // result += (i + 2).ToString() + "," + "编制人" + "," + "[" + row2 + "]不存在!" + "|"; + // } + //} + + //string row5 = pds.Rows[i][5].ToString().Trim(); + //if (!string.IsNullOrEmpty(row5)) + //{ + // try + // { + // DateTime d = Convert.ToDateTime(row5); + // } + // catch (Exception) + // { + // result += (i + 2).ToString() + "," + "批准日期" + "," + "[" + row5 + "]错误!" + "|"; + // } + //} + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 1); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var oldViewInfos = from x in Funs.DB.QualityPlanning_ConExperienceSummary + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + //var users = from x in Funs.DB.Project_ProjectUser + // join y in Funs.DB.Sys_User on x.UserId equals y.UserId + // where x.ProjectId == this.CurrUser.LoginProjectId + // select y; + + for (int i = 1; i < ir; i++) + { + string row0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(row0)) + { + Model.QualityPlanning_ConExperienceSummary oldViewInfo = new Model.QualityPlanning_ConExperienceSummary(); + oldViewInfo = oldViewInfos.FirstOrDefault(x => x.FileName == pds.Rows[i][0].ToString().Trim()); + if (oldViewInfo == null) + { + Model.QualityPlanning_ConExperienceSummary newData = new Model.QualityPlanning_ConExperienceSummary(); + newData.ProjectId = this.CurrUser.LoginProjectId; + //newData.FileCode = pds.Rows[i][0].ToString().Trim(); + newData.FileName = pds.Rows[i][0].ToString().Trim(); + //if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim())) + //{ + // newData.CompileMan = users.FirstOrDefault(e => e.UserName == pds.Rows[i][2].ToString().Trim()).UserId; + //} + //newData.Auditor = pds.Rows[i][3].ToString().Trim(); + //newData.Approver = pds.Rows[i][4].ToString().Trim(); + //newData.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim()); + newData.CompileMan = this.CurrUser.UserId; + newData.CompileDate = DateTime.Now; + newData.ConExperienceSummaryId = SQLHelper.GetNewID(typeof(Model.QualityPlanning_ConExperienceSummary)); + BLL.ConExperienceSummaryService.AddConExperienceSummary(newData); + } + else + { + //oldViewInfo.FileCode = pds.Rows[i][0].ToString().Trim(); + oldViewInfo.FileName = pds.Rows[i][0].ToString().Trim(); + oldViewInfo.CompileMan = this.CurrUser.UserId; + oldViewInfo.CompileDate = DateTime.Now; + //if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim())) + //{ + // oldViewInfo.CompileMan = users.FirstOrDefault(e => e.UserName == pds.Rows[i][2].ToString().Trim()).UserId; + //} + //oldViewInfo.Auditor = pds.Rows[i][3].ToString().Trim(); + //oldViewInfo.Approver = pds.Rows[i][4].ToString().Trim(); + //oldViewInfo.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim()); + BLL.ConExperienceSummaryService.UpdateExperienceSummary(oldViewInfo); + } + } + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.ConExperienceSummaryTemUrl; + string filePath = Const.ConExperienceSummaryTemUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx.designer.cs new file mode 100644 index 00000000..c43fe11a --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryDataIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class ConExperienceSummaryDataIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx new file mode 100644 index 00000000..c1953b85 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx @@ -0,0 +1,65 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConExperienceSummaryEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.ConExperienceSummaryEdit" %> + + + + + + + 编辑类似项目施工经验总结清单 + + +
+ + + + + + <%----%> + + + + <%-- + + + + + + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx.cs new file mode 100644 index 00000000..c2faa98b --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx.cs @@ -0,0 +1,152 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class ConExperienceSummaryEdit : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string ConExperienceSummaryId + { + get + { + return (string)ViewState["ConExperienceSummaryId"]; + } + set + { + ViewState["ConExperienceSummaryId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + //BLL.UserService.InitUserDropDownList(this.drpCompileMan, this.CurrUser.LoginProjectId, true); + + this.ConExperienceSummaryId = Request.Params["id"]; + Model.QualityPlanning_ConExperienceSummary con = BLL.ConExperienceSummaryService.GetConExperienceSummaryById(this.ConExperienceSummaryId); + if (con != null) + { + this.ConExperienceSummaryId = con.ConExperienceSummaryId; + this.hdAttachUrl.Text = this.ConExperienceSummaryId; + //this.txtFileCode.Text = projectQualityPlan.FileCode; + this.txtFileName.Text = con.FileName; + //if (!string.IsNullOrEmpty(projectQualityPlan.CompileMan)) + //{ + // this.drpCompileMan.SelectedValue = projectQualityPlan.CompileMan; + //} + //this.txtAuditor.Text = projectQualityPlan.Auditor; + //this.txtApprover.Text = projectQualityPlan.Approver; + //this.txtApprovalDate.Text = projectQualityPlan.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", projectQualityPlan.ApprovalDate) : ""; + } + else + { + //this.drpCompileMan.SelectedValue = this.CurrUser.UserId; + //this.txtApprovalDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Model.QualityPlanning_ConExperienceSummary newData = new Model.QualityPlanning_ConExperienceSummary(); + newData.ProjectId = this.CurrUser.LoginProjectId; + //projectQualityPlan.FileCode = this.txtFileCode.Text.Trim(); + newData.FileName = this.txtFileName.Text.Trim(); + //if (this.drpCompileMan.SelectedValue != BLL.Const._Null) + //{ + // projectQualityPlan.CompileMan = this.drpCompileMan.SelectedValue; + //} + newData.CompileMan = this.CurrUser.UserId; + newData.CompileDate = DateTime.Now; + //projectQualityPlan.Auditor = this.txtAuditor.Text.Trim(); + //projectQualityPlan.Approver = this.txtApprover.Text.Trim(); + //projectQualityPlan.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text.Trim()); + if (string.IsNullOrEmpty(this.ConExperienceSummaryId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + newData.ConExperienceSummaryId = this.hdAttachUrl.Text; + } + else + { + newData.ConExperienceSummaryId = SQLHelper.GetNewID(typeof(Model.QualityPlanning_ConExperienceSummary)); + this.hdAttachUrl.Text = newData.ConExperienceSummaryId; + } + BLL.ConExperienceSummaryService.AddConExperienceSummary(newData); + } + else + { + newData.ConExperienceSummaryId = this.ConExperienceSummaryId; + BLL.ConExperienceSummaryService.UpdateExperienceSummary(newData); + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region 附件上传 + /// + /// 附件上传 + /// + /// + /// + protected void btnAttach_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录 + { + this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.QualityPlanning_ConExperienceSummary)); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/ConExperienceSummary&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ConExperienceSummaryMenuId))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ConExperienceSummaryMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx.designer.cs new file mode 100644 index 00000000..968318c1 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ConExperienceSummaryEdit.aspx.designer.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class ConExperienceSummaryEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileName; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// btnAttach 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttach; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdAttachUrl; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx new file mode 100644 index 00000000..dc96cb52 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx @@ -0,0 +1,207 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Organizational.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.Organizational" %> + + + + + + + 质量管理组织机构 + + + + + +
+ + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + + +
+ + + + +
+
+
+
+ + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx.cs new file mode 100644 index 00000000..104bf0e9 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx.cs @@ -0,0 +1,510 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class Organizational : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string projectId = this.CurrUser.LoginProjectId; + string unitId = this.CurrUser.UnitId; + + this.lblProjectName.Text = "项目名称:" + BLL.ProjectService.GetProjectNameByProjectId(projectId); + + + + var unit = (from x in Funs.DB.Project_ProjectUnit + join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == projectId + && x.UnitType == BLL.Const.ProjectUnitType_2 + && x.UnitId == unitId + select y).Count(); + if (unit>0) + { + string projectManagerName = string.Empty; + var projectManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "项目经理"); + if (projectManager != null) + { + foreach (var item in projectManager) + { + projectManagerName += item + ","; + } + if (!string.IsNullOrEmpty(projectManagerName)) + { + this.Label1.Text = "项目经理:" + projectManagerName.Substring(0, projectManagerName.LastIndexOf(',')); + } + } + + string sjName = string.Empty; + var sj = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设计经理"); + if (sj != null) + { + foreach (var item in sj) + { + sjName += item + ","; + } + if (!string.IsNullOrEmpty(sjName)) + { + this.Label2.Text = "设计经理:" + sjName.Substring(0, sjName.LastIndexOf(',')); + } + } + + string cgName = string.Empty; + var cg = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "采购经理"); + if (cg != null) + { + foreach (var item in cg) + { + cgName += item + ","; + } + if (!string.IsNullOrEmpty(cgName)) + { + this.Label3.Text = "采购经理:" + cgName.Substring(0, cgName.LastIndexOf(',')); + } + } + + string name4 = string.Empty; + var con = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "施工经理"); + if (con != null) + { + foreach (var item in con) + { + name4 += item + ","; + } + if (!string.IsNullOrEmpty(name4)) + { + this.Label4.Text = "施工经理:" + name4.Substring(0, name4.LastIndexOf(',')); + } + } + + string name5 = string.Empty; + var qa = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "质量经理"); + if (qa != null) + { + foreach (var item in qa) + { + name5 += item + ","; + } + if (!string.IsNullOrEmpty(name5)) + { + this.Label5.Text = "质量经理:" + name5.Substring(0, name5.LastIndexOf(',')); + } + } + + string name6 = string.Empty; + var hseManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "HSE经理"); + if (hseManager != null) + { + foreach (var item in hseManager) + { + name6 += item + ","; + } + if (!string.IsNullOrEmpty(name6)) + { + this.Label6.Text = "HSE经理:" + name6.Substring(0, name6.LastIndexOf(',')); + } + } + + string name7 = string.Empty; + var carManager = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "开车经理"); + if (carManager != null) + { + foreach (var item in carManager) + { + name7 += item + ","; + } + if (!string.IsNullOrEmpty(name7)) + { + this.Label7.Text = "开车经理:" + name7.Substring(0, name7.LastIndexOf(',')); + } + } + + string warehousemanName = string.Empty; + var warehousemanLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仓库管理员"); + if (warehousemanLists != null) + { + foreach (var item in warehousemanLists) + { + warehousemanName += item + ","; + } + if (!string.IsNullOrEmpty(warehousemanName)) + { + warehousemanName = warehousemanName.Substring(0, warehousemanName.LastIndexOf(',')); + } + } + this.Label8.Text = "仓库管理员:" + warehousemanName; + + string docName = string.Empty; + var doc = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "文控工程师"); + if (doc != null) + { + foreach (var item in doc) + { + docName += item + ","; + } + if (!string.IsNullOrEmpty(docName)) + { + docName = docName.Substring(0, docName.LastIndexOf(',')); + } + } + this.Label9.Text = "文控工程师:" + docName; + + string hseEngineerName = string.Empty; + var hseEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "HSE工程师"); + if (hseEngineerLists != null) + { + foreach (var item in hseEngineerLists) + { + hseEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(hseEngineerName)) + { + hseEngineerName = hseEngineerName.Substring(0, hseEngineerName.LastIndexOf(',')); + } + } + this.Label10.Text = "HSE工程师:" + hseEngineerName; + + string carEngineerName = string.Empty; + var carEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "开车工程师"); + if (carEngineerLists != null) + { + foreach (var item in carEngineerLists) + { + carEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(carEngineerName)) + { + carEngineerName = carEngineerName.Substring(0, carEngineerName.LastIndexOf(',')); + } + } + this.Label11.Text = "开车工程师:" + carEngineerName; + + string CVEngineerName = string.Empty; + var CVEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "土建工程师"); + if (CVEngineerLists != null) + { + foreach (var item in CVEngineerLists) + { + CVEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(CVEngineerName)) + { + CVEngineerName = CVEngineerName.Substring(0, CVEngineerName.LastIndexOf(',')); + } + } + this.Label12.Text = "土建工程师:" + CVEngineerName; + + string FEEngineerName = string.Empty; + var FEEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "设备工程师"); + if (FEEngineerLists != null) + { + foreach (var item in FEEngineerLists) + { + FEEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(FEEngineerName)) + { + FEEngineerName = FEEngineerName.Substring(0, FEEngineerName.LastIndexOf(',')); + } + } + this.Label13.Text = "设备工程师:" + FEEngineerName; + + string PDEngineerName = string.Empty; + var PDEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "管道工程师"); + if (PDEngineerLists != null) + { + foreach (var item in PDEngineerLists) + { + PDEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(PDEngineerName)) + { + PDEngineerName = PDEngineerName.Substring(0, PDEngineerName.LastIndexOf(',')); + } + } + this.Label14.Text = "管道工程师:" + PDEngineerName; + + string EHEngineerName = string.Empty; + var EHEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "电气工程师"); + if (EHEngineerLists != null) + { + foreach (var item in EHEngineerLists) + { + EHEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(EHEngineerName)) + { + EHEngineerName = EHEngineerName.Substring(0, EHEngineerName.LastIndexOf(',')); + } + } + this.Label15.Text = "电气工程师:" + EHEngineerName; + + string EAEngineerName = string.Empty; + var EAEngineerLists = BLL.UserService.GetUserNameListsByUnitIdWorkPostName(projectId, unitId, "仪表工程师"); + if (EAEngineerLists != null) + { + foreach (var item in EAEngineerLists) + { + EAEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(EAEngineerName)) + { + EAEngineerName = EAEngineerName.Substring(0, EAEngineerName.LastIndexOf(',')); + } + } + this.Label16.Text = "仪表工程师:" + EAEngineerName; + } + else + { + string projectManagerName = string.Empty; + var projectManager = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "项目经理"); + if (projectManager != null) + { + foreach (var item in projectManager) + { + projectManagerName += item + ","; + } + if (!string.IsNullOrEmpty(projectManagerName)) + { + this.Label1.Text = "项目经理:" + projectManagerName.Substring(0, projectManagerName.LastIndexOf(',')); + } + } + + string sjName = string.Empty; + var sj = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "设计经理"); + if (sj != null) + { + foreach (var item in sj) + { + sjName += item + ","; + } + if (!string.IsNullOrEmpty(sjName)) + { + this.Label2.Text = "设计经理:" + sjName.Substring(0, sjName.LastIndexOf(',')); + } + } + + string cgName = string.Empty; + var cg = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "采购经理"); + if (cg != null) + { + foreach (var item in cg) + { + cgName += item + ","; + } + if (!string.IsNullOrEmpty(cgName)) + { + this.Label3.Text = "采购经理:" + cgName.Substring(0, cgName.LastIndexOf(',')); + } + } + + string name4 = string.Empty; + var con = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "施工经理"); + if (con != null) + { + foreach (var item in con) + { + name4 += item + ","; + } + if (!string.IsNullOrEmpty(name4)) + { + this.Label4.Text = "施工经理:" + name4.Substring(0, name4.LastIndexOf(',')); + } + } + + string name5 = string.Empty; + var qa = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "质量经理"); + if (qa != null) + { + foreach (var item in qa) + { + name5 += item + ","; + } + if (!string.IsNullOrEmpty(name5)) + { + this.Label5.Text = "质量经理:" + name5.Substring(0, name5.LastIndexOf(',')); + } + } + + string name6 = string.Empty; + var hseManager = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "HSE经理"); + if (hseManager != null) + { + foreach (var item in hseManager) + { + name6 += item + ","; + } + if (!string.IsNullOrEmpty(name6)) + { + this.Label6.Text = "HSE经理:" + name6.Substring(0, name6.LastIndexOf(',')); + } + } + + string name7 = string.Empty; + var carManager = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "开车经理"); + if (carManager != null) + { + foreach (var item in carManager) + { + name7 += item + ","; + } + if (!string.IsNullOrEmpty(name7)) + { + this.Label7.Text = "开车经理:" + name7.Substring(0, name7.LastIndexOf(',')); + } + } + + string warehousemanName = string.Empty; + var warehousemanLists = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "仓库管理员"); + if (warehousemanLists != null) + { + foreach (var item in warehousemanLists) + { + warehousemanName += item + ","; + } + if (!string.IsNullOrEmpty(warehousemanName)) + { + warehousemanName = warehousemanName.Substring(0, warehousemanName.LastIndexOf(',')); + } + } + this.Label8.Text = "仓库管理员:" + warehousemanName; + + string docName = string.Empty; + var doc = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "文控工程师"); + if (doc != null) + { + foreach (var item in doc) + { + docName += item + ","; + } + if (!string.IsNullOrEmpty(docName)) + { + docName = docName.Substring(0, docName.LastIndexOf(',')); + } + } + this.Label9.Text = "文控工程师:" + docName; + + string hseEngineerName = string.Empty; + var hseEngineerLists = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "HSE工程师"); + if (hseEngineerLists != null) + { + foreach (var item in hseEngineerLists) + { + hseEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(hseEngineerName)) + { + hseEngineerName = hseEngineerName.Substring(0, hseEngineerName.LastIndexOf(',')); + } + } + this.Label10.Text = "HSE工程师:" + hseEngineerName; + + string carEngineerName = string.Empty; + var carEngineerLists = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "开车工程师"); + if (carEngineerLists != null) + { + foreach (var item in carEngineerLists) + { + carEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(carEngineerName)) + { + carEngineerName = carEngineerName.Substring(0, carEngineerName.LastIndexOf(',')); + } + } + this.Label11.Text = "开车工程师:" + carEngineerName; + + string CVEngineerName = string.Empty; + var CVEngineerLists = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "土建工程师"); + if (CVEngineerLists != null) + { + foreach (var item in CVEngineerLists) + { + CVEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(CVEngineerName)) + { + CVEngineerName = CVEngineerName.Substring(0, CVEngineerName.LastIndexOf(',')); + } + } + this.Label12.Text = "土建工程师:" + CVEngineerName; + + string FEEngineerName = string.Empty; + var FEEngineerLists = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "设备工程师"); + if (FEEngineerLists != null) + { + foreach (var item in FEEngineerLists) + { + FEEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(FEEngineerName)) + { + FEEngineerName = FEEngineerName.Substring(0, FEEngineerName.LastIndexOf(',')); + } + } + this.Label13.Text = "设备工程师:" + FEEngineerName; + + string PDEngineerName = string.Empty; + var PDEngineerLists = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "管道工程师"); + if (PDEngineerLists != null) + { + foreach (var item in PDEngineerLists) + { + PDEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(PDEngineerName)) + { + PDEngineerName = PDEngineerName.Substring(0, PDEngineerName.LastIndexOf(',')); + } + } + this.Label14.Text = "管道工程师:" + PDEngineerName; + + string EHEngineerName = string.Empty; + var EHEngineerLists = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "电气工程师"); + if (EHEngineerLists != null) + { + foreach (var item in EHEngineerLists) + { + EHEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(EHEngineerName)) + { + EHEngineerName = EHEngineerName.Substring(0, EHEngineerName.LastIndexOf(',')); + } + } + this.Label15.Text = "电气工程师:" + EHEngineerName; + + string EAEngineerName = string.Empty; + var EAEngineerLists = BLL.UserService.GetUserNameListsByWorkPostName(projectId, "仪表工程师"); + if (EAEngineerLists != null) + { + foreach (var item in EAEngineerLists) + { + EAEngineerName += item + ","; + } + if (!string.IsNullOrEmpty(EAEngineerName)) + { + EAEngineerName = EAEngineerName.Substring(0, EAEngineerName.LastIndexOf(',')); + } + } + this.Label16.Text = "仪表工程师:" + EAEngineerName; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx.designer.cs new file mode 100644 index 00000000..41fd0ac4 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/Organizational.aspx.designer.cs @@ -0,0 +1,177 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class Organizational { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// lblProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblProjectName; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label6; + + /// + /// Label7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label7; + + /// + /// Label8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label8; + + /// + /// Label9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label9; + + /// + /// Label10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label10; + + /// + /// Label11 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label11; + + /// + /// Label12 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label12; + + /// + /// Label13 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label13; + + /// + /// Label14 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label14; + + /// + /// Label15 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label15; + + /// + /// Label16 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label16; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx new file mode 100644 index 00000000..0b0b20b7 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx @@ -0,0 +1,119 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectQualityPlan.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.ProjectQualityPlan" %> + + + + + + + 项目质量计划 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx.cs new file mode 100644 index 00000000..428f7185 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx.cs @@ -0,0 +1,354 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class ProjectQualityPlan : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"SELECT p.ProjectQualityPlanId, + p.ProjectId, + p.FileCode, + p.FileName, + p.CompileMan, + p.CompileDate, + p.Auditor, + p.Approver, + p.ApprovalDate, + u.UserName AS CompileManName" + + @" FROM QualityPlanning_ProjectQualityPlan AS p" + + @" LEFT JOIN Sys_User AS u ON u.UserId = p.CompileMan" + + @" WHERE p.ProjectId=@projectId "; + List listStr = new List(); + listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim())) + { + strSql += " AND p.FileCode LIKE @fileCode"; + listStr.Add(new SqlParameter("@fileCode", "%" + this.txtFileCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtFileName.Text.Trim())) + { + strSql += " AND p.FileName LIKE @fileName"; + listStr.Add(new SqlParameter("@fileName", "%" + this.txtFileName.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 增加 + /// + /// 新增按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectQualityPlanEdit.aspx", "编辑 - "))); + } + #endregion + + #region 编辑 + /// + /// 右键编辑 + /// + /// + /// + protected void btnMenuModify_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectQualityPlanEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - "))); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + btnMenuModify_Click(sender, e); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var plan = BLL.ProjectQualityPlanService.GetProjectQualityPlanById(rowID); + if (plan != null) + { + BLL.ProjectQualityPlanService.DeleteProjectQualityPlanById(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ProjectQualityPlanDataIn.aspx", "导入 - "))); + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = Const.ProjectQualityPlanTemUrl; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + uploadfilepath = rootPath + initTemplatePath; + + var lists = (from x in Funs.DB.QualityPlanning_ProjectQualityPlan + where x.ProjectId == this.CurrUser.LoginProjectId + select x); + if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim())) + { + lists = lists.Where(x => x.FileCode.Contains(this.txtFileCode.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtFileName.Text.Trim())) + { + lists = lists.Where(x => x.FileName.Contains(this.txtFileName.Text.Trim())); + } + lists = lists.OrderByDescending(x => x.ApprovalDate); + if (lists != null) + { + string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId); + newUrl = uploadfilepath.Replace("项目质量计划导入模板", "项目质量计划(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")"); + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); + workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); + } + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle(); + cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 + var font = workbook.CreateFont(); + font.FontHeightInPoints = 11; + cellStyle.SetFont(font); + + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + NPOI.SS.UserModel.IRow row = sheet.GetRow(0); + NPOI.SS.UserModel.ICell cell; + int i = 2; + foreach (var item in lists) + { + // 第二步:创建新数据行 + row = sheet.CreateRow(i); + // 添加数据 + cell = row.CreateCell(0); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.FileCode);//文件编号 + + cell = row.CreateCell(1); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.FileName);//文件名称 + + cell = row.CreateCell(2); + cell.CellStyle = cellStyle; + cell.SetCellValue(BLL.UserService.GetUserNameByUserId(item.CompileMan));//编制人 + + cell = row.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Auditor);//审核人 + + cell = row.CreateCell(4); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Approver);//批准人 + + cell = row.CreateCell(5); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ApprovalDate) : "");//批准日期 + + i++; + } + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + 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); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectQualityPlanMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx.designer.cs new file mode 100644 index 00000000..f0219155 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlan.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class ProjectQualityPlan { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtFileCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileCode; + + /// + /// txtFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileName; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// lbtnFileUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuModify; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx new file mode 100644 index 00000000..f3101c3c --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectQualityPlanDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.ProjectQualityPlanDataIn" %> + + + + + + + 导入项目质量计划 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx.cs new file mode 100644 index 00000000..f26f8f46 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx.cs @@ -0,0 +1,435 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class ProjectQualityPlanDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 6); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var oldViewInfos = from x in Funs.DB.QualityPlanning_ProjectQualityPlan + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + var users = from x in Funs.DB.Project_ProjectUser + join y in Funs.DB.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + select y; + + for (int i = 1; i < ir; i++) + { + Model.QualityPlanning_ProjectQualityPlan oldViewInfo = new Model.QualityPlanning_ProjectQualityPlan(); + string row0 = pds.Rows[i][0].ToString().Trim(); + if (string.IsNullOrEmpty(row0)) + { + result += (i + 2).ToString() + "," + "文件编号" + "," + "此项为必填项!" + "|"; + } + string row1 = pds.Rows[i][1].ToString().Trim(); + if (string.IsNullOrEmpty(row1)) + { + result += (i + 2).ToString() + "," + "文件名称" + "," + "此项为必填项!" + "|"; + } + string row2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(row2)) + { + var u = users.Where(x => x.UserName == row2).FirstOrDefault(); + if (u==null) + { + result += (i + 2).ToString() + "," + "编制人" + "," + "[" + row2 + "]不存在!" + "|"; + } + } + + string row5 = pds.Rows[i][5].ToString().Trim(); + if (!string.IsNullOrEmpty(row5)) + { + try + { + DateTime d = Convert.ToDateTime(row5); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "批准日期" + "," + "[" + row5 + "]错误!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 6); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var oldViewInfos = from x in Funs.DB.QualityPlanning_ProjectQualityPlan + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + var users = from x in Funs.DB.Project_ProjectUser + join y in Funs.DB.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + select y; + + for (int i = 1; i < ir; i++) + { + string row0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(row0)) + { + Model.QualityPlanning_ProjectQualityPlan oldViewInfo = new Model.QualityPlanning_ProjectQualityPlan(); + oldViewInfo = oldViewInfos.FirstOrDefault(x => x.FileCode == pds.Rows[i][0].ToString().Trim()); + if (oldViewInfo == null) + { + Model.QualityPlanning_ProjectQualityPlan newData = new Model.QualityPlanning_ProjectQualityPlan(); + newData.ProjectId = this.CurrUser.LoginProjectId; + newData.FileCode = pds.Rows[i][0].ToString().Trim(); + newData.FileName = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim())) + { + newData.CompileMan = users.FirstOrDefault(e => e.UserName == pds.Rows[i][2].ToString().Trim()).UserId; + } + newData.Auditor = pds.Rows[i][3].ToString().Trim(); + newData.Approver= pds.Rows[i][4].ToString().Trim(); + newData.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim()); + newData.CompileDate = DateTime.Now; + newData.ProjectQualityPlanId = SQLHelper.GetNewID(typeof(Model.QualityPlanning_ProjectQualityPlan)); + BLL.ProjectQualityPlanService.AddProjectQualityPlan(newData); + } + else + { + oldViewInfo.FileCode = pds.Rows[i][0].ToString().Trim(); + oldViewInfo.FileName = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim())) + { + oldViewInfo.CompileMan = users.FirstOrDefault(e => e.UserName == pds.Rows[i][2].ToString().Trim()).UserId; + } + oldViewInfo.Auditor = pds.Rows[i][3].ToString().Trim(); + oldViewInfo.Approver= pds.Rows[i][4].ToString().Trim(); + oldViewInfo.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim()); + BLL.ProjectQualityPlanService.UpdateProjectQualityPlan(oldViewInfo); + } + } + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.ProjectQualityPlanTemUrl; + string filePath = Const.ProjectQualityPlanTemUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx.designer.cs new file mode 100644 index 00000000..9165695b --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanDataIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class ProjectQualityPlanDataIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx new file mode 100644 index 00000000..78a2fe4c --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx @@ -0,0 +1,65 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectQualityPlanEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.ProjectQualityPlanEdit" %> + + + + + + + 编辑项目质量计划 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx.cs new file mode 100644 index 00000000..eb9fc4ea --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx.cs @@ -0,0 +1,151 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class ProjectQualityPlanEdit : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string ProjectQualityPlanId + { + get + { + return (string)ViewState["ProjectQualityPlanId"]; + } + set + { + ViewState["ProjectQualityPlanId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BLL.UserService.InitUserDropDownList(this.drpCompileMan, this.CurrUser.LoginProjectId, true); + + this.ProjectQualityPlanId = Request.Params["id"]; + Model.QualityPlanning_ProjectQualityPlan projectQualityPlan = BLL.ProjectQualityPlanService.GetProjectQualityPlanById(this.ProjectQualityPlanId); + if (projectQualityPlan != null) + { + this.ProjectQualityPlanId = projectQualityPlan.ProjectQualityPlanId; + this.hdAttachUrl.Text = this.ProjectQualityPlanId; + this.txtFileCode.Text = projectQualityPlan.FileCode; + this.txtFileName.Text = projectQualityPlan.FileName; + if (!string.IsNullOrEmpty(projectQualityPlan.CompileMan)) + { + this.drpCompileMan.SelectedValue = projectQualityPlan.CompileMan; + } + this.txtAuditor.Text = projectQualityPlan.Auditor; + this.txtApprover.Text = projectQualityPlan.Approver; + this.txtApprovalDate.Text = projectQualityPlan.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", projectQualityPlan.ApprovalDate) : ""; + } + else + { + this.drpCompileMan.SelectedValue = this.CurrUser.UserId; + this.txtApprovalDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Model.QualityPlanning_ProjectQualityPlan projectQualityPlan = new Model.QualityPlanning_ProjectQualityPlan(); + projectQualityPlan.ProjectId = this.CurrUser.LoginProjectId; + projectQualityPlan.FileCode = this.txtFileCode.Text.Trim(); + projectQualityPlan.FileName = this.txtFileName.Text.Trim(); + if (this.drpCompileMan.SelectedValue != BLL.Const._Null) + { + projectQualityPlan.CompileMan = this.drpCompileMan.SelectedValue; + } + projectQualityPlan.CompileDate = DateTime.Now; + projectQualityPlan.Auditor = this.txtAuditor.Text.Trim(); + projectQualityPlan.Approver = this.txtApprover.Text.Trim(); + projectQualityPlan.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text.Trim()); + if (string.IsNullOrEmpty(this.ProjectQualityPlanId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + projectQualityPlan.ProjectQualityPlanId = this.hdAttachUrl.Text; + } + else + { + projectQualityPlan.ProjectQualityPlanId = SQLHelper.GetNewID(typeof(Model.QualityPlanning_ProjectQualityPlan)); + this.hdAttachUrl.Text = projectQualityPlan.ProjectQualityPlanId; + } + BLL.ProjectQualityPlanService.AddProjectQualityPlan(projectQualityPlan); + } + else + { + projectQualityPlan.ProjectQualityPlanId = this.ProjectQualityPlanId; + BLL.ProjectQualityPlanService.UpdateProjectQualityPlan(projectQualityPlan); + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region 附件上传 + /// + /// 附件上传 + /// + /// + /// + protected void btnAttach_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录 + { + this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.QualityPlanning_ProjectQualityPlan)); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/ProjectQualityPlan&menuId={1}", this.hdAttachUrl.Text, BLL.Const.ProjectQualityPlanMenuId))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectQualityPlanMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx.designer.cs new file mode 100644 index 00000000..f37eda51 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/ProjectQualityPlanEdit.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class ProjectQualityPlanEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtFileCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileCode; + + /// + /// txtFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileName; + + /// + /// drpCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCompileMan; + + /// + /// txtAuditor 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAuditor; + + /// + /// txtApprover 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApprover; + + /// + /// txtApprovalDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtApprovalDate; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// btnAttach 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttach; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdAttachUrl; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx new file mode 100644 index 00000000..601945a8 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx @@ -0,0 +1,119 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityManagementSys.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.QualityManagementSys" %> + + + + + + + 质量管理制度 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.cs new file mode 100644 index 00000000..55287e1e --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.cs @@ -0,0 +1,354 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class QualityManagementSys : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"SELECT p.QualityManagementSysId, + p.ProjectId, + p.FileCode, + p.FileName, + p.CompileMan, + p.CompileDate, + p.Auditor, + p.Approver, + p.ApprovalDate, + u.UserName AS CompileManName" + + @" FROM QualityPlanning_QualityManagementSys AS p" + + @" LEFT JOIN Sys_User AS u ON u.UserId = p.CompileMan" + + @" WHERE p.ProjectId=@projectId "; + List listStr = new List(); + listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim())) + { + strSql += " AND p.FileCode LIKE @fileCode"; + listStr.Add(new SqlParameter("@fileCode", "%" + this.txtFileCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtFileName.Text.Trim())) + { + strSql += " AND p.FileName LIKE @fileName"; + listStr.Add(new SqlParameter("@fileName", "%" + this.txtFileName.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 增加 + /// + /// 新增按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityManagementSysEdit.aspx", "编辑 - "))); + } + #endregion + + #region 编辑 + /// + /// 右键编辑 + /// + /// + /// + protected void btnMenuModify_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityManagementSysEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - "))); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + btnMenuModify_Click(sender, e); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var sys = BLL.QualityManagementSysService.GetQualityManagementSysById(rowID); + if (sys != null) + { + BLL.QualityManagementSysService.DeleteQualityManagementSys(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("QualityManagementSysDataIn.aspx", "导入 - "))); + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = Const.QualityManagementSysTemUrl; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + uploadfilepath = rootPath + initTemplatePath; + + var lists = (from x in Funs.DB.QualityPlanning_QualityManagementSys + where x.ProjectId == this.CurrUser.LoginProjectId + select x); + if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim())) + { + lists = lists.Where(x => x.FileCode.Contains(this.txtFileCode.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtFileName.Text.Trim())) + { + lists = lists.Where(x => x.FileName.Contains(this.txtFileName.Text.Trim())); + } + lists = lists.OrderByDescending(x => x.ApprovalDate); + if (lists != null) + { + string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId); + newUrl = uploadfilepath.Replace("质量管理制度导入模板", "质量管理制度(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")"); + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); + workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); + } + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle(); + cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 + var font = workbook.CreateFont(); + font.FontHeightInPoints = 11; + cellStyle.SetFont(font); + + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + NPOI.SS.UserModel.IRow row = sheet.GetRow(0); + NPOI.SS.UserModel.ICell cell; + int i = 2; + foreach (var item in lists) + { + // 第二步:创建新数据行 + row = sheet.CreateRow(i); + // 添加数据 + cell = row.CreateCell(0); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.FileCode);//文件编号 + + cell = row.CreateCell(1); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.FileName);//文件名称 + + cell = row.CreateCell(2); + cell.CellStyle = cellStyle; + cell.SetCellValue(BLL.UserService.GetUserNameByUserId(item.CompileMan));//编制人 + + cell = row.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Auditor);//审核人 + + cell = row.CreateCell(4); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Approver);//批准人 + + cell = row.CreateCell(5); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.ApprovalDate) : "");//批准日期 + + i++; + } + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + 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); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.QualityManagementSysMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.designer.cs new file mode 100644 index 00000000..e2964986 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class QualityManagementSys { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtFileCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileCode; + + /// + /// txtFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileName; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// lbtnFileUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuModify; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx new file mode 100644 index 00000000..40104aea --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityManagementSysDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.QualityManagementSysDataIn" %> + + + + + + + 导入质量管理制度 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx.cs new file mode 100644 index 00000000..45f2a6a1 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx.cs @@ -0,0 +1,435 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class QualityManagementSysDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 6); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var oldViewInfos = from x in Funs.DB.QualityPlanning_QualityManagementSys + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + var users = from x in Funs.DB.Project_ProjectUser + join y in Funs.DB.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + select y; + + for (int i = 1; i < ir; i++) + { + Model.QualityPlanning_QualityManagementSys oldViewInfo = new Model.QualityPlanning_QualityManagementSys(); + string row0 = pds.Rows[i][0].ToString().Trim(); + if (string.IsNullOrEmpty(row0)) + { + result += (i + 2).ToString() + "," + "文件编号" + "," + "此项为必填项!" + "|"; + } + string row1 = pds.Rows[i][1].ToString().Trim(); + if (string.IsNullOrEmpty(row1)) + { + result += (i + 2).ToString() + "," + "文件名称" + "," + "此项为必填项!" + "|"; + } + string row2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(row2)) + { + var u = users.Where(x => x.UserName == row2).FirstOrDefault(); + if (u == null) + { + result += (i + 2).ToString() + "," + "编制人" + "," + "[" + row2 + "]不存在!" + "|"; + } + } + + string row5 = pds.Rows[i][5].ToString().Trim(); + if (!string.IsNullOrEmpty(row5)) + { + try + { + DateTime d = Convert.ToDateTime(row5); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "批准日期" + "," + "[" + row5 + "]错误!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 6); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var oldViewInfos = from x in Funs.DB.QualityPlanning_QualityManagementSys + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + var users = from x in Funs.DB.Project_ProjectUser + join y in Funs.DB.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + select y; + + for (int i = 1; i < ir; i++) + { + string row0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(row0)) + { + Model.QualityPlanning_QualityManagementSys oldViewInfo = new Model.QualityPlanning_QualityManagementSys(); + oldViewInfo = oldViewInfos.FirstOrDefault(x => x.FileCode == pds.Rows[i][0].ToString().Trim()); + if (oldViewInfo == null) + { + Model.QualityPlanning_QualityManagementSys newData = new Model.QualityPlanning_QualityManagementSys(); + newData.ProjectId = this.CurrUser.LoginProjectId; + newData.FileCode = pds.Rows[i][0].ToString().Trim(); + newData.FileName = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim())) + { + newData.CompileMan = users.FirstOrDefault(e => e.UserName == pds.Rows[i][2].ToString().Trim()).UserId; + } + newData.Auditor = pds.Rows[i][3].ToString().Trim(); + newData.Approver = pds.Rows[i][4].ToString().Trim(); + newData.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim()); + newData.CompileDate = DateTime.Now; + newData.QualityManagementSysId = SQLHelper.GetNewID(typeof(Model.QualityPlanning_QualityManagementSys)); + BLL.QualityManagementSysService.AddQualityManagementSys(newData); + } + else + { + oldViewInfo.FileCode = pds.Rows[i][0].ToString().Trim(); + oldViewInfo.FileName = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim())) + { + oldViewInfo.CompileMan = users.FirstOrDefault(e => e.UserName == pds.Rows[i][2].ToString().Trim()).UserId; + } + oldViewInfo.Auditor = pds.Rows[i][3].ToString().Trim(); + oldViewInfo.Approver = pds.Rows[i][4].ToString().Trim(); + oldViewInfo.ApprovalDate = Funs.GetNewDateTime(pds.Rows[i][5].ToString().Trim()); + BLL.QualityManagementSysService.UpdateQualityManagementSys(oldViewInfo); + } + } + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.QualityManagementSysTemUrl; + string filePath = Const.QualityManagementSysTemUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx.designer.cs new file mode 100644 index 00000000..e93da8bf --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysDataIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class QualityManagementSysDataIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx new file mode 100644 index 00000000..58caa25f --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx @@ -0,0 +1,65 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityManagementSysEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityPlanning.QualityManagementSysEdit" %> + + + + + + + 编辑质量管理制度 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx.cs new file mode 100644 index 00000000..3331bea7 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx.cs @@ -0,0 +1,151 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.QualityPlanning +{ + public partial class QualityManagementSysEdit : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string QualityManagementSysId + { + get + { + return (string)ViewState["QualityManagementSysId"]; + } + set + { + ViewState["QualityManagementSysId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BLL.UserService.InitUserDropDownList(this.drpCompileMan, this.CurrUser.LoginProjectId, true); + + this.QualityManagementSysId = Request.Params["id"]; + Model.QualityPlanning_QualityManagementSys sys = BLL.QualityManagementSysService.GetQualityManagementSysById(this.QualityManagementSysId); + if (sys != null) + { + this.QualityManagementSysId = sys.QualityManagementSysId; + this.hdAttachUrl.Text = this.QualityManagementSysId; + this.txtFileCode.Text = sys.FileCode; + this.txtFileName.Text = sys.FileName; + if (!string.IsNullOrEmpty(sys.CompileMan)) + { + this.drpCompileMan.SelectedValue = sys.CompileMan; + } + this.txtAuditor.Text = sys.Auditor; + this.txtApprover.Text = sys.Approver; + this.txtApprovalDate.Text = sys.ApprovalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", sys.ApprovalDate) : ""; + } + else + { + this.drpCompileMan.SelectedValue = this.CurrUser.UserId; + this.txtApprovalDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Model.QualityPlanning_QualityManagementSys newSys = new Model.QualityPlanning_QualityManagementSys(); + newSys.ProjectId = this.CurrUser.LoginProjectId; + newSys.FileCode = this.txtFileCode.Text.Trim(); + newSys.FileName = this.txtFileName.Text.Trim(); + if (this.drpCompileMan.SelectedValue != BLL.Const._Null) + { + newSys.CompileMan = this.drpCompileMan.SelectedValue; + } + newSys.CompileDate = DateTime.Now; + newSys.Auditor = this.txtAuditor.Text.Trim(); + newSys.Approver = this.txtApprover.Text.Trim(); + newSys.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text.Trim()); + if (string.IsNullOrEmpty(this.QualityManagementSysId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + newSys.QualityManagementSysId = this.hdAttachUrl.Text; + } + else + { + newSys.QualityManagementSysId = SQLHelper.GetNewID(typeof(Model.QualityPlanning_QualityManagementSys)); + this.hdAttachUrl.Text = newSys.QualityManagementSysId; + } + BLL.QualityManagementSysService.AddQualityManagementSys(newSys); + } + else + { + newSys.QualityManagementSysId = this.QualityManagementSysId; + BLL.QualityManagementSysService.UpdateQualityManagementSys(newSys); + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region 附件上传 + /// + /// 附件上传 + /// + /// + /// + protected void btnAttach_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录 + { + this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.QualityPlanning_QualityManagementSys)); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/QualityManagementSys&menuId={1}", this.hdAttachUrl.Text, BLL.Const.QualityManagementSysMenuId))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.QualityManagementSysMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx.designer.cs new file mode 100644 index 00000000..71ab3684 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSysEdit.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.QualityPlanning { + + + public partial class QualityManagementSysEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtFileCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileCode; + + /// + /// txtFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileName; + + /// + /// drpCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCompileMan; + + /// + /// txtAuditor 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAuditor; + + /// + /// txtApprover 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApprover; + + /// + /// txtApprovalDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtApprovalDate; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// btnAttach 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttach; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdAttachUrl; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/类似项目施工经验总结清单导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/类似项目施工经验总结清单导入模板.xls new file mode 100644 index 00000000..bafd5b03 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/类似项目施工经验总结清单导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/质量管理制度导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/质量管理制度导入模板.xls new file mode 100644 index 00000000..cf4459f0 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/质量管理制度导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/项目质量计划导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/项目质量计划导入模板.xls new file mode 100644 index 00000000..ef39fc3b Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/项目质量计划导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 6faf9b3a..ebdfcb39 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -565,6 +565,16 @@ + + + + + + + + + + @@ -1715,6 +1725,7 @@ + @@ -8363,6 +8374,76 @@ TestPackageManagementEdit.aspx + + ConExperienceSummary.aspx + ASPXCodeBehind + + + ConExperienceSummary.aspx + + + ConExperienceSummaryDataIn.aspx + ASPXCodeBehind + + + ConExperienceSummaryDataIn.aspx + + + ConExperienceSummaryEdit.aspx + ASPXCodeBehind + + + ConExperienceSummaryEdit.aspx + + + Organizational.aspx + ASPXCodeBehind + + + Organizational.aspx + + + ProjectQualityPlan.aspx + ASPXCodeBehind + + + ProjectQualityPlan.aspx + + + ProjectQualityPlanDataIn.aspx + ASPXCodeBehind + + + ProjectQualityPlanDataIn.aspx + + + ProjectQualityPlanEdit.aspx + ASPXCodeBehind + + + ProjectQualityPlanEdit.aspx + + + QualityManagementSys.aspx + ASPXCodeBehind + + + QualityManagementSys.aspx + + + QualityManagementSysDataIn.aspx + ASPXCodeBehind + + + QualityManagementSysDataIn.aspx + + + QualityManagementSysEdit.aspx + ASPXCodeBehind + + + QualityManagementSysEdit.aspx + ConstructSolution.aspx ASPXCodeBehind @@ -8484,6 +8565,7 @@ DivisionSubProjects.aspx + ASPXCodeBehind DivisionSubProjects.aspx diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index b8cc84be..63722353 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -16,9 +16,8 @@ - - - CurrentPage + Login.aspx + SpecificPage True False False diff --git a/SGGL/FineUIPro.Web/Login.aspx b/SGGL/FineUIPro.Web/Login.aspx index 422ad4f8..b781e94e 100644 --- a/SGGL/FineUIPro.Web/Login.aspx +++ b/SGGL/FineUIPro.Web/Login.aspx @@ -42,7 +42,7 @@ + style="width: auto; height: 335px;width:355px; position: absolute; flex-shrink: 0; margin: 0px;border-radius:10px;box-shadow:0px 20px 20px #1b1b2a; top: 0px; left: 0px;">
diff --git a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml index 87be14d7..72b5f81f 100644 --- a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml +++ b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml @@ -3,6 +3,7 @@ + @@ -58,4 +59,9 @@ + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx.cs index cf225c7f..abcc9980 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx.cs @@ -203,7 +203,11 @@ namespace FineUIPro.Web List listCategories = new List(); businessColumn.title = "质量问题统计"; businessColumn.xFontNum = 5; - var cns = BLL.CNProfessionalService.GetList(); + //var cns = BLL.CNProfessionalService.GetList(); + var cns = (from x in Funs.DB.Base_CNProfessional + where x.CNProfessionalId != BLL.Const.CNProfessionalHSEId + && x.CNProfessionalId != BLL.Const.CNProfessionalConstructId + select x).ToList(); var checks = from x in Funs.DB.Check_CheckControl where x.CheckDate <= DateTime.Now && x.ProjectId == CurrUser.LoginProjectId select x; diff --git a/SGGL/FineUIPro.Web/res/images/Organizational.png b/SGGL/FineUIPro.Web/res/images/Organizational.png new file mode 100644 index 00000000..ff29a645 Binary files /dev/null and b/SGGL/FineUIPro.Web/res/images/Organizational.png differ diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index aee0117b..79a5aa0c 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1472,6 +1472,9 @@ namespace Model partial void InsertManager_Month_CheckC(Manager_Month_CheckC instance); partial void UpdateManager_Month_CheckC(Manager_Month_CheckC instance); partial void DeleteManager_Month_CheckC(Manager_Month_CheckC instance); + partial void InsertManager_Month_ComplianceObligations(Manager_Month_ComplianceObligations instance); + partial void UpdateManager_Month_ComplianceObligations(Manager_Month_ComplianceObligations instance); + partial void DeleteManager_Month_ComplianceObligations(Manager_Month_ComplianceObligations instance); partial void InsertManager_Month_ComplianceObligationsC(Manager_Month_ComplianceObligationsC instance); partial void UpdateManager_Month_ComplianceObligationsC(Manager_Month_ComplianceObligationsC instance); partial void DeleteManager_Month_ComplianceObligationsC(Manager_Month_ComplianceObligationsC instance); @@ -1991,6 +1994,15 @@ namespace Model partial void InsertQualityAudit_SubUnitQualityAuditDetail(QualityAudit_SubUnitQualityAuditDetail instance); partial void UpdateQualityAudit_SubUnitQualityAuditDetail(QualityAudit_SubUnitQualityAuditDetail instance); partial void DeleteQualityAudit_SubUnitQualityAuditDetail(QualityAudit_SubUnitQualityAuditDetail instance); + partial void InsertQualityPlanning_ConExperienceSummary(QualityPlanning_ConExperienceSummary instance); + partial void UpdateQualityPlanning_ConExperienceSummary(QualityPlanning_ConExperienceSummary instance); + partial void DeleteQualityPlanning_ConExperienceSummary(QualityPlanning_ConExperienceSummary instance); + partial void InsertQualityPlanning_ProjectQualityPlan(QualityPlanning_ProjectQualityPlan instance); + partial void UpdateQualityPlanning_ProjectQualityPlan(QualityPlanning_ProjectQualityPlan instance); + partial void DeleteQualityPlanning_ProjectQualityPlan(QualityPlanning_ProjectQualityPlan instance); + partial void InsertQualityPlanning_QualityManagementSys(QualityPlanning_QualityManagementSys instance); + partial void UpdateQualityPlanning_QualityManagementSys(QualityPlanning_QualityManagementSys instance); + partial void DeleteQualityPlanning_QualityManagementSys(QualityPlanning_QualityManagementSys instance); partial void InsertRealName_BasicData(RealName_BasicData instance); partial void UpdateRealName_BasicData(RealName_BasicData instance); partial void DeleteRealName_BasicData(RealName_BasicData instance); @@ -2030,6 +2042,9 @@ namespace Model partial void InsertReport_CQMS_MonthReportItem(Report_CQMS_MonthReportItem instance); partial void UpdateReport_CQMS_MonthReportItem(Report_CQMS_MonthReportItem instance); partial void DeleteReport_CQMS_MonthReportItem(Report_CQMS_MonthReportItem instance); + partial void InsertReport_CQMS_ProblemHandle(Report_CQMS_ProblemHandle instance); + partial void UpdateReport_CQMS_ProblemHandle(Report_CQMS_ProblemHandle instance); + partial void DeleteReport_CQMS_ProblemHandle(Report_CQMS_ProblemHandle instance); partial void InsertReport_CqmsTarget(Report_CqmsTarget instance); partial void UpdateReport_CqmsTarget(Report_CqmsTarget instance); partial void DeleteReport_CqmsTarget(Report_CqmsTarget instance); @@ -6560,6 +6575,14 @@ namespace Model } } + public System.Data.Linq.Table Manager_Month_ComplianceObligations + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Manager_Month_ComplianceObligationsC { get @@ -7944,6 +7967,30 @@ namespace Model } } + public System.Data.Linq.Table QualityPlanning_ConExperienceSummary + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table QualityPlanning_ProjectQualityPlan + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table QualityPlanning_QualityManagementSys + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table RealName_BasicData { get @@ -8048,6 +8095,14 @@ namespace Model } } + public System.Data.Linq.Table Report_CQMS_ProblemHandle + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Report_CqmsTarget { get @@ -10104,6 +10159,14 @@ namespace Model } } + public System.Data.Linq.Table View_ProjectUserWorkPost + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_PTP_TestPackageAudit { get @@ -21657,8 +21720,6 @@ namespace Model private string _CodeRule; - private EntitySet _Doc_DocManage; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -21675,7 +21736,6 @@ namespace Model public Base_DocType() { - this._Doc_DocManage = new EntitySet(new Action(this.attach_Doc_DocManage), new Action(this.detach_Doc_DocManage)); OnCreated(); } @@ -21759,19 +21819,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManage_Base_DocType", Storage="_Doc_DocManage", ThisKey="DocTypeId", OtherKey="DocTypeId", DeleteRule="NO ACTION")] - public EntitySet Doc_DocManage - { - get - { - return this._Doc_DocManage; - } - set - { - this._Doc_DocManage.Assign(value); - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -21791,18 +21838,6 @@ namespace Model this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } - - private void attach_Doc_DocManage(Doc_DocManage entity) - { - this.SendPropertyChanging(); - entity.Base_DocType = this; - } - - private void detach_Doc_DocManage(Doc_DocManage entity) - { - this.SendPropertyChanging(); - entity.Base_DocType = null; - } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_EmergencyType")] @@ -26602,6 +26637,12 @@ namespace Model private EntitySet _QualityAudit_SubUnitQualityAuditDetail; + private EntitySet _QualityPlanning_ConExperienceSummary; + + private EntitySet _QualityPlanning_ProjectQualityPlan; + + private EntitySet _QualityPlanning_QualityManagementSys; + private EntitySet _Report_WeekAndMonthReport; private EntitySet _SafetyData_SafetyDataItem; @@ -27042,6 +27083,9 @@ namespace Model this._QualityAudit_InUnit = new EntitySet(new Action(this.attach_QualityAudit_InUnit), new Action(this.detach_QualityAudit_InUnit)); this._QualityAudit_ProjectRecord = new EntitySet(new Action(this.attach_QualityAudit_ProjectRecord), new Action(this.detach_QualityAudit_ProjectRecord)); this._QualityAudit_SubUnitQualityAuditDetail = new EntitySet(new Action(this.attach_QualityAudit_SubUnitQualityAuditDetail), new Action(this.detach_QualityAudit_SubUnitQualityAuditDetail)); + this._QualityPlanning_ConExperienceSummary = new EntitySet(new Action(this.attach_QualityPlanning_ConExperienceSummary), new Action(this.detach_QualityPlanning_ConExperienceSummary)); + this._QualityPlanning_ProjectQualityPlan = new EntitySet(new Action(this.attach_QualityPlanning_ProjectQualityPlan), new Action(this.detach_QualityPlanning_ProjectQualityPlan)); + this._QualityPlanning_QualityManagementSys = new EntitySet(new Action(this.attach_QualityPlanning_QualityManagementSys), new Action(this.detach_QualityPlanning_QualityManagementSys)); this._Report_WeekAndMonthReport = new EntitySet(new Action(this.attach_Report_WeekAndMonthReport), new Action(this.detach_Report_WeekAndMonthReport)); this._SafetyData_SafetyDataItem = new EntitySet(new Action(this.attach_SafetyData_SafetyDataItem), new Action(this.detach_SafetyData_SafetyDataItem)); this._SafetyData_SafetyDataPlan = new EntitySet(new Action(this.attach_SafetyData_SafetyDataPlan), new Action(this.detach_SafetyData_SafetyDataPlan)); @@ -31246,6 +31290,45 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_ConExperienceSummary_Base_Project", Storage="_QualityPlanning_ConExperienceSummary", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet QualityPlanning_ConExperienceSummary + { + get + { + return this._QualityPlanning_ConExperienceSummary; + } + set + { + this._QualityPlanning_ConExperienceSummary.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_ProjectQualityPlan_Base_Project", Storage="_QualityPlanning_ProjectQualityPlan", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet QualityPlanning_ProjectQualityPlan + { + get + { + return this._QualityPlanning_ProjectQualityPlan; + } + set + { + this._QualityPlanning_ProjectQualityPlan.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_QualityManagementSys_Base_Project", Storage="_QualityPlanning_QualityManagementSys", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet QualityPlanning_QualityManagementSys + { + get + { + return this._QualityPlanning_QualityManagementSys; + } + set + { + this._QualityPlanning_QualityManagementSys.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Report_WeekAndMonthReport_Base_Project", Storage="_Report_WeekAndMonthReport", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Report_WeekAndMonthReport { @@ -34927,6 +35010,42 @@ namespace Model entity.Base_Project = null; } + private void attach_QualityPlanning_ConExperienceSummary(QualityPlanning_ConExperienceSummary entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_QualityPlanning_ConExperienceSummary(QualityPlanning_ConExperienceSummary entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_QualityPlanning_ProjectQualityPlan(QualityPlanning_ProjectQualityPlan entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_QualityPlanning_ProjectQualityPlan(QualityPlanning_ProjectQualityPlan entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_QualityPlanning_QualityManagementSys(QualityPlanning_QualityManagementSys entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_QualityPlanning_QualityManagementSys(QualityPlanning_QualityManagementSys entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Report_WeekAndMonthReport(Report_WeekAndMonthReport entity) { this.SendPropertyChanging(); @@ -93274,7 +93393,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanName", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanName", DbType="NVarChar(300)")] public string PlanName { get @@ -98413,10 +98532,10 @@ namespace Model private string _AuditMan; - private string _Problem; - private string _Measure; + private string _Problem; + private System.Nullable _RemarkCode; private EntityRef _Sys_User; @@ -98465,10 +98584,10 @@ namespace Model partial void OnStatusChanged(); partial void OnAuditManChanging(string value); partial void OnAuditManChanged(); - partial void OnProblemChanging(string value); - partial void OnProblemChanged(); partial void OnMeasureChanging(string value); partial void OnMeasureChanged(); + partial void OnProblemChanging(string value); + partial void OnProblemChanged(); partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); #endregion @@ -98838,27 +98957,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Problem", DbType="VarChar(50)")] - public string Problem - { - get - { - return this._Problem; - } - set - { - if ((this._Problem != value)) - { - this.OnProblemChanging(value); - this.SendPropertyChanging(); - this._Problem = value; - this.SendPropertyChanged("Problem"); - this.OnProblemChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measure", DbType="VarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measure", DbType="NVarChar(1000)")] public string Measure { get @@ -98878,6 +98977,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Problem", DbType="NVarChar(1000)")] + public string Problem + { + get + { + return this._Problem; + } + set + { + if ((this._Problem != value)) + { + this.OnProblemChanging(value); + this.SendPropertyChanging(); + this._Problem = value; + this.SendPropertyChanged("Problem"); + this.OnProblemChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] public System.Nullable RemarkCode { @@ -122200,8 +122319,6 @@ namespace Model private EntityRef _Base_CNProfessional; - private EntityRef _Base_DocType; - private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -122253,7 +122370,6 @@ namespace Model public Doc_DocManage() { this._Base_CNProfessional = default(EntityRef); - this._Base_DocType = default(EntityRef); this._Base_Project = default(EntityRef); this._Base_Unit = default(EntityRef); this._Sys_User = default(EntityRef); @@ -122332,10 +122448,6 @@ namespace Model { if ((this._DocTypeId != value)) { - if (this._Base_DocType.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnDocTypeIdChanging(value); this.SendPropertyChanging(); this._DocTypeId = value; @@ -122655,40 +122767,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManage_Base_DocType", Storage="_Base_DocType", ThisKey="DocTypeId", OtherKey="DocTypeId", IsForeignKey=true)] - public Base_DocType Base_DocType - { - get - { - return this._Base_DocType.Entity; - } - set - { - Base_DocType previousValue = this._Base_DocType.Entity; - if (((previousValue != value) - || (this._Base_DocType.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Base_DocType.Entity = null; - previousValue.Doc_DocManage.Remove(this); - } - this._Base_DocType.Entity = value; - if ((value != null)) - { - value.Doc_DocManage.Add(this); - this._DocTypeId = value.DocTypeId; - } - else - { - this._DocTypeId = default(string); - } - this.SendPropertyChanged("Base_DocType"); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManage_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -122859,8 +122937,6 @@ namespace Model private EntityRef _Doc_DocManage; - private EntityRef _Sys_User; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -122884,7 +122960,6 @@ namespace Model public Doc_DocManageApprove() { this._Doc_DocManage = default(EntityRef); - this._Sys_User = default(EntityRef); OnCreated(); } @@ -122932,7 +123007,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(500)")] public string ApproveMan { get @@ -122943,10 +123018,6 @@ namespace Model { if ((this._ApproveMan != value)) { - if (this._Sys_User.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnApproveManChanging(value); this.SendPropertyChanging(); this._ApproveMan = value; @@ -123070,40 +123141,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManageApprove_Sys_User", Storage="_Sys_User", ThisKey="ApproveMan", OtherKey="UserId", IsForeignKey=true)] - public Sys_User Sys_User - { - get - { - return this._Sys_User.Entity; - } - set - { - Sys_User previousValue = this._Sys_User.Entity; - if (((previousValue != value) - || (this._Sys_User.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Sys_User.Entity = null; - previousValue.Doc_DocManageApprove.Remove(this); - } - this._Sys_User.Entity = value; - if ((value != null)) - { - value.Doc_DocManageApprove.Add(this); - this._ApproveMan = value.UserId; - } - else - { - this._ApproveMan = default(string); - } - this.SendPropertyChanged("Sys_User"); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -237950,6 +237987,229 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Manager_Month_ComplianceObligations")] + public partial class Manager_Month_ComplianceObligations : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ComplianceObligationsId; + + private string _MonthReportId; + + private string _InformationContent; + + private string _ResponseMeasures; + + private string _ImplementationStatus; + + private string _EvaluationConclusion; + + private EntityRef _Manager_MonthReportC; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnComplianceObligationsIdChanging(string value); + partial void OnComplianceObligationsIdChanged(); + partial void OnMonthReportIdChanging(string value); + partial void OnMonthReportIdChanged(); + partial void OnInformationContentChanging(string value); + partial void OnInformationContentChanged(); + partial void OnResponseMeasuresChanging(string value); + partial void OnResponseMeasuresChanged(); + partial void OnImplementationStatusChanging(string value); + partial void OnImplementationStatusChanged(); + partial void OnEvaluationConclusionChanging(string value); + partial void OnEvaluationConclusionChanged(); + #endregion + + public Manager_Month_ComplianceObligations() + { + this._Manager_MonthReportC = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComplianceObligationsId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ComplianceObligationsId + { + get + { + return this._ComplianceObligationsId; + } + set + { + if ((this._ComplianceObligationsId != value)) + { + this.OnComplianceObligationsIdChanging(value); + this.SendPropertyChanging(); + this._ComplianceObligationsId = value; + this.SendPropertyChanged("ComplianceObligationsId"); + this.OnComplianceObligationsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthReportId", DbType="NVarChar(50)")] + public string MonthReportId + { + get + { + return this._MonthReportId; + } + set + { + if ((this._MonthReportId != value)) + { + if (this._Manager_MonthReportC.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnMonthReportIdChanging(value); + this.SendPropertyChanging(); + this._MonthReportId = value; + this.SendPropertyChanged("MonthReportId"); + this.OnMonthReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InformationContent", DbType="NVarChar(500)")] + public string InformationContent + { + get + { + return this._InformationContent; + } + set + { + if ((this._InformationContent != value)) + { + this.OnInformationContentChanging(value); + this.SendPropertyChanging(); + this._InformationContent = value; + this.SendPropertyChanged("InformationContent"); + this.OnInformationContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponseMeasures", DbType="NVarChar(500)")] + public string ResponseMeasures + { + get + { + return this._ResponseMeasures; + } + set + { + if ((this._ResponseMeasures != value)) + { + this.OnResponseMeasuresChanging(value); + this.SendPropertyChanging(); + this._ResponseMeasures = value; + this.SendPropertyChanged("ResponseMeasures"); + this.OnResponseMeasuresChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ImplementationStatus", DbType="NVarChar(500)")] + public string ImplementationStatus + { + get + { + return this._ImplementationStatus; + } + set + { + if ((this._ImplementationStatus != value)) + { + this.OnImplementationStatusChanging(value); + this.SendPropertyChanging(); + this._ImplementationStatus = value; + this.SendPropertyChanged("ImplementationStatus"); + this.OnImplementationStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EvaluationConclusion", DbType="NVarChar(50)")] + public string EvaluationConclusion + { + get + { + return this._EvaluationConclusion; + } + set + { + if ((this._EvaluationConclusion != value)) + { + this.OnEvaluationConclusionChanging(value); + this.SendPropertyChanging(); + this._EvaluationConclusion = value; + this.SendPropertyChanged("EvaluationConclusion"); + this.OnEvaluationConclusionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_Month_ComplianceObligations_Manager_MonthReportC", Storage="_Manager_MonthReportC", ThisKey="MonthReportId", OtherKey="MonthReportId", IsForeignKey=true)] + public Manager_MonthReportC Manager_MonthReportC + { + get + { + return this._Manager_MonthReportC.Entity; + } + set + { + Manager_MonthReportC previousValue = this._Manager_MonthReportC.Entity; + if (((previousValue != value) + || (this._Manager_MonthReportC.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Manager_MonthReportC.Entity = null; + previousValue.Manager_Month_ComplianceObligations.Remove(this); + } + this._Manager_MonthReportC.Entity = value; + if ((value != null)) + { + value.Manager_Month_ComplianceObligations.Add(this); + this._MonthReportId = value.MonthReportId; + } + else + { + this._MonthReportId = default(string); + } + this.SendPropertyChanged("Manager_MonthReportC"); + } + } + } + + 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.Manager_Month_ComplianceObligationsC")] public partial class Manager_Month_ComplianceObligationsC : INotifyPropertyChanging, INotifyPropertyChanged { @@ -244149,6 +244409,8 @@ namespace Model private EntitySet _Manager_Month_CheckC; + private EntitySet _Manager_Month_ComplianceObligations; + private EntitySet _Manager_Month_ComplianceObligationsC; private EntitySet _Manager_Month_CostInvestmentPlanC; @@ -244421,6 +244683,7 @@ namespace Model this._Manager_Month_ActivitiesC = new EntitySet(new Action(this.attach_Manager_Month_ActivitiesC), new Action(this.detach_Manager_Month_ActivitiesC)); this._Manager_Month_ActivityDesC = new EntitySet(new Action(this.attach_Manager_Month_ActivityDesC), new Action(this.detach_Manager_Month_ActivityDesC)); this._Manager_Month_CheckC = new EntitySet(new Action(this.attach_Manager_Month_CheckC), new Action(this.detach_Manager_Month_CheckC)); + this._Manager_Month_ComplianceObligations = new EntitySet(new Action(this.attach_Manager_Month_ComplianceObligations), new Action(this.detach_Manager_Month_ComplianceObligations)); this._Manager_Month_ComplianceObligationsC = new EntitySet(new Action(this.attach_Manager_Month_ComplianceObligationsC), new Action(this.detach_Manager_Month_ComplianceObligationsC)); this._Manager_Month_CostInvestmentPlanC = new EntitySet(new Action(this.attach_Manager_Month_CostInvestmentPlanC), new Action(this.detach_Manager_Month_CostInvestmentPlanC)); this._Manager_Month_EmergencyExercisesC = new EntitySet(new Action(this.attach_Manager_Month_EmergencyExercisesC), new Action(this.detach_Manager_Month_EmergencyExercisesC)); @@ -246601,6 +246864,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_Month_ComplianceObligations_Manager_MonthReportC", Storage="_Manager_Month_ComplianceObligations", ThisKey="MonthReportId", OtherKey="MonthReportId", DeleteRule="NO ACTION")] + public EntitySet Manager_Month_ComplianceObligations + { + get + { + return this._Manager_Month_ComplianceObligations; + } + set + { + this._Manager_Month_ComplianceObligations.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_Month_ComplianceObligationsC_Manager_MonthReportC", Storage="_Manager_Month_ComplianceObligationsC", ThisKey="MonthReportId", OtherKey="MonthReportId", DeleteRule="NO ACTION")] public EntitySet Manager_Month_ComplianceObligationsC { @@ -247182,6 +247458,18 @@ namespace Model entity.Manager_MonthReportC = null; } + private void attach_Manager_Month_ComplianceObligations(Manager_Month_ComplianceObligations entity) + { + this.SendPropertyChanging(); + entity.Manager_MonthReportC = this; + } + + private void detach_Manager_Month_ComplianceObligations(Manager_Month_ComplianceObligations entity) + { + this.SendPropertyChanging(); + entity.Manager_MonthReportC = null; + } + private void attach_Manager_Month_ComplianceObligationsC(Manager_Month_ComplianceObligationsC entity) { this.SendPropertyChanging(); @@ -275526,7 +275814,7 @@ namespace Model private System.Nullable _ProblemType; - private string _SubInspectId; + private string _QuestionTechnologyId; private string _TermItemId; @@ -275540,18 +275828,20 @@ namespace Model private string _InspectUser; - private string _HandleUser; - private string _ApproveUser; - private System.Nullable _AdjustCompleteTime; - private System.Nullable _ApproveState; private string _AddUser; private System.Nullable _AddTime; + private string _HandleUser; + + private System.Nullable _AdjustCompleteTime; + + private string _SubInspectId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -275568,8 +275858,8 @@ namespace Model partial void OnConstructionUnitChanged(); partial void OnProblemTypeChanging(System.Nullable value); partial void OnProblemTypeChanged(); - partial void OnSubInspectIdChanging(string value); - partial void OnSubInspectIdChanged(); + partial void OnQuestionTechnologyIdChanging(string value); + partial void OnQuestionTechnologyIdChanged(); partial void OnTermItemIdChanging(string value); partial void OnTermItemIdChanged(); partial void OnWorkPackIdChanging(string value); @@ -275582,18 +275872,20 @@ namespace Model partial void OnRectifyTimeChanged(); partial void OnInspectUserChanging(string value); partial void OnInspectUserChanged(); - partial void OnHandleUserChanging(string value); - partial void OnHandleUserChanged(); partial void OnApproveUserChanging(string value); partial void OnApproveUserChanged(); - partial void OnAdjustCompleteTimeChanging(System.Nullable value); - partial void OnAdjustCompleteTimeChanged(); partial void OnApproveStateChanging(System.Nullable value); partial void OnApproveStateChanged(); partial void OnAddUserChanging(string value); partial void OnAddUserChanged(); partial void OnAddTimeChanging(System.Nullable value); partial void OnAddTimeChanged(); + partial void OnHandleUserChanging(string value); + partial void OnHandleUserChanged(); + partial void OnAdjustCompleteTimeChanging(System.Nullable value); + partial void OnAdjustCompleteTimeChanged(); + partial void OnSubInspectIdChanging(string value); + partial void OnSubInspectIdChanged(); #endregion public PreRun_InspectTailTerm() @@ -275721,22 +276013,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubInspectId", DbType="VarChar(50)")] - public string SubInspectId + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuestionTechnologyId", DbType="VarChar(50)")] + public string QuestionTechnologyId { get { - return this._SubInspectId; + return this._QuestionTechnologyId; } set { - if ((this._SubInspectId != value)) + if ((this._QuestionTechnologyId != value)) { - this.OnSubInspectIdChanging(value); + this.OnQuestionTechnologyIdChanging(value); this.SendPropertyChanging(); - this._SubInspectId = value; - this.SendPropertyChanged("SubInspectId"); - this.OnSubInspectIdChanged(); + this._QuestionTechnologyId = value; + this.SendPropertyChanged("QuestionTechnologyId"); + this.OnQuestionTechnologyIdChanged(); } } } @@ -275861,26 +276153,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleUser", DbType="VarChar(50)")] - public string HandleUser - { - get - { - return this._HandleUser; - } - set - { - if ((this._HandleUser != value)) - { - this.OnHandleUserChanging(value); - this.SendPropertyChanging(); - this._HandleUser = value; - this.SendPropertyChanged("HandleUser"); - this.OnHandleUserChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveUser", DbType="VarChar(50)")] public string ApproveUser { @@ -275901,26 +276173,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AdjustCompleteTime", DbType="DateTime")] - public System.Nullable AdjustCompleteTime - { - get - { - return this._AdjustCompleteTime; - } - set - { - if ((this._AdjustCompleteTime != value)) - { - this.OnAdjustCompleteTimeChanging(value); - this.SendPropertyChanging(); - this._AdjustCompleteTime = value; - this.SendPropertyChanged("AdjustCompleteTime"); - this.OnAdjustCompleteTimeChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveState", DbType="Int")] public System.Nullable ApproveState { @@ -275981,6 +276233,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleUser", DbType="VarChar(50)")] + public string HandleUser + { + get + { + return this._HandleUser; + } + set + { + if ((this._HandleUser != value)) + { + this.OnHandleUserChanging(value); + this.SendPropertyChanging(); + this._HandleUser = value; + this.SendPropertyChanged("HandleUser"); + this.OnHandleUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AdjustCompleteTime", DbType="DateTime")] + public System.Nullable AdjustCompleteTime + { + get + { + return this._AdjustCompleteTime; + } + set + { + if ((this._AdjustCompleteTime != value)) + { + this.OnAdjustCompleteTimeChanging(value); + this.SendPropertyChanging(); + this._AdjustCompleteTime = value; + this.SendPropertyChanged("AdjustCompleteTime"); + this.OnAdjustCompleteTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubInspectId", DbType="NVarChar(50)")] + public string SubInspectId + { + get + { + return this._SubInspectId; + } + set + { + if ((this._SubInspectId != value)) + { + this.OnSubInspectIdChanging(value); + this.SendPropertyChanging(); + this._SubInspectId = value; + this.SendPropertyChanged("SubInspectId"); + this.OnSubInspectIdChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -276022,14 +276334,14 @@ namespace Model private string _ApproveUser; - private System.Nullable _ApproveType; - private System.Nullable _ApproveState; private string _AddUser; private System.Nullable _AddTime; + private System.Nullable _ApproveType; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -276048,14 +276360,14 @@ namespace Model partial void OnApproveTimeChanged(); partial void OnApproveUserChanging(string value); partial void OnApproveUserChanged(); - partial void OnApproveTypeChanging(System.Nullable value); - partial void OnApproveTypeChanged(); partial void OnApproveStateChanging(System.Nullable value); partial void OnApproveStateChanged(); partial void OnAddUserChanging(string value); partial void OnAddUserChanged(); partial void OnAddTimeChanging(System.Nullable value); partial void OnAddTimeChanged(); + partial void OnApproveTypeChanging(System.Nullable value); + partial void OnApproveTypeChanged(); #endregion public PreRun_InspectTermApproveRecords() @@ -276203,26 +276515,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="Int")] - public System.Nullable ApproveType - { - get - { - return this._ApproveType; - } - set - { - if ((this._ApproveType != value)) - { - this.OnApproveTypeChanging(value); - this.SendPropertyChanging(); - this._ApproveType = value; - this.SendPropertyChanged("ApproveType"); - this.OnApproveTypeChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveState", DbType="Int")] public System.Nullable ApproveState { @@ -276283,6 +276575,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="Int")] + public System.Nullable ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -277215,7 +277527,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Remark { get @@ -277338,6 +277650,12 @@ namespace Model private string _InspectResult; + private System.Nullable _InspectTime; + + private string _AddUser; + + private System.Nullable _AddTime; + private string _Subcontractor; private string _Contractor; @@ -277346,6 +277664,12 @@ namespace Model private string _Owner; + private System.Nullable _IsUnifyWanderAbout; + + private System.Nullable _UnifyWanderAboutData; + + private string _UnifyWanderAboutOpinion; + private System.Nullable _InspectionIsAllPass; private System.Nullable _SubcontractorIsAllPass; @@ -277356,9 +277680,7 @@ namespace Model private System.Nullable _OwnerIsAllPass; - private System.Nullable _WorkPackType; - - private string _PropertyTechnologyId; + private System.Nullable _WanderIsComplete; private System.Nullable _SubcontractorAllPassData; @@ -277368,35 +277690,25 @@ namespace Model private System.Nullable _OwnerAllPassData; - private System.Nullable _WanderIsComplete; - private System.Nullable _WanderCompleteData; + private System.Nullable _WorkPackType; + private System.Nullable _IsSiteImplement; - private string _SiteImplementUser; - - private System.Nullable _SiteImplementConfirmData; - - private System.Nullable _RecordUploadData; - private System.Nullable _InspectIsClose; - private string _InspectIsCloseUser; - private System.Nullable _InspectCloseData; - private System.Nullable _IsUnifyWanderAbout; + private string _InspectIsCloseUser; - private System.Nullable _UnifyWanderAboutData; + private string _PropertyTechnologyId; - private string _UnifyWanderAboutOpinion; + private System.Nullable _RecordUploadData; - private System.Nullable _InspectTime; + private System.Nullable _SiteImplementConfirmData; - private string _AddUser; - - private System.Nullable _AddTime; + private string _SiteImplementUser; #region 可扩展性方法定义 partial void OnLoaded(); @@ -277418,6 +277730,12 @@ namespace Model partial void OnWorkPackIdChanged(); partial void OnInspectResultChanging(string value); partial void OnInspectResultChanged(); + partial void OnInspectTimeChanging(System.Nullable value); + partial void OnInspectTimeChanged(); + partial void OnAddUserChanging(string value); + partial void OnAddUserChanged(); + partial void OnAddTimeChanging(System.Nullable value); + partial void OnAddTimeChanged(); partial void OnSubcontractorChanging(string value); partial void OnSubcontractorChanged(); partial void OnContractorChanging(string value); @@ -277426,6 +277744,12 @@ namespace Model partial void OnSupervisionChanged(); partial void OnOwnerChanging(string value); partial void OnOwnerChanged(); + partial void OnIsUnifyWanderAboutChanging(System.Nullable value); + partial void OnIsUnifyWanderAboutChanged(); + partial void OnUnifyWanderAboutDataChanging(System.Nullable value); + partial void OnUnifyWanderAboutDataChanged(); + partial void OnUnifyWanderAboutOpinionChanging(string value); + partial void OnUnifyWanderAboutOpinionChanged(); partial void OnInspectionIsAllPassChanging(System.Nullable value); partial void OnInspectionIsAllPassChanged(); partial void OnSubcontractorIsAllPassChanging(System.Nullable value); @@ -277436,10 +277760,8 @@ namespace Model partial void OnSupervisionIsAllPassChanged(); partial void OnOwnerIsAllPassChanging(System.Nullable value); partial void OnOwnerIsAllPassChanged(); - partial void OnWorkPackTypeChanging(System.Nullable value); - partial void OnWorkPackTypeChanged(); - partial void OnPropertyTechnologyIdChanging(string value); - partial void OnPropertyTechnologyIdChanged(); + partial void OnWanderIsCompleteChanging(System.Nullable value); + partial void OnWanderIsCompleteChanged(); partial void OnSubcontractorAllPassDataChanging(System.Nullable value); partial void OnSubcontractorAllPassDataChanged(); partial void OnContractorAllPassDataChanging(System.Nullable value); @@ -277448,36 +277770,26 @@ namespace Model partial void OnSupervisionAllPassDataChanged(); partial void OnOwnerAllPassDataChanging(System.Nullable value); partial void OnOwnerAllPassDataChanged(); - partial void OnWanderIsCompleteChanging(System.Nullable value); - partial void OnWanderIsCompleteChanged(); partial void OnWanderCompleteDataChanging(System.Nullable value); partial void OnWanderCompleteDataChanged(); + partial void OnWorkPackTypeChanging(System.Nullable value); + partial void OnWorkPackTypeChanged(); partial void OnIsSiteImplementChanging(System.Nullable value); partial void OnIsSiteImplementChanged(); - partial void OnSiteImplementUserChanging(string value); - partial void OnSiteImplementUserChanged(); - partial void OnSiteImplementConfirmDataChanging(System.Nullable value); - partial void OnSiteImplementConfirmDataChanged(); - partial void OnRecordUploadDataChanging(System.Nullable value); - partial void OnRecordUploadDataChanged(); partial void OnInspectIsCloseChanging(System.Nullable value); partial void OnInspectIsCloseChanged(); - partial void OnInspectIsCloseUserChanging(string value); - partial void OnInspectIsCloseUserChanged(); partial void OnInspectCloseDataChanging(System.Nullable value); partial void OnInspectCloseDataChanged(); - partial void OnIsUnifyWanderAboutChanging(System.Nullable value); - partial void OnIsUnifyWanderAboutChanged(); - partial void OnUnifyWanderAboutDataChanging(System.Nullable value); - partial void OnUnifyWanderAboutDataChanged(); - partial void OnUnifyWanderAboutOpinionChanging(string value); - partial void OnUnifyWanderAboutOpinionChanged(); - partial void OnInspectTimeChanging(System.Nullable value); - partial void OnInspectTimeChanged(); - partial void OnAddUserChanging(string value); - partial void OnAddUserChanged(); - partial void OnAddTimeChanging(System.Nullable value); - partial void OnAddTimeChanged(); + partial void OnInspectIsCloseUserChanging(string value); + partial void OnInspectIsCloseUserChanged(); + partial void OnPropertyTechnologyIdChanging(string value); + partial void OnPropertyTechnologyIdChanged(); + partial void OnRecordUploadDataChanging(System.Nullable value); + partial void OnRecordUploadDataChanged(); + partial void OnSiteImplementConfirmDataChanging(System.Nullable value); + partial void OnSiteImplementConfirmDataChanged(); + partial void OnSiteImplementUserChanging(string value); + partial void OnSiteImplementUserChanged(); #endregion public PreRun_SubInspectTerm() @@ -277645,6 +277957,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectTime", DbType="DateTime")] + public System.Nullable InspectTime + { + get + { + return this._InspectTime; + } + set + { + if ((this._InspectTime != value)) + { + this.OnInspectTimeChanging(value); + this.SendPropertyChanging(); + this._InspectTime = value; + this.SendPropertyChanged("InspectTime"); + this.OnInspectTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddUser", DbType="VarChar(50)")] + public string AddUser + { + get + { + return this._AddUser; + } + set + { + if ((this._AddUser != value)) + { + this.OnAddUserChanging(value); + this.SendPropertyChanging(); + this._AddUser = value; + this.SendPropertyChanged("AddUser"); + this.OnAddUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddTime", DbType="DateTime")] + public System.Nullable AddTime + { + get + { + return this._AddTime; + } + set + { + if ((this._AddTime != value)) + { + this.OnAddTimeChanging(value); + this.SendPropertyChanging(); + this._AddTime = value; + this.SendPropertyChanged("AddTime"); + this.OnAddTimeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subcontractor", DbType="VarChar(50)")] public string Subcontractor { @@ -277725,6 +278097,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUnifyWanderAbout", DbType="Int")] + public System.Nullable IsUnifyWanderAbout + { + get + { + return this._IsUnifyWanderAbout; + } + set + { + if ((this._IsUnifyWanderAbout != value)) + { + this.OnIsUnifyWanderAboutChanging(value); + this.SendPropertyChanging(); + this._IsUnifyWanderAbout = value; + this.SendPropertyChanged("IsUnifyWanderAbout"); + this.OnIsUnifyWanderAboutChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnifyWanderAboutData", DbType="DateTime")] + public System.Nullable UnifyWanderAboutData + { + get + { + return this._UnifyWanderAboutData; + } + set + { + if ((this._UnifyWanderAboutData != value)) + { + this.OnUnifyWanderAboutDataChanging(value); + this.SendPropertyChanging(); + this._UnifyWanderAboutData = value; + this.SendPropertyChanged("UnifyWanderAboutData"); + this.OnUnifyWanderAboutDataChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnifyWanderAboutOpinion", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string UnifyWanderAboutOpinion + { + get + { + return this._UnifyWanderAboutOpinion; + } + set + { + if ((this._UnifyWanderAboutOpinion != value)) + { + this.OnUnifyWanderAboutOpinionChanging(value); + this.SendPropertyChanging(); + this._UnifyWanderAboutOpinion = value; + this.SendPropertyChanged("UnifyWanderAboutOpinion"); + this.OnUnifyWanderAboutOpinionChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionIsAllPass", DbType="Int")] public System.Nullable InspectionIsAllPass { @@ -277825,42 +278257,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] - public System.Nullable WorkPackType + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WanderIsComplete", DbType="Int")] + public System.Nullable WanderIsComplete { get { - return this._WorkPackType; + return this._WanderIsComplete; } set { - if ((this._WorkPackType != value)) + if ((this._WanderIsComplete != value)) { - this.OnWorkPackTypeChanging(value); + this.OnWanderIsCompleteChanging(value); this.SendPropertyChanging(); - this._WorkPackType = value; - this.SendPropertyChanged("WorkPackType"); - this.OnWorkPackTypeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] - public string PropertyTechnologyId - { - get - { - return this._PropertyTechnologyId; - } - set - { - if ((this._PropertyTechnologyId != value)) - { - this.OnPropertyTechnologyIdChanging(value); - this.SendPropertyChanging(); - this._PropertyTechnologyId = value; - this.SendPropertyChanged("PropertyTechnologyId"); - this.OnPropertyTechnologyIdChanged(); + this._WanderIsComplete = value; + this.SendPropertyChanged("WanderIsComplete"); + this.OnWanderIsCompleteChanged(); } } } @@ -277945,26 +278357,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WanderIsComplete", DbType="Int")] - public System.Nullable WanderIsComplete - { - get - { - return this._WanderIsComplete; - } - set - { - if ((this._WanderIsComplete != value)) - { - this.OnWanderIsCompleteChanging(value); - this.SendPropertyChanging(); - this._WanderIsComplete = value; - this.SendPropertyChanged("WanderIsComplete"); - this.OnWanderIsCompleteChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WanderCompleteData", DbType="DateTime")] public System.Nullable WanderCompleteData { @@ -277985,6 +278377,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] + public System.Nullable WorkPackType + { + get + { + return this._WorkPackType; + } + set + { + if ((this._WorkPackType != value)) + { + this.OnWorkPackTypeChanging(value); + this.SendPropertyChanging(); + this._WorkPackType = value; + this.SendPropertyChanged("WorkPackType"); + this.OnWorkPackTypeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSiteImplement", DbType="Int")] public System.Nullable IsSiteImplement { @@ -278005,66 +278417,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementUser", DbType="VarChar(50)")] - public string SiteImplementUser - { - get - { - return this._SiteImplementUser; - } - set - { - if ((this._SiteImplementUser != value)) - { - this.OnSiteImplementUserChanging(value); - this.SendPropertyChanging(); - this._SiteImplementUser = value; - this.SendPropertyChanged("SiteImplementUser"); - this.OnSiteImplementUserChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementConfirmData", DbType="DateTime")] - public System.Nullable SiteImplementConfirmData - { - get - { - return this._SiteImplementConfirmData; - } - set - { - if ((this._SiteImplementConfirmData != value)) - { - this.OnSiteImplementConfirmDataChanging(value); - this.SendPropertyChanging(); - this._SiteImplementConfirmData = value; - this.SendPropertyChanged("SiteImplementConfirmData"); - this.OnSiteImplementConfirmDataChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordUploadData", DbType="DateTime")] - public System.Nullable RecordUploadData - { - get - { - return this._RecordUploadData; - } - set - { - if ((this._RecordUploadData != value)) - { - this.OnRecordUploadDataChanging(value); - this.SendPropertyChanging(); - this._RecordUploadData = value; - this.SendPropertyChanged("RecordUploadData"); - this.OnRecordUploadDataChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsClose", DbType="Int")] public System.Nullable InspectIsClose { @@ -278085,26 +278437,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsCloseUser", DbType="VarChar(50)")] - public string InspectIsCloseUser - { - get - { - return this._InspectIsCloseUser; - } - set - { - if ((this._InspectIsCloseUser != value)) - { - this.OnInspectIsCloseUserChanging(value); - this.SendPropertyChanging(); - this._InspectIsCloseUser = value; - this.SendPropertyChanged("InspectIsCloseUser"); - this.OnInspectIsCloseUserChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectCloseData", DbType="DateTime")] public System.Nullable InspectCloseData { @@ -278125,122 +278457,102 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUnifyWanderAbout", DbType="Int")] - public System.Nullable IsUnifyWanderAbout + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsCloseUser", DbType="NVarChar(50)")] + public string InspectIsCloseUser { get { - return this._IsUnifyWanderAbout; + return this._InspectIsCloseUser; } set { - if ((this._IsUnifyWanderAbout != value)) + if ((this._InspectIsCloseUser != value)) { - this.OnIsUnifyWanderAboutChanging(value); + this.OnInspectIsCloseUserChanging(value); this.SendPropertyChanging(); - this._IsUnifyWanderAbout = value; - this.SendPropertyChanged("IsUnifyWanderAbout"); - this.OnIsUnifyWanderAboutChanged(); + this._InspectIsCloseUser = value; + this.SendPropertyChanged("InspectIsCloseUser"); + this.OnInspectIsCloseUserChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnifyWanderAboutData", DbType="DateTime")] - public System.Nullable UnifyWanderAboutData + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="NVarChar(500)")] + public string PropertyTechnologyId { get { - return this._UnifyWanderAboutData; + return this._PropertyTechnologyId; } set { - if ((this._UnifyWanderAboutData != value)) + if ((this._PropertyTechnologyId != value)) { - this.OnUnifyWanderAboutDataChanging(value); + this.OnPropertyTechnologyIdChanging(value); this.SendPropertyChanging(); - this._UnifyWanderAboutData = value; - this.SendPropertyChanged("UnifyWanderAboutData"); - this.OnUnifyWanderAboutDataChanged(); + this._PropertyTechnologyId = value; + this.SendPropertyChanged("PropertyTechnologyId"); + this.OnPropertyTechnologyIdChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnifyWanderAboutOpinion", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] - public string UnifyWanderAboutOpinion + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordUploadData", DbType="DateTime")] + public System.Nullable RecordUploadData { get { - return this._UnifyWanderAboutOpinion; + return this._RecordUploadData; } set { - if ((this._UnifyWanderAboutOpinion != value)) + if ((this._RecordUploadData != value)) { - this.OnUnifyWanderAboutOpinionChanging(value); + this.OnRecordUploadDataChanging(value); this.SendPropertyChanging(); - this._UnifyWanderAboutOpinion = value; - this.SendPropertyChanged("UnifyWanderAboutOpinion"); - this.OnUnifyWanderAboutOpinionChanged(); + this._RecordUploadData = value; + this.SendPropertyChanged("RecordUploadData"); + this.OnRecordUploadDataChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectTime", DbType="DateTime")] - public System.Nullable InspectTime + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementConfirmData", DbType="DateTime")] + public System.Nullable SiteImplementConfirmData { get { - return this._InspectTime; + return this._SiteImplementConfirmData; } set { - if ((this._InspectTime != value)) + if ((this._SiteImplementConfirmData != value)) { - this.OnInspectTimeChanging(value); + this.OnSiteImplementConfirmDataChanging(value); this.SendPropertyChanging(); - this._InspectTime = value; - this.SendPropertyChanged("InspectTime"); - this.OnInspectTimeChanged(); + this._SiteImplementConfirmData = value; + this.SendPropertyChanged("SiteImplementConfirmData"); + this.OnSiteImplementConfirmDataChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddUser", DbType="VarChar(50)")] - public string AddUser + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementUser", DbType="NVarChar(50)")] + public string SiteImplementUser { get { - return this._AddUser; + return this._SiteImplementUser; } set { - if ((this._AddUser != value)) + if ((this._SiteImplementUser != value)) { - this.OnAddUserChanging(value); + this.OnSiteImplementUserChanging(value); this.SendPropertyChanging(); - this._AddUser = value; - this.SendPropertyChanged("AddUser"); - this.OnAddUserChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddTime", DbType="DateTime")] - public System.Nullable AddTime - { - get - { - return this._AddTime; - } - set - { - if ((this._AddTime != value)) - { - this.OnAddTimeChanging(value); - this.SendPropertyChanging(); - this._AddTime = value; - this.SendPropertyChanged("AddTime"); - this.OnAddTimeChanged(); + this._SiteImplementUser = value; + this.SendPropertyChanged("SiteImplementUser"); + this.OnSiteImplementUserChanged(); } } } @@ -278308,22 +278620,6 @@ namespace Model private string _Owner; - private System.Nullable _SubcontractorIsPass; - - private System.Nullable _ContractorIsPass; - - private System.Nullable _SupervisionIsPass; - - private System.Nullable _OwnerIsPass; - - private string _SubcontractorRemark; - - private string _ContractorRemark; - - private string _SupervisionRemark; - - private string _OwnerRemark; - private System.Nullable _WorkPackType; private string _PropertyTechnologyId; @@ -278336,6 +278632,22 @@ namespace Model private System.Nullable _Sort; + private string _SubcontractorRemark; + + private string _ContractorRemark; + + private string _SupervisionRemark; + + private string _OwnerRemark; + + private System.Nullable _SubcontractorIsPass; + + private System.Nullable _ContractorIsPass; + + private System.Nullable _SupervisionIsPass; + + private System.Nullable _OwnerIsPass; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -278376,22 +278688,6 @@ namespace Model partial void OnSupervisionChanged(); partial void OnOwnerChanging(string value); partial void OnOwnerChanged(); - partial void OnSubcontractorIsPassChanging(System.Nullable value); - partial void OnSubcontractorIsPassChanged(); - partial void OnContractorIsPassChanging(System.Nullable value); - partial void OnContractorIsPassChanged(); - partial void OnSupervisionIsPassChanging(System.Nullable value); - partial void OnSupervisionIsPassChanged(); - partial void OnOwnerIsPassChanging(System.Nullable value); - partial void OnOwnerIsPassChanged(); - partial void OnSubcontractorRemarkChanging(string value); - partial void OnSubcontractorRemarkChanged(); - partial void OnContractorRemarkChanging(string value); - partial void OnContractorRemarkChanged(); - partial void OnSupervisionRemarkChanging(string value); - partial void OnSupervisionRemarkChanged(); - partial void OnOwnerRemarkChanging(string value); - partial void OnOwnerRemarkChanged(); partial void OnWorkPackTypeChanging(System.Nullable value); partial void OnWorkPackTypeChanged(); partial void OnPropertyTechnologyIdChanging(string value); @@ -278404,6 +278700,22 @@ namespace Model partial void OnAddTimeChanged(); partial void OnSortChanging(System.Nullable value); partial void OnSortChanged(); + partial void OnSubcontractorRemarkChanging(string value); + partial void OnSubcontractorRemarkChanged(); + partial void OnContractorRemarkChanging(string value); + partial void OnContractorRemarkChanged(); + partial void OnSupervisionRemarkChanging(string value); + partial void OnSupervisionRemarkChanged(); + partial void OnOwnerRemarkChanging(string value); + partial void OnOwnerRemarkChanged(); + partial void OnSubcontractorIsPassChanging(System.Nullable value); + partial void OnSubcontractorIsPassChanged(); + partial void OnContractorIsPassChanging(System.Nullable value); + partial void OnContractorIsPassChanged(); + partial void OnSupervisionIsPassChanging(System.Nullable value); + partial void OnSupervisionIsPassChanged(); + partial void OnOwnerIsPassChanging(System.Nullable value); + partial void OnOwnerIsPassChanged(); #endregion public PreRun_SubInspectTermItem() @@ -278771,166 +279083,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubcontractorIsPass", DbType="Int")] - public System.Nullable SubcontractorIsPass - { - get - { - return this._SubcontractorIsPass; - } - set - { - if ((this._SubcontractorIsPass != value)) - { - this.OnSubcontractorIsPassChanging(value); - this.SendPropertyChanging(); - this._SubcontractorIsPass = value; - this.SendPropertyChanged("SubcontractorIsPass"); - this.OnSubcontractorIsPassChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorIsPass", DbType="Int")] - public System.Nullable ContractorIsPass - { - get - { - return this._ContractorIsPass; - } - set - { - if ((this._ContractorIsPass != value)) - { - this.OnContractorIsPassChanging(value); - this.SendPropertyChanging(); - this._ContractorIsPass = value; - this.SendPropertyChanged("ContractorIsPass"); - this.OnContractorIsPassChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionIsPass", DbType="Int")] - public System.Nullable SupervisionIsPass - { - get - { - return this._SupervisionIsPass; - } - set - { - if ((this._SupervisionIsPass != value)) - { - this.OnSupervisionIsPassChanging(value); - this.SendPropertyChanging(); - this._SupervisionIsPass = value; - this.SendPropertyChanged("SupervisionIsPass"); - this.OnSupervisionIsPassChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerIsPass", DbType="Int")] - public System.Nullable OwnerIsPass - { - get - { - return this._OwnerIsPass; - } - set - { - if ((this._OwnerIsPass != value)) - { - this.OnOwnerIsPassChanging(value); - this.SendPropertyChanging(); - this._OwnerIsPass = value; - this.SendPropertyChanged("OwnerIsPass"); - this.OnOwnerIsPassChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubcontractorRemark", DbType="VarChar(1000)")] - public string SubcontractorRemark - { - get - { - return this._SubcontractorRemark; - } - set - { - if ((this._SubcontractorRemark != value)) - { - this.OnSubcontractorRemarkChanging(value); - this.SendPropertyChanging(); - this._SubcontractorRemark = value; - this.SendPropertyChanged("SubcontractorRemark"); - this.OnSubcontractorRemarkChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorRemark", DbType="VarChar(1000)")] - public string ContractorRemark - { - get - { - return this._ContractorRemark; - } - set - { - if ((this._ContractorRemark != value)) - { - this.OnContractorRemarkChanging(value); - this.SendPropertyChanging(); - this._ContractorRemark = value; - this.SendPropertyChanged("ContractorRemark"); - this.OnContractorRemarkChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionRemark", DbType="VarChar(1000)")] - public string SupervisionRemark - { - get - { - return this._SupervisionRemark; - } - set - { - if ((this._SupervisionRemark != value)) - { - this.OnSupervisionRemarkChanging(value); - this.SendPropertyChanging(); - this._SupervisionRemark = value; - this.SendPropertyChanged("SupervisionRemark"); - this.OnSupervisionRemarkChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerRemark", DbType="VarChar(1000)")] - public string OwnerRemark - { - get - { - return this._OwnerRemark; - } - set - { - if ((this._OwnerRemark != value)) - { - this.OnOwnerRemarkChanging(value); - this.SendPropertyChanging(); - this._OwnerRemark = value; - this.SendPropertyChanged("OwnerRemark"); - this.OnOwnerRemarkChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] public System.Nullable WorkPackType { @@ -278951,7 +279103,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(50)")] public string PropertyTechnologyId { get @@ -279051,6 +279203,166 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubcontractorRemark", DbType="VarChar(1000)")] + public string SubcontractorRemark + { + get + { + return this._SubcontractorRemark; + } + set + { + if ((this._SubcontractorRemark != value)) + { + this.OnSubcontractorRemarkChanging(value); + this.SendPropertyChanging(); + this._SubcontractorRemark = value; + this.SendPropertyChanged("SubcontractorRemark"); + this.OnSubcontractorRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorRemark", DbType="VarChar(1000)")] + public string ContractorRemark + { + get + { + return this._ContractorRemark; + } + set + { + if ((this._ContractorRemark != value)) + { + this.OnContractorRemarkChanging(value); + this.SendPropertyChanging(); + this._ContractorRemark = value; + this.SendPropertyChanged("ContractorRemark"); + this.OnContractorRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionRemark", DbType="VarChar(1000)")] + public string SupervisionRemark + { + get + { + return this._SupervisionRemark; + } + set + { + if ((this._SupervisionRemark != value)) + { + this.OnSupervisionRemarkChanging(value); + this.SendPropertyChanging(); + this._SupervisionRemark = value; + this.SendPropertyChanged("SupervisionRemark"); + this.OnSupervisionRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerRemark", DbType="VarChar(1000)")] + public string OwnerRemark + { + get + { + return this._OwnerRemark; + } + set + { + if ((this._OwnerRemark != value)) + { + this.OnOwnerRemarkChanging(value); + this.SendPropertyChanging(); + this._OwnerRemark = value; + this.SendPropertyChanged("OwnerRemark"); + this.OnOwnerRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubcontractorIsPass", DbType="Int")] + public System.Nullable SubcontractorIsPass + { + get + { + return this._SubcontractorIsPass; + } + set + { + if ((this._SubcontractorIsPass != value)) + { + this.OnSubcontractorIsPassChanging(value); + this.SendPropertyChanging(); + this._SubcontractorIsPass = value; + this.SendPropertyChanged("SubcontractorIsPass"); + this.OnSubcontractorIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorIsPass", DbType="Int")] + public System.Nullable ContractorIsPass + { + get + { + return this._ContractorIsPass; + } + set + { + if ((this._ContractorIsPass != value)) + { + this.OnContractorIsPassChanging(value); + this.SendPropertyChanging(); + this._ContractorIsPass = value; + this.SendPropertyChanged("ContractorIsPass"); + this.OnContractorIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionIsPass", DbType="Int")] + public System.Nullable SupervisionIsPass + { + get + { + return this._SupervisionIsPass; + } + set + { + if ((this._SupervisionIsPass != value)) + { + this.OnSupervisionIsPassChanging(value); + this.SendPropertyChanging(); + this._SupervisionIsPass = value; + this.SendPropertyChanged("SupervisionIsPass"); + this.OnSupervisionIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerIsPass", DbType="Int")] + public System.Nullable OwnerIsPass + { + get + { + return this._OwnerIsPass; + } + set + { + if ((this._OwnerIsPass != value)) + { + this.OnOwnerIsPassChanging(value); + this.SendPropertyChanging(); + this._OwnerIsPass = value; + this.SendPropertyChanged("OwnerIsPass"); + this.OnOwnerIsPassChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -280052,8 +280364,6 @@ namespace Model private string _RestrictCondition; - private System.Nullable _ResponsibilityProposeSatate; - private System.Nullable _ResponsibilityConfirm; private System.Nullable _ProposeConfirm; @@ -280064,11 +280374,9 @@ namespace Model private System.Nullable _OwnerConfirm; - private System.Nullable _ProposeConfirmData; - private System.Nullable _ResponsibilityConfirmData; - private System.Nullable _ProposeHandleData; + private System.Nullable _ProposeConfirmData; private System.Nullable _GeneraConfirmData; @@ -280084,6 +280392,10 @@ namespace Model private System.Nullable _Sort; + private System.Nullable _ResponsibilityProposeSatate; + + private System.Nullable _ProposeHandleData; + private string _FourDecisionCode; #region 可扩展性方法定义 @@ -280120,8 +280432,6 @@ namespace Model partial void OnRealityDestructionTimeChanged(); partial void OnRestrictConditionChanging(string value); partial void OnRestrictConditionChanged(); - partial void OnResponsibilityProposeSatateChanging(System.Nullable value); - partial void OnResponsibilityProposeSatateChanged(); partial void OnResponsibilityConfirmChanging(System.Nullable value); partial void OnResponsibilityConfirmChanged(); partial void OnProposeConfirmChanging(System.Nullable value); @@ -280132,12 +280442,10 @@ namespace Model partial void OnSupervisionConfirmChanged(); partial void OnOwnerConfirmChanging(System.Nullable value); partial void OnOwnerConfirmChanged(); - partial void OnProposeConfirmDataChanging(System.Nullable value); - partial void OnProposeConfirmDataChanged(); partial void OnResponsibilityConfirmDataChanging(System.Nullable value); partial void OnResponsibilityConfirmDataChanged(); - partial void OnProposeHandleDataChanging(System.Nullable value); - partial void OnProposeHandleDataChanged(); + partial void OnProposeConfirmDataChanging(System.Nullable value); + partial void OnProposeConfirmDataChanged(); partial void OnGeneraConfirmDataChanging(System.Nullable value); partial void OnGeneraConfirmDataChanged(); partial void OnSupervisionConfirmDataChanging(System.Nullable value); @@ -280152,6 +280460,10 @@ namespace Model partial void OnAddTimeChanged(); partial void OnSortChanging(System.Nullable value); partial void OnSortChanged(); + partial void OnResponsibilityProposeSatateChanging(System.Nullable value); + partial void OnResponsibilityProposeSatateChanged(); + partial void OnProposeHandleDataChanging(System.Nullable value); + partial void OnProposeHandleDataChanged(); partial void OnFourDecisionCodeChanging(string value); partial void OnFourDecisionCodeChanged(); #endregion @@ -280461,26 +280773,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityProposeSatate", DbType="Int")] - public System.Nullable ResponsibilityProposeSatate - { - get - { - return this._ResponsibilityProposeSatate; - } - set - { - if ((this._ResponsibilityProposeSatate != value)) - { - this.OnResponsibilityProposeSatateChanging(value); - this.SendPropertyChanging(); - this._ResponsibilityProposeSatate = value; - this.SendPropertyChanged("ResponsibilityProposeSatate"); - this.OnResponsibilityProposeSatateChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityConfirm", DbType="Int")] public System.Nullable ResponsibilityConfirm { @@ -280581,26 +280873,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeConfirmData", DbType="DateTime")] - public System.Nullable ProposeConfirmData - { - get - { - return this._ProposeConfirmData; - } - set - { - if ((this._ProposeConfirmData != value)) - { - this.OnProposeConfirmDataChanging(value); - this.SendPropertyChanging(); - this._ProposeConfirmData = value; - this.SendPropertyChanged("ProposeConfirmData"); - this.OnProposeConfirmDataChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityConfirmData", DbType="DateTime")] public System.Nullable ResponsibilityConfirmData { @@ -280621,22 +280893,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeHandleData", DbType="DateTime")] - public System.Nullable ProposeHandleData + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeConfirmData", DbType="DateTime")] + public System.Nullable ProposeConfirmData { get { - return this._ProposeHandleData; + return this._ProposeConfirmData; } set { - if ((this._ProposeHandleData != value)) + if ((this._ProposeConfirmData != value)) { - this.OnProposeHandleDataChanging(value); + this.OnProposeConfirmDataChanging(value); this.SendPropertyChanging(); - this._ProposeHandleData = value; - this.SendPropertyChanged("ProposeHandleData"); - this.OnProposeHandleDataChanged(); + this._ProposeConfirmData = value; + this.SendPropertyChanged("ProposeConfirmData"); + this.OnProposeConfirmDataChanged(); } } } @@ -280781,6 +281053,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibilityProposeSatate", DbType="Int")] + public System.Nullable ResponsibilityProposeSatate + { + get + { + return this._ResponsibilityProposeSatate; + } + set + { + if ((this._ResponsibilityProposeSatate != value)) + { + this.OnResponsibilityProposeSatateChanging(value); + this.SendPropertyChanging(); + this._ResponsibilityProposeSatate = value; + this.SendPropertyChanged("ResponsibilityProposeSatate"); + this.OnResponsibilityProposeSatateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeHandleData", DbType="DateTime")] + public System.Nullable ProposeHandleData + { + get + { + return this._ProposeHandleData; + } + set + { + if ((this._ProposeHandleData != value)) + { + this.OnProposeHandleDataChanging(value); + this.SendPropertyChanging(); + this._ProposeHandleData = value; + this.SendPropertyChanged("ProposeHandleData"); + this.OnProposeHandleDataChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FourDecisionCode", DbType="VarChar(20)")] public string FourDecisionCode { @@ -281493,7 +281805,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Remark { get @@ -313138,6 +313450,918 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.QualityPlanning_ConExperienceSummary")] + public partial class QualityPlanning_ConExperienceSummary : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ConExperienceSummaryId; + + private string _ProjectId; + + private string _FileName; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnConExperienceSummaryIdChanging(string value); + partial void OnConExperienceSummaryIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnFileNameChanging(string value); + partial void OnFileNameChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public QualityPlanning_ConExperienceSummary() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConExperienceSummaryId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ConExperienceSummaryId + { + get + { + return this._ConExperienceSummaryId; + } + set + { + if ((this._ConExperienceSummaryId != value)) + { + this.OnConExperienceSummaryIdChanging(value); + this.SendPropertyChanging(); + this._ConExperienceSummaryId = value; + this.SendPropertyChanged("ConExperienceSummaryId"); + this.OnConExperienceSummaryIdChanged(); + } + } + } + + [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="_FileName", DbType="NVarChar(100)")] + public string FileName + { + get + { + return this._FileName; + } + set + { + if ((this._FileName != value)) + { + this.OnFileNameChanging(value); + this.SendPropertyChanging(); + this._FileName = value; + this.SendPropertyChanged("FileName"); + this.OnFileNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + 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_QualityPlanning_ConExperienceSummary_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.QualityPlanning_ConExperienceSummary.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.QualityPlanning_ConExperienceSummary.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_ConExperienceSummary_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.QualityPlanning_ConExperienceSummary.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.QualityPlanning_ConExperienceSummary.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + 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.QualityPlanning_ProjectQualityPlan")] + public partial class QualityPlanning_ProjectQualityPlan : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ProjectQualityPlanId; + + private string _ProjectId; + + private string _FileCode; + + private string _FileName; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _Auditor; + + private string _Approver; + + private System.Nullable _ApprovalDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnProjectQualityPlanIdChanging(string value); + partial void OnProjectQualityPlanIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnFileCodeChanging(string value); + partial void OnFileCodeChanged(); + partial void OnFileNameChanging(string value); + partial void OnFileNameChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAuditorChanging(string value); + partial void OnAuditorChanged(); + partial void OnApproverChanging(string value); + partial void OnApproverChanged(); + partial void OnApprovalDateChanging(System.Nullable value); + partial void OnApprovalDateChanged(); + #endregion + + public QualityPlanning_ProjectQualityPlan() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectQualityPlanId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ProjectQualityPlanId + { + get + { + return this._ProjectQualityPlanId; + } + set + { + if ((this._ProjectQualityPlanId != value)) + { + this.OnProjectQualityPlanIdChanging(value); + this.SendPropertyChanging(); + this._ProjectQualityPlanId = value; + this.SendPropertyChanged("ProjectQualityPlanId"); + this.OnProjectQualityPlanIdChanged(); + } + } + } + + [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="_FileCode", DbType="NVarChar(50)")] + public string FileCode + { + get + { + return this._FileCode; + } + set + { + if ((this._FileCode != value)) + { + this.OnFileCodeChanging(value); + this.SendPropertyChanging(); + this._FileCode = value; + this.SendPropertyChanged("FileCode"); + this.OnFileCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="NVarChar(100)")] + public string FileName + { + get + { + return this._FileName; + } + set + { + if ((this._FileName != value)) + { + this.OnFileNameChanging(value); + this.SendPropertyChanging(); + this._FileName = value; + this.SendPropertyChanged("FileName"); + this.OnFileNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + 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.ColumnAttribute(Storage="_Auditor", DbType="NVarChar(50)")] + public string Auditor + { + get + { + return this._Auditor; + } + set + { + if ((this._Auditor != value)) + { + this.OnAuditorChanging(value); + this.SendPropertyChanging(); + this._Auditor = value; + this.SendPropertyChanged("Auditor"); + this.OnAuditorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Approver", DbType="NVarChar(50)")] + public string Approver + { + get + { + return this._Approver; + } + set + { + if ((this._Approver != value)) + { + this.OnApproverChanging(value); + this.SendPropertyChanging(); + this._Approver = value; + this.SendPropertyChanged("Approver"); + this.OnApproverChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApprovalDate", DbType="DateTime")] + public System.Nullable ApprovalDate + { + get + { + return this._ApprovalDate; + } + set + { + if ((this._ApprovalDate != value)) + { + this.OnApprovalDateChanging(value); + this.SendPropertyChanging(); + this._ApprovalDate = value; + this.SendPropertyChanged("ApprovalDate"); + this.OnApprovalDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_ProjectQualityPlan_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.QualityPlanning_ProjectQualityPlan.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.QualityPlanning_ProjectQualityPlan.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_ProjectQualityPlan_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.QualityPlanning_ProjectQualityPlan.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.QualityPlanning_ProjectQualityPlan.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + 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.QualityPlanning_QualityManagementSys")] + public partial class QualityPlanning_QualityManagementSys : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _QualityManagementSysId; + + private string _ProjectId; + + private string _FileCode; + + private string _FileName; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _Auditor; + + private string _Approver; + + private System.Nullable _ApprovalDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnQualityManagementSysIdChanging(string value); + partial void OnQualityManagementSysIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnFileCodeChanging(string value); + partial void OnFileCodeChanged(); + partial void OnFileNameChanging(string value); + partial void OnFileNameChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAuditorChanging(string value); + partial void OnAuditorChanged(); + partial void OnApproverChanging(string value); + partial void OnApproverChanged(); + partial void OnApprovalDateChanging(System.Nullable value); + partial void OnApprovalDateChanged(); + #endregion + + public QualityPlanning_QualityManagementSys() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityManagementSysId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string QualityManagementSysId + { + get + { + return this._QualityManagementSysId; + } + set + { + if ((this._QualityManagementSysId != value)) + { + this.OnQualityManagementSysIdChanging(value); + this.SendPropertyChanging(); + this._QualityManagementSysId = value; + this.SendPropertyChanged("QualityManagementSysId"); + this.OnQualityManagementSysIdChanged(); + } + } + } + + [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="_FileCode", DbType="NVarChar(50)")] + public string FileCode + { + get + { + return this._FileCode; + } + set + { + if ((this._FileCode != value)) + { + this.OnFileCodeChanging(value); + this.SendPropertyChanging(); + this._FileCode = value; + this.SendPropertyChanged("FileCode"); + this.OnFileCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileName", DbType="NVarChar(100)")] + public string FileName + { + get + { + return this._FileName; + } + set + { + if ((this._FileName != value)) + { + this.OnFileNameChanging(value); + this.SendPropertyChanging(); + this._FileName = value; + this.SendPropertyChanged("FileName"); + this.OnFileNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + 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.ColumnAttribute(Storage="_Auditor", DbType="NVarChar(50)")] + public string Auditor + { + get + { + return this._Auditor; + } + set + { + if ((this._Auditor != value)) + { + this.OnAuditorChanging(value); + this.SendPropertyChanging(); + this._Auditor = value; + this.SendPropertyChanged("Auditor"); + this.OnAuditorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Approver", DbType="NVarChar(50)")] + public string Approver + { + get + { + return this._Approver; + } + set + { + if ((this._Approver != value)) + { + this.OnApproverChanging(value); + this.SendPropertyChanging(); + this._Approver = value; + this.SendPropertyChanged("Approver"); + this.OnApproverChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApprovalDate", DbType="DateTime")] + public System.Nullable ApprovalDate + { + get + { + return this._ApprovalDate; + } + set + { + if ((this._ApprovalDate != value)) + { + this.OnApprovalDateChanging(value); + this.SendPropertyChanging(); + this._ApprovalDate = value; + this.SendPropertyChanged("ApprovalDate"); + this.OnApprovalDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_QualityManagementSys_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.QualityPlanning_QualityManagementSys.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.QualityPlanning_QualityManagementSys.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_QualityManagementSys_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.QualityPlanning_QualityManagementSys.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.QualityPlanning_QualityManagementSys.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + 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.RealName_BasicData")] public partial class RealName_BasicData : INotifyPropertyChanging, INotifyPropertyChanged { @@ -316378,6 +317602,164 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Report_CQMS_ProblemHandle")] + public partial class Report_CQMS_ProblemHandle : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ReportId; + + private string _ReType; + + private string _UnitName; + + private string _ProblemDes; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnReportIdChanging(string value); + partial void OnReportIdChanged(); + partial void OnReTypeChanging(string value); + partial void OnReTypeChanged(); + partial void OnUnitNameChanging(string value); + partial void OnUnitNameChanged(); + partial void OnProblemDesChanging(string value); + partial void OnProblemDesChanged(); + #endregion + + public Report_CQMS_ProblemHandle() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportId", DbType="NVarChar(50)")] + public string ReportId + { + get + { + return this._ReportId; + } + set + { + if ((this._ReportId != value)) + { + this.OnReportIdChanging(value); + this.SendPropertyChanging(); + this._ReportId = value; + this.SendPropertyChanged("ReportId"); + this.OnReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReType", DbType="NChar(20)")] + public string ReType + { + get + { + return this._ReType; + } + set + { + if ((this._ReType != value)) + { + this.OnReTypeChanging(value); + this.SendPropertyChanging(); + this._ReType = value; + this.SendPropertyChanged("ReType"); + this.OnReTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(100)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this.OnUnitNameChanging(value); + this.SendPropertyChanging(); + this._UnitName = value; + this.SendPropertyChanged("UnitName"); + this.OnUnitNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemDes", DbType="NVarChar(100)")] + public string ProblemDes + { + get + { + return this._ProblemDes; + } + set + { + if ((this._ProblemDes != value)) + { + this.OnProblemDesChanging(value); + this.SendPropertyChanging(); + this._ProblemDes = value; + this.SendPropertyChanged("ProblemDes"); + this.OnProblemDesChanged(); + } + } + } + + 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.Report_CqmsTarget")] public partial class Report_CqmsTarget : INotifyPropertyChanging, INotifyPropertyChanged { @@ -353357,8 +354739,6 @@ namespace Model private EntitySet _Doc_DocManage; - private EntitySet _Doc_DocManageApprove; - private EntitySet _Driver_DriverProgress; private EntitySet _Driver_DriverReport; @@ -353779,6 +355159,12 @@ namespace Model private EntitySet _QualityAudit_SubUnitQualityAuditDetail; + private EntitySet _QualityPlanning_ConExperienceSummary; + + private EntitySet _QualityPlanning_ProjectQualityPlan; + + private EntitySet _QualityPlanning_QualityManagementSys; + private EntitySet _SafetyData_SafetyDataItem; private EntitySet _SeDin_MonthReport; @@ -354080,7 +355466,6 @@ namespace Model this._DataBase_File = new EntitySet(new Action(this.attach_DataBase_File), new Action(this.detach_DataBase_File)); this._DataBase_StartWorkReport = new EntitySet(new Action(this.attach_DataBase_StartWorkReport), new Action(this.detach_DataBase_StartWorkReport)); this._Doc_DocManage = new EntitySet(new Action(this.attach_Doc_DocManage), new Action(this.detach_Doc_DocManage)); - this._Doc_DocManageApprove = new EntitySet(new Action(this.attach_Doc_DocManageApprove), new Action(this.detach_Doc_DocManageApprove)); this._Driver_DriverProgress = new EntitySet(new Action(this.attach_Driver_DriverProgress), new Action(this.detach_Driver_DriverProgress)); this._Driver_DriverReport = new EntitySet(new Action(this.attach_Driver_DriverReport), new Action(this.detach_Driver_DriverReport)); this._Driver_DriverScheme = new EntitySet(new Action(this.attach_Driver_DriverScheme), new Action(this.detach_Driver_DriverScheme)); @@ -354291,6 +355676,9 @@ namespace Model this._QualityAudit_SafePersonQuality = new EntitySet(new Action(this.attach_QualityAudit_SafePersonQuality), new Action(this.detach_QualityAudit_SafePersonQuality)); this._QualityAudit_SafePersonQuality_Sys_User_AuditorId = new EntitySet(new Action(this.attach_QualityAudit_SafePersonQuality_Sys_User_AuditorId), new Action(this.detach_QualityAudit_SafePersonQuality_Sys_User_AuditorId)); this._QualityAudit_SubUnitQualityAuditDetail = new EntitySet(new Action(this.attach_QualityAudit_SubUnitQualityAuditDetail), new Action(this.detach_QualityAudit_SubUnitQualityAuditDetail)); + this._QualityPlanning_ConExperienceSummary = new EntitySet(new Action(this.attach_QualityPlanning_ConExperienceSummary), new Action(this.detach_QualityPlanning_ConExperienceSummary)); + this._QualityPlanning_ProjectQualityPlan = new EntitySet(new Action(this.attach_QualityPlanning_ProjectQualityPlan), new Action(this.detach_QualityPlanning_ProjectQualityPlan)); + this._QualityPlanning_QualityManagementSys = new EntitySet(new Action(this.attach_QualityPlanning_QualityManagementSys), new Action(this.detach_QualityPlanning_QualityManagementSys)); this._SafetyData_SafetyDataItem = new EntitySet(new Action(this.attach_SafetyData_SafetyDataItem), new Action(this.detach_SafetyData_SafetyDataItem)); this._SeDin_MonthReport = new EntitySet(new Action(this.attach_SeDin_MonthReport), new Action(this.detach_SeDin_MonthReport)); this._SeDin_MonthReport_Sys_User1 = new EntitySet(new Action(this.attach_SeDin_MonthReport_Sys_User1), new Action(this.detach_SeDin_MonthReport_Sys_User1)); @@ -356488,19 +357876,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Doc_DocManageApprove_Sys_User", Storage="_Doc_DocManageApprove", ThisKey="UserId", OtherKey="ApproveMan", DeleteRule="NO ACTION")] - public EntitySet Doc_DocManageApprove - { - get - { - return this._Doc_DocManageApprove; - } - set - { - this._Doc_DocManageApprove.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Driver_DriverProgress_Sys_User", Storage="_Driver_DriverProgress", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet Driver_DriverProgress { @@ -359231,6 +360606,45 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_ConExperienceSummary_Sys_User", Storage="_QualityPlanning_ConExperienceSummary", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet QualityPlanning_ConExperienceSummary + { + get + { + return this._QualityPlanning_ConExperienceSummary; + } + set + { + this._QualityPlanning_ConExperienceSummary.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_ProjectQualityPlan_Sys_User", Storage="_QualityPlanning_ProjectQualityPlan", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet QualityPlanning_ProjectQualityPlan + { + get + { + return this._QualityPlanning_ProjectQualityPlan; + } + set + { + this._QualityPlanning_ProjectQualityPlan.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_QualityPlanning_QualityManagementSys_Sys_User", Storage="_QualityPlanning_QualityManagementSys", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet QualityPlanning_QualityManagementSys + { + get + { + return this._QualityPlanning_QualityManagementSys; + } + set + { + this._QualityPlanning_QualityManagementSys.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SafetyData_SafetyDataItem_Sys_User", Storage="_SafetyData_SafetyDataItem", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet SafetyData_SafetyDataItem { @@ -361044,18 +362458,6 @@ namespace Model entity.Sys_User = null; } - private void attach_Doc_DocManageApprove(Doc_DocManageApprove entity) - { - this.SendPropertyChanging(); - entity.Sys_User = this; - } - - private void detach_Doc_DocManageApprove(Doc_DocManageApprove entity) - { - this.SendPropertyChanging(); - entity.Sys_User = null; - } - private void attach_Driver_DriverProgress(Driver_DriverProgress entity) { this.SendPropertyChanging(); @@ -363576,6 +364978,42 @@ namespace Model entity.Sys_User = null; } + private void attach_QualityPlanning_ConExperienceSummary(QualityPlanning_ConExperienceSummary entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_QualityPlanning_ConExperienceSummary(QualityPlanning_ConExperienceSummary entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_QualityPlanning_ProjectQualityPlan(QualityPlanning_ProjectQualityPlan entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_QualityPlanning_ProjectQualityPlan(QualityPlanning_ProjectQualityPlan entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_QualityPlanning_QualityManagementSys(QualityPlanning_QualityManagementSys entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_QualityPlanning_QualityManagementSys(QualityPlanning_QualityManagementSys entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_SafetyData_SafetyDataItem(SafetyData_SafetyDataItem entity) { this.SendPropertyChanging(); @@ -426778,6 +428216,123 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_ProjectUserWorkPost")] + public partial class View_ProjectUserWorkPost + { + + private string _ProjectUserId; + + private string _UserId; + + private string _UnitId; + + private string _ProjectId; + + private string _UserName; + + private string _WorkPostName; + + public View_ProjectUserWorkPost() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectUserId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ProjectUserId + { + get + { + return this._ProjectUserId; + } + set + { + if ((this._ProjectUserId != value)) + { + this._ProjectUserId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="NVarChar(50)")] + public string UserId + { + get + { + return this._UserId; + } + set + { + if ((this._UserId != value)) + { + this._UserId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(50)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this._UserName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostName", DbType="NVarChar(100)")] + public string WorkPostName + { + get + { + return this._WorkPostName; + } + set + { + if ((this._WorkPostName != value)) + { + this._WorkPostName = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_PTP_TestPackageAudit")] public partial class View_PTP_TestPackageAudit {