diff --git a/DataBase/版本日志/SGGLDB-WH-2024-09-27-001-gaofei.sql b/DataBase/版本日志/SGGLDB-WH-2024-09-27-001-gaofei.sql new file mode 100644 index 00000000..3ac406b8 --- /dev/null +++ b/DataBase/版本日志/SGGLDB-WH-2024-09-27-001-gaofei.sql @@ -0,0 +1,228 @@ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES ('CB76394B-BDEB-4F45-9D19-F38612DC6591','ȫαж̨','ZHGL/Information/ActionWorkLedger.aspx',150,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B269EF45-918E-42B0-9B28-65D1A1017CDF','CB76394B-BDEB-4F45-9D19-F38612DC6591','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('71B203E2-42C1-44CD-A0A1-8A75A96B79C7','CB76394B-BDEB-4F45-9D19-F38612DC6591','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DB5C189E-0023-4174-AB83-B7D5028B3148','CB76394B-BDEB-4F45-9D19-F38612DC6591','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BFF69201-1E48-46F4-A8CB-863A0304E6C6','CB76394B-BDEB-4F45-9D19-F38612DC6591','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('70376B94-3340-4343-92B5-8543C6750F6B','CB76394B-BDEB-4F45-9D19-F38612DC6591','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('4B0AE23C-A03D-4146-A5CE-3AB563AF683C','CB76394B-BDEB-4F45-9D19-F38612DC6591','ύ',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7F968B8C-C31F-4D62-8AFC-D37D017C46BB','CB76394B-BDEB-4F45-9D19-F38612DC6591','',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B318C22A-DBFF-46FE-919A-24F50BF190DC','CB76394B-BDEB-4F45-9D19-F38612DC6591','ӡ',8) + GO + + +CREATE TABLE [dbo].[Information_ActionWorkLedger]( + [ActionWorkLedgerId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [ReportDate] [datetime] NULL, + [Quarter] [int] NULL, + [YearId] [int] NULL, + [CompileMan] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Information_ActionWorkLedger] PRIMARY KEY CLUSTERED +( + [ActionWorkLedgerId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Information_ActionWorkLedger] WITH CHECK ADD CONSTRAINT [FK_Information_ActionWorkLedger_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_ActionWorkLedger] CHECK CONSTRAINT [FK_Information_ActionWorkLedger_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫαж̨˱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_ActionWorkLedger' +GO + + + + + + +CREATE TABLE [dbo].[Information_ActionWorkLedgerItem]( + [ActionWorkLedgerItemId] [nvarchar](50) NOT NULL, + [ActionWorkLedgerId] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + [Focus] [nvarchar](20) NULL, + [SpecialTask] [nvarchar](100) NULL, + [WorkPoints] [nvarchar](500) NULL, + [FillingRequirements] [nvarchar](max) NULL, + [CompletionDeadline] [nvarchar](50) NULL, + [ImplementationStatus] [nvarchar](max) NULL, + CONSTRAINT [PK_Information_ActionWorkLedgerItem] PRIMARY KEY CLUSTERED +( + [ActionWorkLedgerItemId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + +GO + +ALTER TABLE [dbo].[Information_ActionWorkLedgerItem] WITH CHECK ADD CONSTRAINT [FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger] FOREIGN KEY([ActionWorkLedgerId]) +REFERENCES [dbo].[Information_ActionWorkLedger] ([ActionWorkLedgerId]) +GO + +ALTER TABLE [dbo].[Information_ActionWorkLedgerItem] CHECK CONSTRAINT [FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫαж̨ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_ActionWorkLedgerItem' +GO + + + +CREATE VIEW [dbo].[View_Information_ActionWorkLedger] AS +SELECT + Report.ActionWorkLedgerId, + Report.UnitId, + Report.ReportDate, + Report.YearId, + Report.Quarter, + Report.UpState, + Report.HandleState, + (ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters, + u.UnitName, + Report.HandleMan, + US.UserName +FROM dbo.Information_ActionWorkLedger AS Report +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId +LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter +Left join Base_Unit as u on u.UnitId=Report.UnitId +LEFT JOIN Sys_User AS US ON US.UserId=Report.HandleMan + + + + + + +GO + + + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES ('C48087A8-4C9F-485D-B0A4-C85E112BA705','ȫ۹̨','ZHGL/Information/SafetyProductionEvaluation.aspx',160,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('39A75960-F70A-4B60-ABFF-C72C919807A6','C48087A8-4C9F-485D-B0A4-C85E112BA705','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9461B39D-D9FF-45CC-9D4C-38E49BCBCF6C','C48087A8-4C9F-485D-B0A4-C85E112BA705','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E417A6A8-0666-49EB-A620-2E73D19C08CB','C48087A8-4C9F-485D-B0A4-C85E112BA705','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('07F975F0-D634-4554-A3B7-667E99278265','C48087A8-4C9F-485D-B0A4-C85E112BA705','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('23B71591-E933-4C3A-BCBF-E398D94A6C88','C48087A8-4C9F-485D-B0A4-C85E112BA705','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E97C8630-3DD7-4A4B-A3FD-7DE592B489BC','C48087A8-4C9F-485D-B0A4-C85E112BA705','ύ',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('5F910FC4-183E-4037-9EE1-1400B96C4584','C48087A8-4C9F-485D-B0A4-C85E112BA705','',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D08BCEF7-843F-4BB6-BE87-182EC476E455','C48087A8-4C9F-485D-B0A4-C85E112BA705','ӡ',8) + GO + + + + +CREATE TABLE [dbo].[Information_SafetyProductionEvaluation]( + [SafetyProductionEvaluationId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [ReportDate] [datetime] NULL, + [Quarter] [int] NULL, + [YearId] [int] NULL, + [CompileMan] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Information_SafetyProductionEvaluation] PRIMARY KEY CLUSTERED +( + [SafetyProductionEvaluationId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Information_SafetyProductionEvaluation] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyProductionEvaluation_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_SafetyProductionEvaluation] CHECK CONSTRAINT [FK_Information_SafetyProductionEvaluation_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫ۹̨˱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyProductionEvaluation' +GO + + + + +CREATE TABLE [dbo].[Information_SafetyProductionEvaluationItem]( + [SafetyProductionEvaluationItemId] [nvarchar](50) NOT NULL, + [SafetyProductionEvaluationId] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + [Type] [nvarchar](50) NULL, + [EvaluateWork] [nvarchar](1000) NULL, + [EvaluationContent] [nvarchar](1000) NULL, + [FillingRequirements] [nvarchar](max) NULL, + [CompletionDeadline] [nvarchar](50) NULL, + [ImplementationStatus] [nvarchar](max) NULL, + CONSTRAINT [PK_Information_SafetyProductionEvaluationItem] PRIMARY KEY CLUSTERED +( + [SafetyProductionEvaluationItemId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + +GO + +ALTER TABLE [dbo].[Information_SafetyProductionEvaluationItem] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluation] FOREIGN KEY([SafetyProductionEvaluationId]) +REFERENCES [dbo].[Information_SafetyProductionEvaluation] ([SafetyProductionEvaluationId]) +GO + +ALTER TABLE [dbo].[Information_SafetyProductionEvaluationItem] CHECK CONSTRAINT [FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluation] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫ۹̨ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyProductionEvaluationItem' +GO + + +CREATE VIEW [dbo].[View_Information_SafetyProductionEvaluation] AS +SELECT + Report.SafetyProductionEvaluationId, + Report.UnitId, + Report.ReportDate, + Report.YearId, + Report.Quarter, + Report.UpState, + Report.HandleState, + (ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters, + u.UnitName, + Report.HandleMan, + US.UserName +FROM dbo.Information_SafetyProductionEvaluation AS Report +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId +LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter +Left join Base_Unit as u on u.UnitId=Report.UnitId +LEFT JOIN Sys_User AS US ON US.UserId=Report.HandleMan + + + + + + +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-10-10-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-10-10-phf.sql new file mode 100644 index 00000000..a1c266d5 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-10-10-phf.sql @@ -0,0 +1,48 @@ +ALTER TABLE Solution_CQMSConstructSolution +ADD CsUsers nvarchar(2000) null; + +ALTER TABLE GJSX +ADD CsUsers nvarchar(2000) null; + +CREATE TABLE [dbo].[Solution_CQMSConstructSolutionApprove_Item]( + [Id] [nvarchar](50) NOT NULL, + [TypeSortId] [int] NULL, + [SortId] [int] NULL, + [ConstructSolutionId] [nvarchar](50) NULL, + [Chapter] [nvarchar](200) NULL, + [Amendment] [nvarchar](200) NULL, + [Proposer] [nvarchar](50) NULL, + ProposerName [nvarchar](50) NULL, + [Modification] [nvarchar](200) NULL, + [ReviewerOpinion] [nvarchar](200) NULL, + [IsAccept] [nvarchar](50) NULL, + CONSTRAINT [PK_Solution_CQMSConstructSolutionApprove_Item] PRIMARY KEY CLUSTERED +( + [Id] 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 + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ţʩʦ1HSE2,ʩ3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'TypeSortId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'SortId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'½' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'Chapter' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'޸' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'Amendment' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'Proposer' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'޸' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'Modification' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'ReviewerOpinion' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'IsAccept' +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-10-12-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-10-12-phf.sql new file mode 100644 index 00000000..7b0401a8 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-10-12-phf.sql @@ -0,0 +1,61 @@ +ALTER PROCEDURE [dbo].[Sp_GJSX_getlist] + -- Add the parameters for the stored procedure here + @ProjectId nvarchar(max), + @sql_where varchar(max) +AS +BEGIN + --IF EXISTS(select * from tempdb..sysobjects where id=object_id('tempdb..#GJSX_List')) + --BEGIN + -- DROP TABLE #GJSX_List + --END + --DECLARE @Sql NVARCHAR(200) + --select * into #GJSX_List from( + -- select + --a.GJSXID + --,a.ProjectId + --,a.detail + --,b.username + --,a.createDate + --,User_ReceiveID=STUFF(( SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%',',' +a.User_ReceiveID + ',') >0 FOR XML PATH('')), 1, 1,'') + --, CNProfessionalId=STUFF(( SELECT ',' + Base_CNProfessional.ProfessionalName FROM dbo.Base_CNProfessional where PATINDEX('%,' + RTRIM(Base_CNProfessional.CNProfessionalId) + ',%',',' +a.CNProfessional_ID + ',') >0 FOR XML PATH('')), 1, 1,'') + --,Base_Project.ProjectName + --,Base_Unit.unitname + --,a.CloseDate + --,case a.state when 2 then 'ڽ' when 0 then 'ر' when 1 then '' end as state + --,QuestionTypeName=STUFF(( SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%',',' +a.QuestionTypeID + ',') >0 FOR XML PATH('')), 1, 1,'') + --,a.IsManypeople + --,a.CompleteDate + --,a.AttachUrl + --,user_Acceptance =STUFF(( SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%',',' +a.user_Acceptance + ',') >0 FOR XML PATH('')), 1, 1,'') + --from GJSX as a left join Sys_User as b on a.UserId=b.UserId + --left join [dbo].[Base_Project] on a.ProjectId =Base_Project.ProjectId + --left join [dbo].[Base_Unit] on a.UnitId=Base_Unit.UnitId + --left join [dbo].[Base_QuestionType] on a.QuestionTypeID=Base_QuestionType.QuestionTypeID ) as a + + --set @Sql ='select * from #GJSX_List where ProjectId='''+@ProjectId+''' ' +@sql_where + + --exec(@Sql) + + select + a.GJSXID + ,a.ProjectId + ,a.detail + ,b.username + ,a.createDate + ,User_ReceiveID=STUFF(( SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%',',' +a.User_ReceiveID + ',') >0 FOR XML PATH('')), 1, 1,'') + , CNProfessionalId=STUFF(( SELECT ',' + Base_CNProfessional.ProfessionalName FROM dbo.Base_CNProfessional where PATINDEX('%,' + RTRIM(Base_CNProfessional.CNProfessionalId) + ',%',',' +a.CNProfessional_ID + ',') >0 FOR XML PATH('')), 1, 1,'') + ,Base_Project.ProjectName + ,Base_Unit.unitname + ,a.CloseDate + ,case a.state when 2 then 'ڽ' when 3 then 'ر' when 0 then 'ѹر' when 1 then '' end as state + ,QuestionTypeName=STUFF(( SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%',',' +a.QuestionTypeID + ',') >0 FOR XML PATH('')), 1, 1,'') + ,a.IsManypeople + ,a.CompleteDate + ,a.AttachUrl + ,user_Acceptance =STUFF(( SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%',',' +a.user_Acceptance + ',') >0 FOR XML PATH('')), 1, 1,'') + from GJSX as a left join Sys_User as b on a.UserId=b.UserId + left join [dbo].[Base_Project] on a.ProjectId =Base_Project.ProjectId + left join [dbo].[Base_Unit] on a.UnitId=Base_Unit.UnitId + left join [dbo].[Base_QuestionType] on a.QuestionTypeID=Base_QuestionType.QuestionTypeID + where a.ProjectId=@ProjectId +END \ No newline at end of file diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 01394877..578d871f 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -848,10 +848,14 @@ + + + + diff --git a/SGGL/BLL/CQMS/Solution/CQMSConstructSolutionApproveService.cs b/SGGL/BLL/CQMS/Solution/CQMSConstructSolutionApproveService.cs index a4222ead..3d4ade20 100644 --- a/SGGL/BLL/CQMS/Solution/CQMSConstructSolutionApproveService.cs +++ b/SGGL/BLL/CQMS/Solution/CQMSConstructSolutionApproveService.cs @@ -37,6 +37,13 @@ namespace BLL return (from x in Funs.DB.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId && x.ApproveType != "S" && x.SignType == signType && x.Edition == edtion select x.ApproveMan).ToList(); } + public static List GetUserIdsApprovesBySignTypeNew(string ConstructSolutionId, string signType) + { + var edtion = GetUserIdsApprovesBySignTypeEditon(ConstructSolutionId); + return (from x in Funs.DB.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId && x.ApproveType != "S" + && x.SignType == signType && x.Edition == edtion-1 select x.ApproveMan).ToList(); + } + public static int? GetUserIdsApprovesBySignTypeEditon(string ConstructSolutionId) { int edition = 0; @@ -54,17 +61,19 @@ namespace BLL /// 施工方案审批实体 public static void UpdateConstructSolutionApprove(Model.Solution_CQMSConstructSolutionApprove approve) { - Model.SGGLDB db = Funs.DB; - Model.Solution_CQMSConstructSolutionApprove newApprove = db.Solution_CQMSConstructSolutionApprove.First(e => e.ConstructSolutionApproveId == approve.ConstructSolutionApproveId && e.ApproveDate == null); - newApprove.ConstructSolutionId = approve.ConstructSolutionId; - newApprove.ApproveMan = approve.ApproveMan; - newApprove.ApproveDate = approve.ApproveDate; - newApprove.ApproveIdea = approve.ApproveIdea; - newApprove.IsAgree = approve.IsAgree; - newApprove.ApproveType = approve.ApproveType; - newApprove.Edition = approve.Edition; - newApprove.Order=approve.Order; - db.SubmitChanges(); + using (var db = new Model.SGGLDB(Funs.ConnString)) { + + Model.Solution_CQMSConstructSolutionApprove newApprove = db.Solution_CQMSConstructSolutionApprove.First(e => e.ConstructSolutionApproveId == approve.ConstructSolutionApproveId && e.ApproveDate == null); + newApprove.ConstructSolutionId = approve.ConstructSolutionId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + newApprove.Order=approve.Order; + db.SubmitChanges(); + } } /// /// 根据施工方案发布Id获取所以对应施工方案审批信息(查询全部会签状态) @@ -78,6 +87,13 @@ namespace BLL } + public static List GetHandleConstructSolutionApprovesByConstructSolutionId2(string ConstructSolutionId, int edition) + { + var list = Funs.DB.Solution_CQMSConstructSolutionApprove.Where(p => p.ConstructSolutionId == ConstructSolutionId && p.ApproveType == Const.CQMSConstructSolution_Audit1 && p.Edition == edition).ToList(); + return list; + + } + public static List GetHandleConstruct(string ConstructSolutionId, int edition) { var list = Funs.DB.Solution_CQMSConstructSolutionApprove.Where(p => p.ConstructSolutionId == ConstructSolutionId && p.ApproveType != "S" && p.ApproveDate != null && p.Edition == edition).ToList(); @@ -162,10 +178,13 @@ namespace BLL /// public static void delSolutionApprove(string constructSolutionId, string man) { - Model.SGGLDB db = Funs.DB; - var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == constructSolutionId && x.ApproveType != "S" && x.ApproveMan.Equals(man) && x.ApproveDate == null select x).ToList(); - db.Solution_CQMSConstructSolutionApprove.DeleteAllOnSubmit(q); - db.SubmitChanges(); + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var q = db.Solution_CQMSConstructSolutionApprove.Where(x => x.ConstructSolutionId == constructSolutionId && x.ApproveType != "S" && x.ApproveMan.Equals(man) && x.ApproveDate == null) + .ToList(); + db.Solution_CQMSConstructSolutionApprove.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } } @@ -177,7 +196,7 @@ namespace BLL public static void DeleteConstructSolutionApprovesByConstructSolutionId(string ConstructSolutionId) { Model.SGGLDB db = Funs.DB; - var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId select x).ToList(); + var q = (from x in db.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId select x).ToList(); db.Solution_CQMSConstructSolutionApprove.DeleteAllOnSubmit(q); db.SubmitChanges(); } @@ -209,8 +228,8 @@ namespace BLL /// 施工方案审批实体 public static void AddConstructSolutionApprove(Model.Solution_CQMSConstructSolutionApprove approve) { - var db = Funs.DB; - Model.Solution_CQMSConstructSolutionApprove newApprove = new Model.Solution_CQMSConstructSolutionApprove(); + using (var db = new Model.SGGLDB(Funs.ConnString)) { + Model.Solution_CQMSConstructSolutionApprove newApprove = new Model.Solution_CQMSConstructSolutionApprove(); if (string.IsNullOrWhiteSpace(approve.ConstructSolutionApproveId)) { newApprove.ConstructSolutionApproveId = SQLHelper.GetNewID(typeof(Model.Solution_CQMSConstructSolutionApprove)); @@ -227,9 +246,11 @@ namespace BLL newApprove.ApproveType = approve.ApproveType; newApprove.SignType = approve.SignType; newApprove.Edition = approve.Edition; - newApprove.Order= GetMaxOrderByConstructSolutionId(approve.ConstructSolutionId); + //newApprove.Order= GetMaxOrderByConstructSolutionId(approve.ConstructSolutionId); + newApprove.Order = approve.Order; db.Solution_CQMSConstructSolutionApprove.InsertOnSubmit(newApprove); db.SubmitChanges(); + } } public static int GetMaxOrderByConstructSolutionId(string constructSolutionId) @@ -254,18 +275,87 @@ namespace BLL select x).FirstOrDefault(); return q; } - public static string GetThisApproveNameByConstructSolutionId(object constructSolutionId) + + public static List GetThisApproveByConstructSolutionId(string constructSolutionId,string state) { - string name = ""; - var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove - where x.ConstructSolutionId == constructSolutionId.ToString() && x.ApproveDate == null - orderby x.Order - select x).FirstOrDefault(); - if (q!=null) + var constructSolution = + CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(constructSolutionId.ToString()); + + var q = new List(); + if (state == "2") { - name = UserService.GetUserNameByUserId(q.ApproveMan); + q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null + && x.SignType == "Yi" + && x.Edition==constructSolution.Edition + orderby x.Order + select x).ToList(); } - return name; + else if (state == "3") + { + q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null + && x.SignType == "Er" + && x.Edition == constructSolution.Edition + orderby x.Order + select x).ToList(); + } + else { + q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null + && x.SignType == null + && x.Edition == constructSolution.Edition + orderby x.Order + select x).ToList(); + } + return q; + } + + //加载审批人 + public static string GetThisApproveNameByConstructSolutionId(object constructSolutionId,object state) + { + var constructSolution = + CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(constructSolutionId.ToString()); + + string name = ""; + if (state.ToString() == "2") + { + var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId.ToString() && x.ApproveDate == null + && x.Edition == constructSolution.Edition + && x.SignType == "Yi" + orderby x.Order + select x).ToList(); + if (q.Count > 0) + { + foreach (var item in q) + { + name += UserService.GetUserNameByUserId(item.ApproveMan) + ","; + } + } + return name; + } + else if (state.ToString() == "3") + { + var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove + where x.ConstructSolutionId == constructSolutionId.ToString() && x.ApproveDate == null + && x.SignType == "Er" + && x.Edition == constructSolution.Edition + orderby x.Order + select x).ToList(); + if (q.Count > 0) + { + foreach (var item in q) + { + name += UserService.GetUserNameByUserId(item.ApproveMan) + ","; + } + } + return name; + } + else { + return ""; + } + } /// /// 推送待办给下一步办理人 diff --git a/SGGL/BLL/CQMS/Solution/CQMSConstructSolutionService.cs b/SGGL/BLL/CQMS/Solution/CQMSConstructSolutionService.cs index 2d3ac3c9..36c2bc3d 100644 --- a/SGGL/BLL/CQMS/Solution/CQMSConstructSolutionService.cs +++ b/SGGL/BLL/CQMS/Solution/CQMSConstructSolutionService.cs @@ -66,6 +66,8 @@ namespace BLL newConstructSolution.Edition = constructSolution.Edition; newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId; newConstructSolution.Content= constructSolution.Content; + newConstructSolution.CsUsers = constructSolution.CsUsers; + db.Solution_CQMSConstructSolution.InsertOnSubmit(newConstructSolution); db.SubmitChanges(); } @@ -75,20 +77,22 @@ namespace BLL /// 方案审查实体 public static void UpdateConstructSolution(Model.Solution_CQMSConstructSolution constructSolution) { - Model.SGGLDB db = Funs.DB; - Model.Solution_CQMSConstructSolution newConstructSolution = db.Solution_CQMSConstructSolution.First(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId); - newConstructSolution.Code = constructSolution.Code; - newConstructSolution.UnitId = constructSolution.UnitId; - newConstructSolution.SolutionName = constructSolution.SolutionName; - newConstructSolution.SolutionType = constructSolution.SolutionType; - newConstructSolution.UnitWorkIds = constructSolution.UnitWorkIds; - newConstructSolution.CNProfessionalCodes = constructSolution.CNProfessionalCodes; - newConstructSolution.AttachUrl = constructSolution.AttachUrl; - newConstructSolution.State = constructSolution.State; - newConstructSolution.Edition = constructSolution.Edition; - newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId; - newConstructSolution.Content= constructSolution.Content; - db.SubmitChanges(); + using (var db = new Model.SGGLDB(Funs.ConnString)) { + Model.Solution_CQMSConstructSolution newConstructSolution = db.Solution_CQMSConstructSolution.First(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId); + newConstructSolution.Code = constructSolution.Code; + newConstructSolution.UnitId = constructSolution.UnitId; + newConstructSolution.SolutionName = constructSolution.SolutionName; + newConstructSolution.SolutionType = constructSolution.SolutionType; + newConstructSolution.UnitWorkIds = constructSolution.UnitWorkIds; + newConstructSolution.CNProfessionalCodes = constructSolution.CNProfessionalCodes; + newConstructSolution.AttachUrl = constructSolution.AttachUrl; + newConstructSolution.State = constructSolution.State; + newConstructSolution.Edition = constructSolution.Edition; + newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId; + newConstructSolution.Content= constructSolution.Content; + newConstructSolution.CsUsers = constructSolution.CsUsers; + db.SubmitChanges(); + } } @@ -112,7 +116,11 @@ namespace BLL } else if (state.ToString() == BLL.Const.CQMSConstructSolution_Audit) { - return "会签"; + return "一级审批"; + } + else if (state.ToString() == BLL.Const.CQMSConstructSolution_Audit1) + { + return "二级审核"; } else if (state.ToString() == BLL.Const.CQMSConstructSolution_Complete) { diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index b263b971..e89fe22e 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -4656,14 +4656,21 @@ namespace BLL public static string CQMSConstructSolution_Compile = "1"; /// - /// 会签 + /// 一级审批 /// public static string CQMSConstructSolution_Audit = "2"; + /// + /// 二级审批 + /// + public static string CQMSConstructSolution_Audit1 = "3"; + /// /// 审批完成 /// - public static string CQMSConstructSolution_Complete = "3"; + public static string CQMSConstructSolution_Complete = "4"; + + #endregion @@ -6091,5 +6098,26 @@ namespace BLL /// HSSE管理月报新 /// public const string ManagerMonthCNewMenuId = "9E4B28DF-8C8E-49F8-AB15-270BBDC73449"; + + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + public const string ActionWorkLedgerMenuId = "CB76394B-BDEB-4F45-9D19-F38612DC6591"; + + + /// + /// 中央企业安全生产管理评价工作调度台账 + /// + public const string SafetyProductionEvaluationMenuId = "C48087A8-4C9F-485D-B0A4-C85E112BA705"; + + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + public const string ReportType_11 = "11"; + + /// + /// 中央企业安全生产管理评价工作调度台账上报 + /// + public const string ReportType_12 = "12"; } } \ No newline at end of file diff --git a/SGGL/BLL/Const.txt b/SGGL/BLL/Const.txt new file mode 100644 index 00000000..768e7fd6 --- /dev/null +++ b/SGGL/BLL/Const.txt @@ -0,0 +1,10 @@ + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + public const string ActionWorkLedgerMenuId = "CB76394B-BDEB-4F45-9D19-F38612DC6591"; + + + /// + /// 中央企业安全生产管理评价工作调度台账 + /// + public const string SafetyProductionEvaluationMenuId = "C48087A8-4C9F-485D-B0A4-C85E112BA705"; \ No newline at end of file diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/ComplianceObligationsCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/ComplianceObligationsCService.cs index 313d61fd..f6f2d6b7 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/ComplianceObligationsCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/ComplianceObligationsCService.cs @@ -53,5 +53,67 @@ namespace BLL Funs.DB.SubmitChanges(); } } + + #region 施工方案审批 + public static void AddSolution_CQMSConstructSolutionApprove_Item(Model.Solution_CQMSConstructSolutionApprove_Item data) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) { + Model.Solution_CQMSConstructSolutionApprove_Item newData = new Model.Solution_CQMSConstructSolutionApprove_Item + { + Id = data.Id, + TypeSortId = data.TypeSortId, + ConstructSolutionId = data.ConstructSolutionId, + SortId = data.SortId, + Chapter = data.Chapter, + Amendment = data.Amendment, + Proposer=data.Proposer, + ProposerName=data.ProposerName, + Modification = data.Modification, + ReviewerOpinion = data.ReviewerOpinion, + IsAccept = data.IsAccept, + }; + db.Solution_CQMSConstructSolutionApprove_Item.InsertOnSubmit(newData); + db.SubmitChanges(); + } + } + + public static void UpdateSolution_CQMSConstructSolutionApprove_Item(Model.Solution_CQMSConstructSolutionApprove_Item data) { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var result = db.Solution_CQMSConstructSolutionApprove_Item.FirstOrDefault(a => a.Id == data.Id); + if (result != null) + { + result.Modification = data.Modification; + db.SubmitChanges(); + } + } + } + + public static void UpdateSolution_CQMSConstructSolutionApprove_ItemNew(Model.Solution_CQMSConstructSolutionApprove_Item data) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var result = db.Solution_CQMSConstructSolutionApprove_Item.FirstOrDefault(a => a.Id == data.Id); + if (result != null) + { + result.ReviewerOpinion = data.ReviewerOpinion; + result.IsAccept = data.IsAccept; + db.SubmitChanges(); + } + } + } + + public static void DeleteSolution_CQMSConstructSolutionApprove_Item(string ConstructSolutionId,string Proposer) + { + var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove_Item where x.ConstructSolutionId == ConstructSolutionId + && x.Proposer== Proposer + select x).ToList(); + if (q .Count>0) + { + Funs.DB.Solution_CQMSConstructSolutionApprove_Item.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + #endregion } } diff --git a/SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs b/SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs index cd0f27b9..c206c13c 100644 --- a/SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs +++ b/SGGL/BLL/PZHGL/GJSX/GJSXItemService.cs @@ -54,7 +54,7 @@ namespace BLL string newKeyID = SQLHelper.GetNewID(typeof(Model.GJSX_detail)); Model.GJSX_detail newGJSXMX = new Model.GJSX_detail(); - newGJSXMX.Cuid = newKeyID; + newGJSXMX.Cuid = gjsxmx.Cuid; newGJSXMX.GJSXID = gjsxmx.GJSXID; newGJSXMX.Progress_user = gjsxmx.Progress_user; newGJSXMX.Progress_detail = gjsxmx.Progress_detail; diff --git a/SGGL/BLL/PZHGL/GJSX/GJSXService.cs b/SGGL/BLL/PZHGL/GJSX/GJSXService.cs index 5b7e2c10..5060bbf3 100644 --- a/SGGL/BLL/PZHGL/GJSX/GJSXService.cs +++ b/SGGL/BLL/PZHGL/GJSX/GJSXService.cs @@ -43,7 +43,9 @@ namespace BLL IsManypeople = _GJSX.IsManypeople, CompleteDate = _GJSX.CompleteDate, AttachUrl = _GJSX.AttachUrl, - User_Acceptance = _GJSX.User_Acceptance + User_Acceptance = _GJSX.User_Acceptance, + + CsUsers=_GJSX.CsUsers }; db.GJSX.InsertOnSubmit(newGJSX); @@ -75,6 +77,7 @@ namespace BLL newGJSX.CompleteDate = _GJSX.CompleteDate; newGJSX.AttachUrl = _GJSX.AttachUrl; newGJSX.User_Acceptance = _GJSX.User_Acceptance; + newGJSX.CsUsers = _GJSX.CsUsers; db.SubmitChanges(); } } diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index 0e5e6ed0..43b374c5 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -3305,6 +3305,192 @@ } #endregion #endregion + + #region 中央企业安全生产治本攻坚三年行动工作台账上报 + /// + /// 中央企业安全生产治本攻坚三年行动工作台账上报 + /// + public static string UpActionWorkLedger(string actionWorkLedgerId, Model.Sys_User CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient(); + var upReport = from x in db.Information_ActionWorkLedger + where x.ActionWorkLedgerId == actionWorkLedgerId + select new Model.ActionWorkLedger + { + ActionWorkLedgerId = x.ActionWorkLedgerId, + UnitId = x.UnitId, + ReportDate = x.ReportDate, + Quarter = x.Quarter, + YearId = x.YearId, + CompileMan = x.CompileMan, + }; + + var upReportItem = from x in db.Information_ActionWorkLedgerItem + where x.ActionWorkLedgerId == actionWorkLedgerId + select new Model.ActionWorkLedgerItem + { + ActionWorkLedgerItemId = x.ActionWorkLedgerItemId, + ActionWorkLedgerId = x.ActionWorkLedgerId, + SortIndex = x.SortIndex, + Focus = x.Focus, + SpecialTask = x.SpecialTask, + WorkPoints = x.WorkPoints, + FillingRequirements = x.FillingRequirements, + CompletionDeadline = x.CompletionDeadline, + ImplementationStatus = x.ImplementationStatus, + }; + + //var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiSaveActionWorkLedger(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.ActionWorkLedgerId)) + { + var report = db.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.ActionWorkLedgerMenuId, item, string.Empty); + ////更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_11, report.YearId.ToString(), report.Quarter.ToString()); + } + } + LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + + return code; + } + } + /// + /// DrillConductedQuarterlyReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiSaveActionWorkLedger(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveActionWorkLedger"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJson1 = JsonConvert.SerializeObject(new { actionWorkLedgerItem = upReportItem }); + resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}"; + var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl); + return responeData.code; + } + #endregion + + #region 中央企业安全生产管理评价工作调度台账上报 + /// + /// 中央企业安全生产管理评价工作调度台账上报 + /// + public static string UpSafetyProductionEvaluation(string safetyProductionEvaluationId, Model.Sys_User CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient(); + var upReport = from x in db.Information_SafetyProductionEvaluation + where x.SafetyProductionEvaluationId == safetyProductionEvaluationId + select new Model.SafetyProductionEvaluation + { + SafetyProductionEvaluationId = x.SafetyProductionEvaluationId, + UnitId = x.UnitId, + ReportDate = x.ReportDate, + Quarter = x.Quarter, + YearId = x.YearId, + CompileMan = x.CompileMan, + }; + + var upReportItem = from x in db.Information_SafetyProductionEvaluationItem + where x.SafetyProductionEvaluationId == safetyProductionEvaluationId + select new Model.SafetyProductionEvaluationItem + { + SafetyProductionEvaluationItemId = x.SafetyProductionEvaluationItemId, + SafetyProductionEvaluationId = x.SafetyProductionEvaluationId, + SortIndex = x.SortIndex, + Type = x.Type, + EvaluateWork = x.EvaluateWork, + EvaluationContent = x.EvaluationContent, + FillingRequirements = x.FillingRequirements, + CompletionDeadline = x.CompletionDeadline, + ImplementationStatus = x.ImplementationStatus, + }; + + //var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiSaveSafetyProductionEvaluation(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.SafetyProductionEvaluationId)) + { + var report = db.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.SafetyProductionEvaluationMenuId, item, string.Empty); + ////更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_12, report.YearId.ToString(), report.Quarter.ToString()); + } + } + LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【中央企业安全生产管理评价工作调度台账上报】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + + return code; + } + } + /// + /// DrillConductedQuarterlyReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiSaveSafetyProductionEvaluation(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveSafetyProductionEvaluation"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJson1 = JsonConvert.SerializeObject(new { safetyProductionEvaluationItem = upReportItem }); + resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}"; + var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl); + return responeData.code; + } + #endregion } diff --git a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs new file mode 100644 index 00000000..b388fd5d --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 中央企业安全生产治本攻坚三年行动工作台账明细表 + /// + public static class ActionWorkLedgerItemService + { + /// + /// 根据主键获取中央企业安全生产治本攻坚三年行动工作台账明细信息 + /// + /// + /// + public static Model.Information_ActionWorkLedgerItem GetActionWorkLedgerItemById(string ActionWorkLedgerItemId) + { + return Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItemId); + } + + /// + /// 根据中央企业安全生产治本攻坚三年行动工作台账Id获取所有相关明细信息 + /// + /// + /// + public static List GetActionWorkLedgerItemList(string ActionWorkLedgerId) + { + return (from x in Funs.DB.Information_ActionWorkLedgerItem where x.ActionWorkLedgerId == ActionWorkLedgerId orderby x.SortIndex select x).ToList(); + } + + /// + /// 添加中央企业安全生产治本攻坚三年行动工作台账明细信息 + /// + /// + public static void AddActionWorkLedgerItem(Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem) + { + Model.Information_ActionWorkLedgerItem newActionWorkLedgerItem = new Model.Information_ActionWorkLedgerItem + { + ActionWorkLedgerItemId = ActionWorkLedgerItem.ActionWorkLedgerItemId, + ActionWorkLedgerId = ActionWorkLedgerItem.ActionWorkLedgerId, + Focus = ActionWorkLedgerItem.Focus, + SpecialTask = ActionWorkLedgerItem.SpecialTask, + WorkPoints = ActionWorkLedgerItem.WorkPoints, + FillingRequirements = ActionWorkLedgerItem.FillingRequirements, + CompletionDeadline = ActionWorkLedgerItem.CompletionDeadline, + ImplementationStatus = ActionWorkLedgerItem.ImplementationStatus, + SortIndex = ActionWorkLedgerItem.SortIndex + }; + Funs.DB.Information_ActionWorkLedgerItem.InsertOnSubmit(newActionWorkLedgerItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改中央企业安全生产治本攻坚三年行动工作台账明细信息 + /// + /// + public static void UpdateActionWorkLedgerItem(Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem) + { + Model.Information_ActionWorkLedgerItem newActionWorkLedgerItem = Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItem.ActionWorkLedgerItemId); + if (newActionWorkLedgerItem != null) + { + newActionWorkLedgerItem.Focus = ActionWorkLedgerItem.Focus; + newActionWorkLedgerItem.SpecialTask = ActionWorkLedgerItem.SpecialTask; + newActionWorkLedgerItem.WorkPoints = ActionWorkLedgerItem.WorkPoints; + newActionWorkLedgerItem.FillingRequirements = ActionWorkLedgerItem.FillingRequirements; + newActionWorkLedgerItem.CompletionDeadline = ActionWorkLedgerItem.CompletionDeadline; + newActionWorkLedgerItem.ImplementationStatus = ActionWorkLedgerItem.ImplementationStatus; + newActionWorkLedgerItem.SortIndex = ActionWorkLedgerItem.SortIndex; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除中央企业安全生产治本攻坚三年行动工作台账明细信息 + /// + /// + public static void DeleteActionWorkLedgerItemById(string ActionWorkLedgerItemId) + { + Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem = Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItemId); + if (ActionWorkLedgerItem != null) + { + Funs.DB.Information_ActionWorkLedgerItem.DeleteOnSubmit(ActionWorkLedgerItem); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据中央企业安全生产治本攻坚三年行动工作台账主表id删除所有相关明细信息 + /// + /// + public static void DeleteActionWorkLedgerItemList(string ActionWorkLedgerId) + { + var q = (from x in Funs.DB.Information_ActionWorkLedgerItem where x.ActionWorkLedgerId == ActionWorkLedgerId select x).ToList(); + if (q != null) + { + Funs.DB.Information_ActionWorkLedgerItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs new file mode 100644 index 00000000..603f472f --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + public static class ActionWorkLedgerService + { + /// + /// 根据主键获取中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + /// + public static Model.Information_ActionWorkLedger GetActionWorkLedgerById(string ActionWorkLedgerId) + { + return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedgerId); + } + + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + /// 单位Id + /// 年度 + /// 季度 + /// 中央企业安全生产治本攻坚三年行动工作台账 + public static Model.Information_ActionWorkLedger GetActionWorkLedgerByUnitIdAndYearAndQuarters(string unitId, int year, int quarters) + { + return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year); + } + + /// + /// 根据单位Id获取安全生产数据季报集合 + /// + /// 单位Id + /// 安全生产数据季报集合 + public static List GetActionWorkLedgersByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_ActionWorkLedger where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList(); + } + + /// + /// 添加中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + public static void AddActionWorkLedger(Model.Information_ActionWorkLedger ActionWorkLedger) + { + Model.Information_ActionWorkLedger newActionWorkLedger = new Model.Information_ActionWorkLedger + { + ActionWorkLedgerId = ActionWorkLedger.ActionWorkLedgerId, + UnitId = ActionWorkLedger.UnitId, + ReportDate = ActionWorkLedger.ReportDate, + YearId = ActionWorkLedger.YearId, + Quarter = ActionWorkLedger.Quarter, + CompileMan = ActionWorkLedger.CompileMan, + UpState = ActionWorkLedger.UpState, + HandleState = ActionWorkLedger.HandleState, + HandleMan = ActionWorkLedger.HandleMan + }; + Funs.DB.Information_ActionWorkLedger.InsertOnSubmit(newActionWorkLedger); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + public static void UpdateActionWorkLedger(Model.Information_ActionWorkLedger ActionWorkLedger) + { + Model.Information_ActionWorkLedger newActionWorkLedger = Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedger.ActionWorkLedgerId); + if (newActionWorkLedger != null) + { + newActionWorkLedger.UnitId = ActionWorkLedger.UnitId; + newActionWorkLedger.ReportDate = ActionWorkLedger.ReportDate; + newActionWorkLedger.YearId = ActionWorkLedger.YearId; + newActionWorkLedger.Quarter = ActionWorkLedger.Quarter; + newActionWorkLedger.UpState = ActionWorkLedger.UpState; + newActionWorkLedger.HandleState = ActionWorkLedger.HandleState; + newActionWorkLedger.HandleMan = ActionWorkLedger.HandleMan; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + public static void DeleteActionWorkLedgerById(string ActionWorkLedgerId) + { + Model.Information_ActionWorkLedger ActionWorkLedger = Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedgerId); + if (ActionWorkLedger != null) + { + Funs.DB.Information_ActionWorkLedger.DeleteOnSubmit(ActionWorkLedger); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据单位、季度获取中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + /// + /// + public static Model.Information_ActionWorkLedger GetActionWorkLedgerByUnitIdDate(string unitId, int yearId, int quarter, string ActionWorkLedgerId) + { + return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((ActionWorkLedgerId == null && e.ActionWorkLedgerId != null) || e.ActionWorkLedgerId != ActionWorkLedgerId)); + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs new file mode 100644 index 00000000..0a0e72bb --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 中央企业安全生产管理评价工作调度台账明细表 + /// + public static class SafetyProductionEvaluationItemService + { + /// + /// 根据主键获取中央企业安全生产管理评价工作调度台账明细信息 + /// + /// + /// + public static Model.Information_SafetyProductionEvaluationItem GetSafetyProductionEvaluationItemById(string SafetyProductionEvaluationItemId) + { + return Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItemId); + } + + /// + /// 根据中央企业安全生产管理评价工作调度台账Id获取所有相关明细信息 + /// + /// + /// + public static List GetSafetyProductionEvaluationItemList(string SafetyProductionEvaluationId) + { + return (from x in Funs.DB.Information_SafetyProductionEvaluationItem where x.SafetyProductionEvaluationId == SafetyProductionEvaluationId orderby x.SortIndex select x).ToList(); + } + + /// + /// 添加中央企业安全生产管理评价工作调度台账明细信息 + /// + /// + public static void AddSafetyProductionEvaluationItem(Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem) + { + Model.Information_SafetyProductionEvaluationItem newSafetyProductionEvaluationItem = new Model.Information_SafetyProductionEvaluationItem + { + SafetyProductionEvaluationItemId = SafetyProductionEvaluationItem.SafetyProductionEvaluationItemId, + SafetyProductionEvaluationId = SafetyProductionEvaluationItem.SafetyProductionEvaluationId, + Type = SafetyProductionEvaluationItem.Type, + EvaluateWork = SafetyProductionEvaluationItem.EvaluateWork, + EvaluationContent = SafetyProductionEvaluationItem.EvaluationContent, + FillingRequirements = SafetyProductionEvaluationItem.FillingRequirements, + CompletionDeadline = SafetyProductionEvaluationItem.CompletionDeadline, + ImplementationStatus = SafetyProductionEvaluationItem.ImplementationStatus, + SortIndex = SafetyProductionEvaluationItem.SortIndex + }; + Funs.DB.Information_SafetyProductionEvaluationItem.InsertOnSubmit(newSafetyProductionEvaluationItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改中央企业安全生产管理评价工作调度台账明细信息 + /// + /// + public static void UpdateSafetyProductionEvaluationItem(Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem) + { + Model.Information_SafetyProductionEvaluationItem newSafetyProductionEvaluationItem = Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItem.SafetyProductionEvaluationItemId); + if (newSafetyProductionEvaluationItem != null) + { + newSafetyProductionEvaluationItem.Type = SafetyProductionEvaluationItem.Type; + newSafetyProductionEvaluationItem.EvaluateWork = SafetyProductionEvaluationItem.EvaluateWork; + newSafetyProductionEvaluationItem.EvaluationContent = SafetyProductionEvaluationItem.EvaluationContent; + newSafetyProductionEvaluationItem.FillingRequirements = SafetyProductionEvaluationItem.FillingRequirements; + newSafetyProductionEvaluationItem.CompletionDeadline = SafetyProductionEvaluationItem.CompletionDeadline; + newSafetyProductionEvaluationItem.ImplementationStatus = SafetyProductionEvaluationItem.ImplementationStatus; + newSafetyProductionEvaluationItem.SortIndex = SafetyProductionEvaluationItem.SortIndex; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除中央企业安全生产管理评价工作调度台账明细信息 + /// + /// + public static void DeleteSafetyProductionEvaluationItemById(string SafetyProductionEvaluationItemId) + { + Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem = Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItemId); + if (SafetyProductionEvaluationItem != null) + { + Funs.DB.Information_SafetyProductionEvaluationItem.DeleteOnSubmit(SafetyProductionEvaluationItem); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据中央企业安全生产管理评价工作调度台账主表id删除所有相关明细信息 + /// + /// + public static void DeleteSafetyProductionEvaluationItemList(string SafetyProductionEvaluationId) + { + var q = (from x in Funs.DB.Information_SafetyProductionEvaluationItem where x.SafetyProductionEvaluationId == SafetyProductionEvaluationId select x).ToList(); + if (q != null) + { + Funs.DB.Information_SafetyProductionEvaluationItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs new file mode 100644 index 00000000..ba36d562 --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 中央企业安全生产管理评价工作调度台账 + /// + public static class SafetyProductionEvaluationService + { + /// + /// 根据主键获取中央企业安全生产管理评价工作调度台账 + /// + /// + /// + public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationById(string SafetyProductionEvaluationId) + { + return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluationId); + } + + /// + /// 中央企业安全生产管理评价工作调度台账 + /// + /// 单位Id + /// 年度 + /// 季度 + /// 中央企业安全生产管理评价工作调度台账 + public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(string unitId, int year, int quarters) + { + return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year); + } + + /// + /// 根据单位Id获取安全生产数据季报集合 + /// + /// 单位Id + /// 安全生产数据季报集合 + public static List GetSafetyProductionEvaluationsByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_SafetyProductionEvaluation where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList(); + } + + /// + /// 添加中央企业安全生产管理评价工作调度台账 + /// + /// + public static void AddSafetyProductionEvaluation(Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation) + { + Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation + { + SafetyProductionEvaluationId = SafetyProductionEvaluation.SafetyProductionEvaluationId, + UnitId = SafetyProductionEvaluation.UnitId, + ReportDate = SafetyProductionEvaluation.ReportDate, + YearId = SafetyProductionEvaluation.YearId, + Quarter = SafetyProductionEvaluation.Quarter, + CompileMan = SafetyProductionEvaluation.CompileMan, + UpState = SafetyProductionEvaluation.UpState, + HandleState = SafetyProductionEvaluation.HandleState, + HandleMan = SafetyProductionEvaluation.HandleMan + }; + Funs.DB.Information_SafetyProductionEvaluation.InsertOnSubmit(newSafetyProductionEvaluation); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改中央企业安全生产管理评价工作调度台账 + /// + /// + public static void UpdateSafetyProductionEvaluation(Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation) + { + Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluation.SafetyProductionEvaluationId); + if (newSafetyProductionEvaluation != null) + { + newSafetyProductionEvaluation.UnitId = SafetyProductionEvaluation.UnitId; + newSafetyProductionEvaluation.ReportDate = SafetyProductionEvaluation.ReportDate; + newSafetyProductionEvaluation.YearId = SafetyProductionEvaluation.YearId; + newSafetyProductionEvaluation.Quarter = SafetyProductionEvaluation.Quarter; + newSafetyProductionEvaluation.UpState = SafetyProductionEvaluation.UpState; + newSafetyProductionEvaluation.HandleState = SafetyProductionEvaluation.HandleState; + newSafetyProductionEvaluation.HandleMan = SafetyProductionEvaluation.HandleMan; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除中央企业安全生产管理评价工作调度台账 + /// + /// + public static void DeleteSafetyProductionEvaluationById(string SafetyProductionEvaluationId) + { + Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluationId); + if (SafetyProductionEvaluation != null) + { + Funs.DB.Information_SafetyProductionEvaluation.DeleteOnSubmit(SafetyProductionEvaluation); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据单位、季度获取中央企业安全生产管理评价工作调度台账 + /// + /// + /// + /// + public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationByUnitIdDate(string unitId, int yearId, int quarter, string SafetyProductionEvaluationId) + { + return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((SafetyProductionEvaluationId == null && e.SafetyProductionEvaluationId != null) || e.SafetyProductionEvaluationId != SafetyProductionEvaluationId)); + } + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx index 8a96bfa1..b731d669 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx @@ -92,8 +92,8 @@ - - + + @@ -108,56 +108,56 @@ - - - - - - - - - - - - + diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs index 28f40e5f..05e1f62f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs @@ -128,12 +128,12 @@ namespace FineUIPro.Web.CQMS.Solution if (drpState.SelectedValue == "1") //已闭合 { strSql += " AND State=@State"; - listStr.Add(new SqlParameter("@State", "3")); + listStr.Add(new SqlParameter("@State", "4")); } else //未闭合 { strSql += " AND State!=@State"; - listStr.Add(new SqlParameter("@State", "3")); + listStr.Add(new SqlParameter("@State", "4")); } } strSql += " order by chec.code desc "; @@ -253,16 +253,21 @@ namespace FineUIPro.Web.CQMS.Solution return; } } - else if (constructSolution.State == Const.CQMSConstructSolution_Audit || constructSolution.State == Const.CQMSConstructSolution_ReCompile) + //一级审核、二级审批、重报 + else if (constructSolution.State == Const.CQMSConstructSolution_Audit + || constructSolution.State == Const.CQMSConstructSolution_Audit1 + || constructSolution.State == Const.CQMSConstructSolution_ReCompile) { - var approve = CQMSConstructSolutionApproveService.GetThisApproveByConstructSolutionId(id); - if (approve!=null && approve.ApproveMan==this.CurrUser.UserId) + //审批列表中是否包含当前用户 + var approve = CQMSConstructSolutionApproveService.GetThisApproveByConstructSolutionId(id, constructSolution.State); + //if (approve!=null && approve.ApproveMan==this.CurrUser.UserId) + if (approve.Any(x=>x.ApproveMan.IndexOf(CurrUser.UserId)>-1)) { PageContext.RegisterStartupScript(window_tt.GetShowReference(String.Format("EditConstructSolution.aspx?constructSolutionId={0}", id))); } else { - Alert.ShowInTop("您不是办理用户,无法操作!请右键查看", MessageBoxIcon.Warning); + Alert.ShowInTop("您不是审核人员,无法操作!请右键查看", MessageBoxIcon.Warning); return; } //Model.Solution_CQMSConstructSolutionApprove approve = CQMSConstructSolutionApproveService.GetConstructSolutionApproveByApproveMan(id, CurrUser.UserId); @@ -285,6 +290,7 @@ namespace FineUIPro.Web.CQMS.Solution //} } + } @@ -324,7 +330,7 @@ namespace FineUIPro.Web.CQMS.Solution } else { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Success); + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); } } else @@ -339,14 +345,14 @@ namespace FineUIPro.Web.CQMS.Solution Alert.ShowInTop("删除成功!", MessageBoxIcon.Success); return; } - Alert.ShowInTop("删除失败,方案正在审批中!", MessageBoxIcon.Success); + Alert.ShowInTop("删除失败,只能删除未上报的数据!", MessageBoxIcon.Warning); } } else { - Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Success); + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); } } diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolutionView.aspx b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolutionView.aspx index cae51a81..8343e1d5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolutionView.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolutionView.aspx @@ -144,6 +144,78 @@ --%> + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- - + <%-- - - - - - - - - - - - - <%----%> - - - - - - - - - <%----%> - - - - - - - - - <%----%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + --%> + + @@ -274,7 +429,7 @@ - + <%-- --%> diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs index da744c0a..52db72f6 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs @@ -1,10 +1,13 @@ using System; using System.Collections.Generic; +using System.Data; using System.Linq; +using System.Reflection; using System.Web; using BLL; using FineUIPro.Web.HSSE.Solution; using Model; +using Newtonsoft.Json.Linq; using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.Solution @@ -23,22 +26,55 @@ namespace FineUIPro.Web.CQMS.Solution set => ViewState["ConstructSolutionId"] = value; } + /// + /// 是否第二次并且不同意的时候 + /// + public bool isSendTrue + { + get => (bool)ViewState["isSendTrue"]; + set => ViewState["isSendTrue"] = value; + } #endregion + private static List complianceObligationsCs = new List(); + public int ContactImg { get => Convert.ToInt32(ViewState["ContactImg"]); set => ViewState["ContactImg"] = value; } + private string[] GetUserNames(string Ids) + { + string[] arr = Ids.Split(','); + var data = Funs.DB.Sys_User.Where(t => arr.Contains(t.UserId)).Select(t => t.UserName).ToList(); + if (data.Count > 0) + return data.ToArray(); + return null; + + } + + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { + isSendTrue = false; + complianceObligationsCs.Clear(); InitDropDownList(); //加载下拉框 - BindZYRole(); - BindAQRole(); - BindSGRole(); + + //加载一级审核人员 + GetCheckManBindGrid1(); + //加载二级审批人员 + GetCheckManBindGrid2(); + + //GetCheckManBindGrid3(); + + GetCheckManBindGrid4(); + + //BindZYRole(); + //BindAQRole(); + //BindSGRole(); ContactImg = 0; txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); ConstructSolutionId = Request.Params["constructSolutionId"]; @@ -101,38 +137,122 @@ namespace FineUIPro.Web.CQMS.Solution #region 检查树节点 var zyUserIds = - CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "ZY"); + CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "Yi"); if (zyUserIds.Count > 0) { - SetCheck(trOne, zyUserIds); + var zyUserIdsStr = string.Join(",", zyUserIds); + drpzyUserIds.Values = zyUserIdsStr.Split(','); + drpzyUserIds.Texts = GetUserNames(zyUserIdsStr); + //SetCheck(trOne, zyUserIds); } var aqUserIds = - CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "AQ"); + CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "Er"); if (aqUserIds.Count > 0) { - SetCheck(trThree, aqUserIds); + var aqUserIdsStr = string.Join(",", aqUserIds); + drpaqUserIds.Values = aqUserIdsStr.Split(','); + drpaqUserIds.Texts = GetUserNames(aqUserIdsStr); + //SetCheck(trThree, aqUserIds); } var sgUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "SG"); if (sgUserIds.Count > 0) { - SetCheck(trFive, sgUserIds); + var sgUserIdsStr = string.Join(",", sgUserIds); + //drpsgUserIds.Values = sgUserIdsStr.Split(','); + //drpsgUserIds.Texts = GetUserNames(sgUserIdsStr); + //SetCheck(trFive, sgUserIds); } + if (!string.IsNullOrEmpty(constructSolution.CsUsers)) + { + drpCsUsers.Values = constructSolution.CsUsers.Split(','); + drpCsUsers.Texts = GetUserNames(constructSolution.CsUsers); + } #endregion if (constructSolution.State == Const.CQMSConstructSolution_ReCompile) - { - agree.Hidden = true; - options.Hidden = true; - optio.Hidden = true; - } - - if (constructSolution.State == Const.CQMSConstructSolution_Audit) { + txtProjectName.Enabled = false; + txtCode.Enabled = false; + drpUnit.Enabled = false; + drpModelType.Enabled = false; + drpSpecialType.Enabled = false; + txtCompileDate.Enabled = false; + txtSolutionName.Enabled = false; + txtCNProfessional.Enabled = false; + txtUnitWork.Enabled = false; + //ContactImg = -2; + //Panel2.Enabled = false; + //Panel2.Hidden = true; + btnSave.Hidden = true; + //txtDocContent.Readonly = true; + drpzyUserIds.Enabled = false; + drpaqUserIds.Enabled = false; + //drpsgUserIds.Enabled = false; + drpCsUsers.Enabled = false; + txtEdition.Enabled = false; + + agree.Hidden = true; + + optio.Hidden = true; + + #region 重报 + zyUserIds = + CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignTypeNew(ConstructSolutionId, "Yi"); + if (zyUserIds.Count > 0) + { + var zyUserIdsStr = string.Join(",", zyUserIds); + drpzyUserIds.Values = zyUserIdsStr.Split(','); + drpzyUserIds.Texts = GetUserNames(zyUserIdsStr); + //SetCheck(trOne, zyUserIds); + } + + aqUserIds = + CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignTypeNew(ConstructSolutionId, "Er"); + if (aqUserIds.Count > 0) + { + var aqUserIdsStr = string.Join(",", aqUserIds); + drpaqUserIds.Values = aqUserIdsStr.Split(','); + drpaqUserIds.Texts = GetUserNames(aqUserIdsStr); + //SetCheck(trThree, aqUserIds); + } + + sgUserIds = + CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignTypeNew(ConstructSolutionId, "SG"); + if (sgUserIds.Count > 0) + { + var sgUserIdsStr = string.Join(",", sgUserIds); + //drpsgUserIds.Values = sgUserIdsStr.Split(','); + //drpsgUserIds.Texts = GetUserNames(sgUserIdsStr); + //SetCheck(trFive, sgUserIds); + } + #endregion + //重报的情况下 + //加载 + complianceObligationsCs = Funs.DB.Solution_CQMSConstructSolutionApprove_Item.Where(x => x.ConstructSolutionId == ConstructSolutionId) + .OrderBy(x => x.SortId).OrderBy(x => x.Proposer).ToList(); + if (complianceObligationsCs.Count > 0) + { + gvOperateComplianceObligations.DataSource = complianceObligationsCs; + gvOperateComplianceObligations.DataBind(); + } + + options.Hidden = false; + options1.Hidden = false; + btnNew.Hidden = true; + gvOperateComplianceObligations.AllColumns[0].Hidden = true; + gvOperateComplianceObligations.AllColumns[6].Hidden = true; + gvOperateComplianceObligations.AllColumns[7].Hidden = true; + } + + if (constructSolution.State == Const.CQMSConstructSolution_Audit || + constructSolution.State == Const.CQMSConstructSolution_Audit1) + { + plApprove2.Hidden = true; txtProjectName.Enabled = false; txtCode.Enabled = false; drpUnit.Enabled = false; @@ -143,12 +263,33 @@ namespace FineUIPro.Web.CQMS.Solution txtCNProfessional.Enabled = false; txtUnitWork.Enabled = false; ContactImg = -2; - Panel2.Enabled = false; - Panel2.Hidden = true; + //Panel2.Enabled = false; + //Panel2.Hidden = true; btnSave.Hidden=true; txtDocContent.Readonly=true; + drpzyUserIds.Enabled = false; + drpaqUserIds.Enabled = false; + //drpsgUserIds.Enabled = false; + drpCsUsers.Enabled = false; + txtEdition.Enabled = false; + + //1级审批 二级审批,如果填写过Solution_CQMSConstructSolutionApprove_Item的情况 则显示 + complianceObligationsCs = Funs.DB.Solution_CQMSConstructSolutionApprove_Item.Where(x => x.ConstructSolutionId == ConstructSolutionId + && x.Proposer == CurrUser.UserId).OrderBy(x => x.SortId).ToList(); + if (complianceObligationsCs.Count > 0) + { + isSendTrue = true; + options.Hidden = false; + options1.Hidden = false; + gvOperateComplianceObligations.DataSource = complianceObligationsCs; + gvOperateComplianceObligations.DataBind(); + gvOperateComplianceObligations.AllColumns[4].Hidden = true; + } + } + + ////提交版本人多次修改 //if (constructSolution.CompileMan.Equals(CurrUser.UserId)) //{ @@ -177,6 +318,7 @@ namespace FineUIPro.Web.CQMS.Solution agree.Hidden = true; txtEdition.Text = "0"; options.Hidden = true; + options1.Hidden = true; optio.Hidden = true; plApprove2.Hidden = true; txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", @@ -281,7 +423,15 @@ namespace FineUIPro.Web.CQMS.Solution { constructSolution.CNProfessionalCodes = string.Join(",", txtCNProfessional.Values); } - + + //抄送人 + string sendUserIds = string.Empty; + if (!string.IsNullOrEmpty(drpCsUsers.Value)) + { + sendUserIds = string.Join(",", drpCsUsers.Values); + } + constructSolution.CsUsers = sendUserIds; + constructSolution.Edition = Convert.ToInt32(txtEdition.Text); constructSolution.ConstructSolutionId = HFConstructSolutionId.Text; constructSolution.Content = txtDocContent.Text.Trim(); @@ -324,88 +474,207 @@ namespace FineUIPro.Web.CQMS.Solution countersign(constructSolution.ConstructSolutionId); constructSolution.State = Const.CQMSConstructSolution_Audit; CQMSConstructSolutionService.UpdateConstructSolution(constructSolution); + var approve = Funs.DB.Solution_CQMSConstructSolutionApprove.Where(x => x.ApproveDate == null && + x.ConstructSolutionId == ConstructSolutionId && x.ApproveMan == CurrUser.UserId && x.ApproveType=="0").First(); - var approve = CQMSConstructSolutionApproveService.GetThisApproveByConstructSolutionId(ConstructSolutionId); - if (approve.ApproveMan == this.CurrUser.UserId && approve.ApproveType == Const.CQMSConstructSolution_ReCompile) + if (approve!=null) { approve.ApproveDate = DateTime.Now; - approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); - CQMSConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); + CQMSConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); + TbrOperateComplianceObligationsCSort(); } } + //一级审核 else if (constructSolution.State == Const.CQMSConstructSolution_Audit && saveType == "submit") { - UpdateApprove(); + UpdateApprove("Yi"); + } + //二级审批 + else if (constructSolution.State == Const.CQMSConstructSolution_Audit1 && saveType == "submit") + { + UpdateApprove("Er"); } } /// /// 修改审批意见 /// - private void UpdateApprove() + private void UpdateApprove(string signType) { - var approve = CQMSConstructSolutionApproveService.GetThisApproveByConstructSolutionId(ConstructSolutionId); - if (approve.ApproveMan==this.CurrUser.UserId ) + var state = ""; + if (signType == "Yi") { - approve.ApproveDate = DateTime.Now; - approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); - approve.ApproveIdea = txtOptions.Text.Trim(); - approve.Edition=Convert.ToInt32(txtEdition.Text); - CQMSConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); - CheckIsAllAgree(); + state = "2"; + } + else { + state = "3"; + } + var approveList = CQMSConstructSolutionApproveService.GetThisApproveByConstructSolutionId(ConstructSolutionId, state); + if (approveList.Any(x => x.ApproveMan.IndexOf(CurrUser.UserId) > -1)) + { + var approve = approveList.FirstOrDefault(x => x.ApproveMan == CurrUser.UserId); + if (approve.ApproveMan == this.CurrUser.UserId) + { + approve.ApproveDate = DateTime.Now; + approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + //approve.ApproveIdea = txtOptions.Text.Trim(); + approve.Edition = Convert.ToInt32(txtEdition.Text); + CQMSConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); + + //如果第二次审批,并且有不同意的情况下,进行修改 + if (isSendTrue) + { + SprOperateComplianceObligationsCSort(); + } + + //不同意的情况下 审批人增加列表 + if (Convert.ToBoolean(rblIsAgree.SelectedValue) == false) + { + if (isSendTrue) + { + SprOperateComplianceObligationsCSort(); + } + else { + OperateComplianceObligationsCSort(); + } + + } + + CheckIsAllAgree(signType); + } } - } /// /// 判断是否全部同意 /// - private void CheckIsAllAgree() + private void CheckIsAllAgree(string signType) { var edtion = Convert.ToInt32(txtEdition.Text); var constructSolution = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); - var allApproves = CQMSConstructSolutionApproveService.GetHandleConstructSolutionApprovesByConstructSolutionId(ConstructSolutionId, - constructSolution.Edition == null ? 0 : Convert.ToInt32(constructSolution.Edition)); + - var needApporveCount = allApproves.Where(x => x.ApproveDate == null).Count(); - if (needApporveCount>0) return; //判断是否最后一个审批 + //var needApporveCount = allApproves.Where(x => x.ApproveDate == null).Count(); + //if (needApporveCount>0) return; //判断是否最后一个审批 - var count = allApproves.Where(p => - p.ApproveDate != null && p.IsAgree != null && Convert.ToBoolean(p.IsAgree)).Count(); //查询会签同意的 - var fcount = allApproves.Where(p => - p.ApproveDate != null && p.IsAgree != null && !Convert.ToBoolean(p.IsAgree)).Count(); //查询会签不同意的 - if (count == allApproves.Count)//全部同意 - { - var cons = - CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId( - ConstructSolutionId); - cons.State = Const.CQMSConstructSolution_Complete; - cons.CompileDate = DateTime.Now; - CQMSConstructSolutionService.UpdateConstructSolution(cons); - } + - //有不同意意见,打回重新编制 - if (fcount > 0) + //一级审核 + if (signType=="Yi") { - var cons = - CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId( - ConstructSolutionId); - var reApprove = new Solution_CQMSConstructSolutionApprove(); - reApprove.ConstructSolutionId = constructSolution.ConstructSolutionId; - reApprove.ApproveMan = cons.CompileMan; - reApprove.ApproveType = Const.CQMSConstructSolution_ReCompile; - edtion++; - reApprove.Edition = edtion; - CQMSConstructSolutionApproveService.AddConstructSolutionApprove(reApprove); + var allApproves = CQMSConstructSolutionApproveService.GetHandleConstructSolutionApprovesByConstructSolutionId(ConstructSolutionId, + constructSolution.Edition == null ? 0 : Convert.ToInt32(constructSolution.Edition)); + + var count = allApproves.Where(p => p.SignType == "Yi").Count(); //查询一级所有数量 + + var ycount = allApproves.Where(p =>p.ApproveDate != null && p.IsAgree != null + && Convert.ToBoolean(p.IsAgree) && p.SignType=="Yi").Count(); //查询一级审核同意的 + + var fcount = allApproves.Where(p =>p.ApproveDate != null && p.IsAgree != null + && !Convert.ToBoolean(p.IsAgree) && p.SignType == "Yi").Count(); //查询一级审核不同意的 + + //如果当前已经审核完 + if (count == (ycount + fcount)) + { + //全部同意 + if (ycount == count) + { + //走到下一步,修改施工方案状态为二级审批 + var cons = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + cons.State = Const.CQMSConstructSolution_Audit1; + CQMSConstructSolutionService.UpdateConstructSolution(cons); + + } + else { + //有不同意的直接打回 + var cons = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId( + ConstructSolutionId); + var reApprove = new Solution_CQMSConstructSolutionApprove(); + reApprove.ConstructSolutionId = constructSolution.ConstructSolutionId; + reApprove.ApproveMan = cons.CompileMan; + reApprove.ApproveType = Const.CQMSConstructSolution_ReCompile; + edtion++; + reApprove.Edition = edtion; + CQMSConstructSolutionApproveService.AddConstructSolutionApprove(reApprove); + + cons.State = Const.CQMSConstructSolution_ReCompile; + cons.CompileDate = DateTime.Now; + cons.Edition = edtion; + constructSolution.State = Const.CQMSConstructSolution_ReCompile; + CQMSConstructSolutionService.UpdateConstructSolution(cons); + LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, + Const.CQMSConstructSolutionMenuId, "修改施工方案"); + } + } + else { + //没有审核完就跳出 + return; + } - cons.State = Const.CQMSConstructSolution_ReCompile; - cons.CompileDate = DateTime.Now; - cons.Edition= edtion; - constructSolution.State = Const.CQMSConstructSolution_ReCompile; - CQMSConstructSolutionService.UpdateConstructSolution(cons); - LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, - Const.CQMSConstructSolutionMenuId, "修改施工方案"); } + else if (signType=="Er") + { + var allApproves = CQMSConstructSolutionApproveService.GetHandleConstructSolutionApprovesByConstructSolutionId2(ConstructSolutionId, + constructSolution.Edition == null ? 0 : Convert.ToInt32(constructSolution.Edition)); + var count = allApproves.Where(p => p.SignType == "Er").Count(); //查询二级所有数量 + + var ycount = allApproves.Where(p => p.ApproveDate != null && p.IsAgree != null + && Convert.ToBoolean(p.IsAgree) && p.SignType == "Er").Count(); //查询二级审核同意的 + + var fcount = allApproves.Where(p => p.ApproveDate != null && p.IsAgree != null + && !Convert.ToBoolean(p.IsAgree) && p.SignType == "Er").Count(); //查询二级审核不同意的 + // 如果当前已经审核完 + if (count == (ycount + fcount)) + { + //全部同意 + if (ycount == count) + { + //完成 + var cons = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + cons.State = Const.CQMSConstructSolution_Complete; + cons.CompileDate = DateTime.Now; + CQMSConstructSolutionService.UpdateConstructSolution(cons); + + } + else + { + //有不同意的直接打回 + var cons = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId( + ConstructSolutionId); + var reApprove = new Solution_CQMSConstructSolutionApprove(); + reApprove.ConstructSolutionId = constructSolution.ConstructSolutionId; + reApprove.ApproveMan = cons.CompileMan; + reApprove.ApproveType = Const.CQMSConstructSolution_ReCompile; + edtion++; + reApprove.Edition = edtion; + CQMSConstructSolutionApproveService.AddConstructSolutionApprove(reApprove); + + cons.State = Const.CQMSConstructSolution_ReCompile; + cons.CompileDate = DateTime.Now; + cons.Edition = edtion; + constructSolution.State = Const.CQMSConstructSolution_ReCompile; + CQMSConstructSolutionService.UpdateConstructSolution(cons); + LogService.AddSys_Log(CurrUser, constructSolution.Code, ConstructSolutionId, + Const.CQMSConstructSolutionMenuId, "修改施工方案"); + } + } + else + { + //没有审核完就跳出 + return; + } + + } + //if (count == allApproves.Count)//全部同意 + //{ + + //} + + ////有不同意意见,打回重新编制 + //if (fcount > 0) + //{ + + //} } /// @@ -422,9 +691,9 @@ namespace FineUIPro.Web.CQMS.Solution if (!AttachFileService.Getfile(HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId)) err += "请上传附件,"; var list = new List(); - list.Add(trOne); - list.Add(trThree); - list.Add(trFive); + //list.Add(trOne); + //list.Add(trThree); + //list.Add(trFive); var res = false; foreach (var item in list) if (nodesCheckd(item)) @@ -593,69 +862,114 @@ namespace FineUIPro.Web.CQMS.Solution private void countersign(string constructSolutionId) { var solution = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + //一级审核人员 + foreach (var item in drpzyUserIds.Values) + { + var approve = new Solution_CQMSConstructSolutionApprove(); + approve.ConstructSolutionId = constructSolutionId; + approve.ApproveMan = item; + approve.ApproveType = Const.CQMSConstructSolution_Audit; + approve.SignType = "Yi"; + var edtion = Convert.ToInt32(txtEdition.Text); + //if (solution != null) edtion++; + approve.Edition = edtion; + approve.Order = 2; + //delSolutionApprove(constructSolutionId, item, "Yi"); + CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); + } + //二级审批人员 + foreach (var item in drpaqUserIds.Values) + { + var approve = new Solution_CQMSConstructSolutionApprove(); + approve.ConstructSolutionId = constructSolutionId; + approve.ApproveMan = item; + approve.ApproveType = Const.CQMSConstructSolution_Audit1; + approve.SignType = "Er"; + var edtion = Convert.ToInt32(txtEdition.Text); + // if (solution != null) edtion++; + approve.Edition = edtion; + approve.Order = 3; + //delSolutionApprove(constructSolutionId, item, "Er"); + CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); + } + //foreach (var item in drpsgUserIds.Values) + //{ + // var approve = new Solution_CQMSConstructSolutionApprove(); + // approve.ConstructSolutionId = constructSolutionId; + // approve.ApproveMan = item; + // approve.ApproveType = Const.CQMSConstructSolution_Audit; + // approve.SignType = "SG"; + // var edtion = Convert.ToInt32(txtEdition.Text); + // //if (solution != null) edtion++; + // approve.Edition = edtion; + // approve.Order = 3; + // delSolutionApprove(constructSolutionId, item, "SG"); + // CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); + //} - if (trOne.Nodes[0].Nodes.Count > 0) - foreach (var tn in trOne.Nodes[0].Nodes) - if (tn.Checked) - { - var approve = new Solution_CQMSConstructSolutionApprove(); - approve.ConstructSolutionId = constructSolutionId; - approve.ApproveMan = tn.NodeID; - approve.ApproveType = Const.CQMSConstructSolution_Audit; - approve.SignType = "ZY"; - var edtion = Convert.ToInt32(txtEdition.Text); - //if (solution != null) edtion++; - approve.Edition = edtion; - delSolutionApprove(constructSolutionId, tn.NodeID, "ZY"); - CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); - //APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); - } - else - { - delSolutionApprove(constructSolutionId, tn.NodeID, "ZY"); - } - if (trThree.Nodes[0].Nodes.Count > 0) - foreach (var tn in trThree.Nodes[0].Nodes) - if (tn.Checked) - { - var approve = new Solution_CQMSConstructSolutionApprove(); - approve.ConstructSolutionId = constructSolutionId; - approve.ApproveMan = tn.NodeID; - approve.ApproveType = Const.CQMSConstructSolution_Audit; - approve.SignType = "AQ"; - var edtion = Convert.ToInt32(txtEdition.Text); - // if (solution != null) edtion++; - approve.Edition = edtion; - delSolutionApprove(constructSolutionId, tn.NodeID, "AQ"); - CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); - //APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); - } - else - { - delSolutionApprove(constructSolutionId, tn.NodeID, "AQ"); - } + //if (trOne.Nodes[0].Nodes.Count > 0) + // foreach (var tn in trOne.Nodes[0].Nodes) + // if (tn.Checked) + // { + // var approve = new Solution_CQMSConstructSolutionApprove(); + // approve.ConstructSolutionId = constructSolutionId; + // approve.ApproveMan = tn.NodeID; + // approve.ApproveType = Const.CQMSConstructSolution_Audit; + // approve.SignType = "ZY"; + // var edtion = Convert.ToInt32(txtEdition.Text); + // //if (solution != null) edtion++; + // approve.Edition = edtion; + // delSolutionApprove(constructSolutionId, tn.NodeID, "ZY"); + // CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); + // //APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + // } + // else + // { + // delSolutionApprove(constructSolutionId, tn.NodeID, "ZY"); + // } - if (trFive.Nodes[0].Nodes.Count > 0) - foreach (var tn in trFive.Nodes[0].Nodes) - if (tn.Checked) - { - var approve = new Solution_CQMSConstructSolutionApprove(); - approve.ConstructSolutionId = constructSolutionId; - approve.ApproveMan = tn.NodeID; - approve.ApproveType = Const.CQMSConstructSolution_Audit; - approve.SignType = "SG"; - var edtion = Convert.ToInt32(txtEdition.Text); - // if (solution != null) edtion++; - approve.Edition = edtion; - delSolutionApprove(constructSolutionId, tn.NodeID, "SG"); - CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); - // APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); - } - else - { - delSolutionApprove(constructSolutionId, tn.NodeID, "SG"); - } + //if (trThree.Nodes[0].Nodes.Count > 0) + // foreach (var tn in trThree.Nodes[0].Nodes) + // if (tn.Checked) + // { + // var approve = new Solution_CQMSConstructSolutionApprove(); + // approve.ConstructSolutionId = constructSolutionId; + // approve.ApproveMan = tn.NodeID; + // approve.ApproveType = Const.CQMSConstructSolution_Audit; + // approve.SignType = "AQ"; + // var edtion = Convert.ToInt32(txtEdition.Text); + // // if (solution != null) edtion++; + // approve.Edition = edtion; + // delSolutionApprove(constructSolutionId, tn.NodeID, "AQ"); + // CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); + // //APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + // } + // else + // { + // delSolutionApprove(constructSolutionId, tn.NodeID, "AQ"); + // } + + //if (trFive.Nodes[0].Nodes.Count > 0) + // foreach (var tn in trFive.Nodes[0].Nodes) + // if (tn.Checked) + // { + // var approve = new Solution_CQMSConstructSolutionApprove(); + // approve.ConstructSolutionId = constructSolutionId; + // approve.ApproveMan = tn.NodeID; + // approve.ApproveType = Const.CQMSConstructSolution_Audit; + // approve.SignType = "SG"; + // var edtion = Convert.ToInt32(txtEdition.Text); + // // if (solution != null) edtion++; + // approve.Edition = edtion; + // delSolutionApprove(constructSolutionId, tn.NodeID, "SG"); + // CQMSConstructSolutionApproveService.AddConstructSolutionApprove(approve); + // // APICommonService.SendSubscribeMessage(approve.ApproveMan, "施工方案待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + // } + // else + // { + // delSolutionApprove(constructSolutionId, tn.NodeID, "SG"); + // } } //protected void imgBtnFile_Click(object sender, EventArgs e) @@ -750,26 +1064,63 @@ namespace FineUIPro.Web.CQMS.Solution return; } var err = string.Empty; - if (!AttachFileService.Getfile(HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId)) - err += "请上传附件,"; - var list = new List(); - list.Add(trOne); - list.Add(trThree); - list.Add(trFive); - var res = false; - foreach (var item in list) - if (nodesCheckd(item)) - { - res = true; - break; - } + //if (!AttachFileService.Getfile(HFConstructSolutionId.Text, Const.CQMSConstructSolutionMenuId)) + // err += "请上传附件,"; + //var list = new List(); + //list.Add(trOne); + //list.Add(trThree); + //list.Add(trFive); + //var res = false; + //foreach (var item in list) + // if (nodesCheckd(item)) + // { + // res = true; + // break; + // } + + //if (!res) err += "请选择总包会签人员,"; + + if (drpzyUserIds.Values.Length<2) + { + err += "一级审核人员必须选择施工工程师和HSE工程师,当前小于2人,"; + } + + if (drpaqUserIds.Values.Length < 3) + { + err += "一二级审批人员必须选择施工经理、HSE经理、质量经理,当前小于3人,"; + } + + //if (string.IsNullOrEmpty(drpzyUserIds.Value)) + //{ + // err += "请选择总包会签专业工程师,"; + //} + //if (string.IsNullOrEmpty(drpaqUserIds.Value)) + //{ + // err += "请选择总包会签HSE组,"; + //} + //if (string.IsNullOrEmpty(drpsgUserIds.Value)) + //{ + // err += "请选择总包会签施工经理,"; + //} - if (!res) err += "请选择总包会签人员,"; if (!string.IsNullOrWhiteSpace(err)) { err = err.Substring(0, err.LastIndexOf(",")); err += "!"; } + if (!string.IsNullOrEmpty(ConstructSolutionId)) + { + var constructSolution = + CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(ConstructSolutionId); + if (constructSolution.State == Const.CQMSConstructSolution_Audit && Convert.ToBoolean(rblIsAgree.SelectedValue)==false) + { + if (complianceObligationsCs.Count==0) + { + err += "不同意的情况下请添加修改意见,"; + } + } + } + if (!string.IsNullOrWhiteSpace(err)) { @@ -777,7 +1128,9 @@ namespace FineUIPro.Web.CQMS.Solution return; } - Save("submit"); + + + Save("submit"); CQMSConstructSolutionApproveService.PushMessageToNextMan(ConstructSolutionId); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); Alert.ShowInTop("提交成功!", MessageBoxIcon.Success); @@ -861,7 +1214,7 @@ namespace FineUIPro.Web.CQMS.Solution approve.Edition = Convert.ToInt32(edtion); approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); - approve.ApproveIdea = txtOptions.Text.Trim(); + //approve.ApproveIdea = txtOptions.Text.Trim(); CQMSConstructSolutionApproveService.UpdateConstructSolutionApprove(approve); } else @@ -974,7 +1327,7 @@ namespace FineUIPro.Web.CQMS.Solution if (userIds.Contains(tn.NodeID)) { tn.Checked = true; - txtCopyMan.Text += tn.Text; + //txtCopyMan.Text += tn.Text; } } } @@ -988,8 +1341,8 @@ namespace FineUIPro.Web.CQMS.Solution rootNode.NodeID = "0"; rootNode.Expanded = true; rootNode.EnableCheckEvent = true; - trOne.Nodes.Add(rootNode); - trOne.EnableCheckBox = true; + //trOne.Nodes.Add(rootNode); + //trOne.EnableCheckBox = true; using (var db = new SGGLDB(Funs.ConnString)) { var userList = from x in db.Sys_User @@ -1039,8 +1392,8 @@ namespace FineUIPro.Web.CQMS.Solution rootNode.NodeID = "0"; rootNode.Expanded = true; rootNode.EnableCheckEvent = true; - trThree.Nodes.Add(rootNode); - trThree.EnableCheckBox = true; + //trThree.Nodes.Add(rootNode); + //trThree.EnableCheckBox = true; using (var db = new SGGLDB(Funs.ConnString)) { var userList = from x in db.Sys_User @@ -1070,8 +1423,8 @@ namespace FineUIPro.Web.CQMS.Solution rootNode.NodeID = "0"; rootNode.Expanded = true; rootNode.EnableCheckEvent = true; - trFive.Nodes.Add(rootNode); - trFive.EnableCheckBox = true; + //trFive.Nodes.Add(rootNode); + //trFive.EnableCheckBox = true; using (var db = new SGGLDB(Funs.ConnString)) { var userList = from x in db.Sys_User @@ -1101,10 +1454,10 @@ namespace FineUIPro.Web.CQMS.Solution protected void trOne_NodeCheck(object sender, TreeCheckEventArgs e) { - if (e.Checked) - trOne.CheckAllNodes(e.Node.Nodes); - else - trOne.UncheckAllNodes(e.Node.Nodes); + //if (e.Checked) + // trOne.CheckAllNodes(e.Node.Nodes); + //else + // trOne.UncheckAllNodes(e.Node.Nodes); } protected void trTwo_NodeCheck(object sender, TreeCheckEventArgs e) @@ -1121,10 +1474,10 @@ namespace FineUIPro.Web.CQMS.Solution protected void trThree_NodeCheck(object sender, TreeCheckEventArgs e) { - if (e.Checked) - trThree.CheckAllNodes(e.Node.Nodes); - else - trThree.UncheckAllNodes(e.Node.Nodes); + //if (e.Checked) + // trThree.CheckAllNodes(e.Node.Nodes); + //else + // trThree.UncheckAllNodes(e.Node.Nodes); } protected void trFour_NodeCheck(object sender, TreeCheckEventArgs e) @@ -1141,10 +1494,10 @@ namespace FineUIPro.Web.CQMS.Solution protected void trFive_NodeCheck(object sender, TreeCheckEventArgs e) { - if (e.Checked) - trFive.CheckAllNodes(e.Node.Nodes); - else - trFive.UncheckAllNodes(e.Node.Nodes); + //if (e.Checked) + // trFive.CheckAllNodes(e.Node.Nodes); + //else + // trFive.UncheckAllNodes(e.Node.Nodes); } protected void trSixe_NodeCheck(object sender, TreeCheckEventArgs e) @@ -1160,5 +1513,511 @@ namespace FineUIPro.Web.CQMS.Solution } #endregion + + #region 加载一级审核人员 + private void GetCheckManBindGrid1() + { + var tb = GetCheckManSource1(); + // 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount) + Grid1.RecordCount = tb.Rows.Count; + + // 2.获取当前分页数据 + var table = this.GetPagedDataTable(Grid1, tb); + + // 3.绑定到Grid + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 一级审核人员, 施工工程师和HSE工程师 + /// + /// + private DataTable GetCheckManSource1() + { + string sortField = Grid1.SortField; + string sortDirection = Grid1.SortDirection; + + var userList = (from x in Funs.DB.Sys_User + join y in Funs.DB.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in Funs.DB.Project_ProjectUser + on x.UserId equals p.UserId + where (p.RoleId.Contains(Const.ZBCNEngineer)|| p.RoleId.Contains(Const.HSSEEngineer)) + && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && + y.ProjectId == CurrUser.LoginProjectId + select x); + + DataTable table2 = LINQToDataTable(userList); + DataView view2 = table2.DefaultView; + view2.Sort = String.Format("{0} {1}", sortField, sortDirection); + + string searchKeyword = ttbSearch1.Text.Trim(); + if (!String.IsNullOrEmpty(searchKeyword) && ttbSearch1.ShowTrigger1) + { + view2.RowFilter = String.Format(" UserName LIKE '%{0}%'", searchKeyword); + } + + return view2.ToTable(); + } + + protected void ttbSearch_Trigger1Click1(object sender, EventArgs e) + { + ttbSearch1.ShowTrigger1 = true; + GetCheckManBindGrid1(); + } + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + GetCheckManBindGrid1(); + } + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + GetCheckManBindGrid1(); + } + protected void ttbSearch_Trigger2Click1(object sender, EventArgs e) + { + ttbSearch1.ShowTrigger1 = true; + GetCheckManBindGrid1(); + } + + #endregion + + #region 加载二级审批人员 + private void GetCheckManBindGrid2() + { + var tb = GetCheckManSource2(); + // 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount) + Grid2.RecordCount = tb.Rows.Count; + + // 2.获取当前分页数据 + var table = this.GetPagedDataTable(Grid2, tb); + + // 3.绑定到Grid + Grid2.DataSource = table; + Grid2.DataBind(); + } + + /// + /// 二级审批人员显示施工经理、HSE经理、质量经理 + /// + /// + private DataTable GetCheckManSource2() + { + string sortField = Grid2.SortField; + string sortDirection = Grid2.SortDirection; + + var userList = (from x in Funs.DB.Sys_User + join y in Funs.DB.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in Funs.DB.Project_ProjectUser + on x.UserId equals p.UserId + where (p.RoleId.Contains(Const.HSSEManager) || p.RoleId.Contains(Const.ConstructionManager) + || p.RoleId.Contains(Const.QAManager)) + && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && + y.ProjectId == CurrUser.LoginProjectId + orderby x.UserCode + select x); + + DataTable table2 = LINQToDataTable(userList); + DataView view2 = table2.DefaultView; + view2.Sort = String.Format("{0} {1}", sortField, sortDirection); + + string searchKeyword = ttbSearch1.Text.Trim(); + if (!String.IsNullOrEmpty(searchKeyword) && ttbSearch1.ShowTrigger1) + { + view2.RowFilter = String.Format(" UserName LIKE '%{0}%'", searchKeyword); + } + + return view2.ToTable(); + } + + protected void ttbSearch_Trigger1Click2(object sender, EventArgs e) + { + ttbSearch2.ShowTrigger1 = true; + GetCheckManBindGrid2(); + } + protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid2.PageIndex = e.NewPageIndex; + GetCheckManBindGrid2(); + } + protected void Grid2_Sort(object sender, GridSortEventArgs e) + { + Grid2.SortDirection = e.SortDirection; + Grid2.SortField = e.SortField; + GetCheckManBindGrid2(); + } + protected void ttbSearch_Trigger2Click2(object sender, EventArgs e) + { + ttbSearch2.ShowTrigger1 = true; + GetCheckManBindGrid2(); + } + #endregion + + #region 加载施工经理 不用 + //private void GetCheckManBindGrid3() + //{ + // var tb = GetCheckManSource3(); + // // 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount) + // Grid3.RecordCount = tb.Rows.Count; + + // // 2.获取当前分页数据 + // var table = this.GetPagedDataTable(Grid3, tb); + + // // 3.绑定到Grid + // Grid3.DataSource = table; + // Grid3.DataBind(); + //} + + //private DataTable GetCheckManSource3() + //{ + // string sortField = Grid3.SortField; + // string sortDirection = Grid3.SortDirection; + + // var userList = (from x in Funs.DB.Sys_User + // join y in Funs.DB.Project_ProjectUnit + // on x.UnitId equals y.UnitId + // join p in Funs.DB.Project_ProjectUser + // on x.UserId equals p.UserId + // where (p.RoleId.Contains(Const.ConstructionManager) || + // p.RoleId.Contains(Const.ConstructionAssistantManager)) + // && y.UnitType == Const.ProjectUnitType_1 && p.ProjectId == CurrUser.LoginProjectId && + // y.ProjectId == CurrUser.LoginProjectId + // orderby x.UserCode + // select x); + + // DataTable table2 = LINQToDataTable(userList); + // DataView view2 = table2.DefaultView; + // view2.Sort = String.Format("{0} {1}", sortField, sortDirection); + + // string searchKeyword = ttbSearch1.Text.Trim(); + // if (!String.IsNullOrEmpty(searchKeyword) && ttbSearch1.ShowTrigger1) + // { + // view2.RowFilter = String.Format(" UserName LIKE '%{0}%'", searchKeyword); + // } + + // return view2.ToTable(); + //} + + //protected void ttbSearch_Trigger1Click3(object sender, EventArgs e) + //{ + // ttbSearch3.ShowTrigger1 = true; + // GetCheckManBindGrid3(); + //} + //protected void Grid3_PageIndexChange(object sender, GridPageEventArgs e) + //{ + // Grid3.PageIndex = e.NewPageIndex; + // GetCheckManBindGrid3(); + //} + //protected void Grid3_Sort(object sender, GridSortEventArgs e) + //{ + // Grid3.SortDirection = e.SortDirection; + // Grid3.SortField = e.SortField; + // GetCheckManBindGrid3(); + //} + //protected void ttbSearch_Trigger2Click3(object sender, EventArgs e) + //{ + // ttbSearch3.ShowTrigger1 = true; + // GetCheckManBindGrid3(); + //} + #endregion + + #region 加载抄送人员 + private void GetCheckManBindGrid4() + { + var tb = GetCheckManSource4(); + // 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount) + Grid4.RecordCount = tb.Rows.Count; + + // 2.获取当前分页数据 + var table = this.GetPagedDataTable(Grid4, tb); + + // 3.绑定到Grid + Grid4.DataSource = table; + Grid4.DataBind(); + } + + private DataTable GetCheckManSource4() + { + string sortField = Grid4.SortField; + string sortDirection = Grid4.SortDirection; + + var userList = (from x in Funs.DB.Sys_User + join y in Funs.DB.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in Funs.DB.Project_ProjectUser + on x.UserId equals p.UserId + where p.ProjectId == CurrUser.LoginProjectId && + y.ProjectId == CurrUser.LoginProjectId + orderby x.UserCode + select x); + + DataTable table2 = LINQToDataTable(userList); + DataView view2 = table2.DefaultView; + view2.Sort = String.Format("{0} {1}", sortField, sortDirection); + + string searchKeyword = ttbSearch4.Text.Trim(); + if (!String.IsNullOrEmpty(searchKeyword) && ttbSearch4.ShowTrigger1) + { + view2.RowFilter = String.Format(" UserName LIKE '%{0}%'", searchKeyword); + } + + return view2.ToTable(); + } + + protected void ttbSearch_Trigger1Click4(object sender, EventArgs e) + { + ttbSearch4.ShowTrigger1 = true; + GetCheckManBindGrid4(); + } + protected void Grid4_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid4.PageIndex = e.NewPageIndex; + GetCheckManBindGrid4(); + } + protected void Grid4_Sort(object sender, GridSortEventArgs e) + { + Grid4.SortDirection = e.SortDirection; + Grid4.SortField = e.SortField; + GetCheckManBindGrid4(); + } + protected void ttbSearch_Trigger2Click4(object sender, EventArgs e) + { + ttbSearch4.ShowTrigger1 = true; + GetCheckManBindGrid4(); + } + #endregion + + #region linq结果转换datatable + /// + /// linq结果转换datatable + /// + /// + /// + /// + public DataTable LINQToDataTable(IEnumerable varlist) + + { + DataTable dtReturn = new DataTable(); + // column names + PropertyInfo[] oProps = null; + + + + if (varlist == null) return dtReturn; + + foreach (T rec in varlist) + { + // Use reflection to get property names, to create table, Only first time, others + if (oProps == null) + { + oProps = ((Type)rec.GetType()).GetProperties(); + foreach (PropertyInfo pi in oProps) + { + Type colType = pi.PropertyType; + + if ((colType.IsGenericType) && (colType.GetGenericTypeDefinition() + == typeof(Nullable<>))) + { + colType = colType.GetGenericArguments()[0]; + } + + dtReturn.Columns.Add(new DataColumn(pi.Name, colType)); + } + } + + DataRow dr = dtReturn.NewRow(); + + foreach (PropertyInfo pi in oProps) + { + dr[pi.Name] = pi.GetValue(rec, null) == null ? DBNull.Value : pi.GetValue + (rec, null); + } + + dtReturn.Rows.Add(dr); + } + return dtReturn; + } + #endregion + + #region 审批填写表格 + /// + /// 审批人保存第一次 + /// + private void OperateComplianceObligationsCSort() + { + BLL.ComplianceObligationsCService.DeleteSolution_CQMSConstructSolutionApprove_Item(ConstructSolutionId,CurrUser.UserId); + jerqueSaveComplianceObligationsCList(); + foreach (Model.Solution_CQMSConstructSolutionApprove_Item coc in complianceObligationsCs) + { + coc.ConstructSolutionId = ConstructSolutionId; + BLL.ComplianceObligationsCService.AddSolution_CQMSConstructSolutionApprove_Item(coc); + } + } + + /// + /// 填报人保存(修改) + /// + private void TbrOperateComplianceObligationsCSort() + { + jerqueSaveComplianceObligationsCListTbr(); + foreach (Model.Solution_CQMSConstructSolutionApprove_Item coc in complianceObligationsCs) + { + coc.ConstructSolutionId = ConstructSolutionId; + BLL.ComplianceObligationsCService.UpdateSolution_CQMSConstructSolutionApprove_Item(coc); + } + } + + /// + /// 审批人(修改) + /// + private void SprOperateComplianceObligationsCSort() + { + jerqueSaveComplianceObligationsCListSpr(); + foreach (Model.Solution_CQMSConstructSolutionApprove_Item coc in complianceObligationsCs) + { + coc.ConstructSolutionId = ConstructSolutionId; + BLL.ComplianceObligationsCService.UpdateSolution_CQMSConstructSolutionApprove_ItemNew(coc); + } + } + + protected void btnNew_Click(object sender, EventArgs e) + { + jerqueSaveComplianceObligationsCList(); + Model.Solution_CQMSConstructSolutionApprove_Item complianceObligationsC = new Model.Solution_CQMSConstructSolutionApprove_Item + { + Id = SQLHelper.GetNewID(typeof(Model.Solution_CQMSConstructSolutionApprove_Item)) + }; + complianceObligationsCs.Add(complianceObligationsC); + this.gvOperateComplianceObligations.DataSource = complianceObligationsCs; + this.gvOperateComplianceObligations.DataBind(); + } + + private void jerqueSaveComplianceObligationsCList() + { + complianceObligationsCs.Clear(); + JArray mergedData = gvOperateComplianceObligations.GetMergedData(); + foreach (JObject mergedRow in mergedData) + { + string status = mergedRow.Value("status"); + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + var hazardSort = new Model.Solution_CQMSConstructSolutionApprove_Item + { + Id = this.gvOperateComplianceObligations.Rows[i].DataKeys[0].ToString(), + SortId= i+1, + Chapter = values.Value("Chapter").ToString(), + Amendment = values.Value("Amendment").ToString(), + Proposer = CurrUser.UserId, + ProposerName= CurrUser.UserName, + Modification = values.Value("Modification").ToString(), + ReviewerOpinion = values.Value("ReviewerOpinion").ToString(), + IsAccept = values.Value("IsAccept").ToString(), + }; + complianceObligationsCs.Add(hazardSort); + } + } + + private void jerqueSaveComplianceObligationsCListTbr() + { + complianceObligationsCs.Clear(); + JArray mergedData = gvOperateComplianceObligations.GetMergedData(); + foreach (JObject mergedRow in mergedData) + { + string status = mergedRow.Value("status"); + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + var hazardSort = new Model.Solution_CQMSConstructSolutionApprove_Item + { + Id = this.gvOperateComplianceObligations.Rows[i].DataKeys[0].ToString(), + Modification = values.Value("Modification").ToString(), + + }; + complianceObligationsCs.Add(hazardSort); + } + } + + private void jerqueSaveComplianceObligationsCListSpr() + { + complianceObligationsCs.Clear(); + JArray mergedData = gvOperateComplianceObligations.GetMergedData(); + foreach (JObject mergedRow in mergedData) + { + string status = mergedRow.Value("status"); + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + var hazardSort = new Model.Solution_CQMSConstructSolutionApprove_Item + { + Id = this.gvOperateComplianceObligations.Rows[i].DataKeys[0].ToString(), + ReviewerOpinion= values.Value("ReviewerOpinion").ToString(), + IsAccept = values.Value("IsAccept").ToString(), + + }; + complianceObligationsCs.Add(hazardSort); + } + } + + protected void gvOperateComplianceObligations_RowCommand(object sender, GridCommandEventArgs e) + { + jerqueSaveComplianceObligationsCList(); + string rowID = this.gvOperateComplianceObligations.DataKeys[e.RowIndex][0].ToString(); + if (e.CommandName == "Delete") + { + foreach (var item in complianceObligationsCs) + { + if (item.Id == rowID) + { + complianceObligationsCs.Remove(item); + break; + } + } + gvOperateComplianceObligations.DataSource = complianceObligationsCs; + gvOperateComplianceObligations.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + + #endregion + + /// + /// 不同意的情况下显示 + /// + /// + /// + protected void radChange(object sender, EventArgs e) { + //不同意的情况下 + if (rblIsAgree.SelectedValue == "false") + { + if (isSendTrue) + { + + } + else { + //显示 + options.Hidden = false; + options1.Hidden = false; + //第一次 + gvOperateComplianceObligations.AllColumns[4].Hidden = true; + gvOperateComplianceObligations.AllColumns[5].Hidden = true; + gvOperateComplianceObligations.AllColumns[6].Hidden = true; + gvOperateComplianceObligations.AllColumns[7].Hidden = true; + } + + } + else { + if (isSendTrue) + { + + } + else { + //同意的情况下 + options.Hidden = true; + options1.Hidden = true; + } + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.designer.cs index 179c4546..61364cb6 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.designer.cs @@ -168,103 +168,85 @@ namespace FineUIPro.Web.CQMS.Solution protected global::FineUIPro.DatePicker txtCompileDate; /// - /// TabStrip1 控件。 + /// drpzyUserIds 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TabStrip TabStrip1; + protected global::FineUIPro.DropDownBox drpzyUserIds; /// - /// SimpleForm2 控件。 + /// Grid1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.SimpleForm SimpleForm2; + protected global::FineUIPro.Grid Grid1; /// - /// txtDocContent 控件。 + /// ttbSearch1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HtmlEditor txtDocContent; + protected global::FineUIPro.TwinTriggerBox ttbSearch1; /// - /// txtCopyMan 控件。 + /// drpaqUserIds 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtCopyMan; + protected global::FineUIPro.DropDownBox drpaqUserIds; /// - /// Panel2 控件。 + /// Grid2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Panel Panel2; + protected global::FineUIPro.Grid Grid2; /// - /// Panel1 控件。 + /// ttbSearch2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Panel Panel1; + protected global::FineUIPro.TwinTriggerBox ttbSearch2; /// - /// trOne 控件。 + /// drpCsUsers 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Tree trOne; + protected global::FineUIPro.DropDownBox drpCsUsers; /// - /// Panel4 控件。 + /// Grid4 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Panel Panel4; + protected global::FineUIPro.Grid Grid4; /// - /// trThree 控件。 + /// ttbSearch4 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Tree trThree; - - /// - /// Panel6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Panel Panel6; - - /// - /// trFive 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tree trFive; + protected global::FineUIPro.TwinTriggerBox ttbSearch4; /// /// agree 控件。 @@ -294,13 +276,76 @@ namespace FineUIPro.Web.CQMS.Solution protected global::FineUIPro.FormRow options; /// - /// txtOptions 控件。 + /// btnNew 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextArea txtOptions; + protected global::FineUIPro.Button btnNew; + + /// + /// options1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options1; + + /// + /// gvOperateComplianceObligations 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvOperateComplianceObligations; + + /// + /// TextBox7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox TextBox7; + + /// + /// TextBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox TextBox1; + + /// + /// TextBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox TextBox2; + + /// + /// TextBox3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox TextBox3; + + /// + /// drpIsAccept 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIsAccept; /// /// optio 控件。 @@ -320,6 +365,33 @@ namespace FineUIPro.Web.CQMS.Solution /// protected global::FineUIPro.Button btnapprove; + /// + /// TabStrip1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip TabStrip1; + + /// + /// SimpleForm2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.SimpleForm SimpleForm2; + + /// + /// txtDocContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtDocContent; + /// /// plApprove2 控件。 /// diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 758095f5..cb3c8ed0 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -2161,6 +2161,8 @@ + + @@ -2181,6 +2183,8 @@ + + @@ -18592,6 +18596,18 @@ AccidentCauseReportSave.aspx + + ActionWorkLedger.aspx + + + ActionWorkLedger.aspx + + + ActionWorkLedgerAdd.aspx + + + ActionWorkLedgerAdd.aspx + AnalyseHiddenDanger.aspx ASPXCodeBehind @@ -18732,6 +18748,20 @@ SafetyBriefingEdit.aspx + + SafetyProductionEvaluation.aspx + ASPXCodeBehind + + + SafetyProductionEvaluation.aspx + + + SafetyProductionEvaluationAdd.aspx + ASPXCodeBehind + + + SafetyProductionEvaluationAdd.aspx + SafetyQuarterlyReport.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx index c10017ff..96f63939 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx @@ -103,18 +103,16 @@ + FieldType="String" HeaderText="跟踪人" HeaderTextAlign="Center" TextAlign="Left" > + FieldType="String" HeaderText="责任人" HeaderTextAlign="Center" TextAlign="Left"> - - + <%-- diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.cs index f9435c0a..c5a25cf2 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.cs @@ -221,7 +221,18 @@ namespace FineUIPro.Web.PZHGL.GJSX return; } string Id = Grid1.SelectedRowID; - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("GJSXListEdit.aspx?EditType=Edit&Id={0}", Id, "编辑 - "))); + var gjsx = BLL.GJSXService.GetGJSXById(Id); + //必须是责任人、提出人、跟踪人才能修改 + if (gjsx.User_Acceptance.Contains(this.CurrUser.UserId) + || gjsx.UserID.Contains(this.CurrUser.UserId) || + gjsx.User_ReceiveID.Contains(this.CurrUser.UserId)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("GJSXListEdit.aspx?EditType=Edit&Id={0}", Id, "编辑 - "))); + } + else { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("GJSXListEdit.aspx?EditType=See&Id={0}", Id),"查看 - ")); + } + } #region 判断是否可删除 diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXListEdit.aspx b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXListEdit.aspx index 26d6919a..3bbc5a23 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXListEdit.aspx +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXListEdit.aspx @@ -7,6 +7,9 @@ 编辑员工 <%-- --%> +
@@ -49,18 +52,52 @@ - + - - + + + + + + + + + - + <%-- @@ -68,17 +105,17 @@ - <%-- - --%> + - + --%> @@ -92,24 +129,36 @@ - + - + <%-- - + --%> + + + + + + + +
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("安全生产治本攻坚三年行动工作台账" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.designer.cs new file mode 100644 index 00000000..76d23bcb --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.designer.cs @@ -0,0 +1,276 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class ActionWorkLedger { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpQuarter; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtUnitName; + + /// + /// txtQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtQuarter; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileDate; + + /// + /// lbHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx new file mode 100644 index 00000000..2e0c1ddb --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx @@ -0,0 +1,108 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionWorkLedgerAdd.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ActionWorkLedgerAdd" %> + + + + + + + 编辑安全生产治本攻坚三年行动工作台账 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.cs new file mode 100644 index 00000000..ecddad4c --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.cs @@ -0,0 +1,534 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class ActionWorkLedgerAdd : PageBase + { + #region 定义变量 + public string ActionWorkLedgerId + { + get + { + return (string)ViewState["ActionWorkLedgerId"]; + } + set + { + ViewState["ActionWorkLedgerId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + items.Clear(); + this.ddlUnitId.DataTextField = "UnitName"; + this.ddlUnitId.DataValueField = "UnitId"; + this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + this.ddlUnitId.DataBind(); + + this.ddlYearId.DataTextField = "ConstText"; + ddlYearId.DataValueField = "ConstValue"; + ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + ddlYearId.DataBind(); + + this.ddlQuarter.DataTextField = "ConstText"; + ddlQuarter.DataValueField = "ConstValue"; + ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011); + ddlQuarter.DataBind(); + this.ddlUnitId.Readonly = true; + string unitId = Request.Params["UnitId"]; + string year = Request.QueryString["Year"]; + string quarter = Request.QueryString["Quarter"]; + this.ActionWorkLedgerId = Request.Params["ActionWorkLedgerId"]; + if (!string.IsNullOrEmpty(this.ActionWorkLedgerId)) + { + items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(this.ActionWorkLedgerId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + + var ActionWorkLedger = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId); + if (ActionWorkLedger != null) + { + this.btnCopy.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + if (ActionWorkLedger.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (ActionWorkLedger.HandleMan == this.CurrUser.UserId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (ActionWorkLedger.UpState == BLL.Const.UpState_3) //已上报 + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + if (!string.IsNullOrEmpty(ActionWorkLedger.UnitId)) + { + this.ddlUnitId.SelectedValue = ActionWorkLedger.UnitId; + } + if (ActionWorkLedger.YearId.HasValue) + { + this.ddlYearId.SelectedValue = ActionWorkLedger.YearId.ToString(); + } + if (ActionWorkLedger.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = ActionWorkLedger.Quarter.ToString(); + } + if (ActionWorkLedger.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", ActionWorkLedger.ReportDate); + } + } + } + else + { + //this.btnCopy.Hidden = false; + this.ddlUnitId.SelectedValue = unitId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.ddlYearId.SelectedValue = year; + this.ddlQuarter.SelectedValue = quarter; + ////获取项目报告集合 + //List projectItems = (from x in Funs.DB.InformationProject_ActionWorkLedger + // join y in Funs.DB.InformationProject_ActionWorkLedgerItem + // on x.ActionWorkLedgerId equals y.ActionWorkLedgerId + // where x.YearId.ToString() == year && x.Quarter.ToString() == quarter && x.States == BLL.Const.State_2 + // select y).Distinct().ToList(); + //if (projectItems.Count > 0) + //{ + // int i = 0; + // foreach (var projectItem in projectItems) + // { + // i += 10; + // Model.Information_ActionWorkLedgerItem item = new Model.Information_ActionWorkLedgerItem + // { + // ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)), + // SortIndex = i + // }; + // Model.Base_Project project = (from x in Funs.DB.Base_Project + // join y in Funs.DB.InformationProject_ActionWorkLedger + // on x.ProjectId equals y.ProjectId + // join z in Funs.DB.InformationProject_ActionWorkLedgerItem + // on y.ActionWorkLedgerId equals z.ActionWorkLedgerId + // where z.ActionWorkLedgerItemId == projectItem.ActionWorkLedgerItemId + // select x).FirstOrDefault(); + // if (project != null) + // { + // item.IndustryType = project.ProjectName; + // } + // item.TotalConductCount = projectItem.TotalConductCount; + // item.TotalPeopleCount = projectItem.TotalPeopleCount; + // item.TotalInvestment = projectItem.TotalInvestment; + // item.HQConductCount = projectItem.HQConductCount; + // item.HQPeopleCount = projectItem.HQPeopleCount; + // item.HQInvestment = projectItem.HQInvestment; + // item.BasicConductCount = projectItem.BasicConductCount; + // item.BasicPeopleCount = projectItem.BasicPeopleCount; + // item.BasicInvestment = projectItem.BasicInvestment; + // item.ComprehensivePractice = projectItem.ComprehensivePractice; + // item.CPScene = projectItem.CPScene; + // item.CPDesktop = projectItem.CPDesktop; + // item.SpecialDrill = projectItem.SpecialDrill; + // item.SDScene = projectItem.SDScene; + // item.SDDesktop = projectItem.SDDesktop; + // items.Add(item); + // } + //} + //else + //{ + // for (int i = 0; i < 100; i++) + // { + // i += 10; + // Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem + // { + // ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)), + // SortIndex = i + // }; + // items.Add(newItem); + // } + //} + Grid1.DataSource = items; + Grid1.DataBind(); + + + } + } + } + + #endregion + + #region 保存、提交、上报 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + /// + /// 上报按钮 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + + /// + /// 保存数据 + /// + /// + private void Save(string type) + { + if (this.ddlUnitId.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择单位!", MessageBoxIcon.Warning); + return; + } + var drill = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdDate(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue), this.ActionWorkLedgerId); + if (drill != null) + { + ShowNotify("本单位本季度报表已存在,不能重复编制", MessageBoxIcon.Warning); + return; + } + + var ActionWorkLedger = new Model.Information_ActionWorkLedger(); + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + ActionWorkLedger.UnitId = this.ddlUnitId.SelectedValue; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text.Trim())) + { + ActionWorkLedger.ReportDate = Convert.ToDateTime(this.dpkCompileDate.Text.Trim()); + } + ActionWorkLedger.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + ActionWorkLedger.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + if (string.IsNullOrEmpty(this.ActionWorkLedgerId)) + { + this.ActionWorkLedgerId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedger)); ActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId; + ActionWorkLedger.CompileMan = this.CurrUser.UserName; + ActionWorkLedger.UpState = BLL.Const.UpState_2; + ActionWorkLedger.HandleMan = this.CurrUser.UserId; + ActionWorkLedger.HandleState = BLL.Const.HandleState_1; + BLL.ActionWorkLedgerService.AddActionWorkLedger(ActionWorkLedger); + BLL.LogService.AddSys_Log(this.CurrUser, ActionWorkLedger.YearId.ToString() + "-" + ActionWorkLedger.Quarter.ToString(), + ActionWorkLedger.ActionWorkLedgerId, BLL.Const.ActionWorkLedgerMenuId, BLL.Const.BtnAdd); + } + else + { + Model.Information_ActionWorkLedger oldReport = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId); + if (oldReport != null) + { + ActionWorkLedger.HandleMan = oldReport.HandleMan; + ActionWorkLedger.HandleState = oldReport.HandleState; + } + ActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId; + ActionWorkLedger.UpState = BLL.Const.UpState_2; + BLL.ActionWorkLedgerService.UpdateActionWorkLedger(ActionWorkLedger); + BLL.LogService.AddSys_Log(this.CurrUser, ActionWorkLedger.YearId.ToString() + "-" + ActionWorkLedger.Quarter.ToString(), + ActionWorkLedger.ActionWorkLedgerId, BLL.Const.ActionWorkLedgerMenuId, BLL.Const.BtnModify); + BLL.ActionWorkLedgerItemService.DeleteActionWorkLedgerItemList(ActionWorkLedger.ActionWorkLedgerId); + } + GetItems(ActionWorkLedger.ActionWorkLedgerId); + foreach (var item in items) + { + BLL.ActionWorkLedgerItemService.AddActionWorkLedgerItem(item); + } + if (type == "updata") //保存并上报 + { + if (ActionWorkLedger.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpActionWorkLedger(ActionWorkLedger.ActionWorkLedgerId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=ActionWorkLedger&Id={0}", ActionWorkLedger.ActionWorkLedgerId, "编辑 - "))); + } + else + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + /// + /// 获取明细值 + /// + /// + private void GetItems(string ActionWorkLedgerId) + { + items.Clear(); + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + Model.Information_ActionWorkLedgerItem item = new Model.Information_ActionWorkLedgerItem(); + if (values["ActionWorkLedgerItemId"].ToString() != "") + { + item.ActionWorkLedgerItemId = values.Value("ActionWorkLedgerItemId"); + } + item.ActionWorkLedgerId = ActionWorkLedgerId; + item.SortIndex = Funs.GetNewInt(values.Value("SortIndex")); + if (values["Focus"].ToString() != "") + { + item.Focus = values.Value("Focus"); + } + if (values["SpecialTask"].ToString() != "") + { + item.SpecialTask = values.Value("SpecialTask"); + } + if (values["WorkPoints"].ToString() != "") + { + item.WorkPoints = values.Value("WorkPoints"); + } + if (values["FillingRequirements"].ToString() != "") + { + item.FillingRequirements = values.Value("FillingRequirements"); + } + if (values["CompletionDeadline"].ToString() != "") + { + item.CompletionDeadline = values.Value("CompletionDeadline"); + } + if (values["ImplementationStatus"].ToString() != "") + { + item.ImplementationStatus = values.Value("ImplementationStatus"); + } + items.Add(item); + } + } + #endregion + + #region 关闭办理流程窗口 + /// + /// 关闭办理流程窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId); + if (report.HandleMan == this.CurrUser.UserId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + #endregion + + #region Grid行事件 + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + GetItems(string.Empty); + if (e.CommandName == "Add") + { + Model.Information_ActionWorkLedgerItem oldItem = items.FirstOrDefault(x => x.ActionWorkLedgerItemId == rowID); + Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem + { + ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)) + }; + if (oldItem != null) + { + newItem.SortIndex = oldItem.SortIndex + 1; + } + else + { + newItem.SortIndex = 0; + } + items.Add(newItem); + items = items.OrderBy(x => x.SortIndex).ToList(); + Grid1.DataSource = items; + Grid1.DataBind(); + } + if (e.CommandName == "Delete") + { + if (Grid1.Rows.Count == 1) + { + ShowNotify("只有一条数据,无法删除", MessageBoxIcon.Warning); + return; + } + foreach (var item in items) + { + if (item.ActionWorkLedgerItemId == rowID) + { + items.Remove(item); + break; + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ActionWorkLedgerMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnCopy.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + + //} + if (buttonList.Contains(BLL.Const.BtnSubmit)) + { + this.btnSubmit.Hidden = false; + } + } + } + #endregion + + #region 复制上个季度数据 + /// + /// 复制上个季度的数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + int lastYear = 0, lastQuarter = 0; + int year = Convert.ToInt32(this.ddlYearId.SelectedValue); + int quarter = Convert.ToInt32(this.ddlQuarter.SelectedValue); + if (quarter == 1) + { + lastYear = year - 1; + lastQuarter = 4; + } + else + { + lastYear = year; + lastQuarter = quarter - 1; + } + Model.Information_ActionWorkLedger ActionWorkLedger = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(this.ddlUnitId.SelectedValue, lastYear, lastQuarter); + if (ActionWorkLedger != null) + { + Model.Information_ActionWorkLedger newActionWorkLedger = new Model.Information_ActionWorkLedger(); + this.ActionWorkLedgerId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedger)); + newActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId; + newActionWorkLedger.UnitId = this.ddlUnitId.SelectedValue; + newActionWorkLedger.ReportDate = DateTime.Now; + newActionWorkLedger.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + newActionWorkLedger.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + newActionWorkLedger.CompileMan = this.CurrUser.UserName; + newActionWorkLedger.UpState = BLL.Const.UpState_2; + newActionWorkLedger.HandleState = BLL.Const.HandleState_1; + newActionWorkLedger.HandleMan = this.CurrUser.UserId; + BLL.ActionWorkLedgerService.AddActionWorkLedger(newActionWorkLedger); + + items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(ActionWorkLedger.ActionWorkLedgerId); + if (items.Count > 0) + { + foreach (var item in items) + { + Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem + { + ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)), + ActionWorkLedgerId = this.ActionWorkLedgerId, + SortIndex = item.SortIndex + }; + BLL.ActionWorkLedgerItemService.AddActionWorkLedgerItem(newItem); + } + } + GetValues(newActionWorkLedger.ActionWorkLedgerId); + } + + } + + /// + /// 获取数据 + /// + private void GetValues(string ActionWorkLedgerId) + { + var report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(ActionWorkLedgerId); + if (report != null) + { + if (!string.IsNullOrEmpty(report.UnitId)) + { + this.ddlUnitId.SelectedValue = report.UnitId; + } + if (report.YearId.HasValue) + { + this.ddlYearId.SelectedValue = report.YearId.ToString(); + } + if (report.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = report.Quarter.ToString(); + } + if (report.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(ActionWorkLedgerId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs new file mode 100644 index 00000000..ffe225da --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class ActionWorkLedgerAdd { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// ddlYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlYearId; + + /// + /// ddlQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlQuarter; + + /// + /// dpkCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtImplementationStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtImplementationStatus; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs index c4559a86..873881e6 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs @@ -59,7 +59,7 @@ namespace FineUIPro.Web.ZHGL.Information ///
private void BindGrid() { - string unitId = BLL.Const.UnitId_CWCEC; + string unitId = Const.UnitId_CWCEC; string strSql = @"SELECT UserId,UserName,UserCode,role.RoleName" + @" FROM Sys_User AS users" @@ -205,6 +205,34 @@ namespace FineUIPro.Web.ZHGL.Information //} #endregion + #region 中央企业安全生产治本攻坚三年行动工作台账 + if (Type == "ActionWorkLedger")//中央企业安全生产治本攻坚三年行动工作台账 + { + var report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(Id); + if (report != null) + { + SetFlowData(Const.ActionWorkLedgerMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.ActionWorkLedgerService.UpdateActionWorkLedger(report); + } + } + #endregion + + #region 中央企业安全生产管理评价工作调度台账 + if (Type == "SafetyProductionEvaluation")//中央企业安全生产管理评价工作调度台账 + { + var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(Id); + if (report != null) + { + SetFlowData(Const.SafetyProductionEvaluationMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.SafetyProductionEvaluationService.UpdateSafetyProductionEvaluation(report); + } + } + #endregion + ShowNotify("提交成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx new file mode 100644 index 00000000..a1af3485 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx @@ -0,0 +1,163 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyProductionEvaluation.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.SafetyProductionEvaluation" %> + + + + + + + 安全生产管理评价工作调度台账 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs new file mode 100644 index 00000000..4f20906e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs @@ -0,0 +1,619 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class SafetyProductionEvaluation : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string SafetyProductionEvaluationId + { + get + { + return (string)ViewState["SafetyProductionEvaluationId"]; + } + set + { + ViewState["SafetyProductionEvaluationId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List SafetyProductionEvaluationItems = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BLL.ConstValue.InitConstValueDropDownList(this.drpQuarter, ConstValue.Group_0011, false); + BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false); + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + DateTime showDate = System.DateTime.Now.AddMonths(-3); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + this.drpYear.SelectedValue = showDate.Year.ToString(); + GetValue(); + } + } + #endregion + + #region 清空文本框 + private void SetEmpty() + { + this.SimpleForm1.Title = string.Empty; + txtUnitName.Text = string.Empty; + txtQuarter.Text = string.Empty; + txtCompileDate.Text = string.Empty; + this.lbHandleMan.Text = string.Empty; + Grid1.DataSource = null; + Grid1.DataBind(); + } + #endregion + + #region 获取记录值 + private void GetValue() + { + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(drpQuarter.SelectedValue); + this.SafetyProductionEvaluationId = string.Empty; + Model.View_Information_SafetyProductionEvaluation report = Funs.DB.View_Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarter == quarter && e.YearId == year); + if (report != null) + { + string state = string.Empty; + if (report.UpState == BLL.Const.UpState_3) + { + state = "(已上报)"; + } + else + { + if (report.HandleState == BLL.Const.HandleState_1) + { + state = "(待提交)"; + } + else if (report.HandleState == BLL.Const.HandleState_2) + { + state = "(待审核)"; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + state = "(待审批)"; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + state = "(待上报)"; + } + } + this.SimpleForm1.Title = "中央企业安全生产管理评价工作调度台账" + state; + this.SafetyProductionEvaluationId = report.SafetyProductionEvaluationId; + txtUnitName.Text = "单位:" + report.UnitName; + txtQuarter.Text = "季度:" + report.Quarters; + if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3) + { + this.lbHandleMan.Hidden = true; + } + else + { + this.lbHandleMan.Hidden = false; + this.lbHandleMan.Text = "下一步办理人:" + report.UserName; + } + if (report.ReportDate != null) + { + txtCompileDate.Text = "制表时间:" + string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + BindGrid1(); + } + else + { + SetEmpty(); + } + this.GetButtonPower(); + } + #endregion + + #region 加载Grid + private void BindGrid1() + { + string strSql = "select * from dbo.Information_SafetyProductionEvaluationItem where SafetyProductionEvaluationId = @SafetyProductionEvaluationId order by SortIndex"; + SqlParameter[] parameter = new SqlParameter[] + { + new SqlParameter("@SafetyProductionEvaluationId",this.SafetyProductionEvaluationId), + }; + 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 增加、修改、删除、审核、审批、上报按钮事件 + /// + /// Tree增加按钮 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyProductionEvaluationAdd.aspx?UnitId={0}&&Year={1}&&Quarter={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarter.SelectedValue, "编辑 - "))); + } + + /// + /// 显示编辑页面 + /// + private void ShowEdit() + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report == null) + { + Alert.ShowInTop("所选时间无报表记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyProductionEvaluationAdd.aspx?SafetyProductionEvaluationId={0}", report.SafetyProductionEvaluationId, "编辑 - "))); + } + + /// + /// Tree编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审核 + /// + /// + /// + protected void btnAudit1_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审批 + /// + /// + /// + protected void btnAudit2_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 上报 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// Tree删除按钮 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString() + "-" + report.Quarter.ToString(), + report.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnDelete); + BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.SafetyProductionEvaluationId); + BLL.SafetyProductionEvaluationItemService.DeleteSafetyProductionEvaluationItemList(report.SafetyProductionEvaluationId); + BLL.SafetyProductionEvaluationService.DeleteSafetyProductionEvaluationById(report.SafetyProductionEvaluationId); + + SetEmpty(); + //this.btnNew.Hidden = false; + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 过滤、分页、排序、关闭窗口 + /// + /// 表头过滤 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid1(); + } + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid1(); + } + + /// + /// Grid1排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid1(); + } + + /// + /// 分页列表显示条数下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + } + + /// + /// 关闭Grid1弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SafetyProductionEvaluationMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + this.btnGet.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnPrint)) + //{ + // this.btnPrint.Hidden = false; + //} + int year = Funs.GetNewIntOrZero(this.drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue); + var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, year, quarter); + this.btnAudit1.Hidden = true; + this.btnAudit2.Hidden = true; + this.btnUpdata.Hidden = true; + if (report != null) + { + this.btnNew.Hidden = true; + if (report.HandleMan == this.CurrUser.UserId) //当前人是下一步办理入 + { + if (report.HandleState == BLL.Const.HandleState_2) + { + this.btnAudit1.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + this.btnAudit2.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + this.btnDelete.Hidden = true; + this.btnUpdata.Hidden = false; + } + } + if (report.UpState == BLL.Const.UpState_3) + { + this.btnUpdata.Hidden = true; + this.btnEdit.Hidden = true; + this.btnDelete.Hidden = true; + } + if (report.HandleMan == this.CurrUser.UserId || report.CompileMan == this.CurrUser.UserName) + { + this.btnEdit.Hidden = false; + } + else + { + this.btnEdit.Hidden = true; + } + } + } + + if (this.CurrUser.UserId == BLL.Const.sysglyId) + { + this.btnDelete.Hidden = false; + } + } + #endregion + + #region 单位下拉框联动事件 + /// + /// 单位下拉框联动事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + GetValue(); + } + #endregion + + #region 获取 + /// + /// 获取按钮 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report == null) + { + var returnValue = getSafetyProductionEvaluationToSUB(); + if (returnValue.code == 1) + { + ShowNotify(returnValue.message, MessageBoxIcon.Success); + GetValue(); + } + else + { + Alert.ShowInTop(returnValue.message, MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("该季度记录已存在,无需获取!", MessageBoxIcon.Warning); + } + } + + /// + /// 获取 + /// + /// + /// + public Model.ResponeData getSafetyProductionEvaluationToSUB() + { + var responeData = new Model.ResponeData(); + try + { + string unitId = CommonService.GetThisUnitId(); + string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getSafetyProductionEvaluation?year=" + this.drpYear.SelectedValue + "&quarter=" + this.drpQuarter.SelectedValue; + string contenttype = "application/json;charset=unicode"; + Hashtable newToken = new Hashtable + { + { "token", ServerService.GetToken().Token } + }; + + var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null); + if (!string.IsNullOrEmpty(strJosn)) + { + JObject obj = JObject.Parse(strJosn); + responeData.code = Funs.GetNewIntOrZero(obj["code"].ToString()); + responeData.message = obj["message"].ToString(); + if (responeData.code == 1) + { + JArray getData = JArray.Parse(obj["data"].ToString()); + if (getData.Count() > 0) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + int i = 0; + string SafetyProductionEvaluationId = SQLHelper.GetNewID(); + foreach (var item in getData) + { + if (i == 0) + { + Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation(); + SafetyProductionEvaluation.SafetyProductionEvaluationId = SafetyProductionEvaluationId; + SafetyProductionEvaluation.UnitId = BLL.CommonService.GetThisUnitId(); + SafetyProductionEvaluation.ReportDate = DateTime.Now; + SafetyProductionEvaluation.Quarter = Funs.GetNewInt(this.drpQuarter.SelectedValue); + SafetyProductionEvaluation.YearId = Funs.GetNewInt(this.drpYear.SelectedValue); + SafetyProductionEvaluation.CompileMan = this.CurrUser.UserName; + SafetyProductionEvaluation.UpState = BLL.Const.UpState_2; + SafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1; + SafetyProductionEvaluation.HandleMan = this.CurrUser.UserId; + BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(SafetyProductionEvaluation); + } + Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem(); + newItem.SafetyProductionEvaluationItemId = SQLHelper.GetNewID(); + newItem.SafetyProductionEvaluationId = SafetyProductionEvaluationId; + newItem.SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()); + newItem.Type = item["Type"].ToString(); + newItem.EvaluateWork = item["EvaluateWork"].ToString(); + newItem.EvaluationContent = item["EvaluationContent"].ToString(); + newItem.FillingRequirements = item["FillingRequirements"].ToString(); + newItem.CompletionDeadline = item["CompletionDeadline"].ToString(); + BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(newItem); + i++; + } + } + responeData.message = "获取成功!"; + } + else + { + responeData.code = 0; + responeData.message = "集团记录尚未生成!"; + } + } + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = "获取失败:" + ex.Message; + ErrLogInfo.WriteLog("中央企业安全生产管理评价工作调度台账获取!", ex); + } + + return responeData; + } + #endregion + + #region 关闭导入弹出窗口 + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭查看审批信息弹出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + //Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + //if (report != null) + //{ + // PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_SafetyProductionEvaluationId, report.SafetyProductionEvaluationId, "", "打印 - "))); + //} + } + #endregion + + #region 季度向前/向后 + /// + /// 前一季度 + /// + /// + /// + protected void BtnBulletLeft_Click(object sender, EventArgs e) + { + SetMonthChange("-"); + } + + /// + /// 后一季度 + /// + /// + /// + protected void BulletRight_Click(object sender, EventArgs e) + { + SetMonthChange("+"); + } + + /// + /// 季度加减变化 + /// + /// + private void SetMonthChange(string type) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue) * 3).ToString()); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + if (type == "+") + { + showDate = nowDate.Value.AddMonths(3); + } + else + { + showDate = nowDate.Value.AddMonths(-3); + } + + this.drpYear.SelectedValue = showDate.Year.ToString(); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + ///值变化 + GetValue(); + } + } + #endregion + + #region 查看审批信息 + /// + /// 查看审批信息 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.SafetyProductionEvaluationId, "查看 - "))); + } + else + { + ShowNotify("所选月份无记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("中央企业安全生产管理评价工作调度台账" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.designer.cs new file mode 100644 index 00000000..f11c0aea --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.designer.cs @@ -0,0 +1,276 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class SafetyProductionEvaluation { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpQuarter; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtUnitName; + + /// + /// txtQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtQuarter; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileDate; + + /// + /// lbHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx new file mode 100644 index 00000000..54865c79 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx @@ -0,0 +1,112 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyProductionEvaluationAdd.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.SafetyProductionEvaluationAdd" %> + + + + + + + 编辑安全生产管理评价工作调度台账 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.cs new file mode 100644 index 00000000..c208aa87 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.cs @@ -0,0 +1,534 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class SafetyProductionEvaluationAdd : PageBase + { + #region 定义变量 + public string SafetyProductionEvaluationId + { + get + { + return (string)ViewState["SafetyProductionEvaluationId"]; + } + set + { + ViewState["SafetyProductionEvaluationId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + items.Clear(); + this.ddlUnitId.DataTextField = "UnitName"; + this.ddlUnitId.DataValueField = "UnitId"; + this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + this.ddlUnitId.DataBind(); + + this.ddlYearId.DataTextField = "ConstText"; + ddlYearId.DataValueField = "ConstValue"; + ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + ddlYearId.DataBind(); + + this.ddlQuarter.DataTextField = "ConstText"; + ddlQuarter.DataValueField = "ConstValue"; + ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011); + ddlQuarter.DataBind(); + this.ddlUnitId.Readonly = true; + string unitId = Request.Params["UnitId"]; + string year = Request.QueryString["Year"]; + string quarter = Request.QueryString["Quarter"]; + this.SafetyProductionEvaluationId = Request.Params["SafetyProductionEvaluationId"]; + if (!string.IsNullOrEmpty(this.SafetyProductionEvaluationId)) + { + items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(this.SafetyProductionEvaluationId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + + var SafetyProductionEvaluation = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId); + if (SafetyProductionEvaluation != null) + { + this.btnCopy.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + if (SafetyProductionEvaluation.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (SafetyProductionEvaluation.HandleMan == this.CurrUser.UserId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (SafetyProductionEvaluation.UpState == BLL.Const.UpState_3) //已上报 + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + if (!string.IsNullOrEmpty(SafetyProductionEvaluation.UnitId)) + { + this.ddlUnitId.SelectedValue = SafetyProductionEvaluation.UnitId; + } + if (SafetyProductionEvaluation.YearId.HasValue) + { + this.ddlYearId.SelectedValue = SafetyProductionEvaluation.YearId.ToString(); + } + if (SafetyProductionEvaluation.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = SafetyProductionEvaluation.Quarter.ToString(); + } + if (SafetyProductionEvaluation.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", SafetyProductionEvaluation.ReportDate); + } + } + } + else + { + //this.btnCopy.Hidden = false; + this.ddlUnitId.SelectedValue = unitId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.ddlYearId.SelectedValue = year; + this.ddlQuarter.SelectedValue = quarter; + ////获取项目报告集合 + //List projectItems = (from x in Funs.DB.InformationProject_SafetyProductionEvaluation + // join y in Funs.DB.InformationProject_SafetyProductionEvaluationItem + // on x.SafetyProductionEvaluationId equals y.SafetyProductionEvaluationId + // where x.YearId.ToString() == year && x.Quarter.ToString() == quarter && x.States == BLL.Const.State_2 + // select y).Distinct().ToList(); + //if (projectItems.Count > 0) + //{ + // int i = 0; + // foreach (var projectItem in projectItems) + // { + // i += 10; + // Model.Information_SafetyProductionEvaluationItem item = new Model.Information_SafetyProductionEvaluationItem + // { + // SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)), + // SortIndex = i + // }; + // Model.Base_Project project = (from x in Funs.DB.Base_Project + // join y in Funs.DB.InformationProject_SafetyProductionEvaluation + // on x.ProjectId equals y.ProjectId + // join z in Funs.DB.InformationProject_SafetyProductionEvaluationItem + // on y.SafetyProductionEvaluationId equals z.SafetyProductionEvaluationId + // where z.SafetyProductionEvaluationItemId == projectItem.SafetyProductionEvaluationItemId + // select x).FirstOrDefault(); + // if (project != null) + // { + // item.IndustryType = project.ProjectName; + // } + // item.TotalConductCount = projectItem.TotalConductCount; + // item.TotalPeopleCount = projectItem.TotalPeopleCount; + // item.TotalInvestment = projectItem.TotalInvestment; + // item.HQConductCount = projectItem.HQConductCount; + // item.HQPeopleCount = projectItem.HQPeopleCount; + // item.HQInvestment = projectItem.HQInvestment; + // item.BasicConductCount = projectItem.BasicConductCount; + // item.BasicPeopleCount = projectItem.BasicPeopleCount; + // item.BasicInvestment = projectItem.BasicInvestment; + // item.ComprehensivePractice = projectItem.ComprehensivePractice; + // item.CPScene = projectItem.CPScene; + // item.CPDesktop = projectItem.CPDesktop; + // item.SpecialDrill = projectItem.SpecialDrill; + // item.SDScene = projectItem.SDScene; + // item.SDDesktop = projectItem.SDDesktop; + // items.Add(item); + // } + //} + //else + //{ + // for (int i = 0; i < 100; i++) + // { + // i += 10; + // Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem + // { + // SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)), + // SortIndex = i + // }; + // items.Add(newItem); + // } + //} + Grid1.DataSource = items; + Grid1.DataBind(); + + + } + } + } + + #endregion + + #region 保存、提交、上报 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + /// + /// 上报按钮 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + + /// + /// 保存数据 + /// + /// + private void Save(string type) + { + if (this.ddlUnitId.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择单位!", MessageBoxIcon.Warning); + return; + } + var drill = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdDate(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue), this.SafetyProductionEvaluationId); + if (drill != null) + { + ShowNotify("本单位本季度报表已存在,不能重复编制", MessageBoxIcon.Warning); + return; + } + + var SafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation(); + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + SafetyProductionEvaluation.UnitId = this.ddlUnitId.SelectedValue; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text.Trim())) + { + SafetyProductionEvaluation.ReportDate = Convert.ToDateTime(this.dpkCompileDate.Text.Trim()); + } + SafetyProductionEvaluation.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + SafetyProductionEvaluation.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + if (string.IsNullOrEmpty(this.SafetyProductionEvaluationId)) + { + this.SafetyProductionEvaluationId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluation)); SafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId; + SafetyProductionEvaluation.CompileMan = this.CurrUser.UserName; + SafetyProductionEvaluation.UpState = BLL.Const.UpState_2; + SafetyProductionEvaluation.HandleMan = this.CurrUser.UserId; + SafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1; + BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(SafetyProductionEvaluation); + BLL.LogService.AddSys_Log(this.CurrUser, SafetyProductionEvaluation.YearId.ToString() + "-" + SafetyProductionEvaluation.Quarter.ToString(), + SafetyProductionEvaluation.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnAdd); + } + else + { + Model.Information_SafetyProductionEvaluation oldReport = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId); + if (oldReport != null) + { + SafetyProductionEvaluation.HandleMan = oldReport.HandleMan; + SafetyProductionEvaluation.HandleState = oldReport.HandleState; + } + SafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId; + SafetyProductionEvaluation.UpState = BLL.Const.UpState_2; + BLL.SafetyProductionEvaluationService.UpdateSafetyProductionEvaluation(SafetyProductionEvaluation); + BLL.LogService.AddSys_Log(this.CurrUser, SafetyProductionEvaluation.YearId.ToString() + "-" + SafetyProductionEvaluation.Quarter.ToString(), + SafetyProductionEvaluation.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnModify); + BLL.SafetyProductionEvaluationItemService.DeleteSafetyProductionEvaluationItemList(SafetyProductionEvaluation.SafetyProductionEvaluationId); + } + GetItems(SafetyProductionEvaluation.SafetyProductionEvaluationId); + foreach (var item in items) + { + BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(item); + } + if (type == "updata") //保存并上报 + { + if (SafetyProductionEvaluation.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpSafetyProductionEvaluation(SafetyProductionEvaluation.SafetyProductionEvaluationId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=SafetyProductionEvaluation&Id={0}", SafetyProductionEvaluation.SafetyProductionEvaluationId, "编辑 - "))); + } + else + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + /// + /// 获取明细值 + /// + /// + private void GetItems(string SafetyProductionEvaluationId) + { + items.Clear(); + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + Model.Information_SafetyProductionEvaluationItem item = new Model.Information_SafetyProductionEvaluationItem(); + if (values["SafetyProductionEvaluationItemId"].ToString() != "") + { + item.SafetyProductionEvaluationItemId = values.Value("SafetyProductionEvaluationItemId"); + } + item.SafetyProductionEvaluationId = SafetyProductionEvaluationId; + item.SortIndex = Funs.GetNewInt(values.Value("SortIndex")); + if (values["Type"].ToString() != "") + { + item.Type = values.Value("Type"); + } + if (values["EvaluateWork"].ToString() != "") + { + item.EvaluateWork = values.Value("EvaluateWork"); + } + if (values["EvaluationContent"].ToString() != "") + { + item.EvaluationContent = values.Value("EvaluationContent"); + } + if (values["FillingRequirements"].ToString() != "") + { + item.FillingRequirements = values.Value("FillingRequirements"); + } + if (values["CompletionDeadline"].ToString() != "") + { + item.CompletionDeadline = values.Value("CompletionDeadline"); + } + if (values["ImplementationStatus"].ToString() != "") + { + item.ImplementationStatus = values.Value("ImplementationStatus"); + } + items.Add(item); + } + } + #endregion + + #region 关闭办理流程窗口 + /// + /// 关闭办理流程窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId); + if (report.HandleMan == this.CurrUser.UserId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + #endregion + + #region Grid行事件 + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + GetItems(string.Empty); + if (e.CommandName == "Add") + { + Model.Information_SafetyProductionEvaluationItem oldItem = items.FirstOrDefault(x => x.SafetyProductionEvaluationItemId == rowID); + Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem + { + SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)) + }; + if (oldItem != null) + { + newItem.SortIndex = oldItem.SortIndex + 1; + } + else + { + newItem.SortIndex = 0; + } + items.Add(newItem); + items = items.OrderBy(x => x.SortIndex).ToList(); + Grid1.DataSource = items; + Grid1.DataBind(); + } + if (e.CommandName == "Delete") + { + if (Grid1.Rows.Count == 1) + { + ShowNotify("只有一条数据,无法删除", MessageBoxIcon.Warning); + return; + } + foreach (var item in items) + { + if (item.SafetyProductionEvaluationItemId == rowID) + { + items.Remove(item); + break; + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SafetyProductionEvaluationMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnCopy.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + + //} + if (buttonList.Contains(BLL.Const.BtnSubmit)) + { + this.btnSubmit.Hidden = false; + } + } + } + #endregion + + #region 复制上个季度数据 + /// + /// 复制上个季度的数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + int lastYear = 0, lastQuarter = 0; + int year = Convert.ToInt32(this.ddlYearId.SelectedValue); + int quarter = Convert.ToInt32(this.ddlQuarter.SelectedValue); + if (quarter == 1) + { + lastYear = year - 1; + lastQuarter = 4; + } + else + { + lastYear = year; + lastQuarter = quarter - 1; + } + Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(this.ddlUnitId.SelectedValue, lastYear, lastQuarter); + if (SafetyProductionEvaluation != null) + { + Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation(); + this.SafetyProductionEvaluationId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluation)); + newSafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId; + newSafetyProductionEvaluation.UnitId = this.ddlUnitId.SelectedValue; + newSafetyProductionEvaluation.ReportDate = DateTime.Now; + newSafetyProductionEvaluation.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + newSafetyProductionEvaluation.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + newSafetyProductionEvaluation.CompileMan = this.CurrUser.UserName; + newSafetyProductionEvaluation.UpState = BLL.Const.UpState_2; + newSafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1; + newSafetyProductionEvaluation.HandleMan = this.CurrUser.UserId; + BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(newSafetyProductionEvaluation); + + items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(SafetyProductionEvaluation.SafetyProductionEvaluationId); + if (items.Count > 0) + { + foreach (var item in items) + { + Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem + { + SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)), + SafetyProductionEvaluationId = this.SafetyProductionEvaluationId, + SortIndex = item.SortIndex + }; + BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(newItem); + } + } + GetValues(newSafetyProductionEvaluation.SafetyProductionEvaluationId); + } + + } + + /// + /// 获取数据 + /// + private void GetValues(string SafetyProductionEvaluationId) + { + var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(SafetyProductionEvaluationId); + if (report != null) + { + if (!string.IsNullOrEmpty(report.UnitId)) + { + this.ddlUnitId.SelectedValue = report.UnitId; + } + if (report.YearId.HasValue) + { + this.ddlYearId.SelectedValue = report.YearId.ToString(); + } + if (report.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = report.Quarter.ToString(); + } + if (report.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(SafetyProductionEvaluationId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.designer.cs new file mode 100644 index 00000000..a972c71c --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class SafetyProductionEvaluationAdd { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// ddlYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlYearId; + + /// + /// ddlQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlQuarter; + + /// + /// dpkCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtImplementationStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtImplementationStatus; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml index cefc9ef0..c90f11c5 100644 --- a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml +++ b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml @@ -8,10 +8,9 @@ - + - diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index cc7e0f27..53012cf7 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -27,6 +27,8 @@ + + diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx index 2a96bab5..6857d2ba 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx @@ -404,7 +404,7 @@ var basePath = '<%= ResolveUrl("~/") %>'; }, axisLabel: { show: true, - interval: 0, + /*interval: 0,*/ textStyle: { color: 'rgba(255, 255, 255, 0.8)' } @@ -461,7 +461,7 @@ var basePath = '<%= ResolveUrl("~/") %>'; },{ name: '当月人工时', type: 'bar', - barWidth: 40, + /* barWidth: 40,*/ data: two.series[1].data }] category_Two('two', xArr, data) @@ -688,7 +688,7 @@ var basePath = '<%= ResolveUrl("~/") %>'; }, axisLabel: { show: true, - interval: 0, + /*interval: 0,*/ fontSize:10, rotate: 15, textStyle: { @@ -748,7 +748,7 @@ var basePath = '<%= ResolveUrl("~/") %>'; },{ name: '当月', type: 'bar', - barWidth: 30, + /* barWidth: 30,*/ data: five.series[0].data }] diff --git a/SGGL/Model/APIItem/CNCEC/ActionWorkLedger.cs b/SGGL/Model/APIItem/CNCEC/ActionWorkLedger.cs new file mode 100644 index 00000000..d54abd04 --- /dev/null +++ b/SGGL/Model/APIItem/CNCEC/ActionWorkLedger.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; + +namespace Model +{ + public class ActionWorkLedger + { + public string ActionWorkLedgerId + { + get; + set; + } + + public string UnitId + { + get; + set; + } + + public DateTime? ReportDate + { + get; + set; + } + + public int? Quarter + { + get; + set; + } + + public int? YearId + { + get; + set; + } + + public string CompileMan + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/CNCEC/ActionWorkLedgerItem.cs b/SGGL/Model/APIItem/CNCEC/ActionWorkLedgerItem.cs new file mode 100644 index 00000000..6f271afc --- /dev/null +++ b/SGGL/Model/APIItem/CNCEC/ActionWorkLedgerItem.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; + +namespace Model +{ + public class ActionWorkLedgerItem + { + public string ActionWorkLedgerItemId + { + get; + set; + } + + public string ActionWorkLedgerId + { + get; + set; + } + + public int? SortIndex + { + get; + set; + } + + public string Focus + { + get; + set; + } + + public string SpecialTask + { + get; + set; + } + + public string WorkPoints + { + get; + set; + } + + public string FillingRequirements + { + get; + set; + } + + public string CompletionDeadline + { + get; + set; + } + + public string ImplementationStatus + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/CNCEC/SafetyProductionEvaluation.cs b/SGGL/Model/APIItem/CNCEC/SafetyProductionEvaluation.cs new file mode 100644 index 00000000..0aaded90 --- /dev/null +++ b/SGGL/Model/APIItem/CNCEC/SafetyProductionEvaluation.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class SafetyProductionEvaluation + { + public string SafetyProductionEvaluationId + { + get; + set; + } + + public string UnitId + { + get; + set; + } + + public DateTime? ReportDate + { + get; + set; + } + + public int? Quarter + { + get; + set; + } + + public int? YearId + { + get; + set; + } + + public string CompileMan + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/CNCEC/SafetyProductionEvaluationItem.cs b/SGGL/Model/APIItem/CNCEC/SafetyProductionEvaluationItem.cs new file mode 100644 index 00000000..1d9e2f52 --- /dev/null +++ b/SGGL/Model/APIItem/CNCEC/SafetyProductionEvaluationItem.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class SafetyProductionEvaluationItem + { + public string SafetyProductionEvaluationItemId + { + get; + set; + } + + public string SafetyProductionEvaluationId + { + get; + set; + } + + public int? SortIndex + { + get; + set; + } + + public string Type + { + get; + set; + } + + public string EvaluateWork + { + get; + set; + } + + public string EvaluationContent + { + get; + set; + } + + public string FillingRequirements + { + get; + set; + } + + public string CompletionDeadline + { + get; + set; + } + + public string ImplementationStatus + { + get; + set; + } + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 26232ecf..f657d28c 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1178,6 +1178,12 @@ namespace Model partial void InsertInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); partial void UpdateInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); partial void DeleteInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); + partial void InsertInformation_ActionWorkLedger(Information_ActionWorkLedger instance); + partial void UpdateInformation_ActionWorkLedger(Information_ActionWorkLedger instance); + partial void DeleteInformation_ActionWorkLedger(Information_ActionWorkLedger instance); + partial void InsertInformation_ActionWorkLedgerItem(Information_ActionWorkLedgerItem instance); + partial void UpdateInformation_ActionWorkLedgerItem(Information_ActionWorkLedgerItem instance); + partial void DeleteInformation_ActionWorkLedgerItem(Information_ActionWorkLedgerItem instance); partial void InsertInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); partial void UpdateInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); partial void DeleteInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); @@ -1214,6 +1220,12 @@ namespace Model partial void InsertInformation_SafetyBriefing(Information_SafetyBriefing instance); partial void UpdateInformation_SafetyBriefing(Information_SafetyBriefing instance); partial void DeleteInformation_SafetyBriefing(Information_SafetyBriefing instance); + partial void InsertInformation_SafetyProductionEvaluation(Information_SafetyProductionEvaluation instance); + partial void UpdateInformation_SafetyProductionEvaluation(Information_SafetyProductionEvaluation instance); + partial void DeleteInformation_SafetyProductionEvaluation(Information_SafetyProductionEvaluation instance); + partial void InsertInformation_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem instance); + partial void UpdateInformation_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem instance); + partial void DeleteInformation_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem instance); partial void InsertInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); partial void UpdateInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); partial void DeleteInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); @@ -1490,9 +1502,6 @@ 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); @@ -2063,9 +2072,6 @@ 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); @@ -2228,6 +2234,9 @@ namespace Model partial void InsertSolution_CQMSConstructSolutionApprove(Solution_CQMSConstructSolutionApprove instance); partial void UpdateSolution_CQMSConstructSolutionApprove(Solution_CQMSConstructSolutionApprove instance); partial void DeleteSolution_CQMSConstructSolutionApprove(Solution_CQMSConstructSolutionApprove instance); + partial void InsertSolution_CQMSConstructSolutionApprove_Item(Solution_CQMSConstructSolutionApprove_Item instance); + partial void UpdateSolution_CQMSConstructSolutionApprove_Item(Solution_CQMSConstructSolutionApprove_Item instance); + partial void DeleteSolution_CQMSConstructSolutionApprove_Item(Solution_CQMSConstructSolutionApprove_Item instance); partial void InsertSolution_ExpertArgument(Solution_ExpertArgument instance); partial void UpdateSolution_ExpertArgument(Solution_ExpertArgument instance); partial void DeleteSolution_ExpertArgument(Solution_ExpertArgument instance); @@ -5827,6 +5836,22 @@ namespace Model } } + public System.Data.Linq.Table Information_ActionWorkLedger + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_ActionWorkLedgerItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Information_DrillConductedQuarterlyReport { get @@ -5923,6 +5948,22 @@ namespace Model } } + public System.Data.Linq.Table Information_SafetyProductionEvaluation + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_SafetyProductionEvaluationItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Information_SafetyQuarterlyReport { get @@ -6659,14 +6700,6 @@ namespace Model } } - public System.Data.Linq.Table Manager_Month_ComplianceObligations - { - get - { - return this.GetTable(); - } - } - public System.Data.Linq.Table Manager_Month_ComplianceObligationsC { get @@ -8187,14 +8220,6 @@ namespace Model } } - public System.Data.Linq.Table Report_CQMS_ProblemHandle - { - get - { - return this.GetTable(); - } - } - public System.Data.Linq.Table Report_CqmsTarget { get @@ -8635,6 +8660,14 @@ namespace Model } } + public System.Data.Linq.Table Solution_CQMSConstructSolutionApprove_Item + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Solution_ExpertArgument { get @@ -9995,6 +10028,14 @@ namespace Model } } + public System.Data.Linq.Table View_Information_ActionWorkLedger + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_Information_DrillConductedQuarterlyReport { get @@ -10035,6 +10076,14 @@ namespace Model } } + public System.Data.Linq.Table View_Information_SafetyProductionEvaluation + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_Information_SafetyQuarterlyReport { get @@ -21868,6 +21917,8 @@ namespace Model private string _CodeRule; + private EntitySet _Doc_DocManage; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -21884,6 +21935,7 @@ namespace Model public Base_DocType() { + this._Doc_DocManage = new EntitySet(new Action(this.attach_Doc_DocManage), new Action(this.detach_Doc_DocManage)); OnCreated(); } @@ -21967,6 +22019,19 @@ 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; @@ -21986,6 +22051,18 @@ 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")] @@ -39839,8 +39916,6 @@ namespace Model private EntitySet _Check_CheckRectify; - private EntitySet _Check_CheckSpecialDetail; - private EntitySet _Check_ContactList; private EntitySet _Check_IncentiveNotice; @@ -39967,6 +40042,8 @@ namespace Model private EntitySet _Information_AccidentCauseReport; + private EntitySet _Information_ActionWorkLedger; + private EntitySet _Information_DrillConductedQuarterlyReport; private EntitySet _Information_DrillPlanHalfYearReport; @@ -39981,6 +40058,8 @@ namespace Model private EntitySet _Information_SafetyBriefing; + private EntitySet _Information_SafetyProductionEvaluation; + private EntitySet _Information_SafetyQuarterlyReport; private EntitySet _Information_UrgeReport; @@ -40232,7 +40311,6 @@ namespace Model this._Check_CheckDayDetail = new EntitySet(new Action(this.attach_Check_CheckDayDetail), new Action(this.detach_Check_CheckDayDetail)); this._Check_CheckInfo = new EntitySet(new Action(this.attach_Check_CheckInfo), new Action(this.detach_Check_CheckInfo)); this._Check_CheckRectify = new EntitySet(new Action(this.attach_Check_CheckRectify), new Action(this.detach_Check_CheckRectify)); - this._Check_CheckSpecialDetail = new EntitySet(new Action(this.attach_Check_CheckSpecialDetail), new Action(this.detach_Check_CheckSpecialDetail)); this._Check_ContactList = new EntitySet(new Action(this.attach_Check_ContactList), new Action(this.detach_Check_ContactList)); this._Check_IncentiveNotice = new EntitySet(new Action(this.attach_Check_IncentiveNotice), new Action(this.detach_Check_IncentiveNotice)); this._Check_JointCheck = new EntitySet(new Action(this.attach_Check_JointCheck), new Action(this.detach_Check_JointCheck)); @@ -40296,6 +40374,7 @@ namespace Model this._InApproveManager_GeneralEquipmentOut = new EntitySet(new Action(this.attach_InApproveManager_GeneralEquipmentOut), new Action(this.detach_InApproveManager_GeneralEquipmentOut)); this._InformationProject_SafetyBriefing = new EntitySet(new Action(this.attach_InformationProject_SafetyBriefing), new Action(this.detach_InformationProject_SafetyBriefing)); this._Information_AccidentCauseReport = new EntitySet(new Action(this.attach_Information_AccidentCauseReport), new Action(this.detach_Information_AccidentCauseReport)); + this._Information_ActionWorkLedger = new EntitySet(new Action(this.attach_Information_ActionWorkLedger), new Action(this.detach_Information_ActionWorkLedger)); this._Information_DrillConductedQuarterlyReport = new EntitySet(new Action(this.attach_Information_DrillConductedQuarterlyReport), new Action(this.detach_Information_DrillConductedQuarterlyReport)); this._Information_DrillPlanHalfYearReport = new EntitySet(new Action(this.attach_Information_DrillPlanHalfYearReport), new Action(this.detach_Information_DrillPlanHalfYearReport)); this._Information_EPSummaryReport = new EntitySet(new Action(this.attach_Information_EPSummaryReport), new Action(this.detach_Information_EPSummaryReport)); @@ -40303,6 +40382,7 @@ namespace Model this._Information_QualityWorkSummaryReport = new EntitySet(new Action(this.attach_Information_QualityWorkSummaryReport), new Action(this.detach_Information_QualityWorkSummaryReport)); this._Information_QuarterlyProjectQuality = new EntitySet(new Action(this.attach_Information_QuarterlyProjectQuality), new Action(this.detach_Information_QuarterlyProjectQuality)); this._Information_SafetyBriefing = new EntitySet(new Action(this.attach_Information_SafetyBriefing), new Action(this.detach_Information_SafetyBriefing)); + this._Information_SafetyProductionEvaluation = new EntitySet(new Action(this.attach_Information_SafetyProductionEvaluation), new Action(this.detach_Information_SafetyProductionEvaluation)); this._Information_SafetyQuarterlyReport = new EntitySet(new Action(this.attach_Information_SafetyQuarterlyReport), new Action(this.detach_Information_SafetyQuarterlyReport)); this._Information_UrgeReport = new EntitySet(new Action(this.attach_Information_UrgeReport), new Action(this.detach_Information_UrgeReport)); this._Information_WorkSummaryReport = new EntitySet(new Action(this.attach_Information_WorkSummaryReport), new Action(this.detach_Information_WorkSummaryReport)); @@ -41140,19 +41220,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecialDetail_Base_Unit", Storage="_Check_CheckSpecialDetail", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] - public EntitySet Check_CheckSpecialDetail - { - get - { - return this._Check_CheckSpecialDetail; - } - set - { - this._Check_CheckSpecialDetail.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_ContactList_Base_Unit", Storage="_Check_ContactList", ThisKey="UnitId", OtherKey="SponsorUnitId", DeleteRule="NO ACTION")] public EntitySet Check_ContactList { @@ -41972,6 +42039,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_ActionWorkLedger_Base_Unit", Storage="_Information_ActionWorkLedger", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_ActionWorkLedger + { + get + { + return this._Information_ActionWorkLedger; + } + set + { + this._Information_ActionWorkLedger.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillConductedQuarterlyReport_Base_Unit", Storage="_Information_DrillConductedQuarterlyReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Information_DrillConductedQuarterlyReport { @@ -42063,6 +42143,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyProductionEvaluation_Base_Unit", Storage="_Information_SafetyProductionEvaluation", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_SafetyProductionEvaluation + { + get + { + return this._Information_SafetyProductionEvaluation; + } + set + { + this._Information_SafetyProductionEvaluation.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyQuarterlyReport_Base_Unit", Storage="_Information_SafetyQuarterlyReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Information_SafetyQuarterlyReport { @@ -43442,18 +43535,6 @@ namespace Model entity.Base_Unit = null; } - private void attach_Check_CheckSpecialDetail(Check_CheckSpecialDetail entity) - { - this.SendPropertyChanging(); - entity.Base_Unit = this; - } - - private void detach_Check_CheckSpecialDetail(Check_CheckSpecialDetail entity) - { - this.SendPropertyChanging(); - entity.Base_Unit = null; - } - private void attach_Check_ContactList(Check_ContactList entity) { this.SendPropertyChanging(); @@ -44210,6 +44291,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Information_ActionWorkLedger(Information_ActionWorkLedger entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_ActionWorkLedger(Information_ActionWorkLedger entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Information_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport entity) { this.SendPropertyChanging(); @@ -44294,6 +44387,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Information_SafetyProductionEvaluation(Information_SafetyProductionEvaluation entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_SafetyProductionEvaluation(Information_SafetyProductionEvaluation entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Information_SafetyQuarterlyReport(Information_SafetyQuarterlyReport entity) { this.SendPropertyChanging(); @@ -62173,8 +62278,6 @@ namespace Model private EntityRef _Base_Project; - private EntityRef _Technique_CheckItemSet; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -62226,7 +62329,6 @@ namespace Model public Check_CheckSpecial() { this._Base_Project = default(EntityRef); - this._Technique_CheckItemSet = default(EntityRef); OnCreated(); } @@ -62545,10 +62647,6 @@ namespace Model { if ((this._CheckItemSetId != value)) { - if (this._Technique_CheckItemSet.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnCheckItemSetIdChanging(value); this.SendPropertyChanging(); this._CheckItemSetId = value; @@ -62692,40 +62790,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Technique_CheckItemSet", Storage="_Technique_CheckItemSet", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", IsForeignKey=true)] - public Technique_CheckItemSet Technique_CheckItemSet - { - get - { - return this._Technique_CheckItemSet.Entity; - } - set - { - Technique_CheckItemSet previousValue = this._Technique_CheckItemSet.Entity; - if (((previousValue != value) - || (this._Technique_CheckItemSet.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Technique_CheckItemSet.Entity = null; - previousValue.Check_CheckSpecial.Remove(this); - } - this._Technique_CheckItemSet.Entity = value; - if ((value != null)) - { - value.Check_CheckSpecial.Add(this); - this._CheckItemSetId = value.CheckItemSetId; - } - else - { - this._CheckItemSetId = default(string); - } - this.SendPropertyChanged("Technique_CheckItemSet"); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -62801,8 +62865,6 @@ namespace Model private string _HiddenType; - private EntityRef _Base_Unit; - private EntityRef _WBS_UnitWork; #region 可扩展性方法定义 @@ -62861,7 +62923,6 @@ namespace Model public Check_CheckSpecialDetail() { - this._Base_Unit = default(EntityRef); this._WBS_UnitWork = default(EntityRef); OnCreated(); } @@ -63001,10 +63062,6 @@ namespace Model { if ((this._UnitId != value)) { - if (this._Base_Unit.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnUnitIdChanging(value); this.SendPropertyChanging(); this._UnitId = value; @@ -63354,40 +63411,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecialDetail_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] - public Base_Unit Base_Unit - { - get - { - return this._Base_Unit.Entity; - } - set - { - Base_Unit previousValue = this._Base_Unit.Entity; - if (((previousValue != value) - || (this._Base_Unit.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._Base_Unit.Entity = null; - previousValue.Check_CheckSpecialDetail.Remove(this); - } - this._Base_Unit.Entity = value; - if ((value != null)) - { - value.Check_CheckSpecialDetail.Add(this); - this._UnitId = value.UnitId; - } - else - { - this._UnitId = default(string); - } - this.SendPropertyChanged("Base_Unit"); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecialDetail_ProjectData_WorkArea", Storage="_WBS_UnitWork", ThisKey="CheckArea", OtherKey="UnitWorkId", IsForeignKey=true)] public WBS_UnitWork WBS_UnitWork { @@ -98828,10 +98851,10 @@ namespace Model private string _AuditMan; - private string _Measure; - private string _Problem; + private string _Measure; + private System.Nullable _RemarkCode; private string _Supervisor; @@ -98884,10 +98907,10 @@ namespace Model partial void OnStatusChanged(); partial void OnAuditManChanging(string value); partial void OnAuditManChanged(); - partial void OnMeasureChanging(string value); - partial void OnMeasureChanged(); partial void OnProblemChanging(string value); partial void OnProblemChanged(); + partial void OnMeasureChanging(string value); + partial void OnMeasureChanged(); partial void OnRemarkCodeChanging(System.Nullable value); partial void OnRemarkCodeChanged(); partial void OnSupervisorChanging(string value); @@ -99260,26 +99283,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measure", DbType="NVarChar(1000)")] - public string Measure - { - get - { - return this._Measure; - } - set - { - if ((this._Measure != value)) - { - this.OnMeasureChanging(value); - this.SendPropertyChanging(); - this._Measure = value; - this.SendPropertyChanged("Measure"); - this.OnMeasureChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Problem", DbType="NVarChar(1000)")] public string Problem { @@ -99300,6 +99303,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measure", DbType="NVarChar(1000)")] + public string Measure + { + get + { + return this._Measure; + } + set + { + if ((this._Measure != value)) + { + this.OnMeasureChanging(value); + this.SendPropertyChanging(); + this._Measure = value; + this.SendPropertyChanged("Measure"); + this.OnMeasureChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")] public System.Nullable RemarkCode { @@ -123360,6 +123383,8 @@ namespace Model private EntityRef _Base_CNProfessional; + private EntityRef _Base_DocType; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -123411,6 +123436,7 @@ 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); @@ -123489,6 +123515,10 @@ 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; @@ -123808,6 +123838,40 @@ 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 { @@ -123978,6 +124042,8 @@ namespace Model private EntityRef _Doc_DocManage; + private EntityRef _Sys_User; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -124001,6 +124067,7 @@ namespace Model public Doc_DocManageApprove() { this._Doc_DocManage = default(EntityRef); + this._Sys_User = default(EntityRef); OnCreated(); } @@ -124048,7 +124115,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] public string ApproveMan { get @@ -124059,6 +124126,10 @@ 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; @@ -124182,6 +124253,40 @@ 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; @@ -153864,6 +153969,8 @@ namespace Model private string _User_Acceptance; + private string _CsUsers; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -153898,6 +154005,8 @@ namespace Model partial void OnAttachUrlChanged(); partial void OnUser_AcceptanceChanging(string value); partial void OnUser_AcceptanceChanged(); + partial void OnCsUsersChanging(string value); + partial void OnCsUsersChanged(); #endregion public GJSX() @@ -154205,6 +154314,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CsUsers", DbType="NVarChar(2000)")] + public string CsUsers + { + get + { + return this._CsUsers; + } + set + { + if ((this._CsUsers != value)) + { + this.OnCsUsersChanging(value); + this.SendPropertyChanging(); + this._CsUsers = value; + this.SendPropertyChanged("CsUsers"); + this.OnCsUsersChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -187078,6 +187207,624 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_ActionWorkLedger")] + public partial class Information_ActionWorkLedger : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ActionWorkLedgerId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _Quarter; + + private System.Nullable _YearId; + + private string _CompileMan; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private EntityRef _Base_Unit; + + private EntitySet _Information_ActionWorkLedgerItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnActionWorkLedgerIdChanging(string value); + partial void OnActionWorkLedgerIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + partial void OnQuarterChanging(System.Nullable value); + partial void OnQuarterChanged(); + partial void OnYearIdChanging(System.Nullable value); + partial void OnYearIdChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + #endregion + + public Information_ActionWorkLedger() + { + this._Base_Unit = default(EntityRef); + this._Information_ActionWorkLedgerItem = new EntitySet(new Action(this.attach_Information_ActionWorkLedgerItem), new Action(this.detach_Information_ActionWorkLedgerItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionWorkLedgerId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ActionWorkLedgerId + { + get + { + return this._ActionWorkLedgerId; + } + set + { + if ((this._ActionWorkLedgerId != value)) + { + this.OnActionWorkLedgerIdChanging(value); + this.SendPropertyChanging(); + this._ActionWorkLedgerId = value; + this.SendPropertyChanged("ActionWorkLedgerId"); + this.OnActionWorkLedgerIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this.OnQuarterChanging(value); + this.SendPropertyChanging(); + this._Quarter = value; + this.SendPropertyChanged("Quarter"); + this.OnQuarterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this.OnYearIdChanging(value); + this.SendPropertyChanging(); + this._YearId = value; + this.SendPropertyChanged("YearId"); + this.OnYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_ActionWorkLedger_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Information_ActionWorkLedger.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_ActionWorkLedger.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger", Storage="_Information_ActionWorkLedgerItem", ThisKey="ActionWorkLedgerId", OtherKey="ActionWorkLedgerId", DeleteRule="NO ACTION")] + public EntitySet Information_ActionWorkLedgerItem + { + get + { + return this._Information_ActionWorkLedgerItem; + } + set + { + this._Information_ActionWorkLedgerItem.Assign(value); + } + } + + 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)); + } + } + + private void attach_Information_ActionWorkLedgerItem(Information_ActionWorkLedgerItem entity) + { + this.SendPropertyChanging(); + entity.Information_ActionWorkLedger = this; + } + + private void detach_Information_ActionWorkLedgerItem(Information_ActionWorkLedgerItem entity) + { + this.SendPropertyChanging(); + entity.Information_ActionWorkLedger = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_ActionWorkLedgerItem")] + public partial class Information_ActionWorkLedgerItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ActionWorkLedgerItemId; + + private string _ActionWorkLedgerId; + + private System.Nullable _SortIndex; + + private string _Focus; + + private string _SpecialTask; + + private string _WorkPoints; + + private string _FillingRequirements; + + private string _CompletionDeadline; + + private string _ImplementationStatus; + + private EntityRef _Information_ActionWorkLedger; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnActionWorkLedgerItemIdChanging(string value); + partial void OnActionWorkLedgerItemIdChanged(); + partial void OnActionWorkLedgerIdChanging(string value); + partial void OnActionWorkLedgerIdChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnFocusChanging(string value); + partial void OnFocusChanged(); + partial void OnSpecialTaskChanging(string value); + partial void OnSpecialTaskChanged(); + partial void OnWorkPointsChanging(string value); + partial void OnWorkPointsChanged(); + partial void OnFillingRequirementsChanging(string value); + partial void OnFillingRequirementsChanged(); + partial void OnCompletionDeadlineChanging(string value); + partial void OnCompletionDeadlineChanged(); + partial void OnImplementationStatusChanging(string value); + partial void OnImplementationStatusChanged(); + #endregion + + public Information_ActionWorkLedgerItem() + { + this._Information_ActionWorkLedger = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionWorkLedgerItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ActionWorkLedgerItemId + { + get + { + return this._ActionWorkLedgerItemId; + } + set + { + if ((this._ActionWorkLedgerItemId != value)) + { + this.OnActionWorkLedgerItemIdChanging(value); + this.SendPropertyChanging(); + this._ActionWorkLedgerItemId = value; + this.SendPropertyChanged("ActionWorkLedgerItemId"); + this.OnActionWorkLedgerItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionWorkLedgerId", DbType="NVarChar(50)")] + public string ActionWorkLedgerId + { + get + { + return this._ActionWorkLedgerId; + } + set + { + if ((this._ActionWorkLedgerId != value)) + { + if (this._Information_ActionWorkLedger.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnActionWorkLedgerIdChanging(value); + this.SendPropertyChanging(); + this._ActionWorkLedgerId = value; + this.SendPropertyChanged("ActionWorkLedgerId"); + this.OnActionWorkLedgerIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Focus", DbType="NVarChar(20)")] + public string Focus + { + get + { + return this._Focus; + } + set + { + if ((this._Focus != value)) + { + this.OnFocusChanging(value); + this.SendPropertyChanging(); + this._Focus = value; + this.SendPropertyChanged("Focus"); + this.OnFocusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialTask", DbType="NVarChar(100)")] + public string SpecialTask + { + get + { + return this._SpecialTask; + } + set + { + if ((this._SpecialTask != value)) + { + this.OnSpecialTaskChanging(value); + this.SendPropertyChanging(); + this._SpecialTask = value; + this.SendPropertyChanged("SpecialTask"); + this.OnSpecialTaskChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPoints", DbType="NVarChar(500)")] + public string WorkPoints + { + get + { + return this._WorkPoints; + } + set + { + if ((this._WorkPoints != value)) + { + this.OnWorkPointsChanging(value); + this.SendPropertyChanging(); + this._WorkPoints = value; + this.SendPropertyChanged("WorkPoints"); + this.OnWorkPointsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingRequirements", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string FillingRequirements + { + get + { + return this._FillingRequirements; + } + set + { + if ((this._FillingRequirements != value)) + { + this.OnFillingRequirementsChanging(value); + this.SendPropertyChanging(); + this._FillingRequirements = value; + this.SendPropertyChanged("FillingRequirements"); + this.OnFillingRequirementsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletionDeadline", DbType="NVarChar(50)")] + public string CompletionDeadline + { + get + { + return this._CompletionDeadline; + } + set + { + if ((this._CompletionDeadline != value)) + { + this.OnCompletionDeadlineChanging(value); + this.SendPropertyChanging(); + this._CompletionDeadline = value; + this.SendPropertyChanged("CompletionDeadline"); + this.OnCompletionDeadlineChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ImplementationStatus", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + 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.AssociationAttribute(Name="FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger", Storage="_Information_ActionWorkLedger", ThisKey="ActionWorkLedgerId", OtherKey="ActionWorkLedgerId", IsForeignKey=true)] + public Information_ActionWorkLedger Information_ActionWorkLedger + { + get + { + return this._Information_ActionWorkLedger.Entity; + } + set + { + Information_ActionWorkLedger previousValue = this._Information_ActionWorkLedger.Entity; + if (((previousValue != value) + || (this._Information_ActionWorkLedger.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Information_ActionWorkLedger.Entity = null; + previousValue.Information_ActionWorkLedgerItem.Remove(this); + } + this._Information_ActionWorkLedger.Entity = value; + if ((value != null)) + { + value.Information_ActionWorkLedgerItem.Add(this); + this._ActionWorkLedgerId = value.ActionWorkLedgerId; + } + else + { + this._ActionWorkLedgerId = default(string); + } + this.SendPropertyChanged("Information_ActionWorkLedger"); + } + } + } + + 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.Information_DrillConductedQuarterlyReport")] public partial class Information_DrillConductedQuarterlyReport : INotifyPropertyChanging, INotifyPropertyChanged { @@ -193731,6 +194478,626 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_SafetyProductionEvaluation")] + public partial class Information_SafetyProductionEvaluation : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SafetyProductionEvaluationId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _Quarter; + + private System.Nullable _YearId; + + private string _CompileMan; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private EntityRef _Base_Unit; + + private EntitySet _Information_SafetyProductionEvaluationItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSafetyProductionEvaluationIdChanging(string value); + partial void OnSafetyProductionEvaluationIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + partial void OnQuarterChanging(System.Nullable value); + partial void OnQuarterChanged(); + partial void OnYearIdChanging(System.Nullable value); + partial void OnYearIdChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + #endregion + + public Information_SafetyProductionEvaluation() + { + this._Base_Unit = default(EntityRef); + this._Information_SafetyProductionEvaluationItem = new EntitySet(new Action(this.attach_Information_SafetyProductionEvaluationItem), new Action(this.detach_Information_SafetyProductionEvaluationItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyProductionEvaluationId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SafetyProductionEvaluationId + { + get + { + return this._SafetyProductionEvaluationId; + } + set + { + if ((this._SafetyProductionEvaluationId != value)) + { + this.OnSafetyProductionEvaluationIdChanging(value); + this.SendPropertyChanging(); + this._SafetyProductionEvaluationId = value; + this.SendPropertyChanged("SafetyProductionEvaluationId"); + this.OnSafetyProductionEvaluationIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this.OnQuarterChanging(value); + this.SendPropertyChanging(); + this._Quarter = value; + this.SendPropertyChanged("Quarter"); + this.OnQuarterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this.OnYearIdChanging(value); + this.SendPropertyChanging(); + this._YearId = value; + this.SendPropertyChanged("YearId"); + this.OnYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyProductionEvaluation_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Information_SafetyProductionEvaluation.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_SafetyProductionEvaluation.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluat" + + "ion", Storage="_Information_SafetyProductionEvaluationItem", ThisKey="SafetyProductionEvaluationId", OtherKey="SafetyProductionEvaluationId", DeleteRule="NO ACTION")] + public EntitySet Information_SafetyProductionEvaluationItem + { + get + { + return this._Information_SafetyProductionEvaluationItem; + } + set + { + this._Information_SafetyProductionEvaluationItem.Assign(value); + } + } + + 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)); + } + } + + private void attach_Information_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem entity) + { + this.SendPropertyChanging(); + entity.Information_SafetyProductionEvaluation = this; + } + + private void detach_Information_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem entity) + { + this.SendPropertyChanging(); + entity.Information_SafetyProductionEvaluation = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_SafetyProductionEvaluationItem")] + public partial class Information_SafetyProductionEvaluationItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SafetyProductionEvaluationItemId; + + private string _SafetyProductionEvaluationId; + + private System.Nullable _SortIndex; + + private string _Type; + + private string _EvaluateWork; + + private string _EvaluationContent; + + private string _FillingRequirements; + + private string _CompletionDeadline; + + private string _ImplementationStatus; + + private EntityRef _Information_SafetyProductionEvaluation; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSafetyProductionEvaluationItemIdChanging(string value); + partial void OnSafetyProductionEvaluationItemIdChanged(); + partial void OnSafetyProductionEvaluationIdChanging(string value); + partial void OnSafetyProductionEvaluationIdChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + partial void OnEvaluateWorkChanging(string value); + partial void OnEvaluateWorkChanged(); + partial void OnEvaluationContentChanging(string value); + partial void OnEvaluationContentChanged(); + partial void OnFillingRequirementsChanging(string value); + partial void OnFillingRequirementsChanged(); + partial void OnCompletionDeadlineChanging(string value); + partial void OnCompletionDeadlineChanged(); + partial void OnImplementationStatusChanging(string value); + partial void OnImplementationStatusChanged(); + #endregion + + public Information_SafetyProductionEvaluationItem() + { + this._Information_SafetyProductionEvaluation = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyProductionEvaluationItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SafetyProductionEvaluationItemId + { + get + { + return this._SafetyProductionEvaluationItemId; + } + set + { + if ((this._SafetyProductionEvaluationItemId != value)) + { + this.OnSafetyProductionEvaluationItemIdChanging(value); + this.SendPropertyChanging(); + this._SafetyProductionEvaluationItemId = value; + this.SendPropertyChanged("SafetyProductionEvaluationItemId"); + this.OnSafetyProductionEvaluationItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyProductionEvaluationId", DbType="NVarChar(50)")] + public string SafetyProductionEvaluationId + { + get + { + return this._SafetyProductionEvaluationId; + } + set + { + if ((this._SafetyProductionEvaluationId != value)) + { + if (this._Information_SafetyProductionEvaluation.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSafetyProductionEvaluationIdChanging(value); + this.SendPropertyChanging(); + this._SafetyProductionEvaluationId = value; + this.SendPropertyChanged("SafetyProductionEvaluationId"); + this.OnSafetyProductionEvaluationIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="NVarChar(50)")] + public string Type + { + get + { + return this._Type; + } + set + { + if ((this._Type != value)) + { + this.OnTypeChanging(value); + this.SendPropertyChanging(); + this._Type = value; + this.SendPropertyChanged("Type"); + this.OnTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EvaluateWork", DbType="NVarChar(1000)")] + public string EvaluateWork + { + get + { + return this._EvaluateWork; + } + set + { + if ((this._EvaluateWork != value)) + { + this.OnEvaluateWorkChanging(value); + this.SendPropertyChanging(); + this._EvaluateWork = value; + this.SendPropertyChanged("EvaluateWork"); + this.OnEvaluateWorkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EvaluationContent", DbType="NVarChar(1000)")] + public string EvaluationContent + { + get + { + return this._EvaluationContent; + } + set + { + if ((this._EvaluationContent != value)) + { + this.OnEvaluationContentChanging(value); + this.SendPropertyChanging(); + this._EvaluationContent = value; + this.SendPropertyChanged("EvaluationContent"); + this.OnEvaluationContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingRequirements", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string FillingRequirements + { + get + { + return this._FillingRequirements; + } + set + { + if ((this._FillingRequirements != value)) + { + this.OnFillingRequirementsChanging(value); + this.SendPropertyChanging(); + this._FillingRequirements = value; + this.SendPropertyChanged("FillingRequirements"); + this.OnFillingRequirementsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletionDeadline", DbType="NVarChar(50)")] + public string CompletionDeadline + { + get + { + return this._CompletionDeadline; + } + set + { + if ((this._CompletionDeadline != value)) + { + this.OnCompletionDeadlineChanging(value); + this.SendPropertyChanging(); + this._CompletionDeadline = value; + this.SendPropertyChanged("CompletionDeadline"); + this.OnCompletionDeadlineChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ImplementationStatus", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + 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.AssociationAttribute(Name="FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluat" + + "ion", Storage="_Information_SafetyProductionEvaluation", ThisKey="SafetyProductionEvaluationId", OtherKey="SafetyProductionEvaluationId", IsForeignKey=true)] + public Information_SafetyProductionEvaluation Information_SafetyProductionEvaluation + { + get + { + return this._Information_SafetyProductionEvaluation.Entity; + } + set + { + Information_SafetyProductionEvaluation previousValue = this._Information_SafetyProductionEvaluation.Entity; + if (((previousValue != value) + || (this._Information_SafetyProductionEvaluation.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Information_SafetyProductionEvaluation.Entity = null; + previousValue.Information_SafetyProductionEvaluationItem.Remove(this); + } + this._Information_SafetyProductionEvaluation.Entity = value; + if ((value != null)) + { + value.Information_SafetyProductionEvaluationItem.Add(this); + this._SafetyProductionEvaluationId = value.SafetyProductionEvaluationId; + } + else + { + this._SafetyProductionEvaluationId = default(string); + } + this.SendPropertyChanged("Information_SafetyProductionEvaluation"); + } + } + } + + 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.Information_SafetyQuarterlyReport")] public partial class Information_SafetyQuarterlyReport : INotifyPropertyChanging, INotifyPropertyChanged { @@ -239900,229 +241267,6 @@ 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 { @@ -246342,6 +247486,12 @@ namespace Model private string _AccidentDef; + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private System.Nullable _TotalHseManhoursYear; + private System.Nullable _MonthHdangerCount; private System.Nullable _YearHdangerCount; @@ -246358,12 +247508,6 @@ namespace Model private string _MonthReportType; - private System.Nullable _StartDate; - - private System.Nullable _EndDate; - - private System.Nullable _TotalHseManhoursYear; - private EntitySet _Manager_AccidentSortC; private EntitySet _Manager_CheckDetailSortC; @@ -246392,8 +247536,6 @@ namespace Model private EntitySet _Manager_Month_CheckC; - private EntitySet _Manager_Month_ComplianceObligations; - private EntitySet _Manager_Month_ComplianceObligationsC; private EntitySet _Manager_Month_CostInvestmentPlanC; @@ -246648,6 +247790,12 @@ namespace Model partial void OnPhotoContentsChanged(); partial void OnAccidentDefChanging(string value); partial void OnAccidentDefChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnTotalHseManhoursYearChanging(System.Nullable value); + partial void OnTotalHseManhoursYearChanged(); partial void OnMonthHdangerCountChanging(System.Nullable value); partial void OnMonthHdangerCountChanged(); partial void OnYearHdangerCountChanging(System.Nullable value); @@ -246664,12 +247812,6 @@ namespace Model partial void OnGoalach3Changed(); partial void OnMonthReportTypeChanging(string value); partial void OnMonthReportTypeChanged(); - partial void OnStartDateChanging(System.Nullable value); - partial void OnStartDateChanged(); - partial void OnEndDateChanging(System.Nullable value); - partial void OnEndDateChanged(); - partial void OnTotalHseManhoursYearChanging(System.Nullable value); - partial void OnTotalHseManhoursYearChanged(); #endregion public Manager_MonthReportC() @@ -246688,7 +247830,6 @@ 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)); @@ -248687,6 +249828,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalHseManhoursYear", DbType="Int")] + public System.Nullable TotalHseManhoursYear + { + get + { + return this._TotalHseManhoursYear; + } + set + { + if ((this._TotalHseManhoursYear != value)) + { + this.OnTotalHseManhoursYearChanging(value); + this.SendPropertyChanging(); + this._TotalHseManhoursYear = value; + this.SendPropertyChanged("TotalHseManhoursYear"); + this.OnTotalHseManhoursYearChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthHdangerCount", DbType="Int")] public System.Nullable MonthHdangerCount { @@ -248847,66 +250048,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] - public System.Nullable StartDate - { - get - { - return this._StartDate; - } - set - { - if ((this._StartDate != value)) - { - this.OnStartDateChanging(value); - this.SendPropertyChanging(); - this._StartDate = value; - this.SendPropertyChanged("StartDate"); - this.OnStartDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] - public System.Nullable EndDate - { - get - { - return this._EndDate; - } - set - { - if ((this._EndDate != value)) - { - this.OnEndDateChanging(value); - this.SendPropertyChanging(); - this._EndDate = value; - this.SendPropertyChanged("EndDate"); - this.OnEndDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalHseManhoursYear", DbType="Int")] - public System.Nullable TotalHseManhoursYear - { - get - { - return this._TotalHseManhoursYear; - } - set - { - if ((this._TotalHseManhoursYear != value)) - { - this.OnTotalHseManhoursYearChanging(value); - this.SendPropertyChanging(); - this._TotalHseManhoursYear = value; - this.SendPropertyChanged("TotalHseManhoursYear"); - this.OnTotalHseManhoursYearChanged(); - } - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_AccidentCSort_Manager_MonthReport", Storage="_Manager_AccidentSortC", ThisKey="MonthReportId", OtherKey="MonthReportId", DeleteRule="NO ACTION")] public EntitySet Manager_AccidentSortC { @@ -249089,19 +250230,6 @@ 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 { @@ -249683,18 +250811,6 @@ 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(); @@ -278389,7 +279505,7 @@ namespace Model private System.Nullable _ProblemType; - private string _QuestionTechnologyId; + private string _SubInspectId; private string _TermItemId; @@ -278403,20 +279519,18 @@ 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); @@ -278433,8 +279547,8 @@ namespace Model partial void OnConstructionUnitChanged(); partial void OnProblemTypeChanging(System.Nullable value); partial void OnProblemTypeChanged(); - partial void OnQuestionTechnologyIdChanging(string value); - partial void OnQuestionTechnologyIdChanged(); + partial void OnSubInspectIdChanging(string value); + partial void OnSubInspectIdChanged(); partial void OnTermItemIdChanging(string value); partial void OnTermItemIdChanged(); partial void OnWorkPackIdChanging(string value); @@ -278447,20 +279561,18 @@ 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() @@ -278588,22 +279700,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuestionTechnologyId", DbType="VarChar(50)")] - public string QuestionTechnologyId + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubInspectId", DbType="VarChar(50)")] + public string SubInspectId { get { - return this._QuestionTechnologyId; + return this._SubInspectId; } set { - if ((this._QuestionTechnologyId != value)) + if ((this._SubInspectId != value)) { - this.OnQuestionTechnologyIdChanging(value); + this.OnSubInspectIdChanging(value); this.SendPropertyChanging(); - this._QuestionTechnologyId = value; - this.SendPropertyChanged("QuestionTechnologyId"); - this.OnQuestionTechnologyIdChanged(); + this._SubInspectId = value; + this.SendPropertyChanged("SubInspectId"); + this.OnSubInspectIdChanged(); } } } @@ -278728,6 +279840,26 @@ 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 { @@ -278748,6 +279880,26 @@ 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 { @@ -278808,66 +279960,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="_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; @@ -278909,14 +280001,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); @@ -278935,14 +280027,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() @@ -279090,6 +280182,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(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveState", DbType="Int")] public System.Nullable ApproveState { @@ -279150,26 +280262,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(); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -280102,7 +281194,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Remark { get @@ -280225,12 +281317,6 @@ namespace Model private string _InspectResult; - private System.Nullable _InspectTime; - - private string _AddUser; - - private System.Nullable _AddTime; - private string _Subcontractor; private string _Contractor; @@ -280239,12 +281325,6 @@ namespace Model private string _Owner; - private System.Nullable _IsUnifyWanderAbout; - - private System.Nullable _UnifyWanderAboutData; - - private string _UnifyWanderAboutOpinion; - private System.Nullable _InspectionIsAllPass; private System.Nullable _SubcontractorIsAllPass; @@ -280255,7 +281335,9 @@ namespace Model private System.Nullable _OwnerIsAllPass; - private System.Nullable _WanderIsComplete; + private System.Nullable _WorkPackType; + + private string _PropertyTechnologyId; private System.Nullable _SubcontractorAllPassData; @@ -280265,25 +281347,35 @@ namespace Model private System.Nullable _OwnerAllPassData; - private System.Nullable _WanderCompleteData; + private System.Nullable _WanderIsComplete; - private System.Nullable _WorkPackType; + private System.Nullable _WanderCompleteData; private System.Nullable _IsSiteImplement; - private System.Nullable _InspectIsClose; - - private System.Nullable _InspectCloseData; - - private string _InspectIsCloseUser; - - private string _PropertyTechnologyId; - - private System.Nullable _RecordUploadData; + private string _SiteImplementUser; private System.Nullable _SiteImplementConfirmData; - private string _SiteImplementUser; + private System.Nullable _RecordUploadData; + + private System.Nullable _InspectIsClose; + + private string _InspectIsCloseUser; + + private System.Nullable _InspectCloseData; + + private System.Nullable _IsUnifyWanderAbout; + + private System.Nullable _UnifyWanderAboutData; + + private string _UnifyWanderAboutOpinion; + + private System.Nullable _InspectTime; + + private string _AddUser; + + private System.Nullable _AddTime; #region 可扩展性方法定义 partial void OnLoaded(); @@ -280305,12 +281397,6 @@ 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); @@ -280319,12 +281405,6 @@ 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); @@ -280335,8 +281415,10 @@ namespace Model partial void OnSupervisionIsAllPassChanged(); partial void OnOwnerIsAllPassChanging(System.Nullable value); partial void OnOwnerIsAllPassChanged(); - partial void OnWanderIsCompleteChanging(System.Nullable value); - partial void OnWanderIsCompleteChanged(); + partial void OnWorkPackTypeChanging(System.Nullable value); + partial void OnWorkPackTypeChanged(); + partial void OnPropertyTechnologyIdChanging(string value); + partial void OnPropertyTechnologyIdChanged(); partial void OnSubcontractorAllPassDataChanging(System.Nullable value); partial void OnSubcontractorAllPassDataChanged(); partial void OnContractorAllPassDataChanging(System.Nullable value); @@ -280345,26 +281427,36 @@ 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 OnInspectIsCloseChanging(System.Nullable value); - partial void OnInspectIsCloseChanged(); - partial void OnInspectCloseDataChanging(System.Nullable value); - partial void OnInspectCloseDataChanged(); - 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(); + 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(); #endregion public PreRun_SubInspectTerm() @@ -280532,66 +281624,6 @@ 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 { @@ -280672,66 +281704,6 @@ 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 { @@ -280832,22 +281804,42 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WanderIsComplete", DbType="Int")] - public System.Nullable WanderIsComplete + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] + public System.Nullable WorkPackType { get { - return this._WanderIsComplete; + return this._WorkPackType; } set { - if ((this._WanderIsComplete != value)) + if ((this._WorkPackType != value)) { - this.OnWanderIsCompleteChanging(value); + this.OnWorkPackTypeChanging(value); this.SendPropertyChanging(); - this._WanderIsComplete = value; - this.SendPropertyChanged("WanderIsComplete"); - this.OnWanderIsCompleteChanged(); + 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(); } } } @@ -280932,6 +281924,26 @@ 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 { @@ -280952,26 +281964,6 @@ 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 { @@ -280992,102 +281984,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsClose", DbType="Int")] - public System.Nullable InspectIsClose + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementUser", DbType="VarChar(50)")] + public string SiteImplementUser { get { - return this._InspectIsClose; + return this._SiteImplementUser; } set { - if ((this._InspectIsClose != value)) + if ((this._SiteImplementUser != value)) { - this.OnInspectIsCloseChanging(value); + this.OnSiteImplementUserChanging(value); this.SendPropertyChanging(); - this._InspectIsClose = value; - this.SendPropertyChanged("InspectIsClose"); - this.OnInspectIsCloseChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectCloseData", DbType="DateTime")] - public System.Nullable InspectCloseData - { - get - { - return this._InspectCloseData; - } - set - { - if ((this._InspectCloseData != value)) - { - this.OnInspectCloseDataChanging(value); - this.SendPropertyChanging(); - this._InspectCloseData = value; - this.SendPropertyChanged("InspectCloseData"); - this.OnInspectCloseDataChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsCloseUser", DbType="NVarChar(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="_PropertyTechnologyId", DbType="NVarChar(500)")] - 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(); - } - } - } - - [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(); + this._SiteImplementUser = value; + this.SendPropertyChanged("SiteImplementUser"); + this.OnSiteImplementUserChanged(); } } } @@ -281112,22 +282024,202 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteImplementUser", DbType="NVarChar(50)")] - public string SiteImplementUser + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordUploadData", DbType="DateTime")] + public System.Nullable RecordUploadData { get { - return this._SiteImplementUser; + return this._RecordUploadData; } set { - if ((this._SiteImplementUser != value)) + if ((this._RecordUploadData != value)) { - this.OnSiteImplementUserChanging(value); + this.OnRecordUploadDataChanging(value); this.SendPropertyChanging(); - this._SiteImplementUser = value; - this.SendPropertyChanged("SiteImplementUser"); - this.OnSiteImplementUserChanged(); + this._RecordUploadData = value; + this.SendPropertyChanged("RecordUploadData"); + this.OnRecordUploadDataChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectIsClose", DbType="Int")] + public System.Nullable InspectIsClose + { + get + { + return this._InspectIsClose; + } + set + { + if ((this._InspectIsClose != value)) + { + this.OnInspectIsCloseChanging(value); + this.SendPropertyChanging(); + this._InspectIsClose = value; + this.SendPropertyChanged("InspectIsClose"); + this.OnInspectIsCloseChanged(); + } + } + } + + [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 + { + get + { + return this._InspectCloseData; + } + set + { + if ((this._InspectCloseData != value)) + { + this.OnInspectCloseDataChanging(value); + this.SendPropertyChanging(); + this._InspectCloseData = value; + this.SendPropertyChanged("InspectCloseData"); + this.OnInspectCloseDataChanged(); + } + } + } + + [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="_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(); } } } @@ -281195,6 +282287,22 @@ 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; @@ -281207,22 +282315,6 @@ 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); @@ -281263,6 +282355,22 @@ 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); @@ -281275,22 +282383,6 @@ 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() @@ -281658,6 +282750,166 @@ 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 { @@ -281678,7 +282930,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string PropertyTechnologyId { get @@ -281778,166 +283030,6 @@ 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; @@ -282939,6 +284031,8 @@ namespace Model private string _RestrictCondition; + private System.Nullable _ResponsibilityProposeSatate; + private System.Nullable _ResponsibilityConfirm; private System.Nullable _ProposeConfirm; @@ -282949,9 +284043,11 @@ namespace Model private System.Nullable _OwnerConfirm; + private System.Nullable _ProposeConfirmData; + private System.Nullable _ResponsibilityConfirmData; - private System.Nullable _ProposeConfirmData; + private System.Nullable _ProposeHandleData; private System.Nullable _GeneraConfirmData; @@ -282967,10 +284063,6 @@ namespace Model private System.Nullable _Sort; - private System.Nullable _ResponsibilityProposeSatate; - - private System.Nullable _ProposeHandleData; - private string _FourDecisionCode; #region 可扩展性方法定义 @@ -283007,6 +284099,8 @@ 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); @@ -283017,10 +284111,12 @@ namespace Model partial void OnSupervisionConfirmChanged(); partial void OnOwnerConfirmChanging(System.Nullable value); partial void OnOwnerConfirmChanged(); - partial void OnResponsibilityConfirmDataChanging(System.Nullable value); - partial void OnResponsibilityConfirmDataChanged(); 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 OnGeneraConfirmDataChanging(System.Nullable value); partial void OnGeneraConfirmDataChanged(); partial void OnSupervisionConfirmDataChanging(System.Nullable value); @@ -283035,10 +284131,6 @@ 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 @@ -283348,6 +284440,26 @@ 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 { @@ -283448,6 +284560,26 @@ 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 { @@ -283468,22 +284600,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeConfirmData", DbType="DateTime")] - public System.Nullable ProposeConfirmData + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposeHandleData", DbType="DateTime")] + public System.Nullable ProposeHandleData { get { - return this._ProposeConfirmData; + return this._ProposeHandleData; } set { - if ((this._ProposeConfirmData != value)) + if ((this._ProposeHandleData != value)) { - this.OnProposeConfirmDataChanging(value); + this.OnProposeHandleDataChanging(value); this.SendPropertyChanging(); - this._ProposeConfirmData = value; - this.SendPropertyChanged("ProposeConfirmData"); - this.OnProposeConfirmDataChanged(); + this._ProposeHandleData = value; + this.SendPropertyChanged("ProposeHandleData"); + this.OnProposeHandleDataChanged(); } } } @@ -283628,46 +284760,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="_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 { @@ -284380,7 +285472,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Remark { get @@ -320201,164 +321293,6 @@ 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 { @@ -341806,6 +342740,8 @@ namespace Model private string _Content; + private string _CsUsers; + private EntityRef _Base_Project; private EntityRef _Base_SolutionTempleteType; @@ -341850,6 +342786,8 @@ namespace Model partial void OnSpecialSchemeTypeIdChanged(); partial void OnContentChanging(string value); partial void OnContentChanged(); + partial void OnCsUsersChanging(string value); + partial void OnCsUsersChanged(); #endregion public Solution_CQMSConstructSolution() @@ -342178,6 +343116,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CsUsers", DbType="NVarChar(500)")] + public string CsUsers + { + get + { + return this._CsUsers; + } + set + { + if ((this._CsUsers != value)) + { + this.OnCsUsersChanging(value); + this.SendPropertyChanging(); + this._CsUsers = value; + this.SendPropertyChanged("CsUsers"); + this.OnCsUsersChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_CQMSConstructSolution_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -342744,6 +343702,308 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Solution_CQMSConstructSolutionApprove_Item")] + public partial class Solution_CQMSConstructSolutionApprove_Item : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private System.Nullable _TypeSortId; + + private System.Nullable _SortId; + + private string _ConstructSolutionId; + + private string _Chapter; + + private string _Amendment; + + private string _Proposer; + + private string _ProposerName; + + private string _Modification; + + private string _ReviewerOpinion; + + private string _IsAccept; + + #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 OnTypeSortIdChanging(System.Nullable value); + partial void OnTypeSortIdChanged(); + partial void OnSortIdChanging(System.Nullable value); + partial void OnSortIdChanged(); + partial void OnConstructSolutionIdChanging(string value); + partial void OnConstructSolutionIdChanged(); + partial void OnChapterChanging(string value); + partial void OnChapterChanged(); + partial void OnAmendmentChanging(string value); + partial void OnAmendmentChanged(); + partial void OnProposerChanging(string value); + partial void OnProposerChanged(); + partial void OnProposerNameChanging(string value); + partial void OnProposerNameChanged(); + partial void OnModificationChanging(string value); + partial void OnModificationChanged(); + partial void OnReviewerOpinionChanging(string value); + partial void OnReviewerOpinionChanged(); + partial void OnIsAcceptChanging(string value); + partial void OnIsAcceptChanged(); + #endregion + + public Solution_CQMSConstructSolutionApprove_Item() + { + 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="_TypeSortId", DbType="Int")] + public System.Nullable TypeSortId + { + get + { + return this._TypeSortId; + } + set + { + if ((this._TypeSortId != value)) + { + this.OnTypeSortIdChanging(value); + this.SendPropertyChanging(); + this._TypeSortId = value; + this.SendPropertyChanged("TypeSortId"); + this.OnTypeSortIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortId", DbType="Int")] + public System.Nullable SortId + { + get + { + return this._SortId; + } + set + { + if ((this._SortId != value)) + { + this.OnSortIdChanging(value); + this.SendPropertyChanging(); + this._SortId = value; + this.SendPropertyChanged("SortId"); + this.OnSortIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionId", DbType="NVarChar(50)")] + public string ConstructSolutionId + { + get + { + return this._ConstructSolutionId; + } + set + { + if ((this._ConstructSolutionId != value)) + { + this.OnConstructSolutionIdChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionId = value; + this.SendPropertyChanged("ConstructSolutionId"); + this.OnConstructSolutionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Chapter", DbType="NVarChar(200)")] + public string Chapter + { + get + { + return this._Chapter; + } + set + { + if ((this._Chapter != value)) + { + this.OnChapterChanging(value); + this.SendPropertyChanging(); + this._Chapter = value; + this.SendPropertyChanged("Chapter"); + this.OnChapterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Amendment", DbType="NVarChar(200)")] + public string Amendment + { + get + { + return this._Amendment; + } + set + { + if ((this._Amendment != value)) + { + this.OnAmendmentChanging(value); + this.SendPropertyChanging(); + this._Amendment = value; + this.SendPropertyChanged("Amendment"); + this.OnAmendmentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Proposer", DbType="NVarChar(50)")] + public string Proposer + { + get + { + return this._Proposer; + } + set + { + if ((this._Proposer != value)) + { + this.OnProposerChanging(value); + this.SendPropertyChanging(); + this._Proposer = value; + this.SendPropertyChanged("Proposer"); + this.OnProposerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProposerName", DbType="NVarChar(50)")] + public string ProposerName + { + get + { + return this._ProposerName; + } + set + { + if ((this._ProposerName != value)) + { + this.OnProposerNameChanging(value); + this.SendPropertyChanging(); + this._ProposerName = value; + this.SendPropertyChanged("ProposerName"); + this.OnProposerNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Modification", DbType="NVarChar(200)")] + public string Modification + { + get + { + return this._Modification; + } + set + { + if ((this._Modification != value)) + { + this.OnModificationChanging(value); + this.SendPropertyChanging(); + this._Modification = value; + this.SendPropertyChanged("Modification"); + this.OnModificationChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewerOpinion", DbType="NVarChar(200)")] + public string ReviewerOpinion + { + get + { + return this._ReviewerOpinion; + } + set + { + if ((this._ReviewerOpinion != value)) + { + this.OnReviewerOpinionChanging(value); + this.SendPropertyChanging(); + this._ReviewerOpinion = value; + this.SendPropertyChanged("ReviewerOpinion"); + this.OnReviewerOpinionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAccept", DbType="NVarChar(50)")] + public string IsAccept + { + get + { + return this._IsAccept; + } + set + { + if ((this._IsAccept != value)) + { + this.OnIsAcceptChanging(value); + this.SendPropertyChanging(); + this._IsAccept = value; + this.SendPropertyChanged("IsAccept"); + this.OnIsAcceptChanged(); + } + } + } + + 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.Solution_ExpertArgument")] public partial class Solution_ExpertArgument : INotifyPropertyChanging, INotifyPropertyChanged { @@ -357476,6 +358736,8 @@ namespace Model private EntitySet _Doc_DocManage; + private EntitySet _Doc_DocManageApprove; + private EntitySet _Driver_DriverProgress; private EntitySet _Driver_DriverReport; @@ -358206,6 +359468,7 @@ 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)); @@ -360649,6 +361912,19 @@ 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 { @@ -365243,6 +366519,18 @@ 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(); @@ -372612,8 +373900,6 @@ namespace Model private System.Nullable _IsBuiltIn; - private EntitySet _Check_CheckSpecial; - private EntitySet _Technique_CheckItemDetail; #region 可扩展性方法定义 @@ -372640,7 +373926,6 @@ namespace Model public Technique_CheckItemSet() { - this._Check_CheckSpecial = new EntitySet(new Action(this.attach_Check_CheckSpecial), new Action(this.detach_Check_CheckSpecial)); this._Technique_CheckItemDetail = new EntitySet(new Action(this.attach_Technique_CheckItemDetail), new Action(this.detach_Technique_CheckItemDetail)); OnCreated(); } @@ -372805,19 +374090,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Technique_CheckItemSet", Storage="_Check_CheckSpecial", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", DeleteRule="NO ACTION")] - public EntitySet Check_CheckSpecial - { - get - { - return this._Check_CheckSpecial; - } - set - { - this._Check_CheckSpecial.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Technique_CheckItemDetail_Technique_CheckItemSet", Storage="_Technique_CheckItemDetail", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", DeleteRule="NO ACTION")] public EntitySet Technique_CheckItemDetail { @@ -372851,18 +374123,6 @@ namespace Model } } - private void attach_Check_CheckSpecial(Check_CheckSpecial entity) - { - this.SendPropertyChanging(); - entity.Technique_CheckItemSet = this; - } - - private void detach_Check_CheckSpecial(Check_CheckSpecial entity) - { - this.SendPropertyChanging(); - entity.Technique_CheckItemSet = null; - } - private void attach_Technique_CheckItemDetail(Technique_CheckItemDetail entity) { this.SendPropertyChanging(); @@ -396640,12 +397900,8 @@ namespace Model private string _Comments; - private string _Num_NO; - private string _System_No; - private string _Sub_Sys_No; - private string _Cat; private string _Raised_By; @@ -396666,8 +397922,6 @@ namespace Model private string _PIC_WUH; - private string _Correction_Action; - private System.Nullable _Actual_Date; private string _Cleared_By; @@ -396686,6 +397940,12 @@ namespace Model private string _Remark; + private string _Sub_Sys_No; + + private string _Num_NO; + + private string _Correction_Action; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -396722,12 +397982,8 @@ namespace Model partial void OnPUNCH_ITEM_STATUSChanged(); partial void OnCommentsChanging(string value); partial void OnCommentsChanged(); - partial void OnNum_NOChanging(string value); - partial void OnNum_NOChanged(); partial void OnSystem_NoChanging(string value); partial void OnSystem_NoChanged(); - partial void OnSub_Sys_NoChanging(string value); - partial void OnSub_Sys_NoChanged(); partial void OnCatChanging(string value); partial void OnCatChanged(); partial void OnRaised_ByChanging(string value); @@ -396748,8 +398004,6 @@ namespace Model partial void OnPICChanged(); partial void OnPIC_WUHChanging(string value); partial void OnPIC_WUHChanged(); - partial void OnCorrection_ActionChanging(string value); - partial void OnCorrection_ActionChanged(); partial void OnActual_DateChanging(System.Nullable value); partial void OnActual_DateChanged(); partial void OnCleared_ByChanging(string value); @@ -396768,6 +398022,12 @@ namespace Model partial void OnStatusChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); + partial void OnSub_Sys_NoChanging(string value); + partial void OnSub_Sys_NoChanged(); + partial void OnNum_NOChanging(string value); + partial void OnNum_NOChanged(); + partial void OnCorrection_ActionChanging(string value); + partial void OnCorrection_ActionChanged(); #endregion public Transfer_PunchlistFrom() @@ -397095,26 +398355,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Num_NO", DbType="NVarChar(50)")] - public string Num_NO - { - get - { - return this._Num_NO; - } - set - { - if ((this._Num_NO != value)) - { - this.OnNum_NOChanging(value); - this.SendPropertyChanging(); - this._Num_NO = value; - this.SendPropertyChanged("Num_NO"); - this.OnNum_NOChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_System_No", DbType="NVarChar(50)")] public string System_No { @@ -397135,26 +398375,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sub_Sys_No", DbType="NVarChar(50)")] - public string Sub_Sys_No - { - get - { - return this._Sub_Sys_No; - } - set - { - if ((this._Sub_Sys_No != value)) - { - this.OnSub_Sys_NoChanging(value); - this.SendPropertyChanging(); - this._Sub_Sys_No = value; - this.SendPropertyChanged("Sub_Sys_No"); - this.OnSub_Sys_NoChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Cat", DbType="NVarChar(50)")] public string Cat { @@ -397355,26 +398575,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Correction_Action", DbType="NVarChar(500)")] - public string Correction_Action - { - get - { - return this._Correction_Action; - } - set - { - if ((this._Correction_Action != value)) - { - this.OnCorrection_ActionChanging(value); - this.SendPropertyChanging(); - this._Correction_Action = value; - this.SendPropertyChanged("Correction_Action"); - this.OnCorrection_ActionChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Actual_Date", DbType="DateTime")] public System.Nullable Actual_Date { @@ -397555,6 +398755,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sub_Sys_No", DbType="NVarChar(50)")] + public string Sub_Sys_No + { + get + { + return this._Sub_Sys_No; + } + set + { + if ((this._Sub_Sys_No != value)) + { + this.OnSub_Sys_NoChanging(value); + this.SendPropertyChanging(); + this._Sub_Sys_No = value; + this.SendPropertyChanged("Sub_Sys_No"); + this.OnSub_Sys_NoChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Num_NO", DbType="NVarChar(50)")] + public string Num_NO + { + get + { + return this._Num_NO; + } + set + { + if ((this._Num_NO != value)) + { + this.OnNum_NOChanging(value); + this.SendPropertyChanging(); + this._Num_NO = value; + this.SendPropertyChanged("Num_NO"); + this.OnNum_NOChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Correction_Action", DbType="NVarChar(500)")] + public string Correction_Action + { + get + { + return this._Correction_Action; + } + set + { + if ((this._Correction_Action != value)) + { + this.OnCorrection_ActionChanging(value); + this.SendPropertyChanging(); + this._Correction_Action = value; + this.SendPropertyChanged("Correction_Action"); + this.OnCorrection_ActionChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -421779,6 +423039,213 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_ActionWorkLedger")] + public partial class View_Information_ActionWorkLedger + { + + private string _ActionWorkLedgerId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _YearId; + + private System.Nullable _Quarter; + + private string _UpState; + + private string _HandleState; + + private string _Quarters; + + private string _UnitName; + + private string _HandleMan; + + private string _UserName; + + public View_Information_ActionWorkLedger() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionWorkLedgerId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ActionWorkLedgerId + { + get + { + return this._ActionWorkLedgerId; + } + set + { + if ((this._ActionWorkLedgerId != value)) + { + this._ActionWorkLedgerId = 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="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this._ReportDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this._Quarter = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string Quarters + { + get + { + return this._Quarters; + } + set + { + if ((this._Quarters != value)) + { + this._Quarters = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = 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.TableAttribute(Name="dbo.View_Information_DrillConductedQuarterlyReport")] public partial class View_Information_DrillConductedQuarterlyReport { @@ -423444,6 +424911,213 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_SafetyProductionEvaluation")] + public partial class View_Information_SafetyProductionEvaluation + { + + private string _SafetyProductionEvaluationId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _YearId; + + private System.Nullable _Quarter; + + private string _UpState; + + private string _HandleState; + + private string _Quarters; + + private string _UnitName; + + private string _HandleMan; + + private string _UserName; + + public View_Information_SafetyProductionEvaluation() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyProductionEvaluationId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SafetyProductionEvaluationId + { + get + { + return this._SafetyProductionEvaluationId; + } + set + { + if ((this._SafetyProductionEvaluationId != value)) + { + this._SafetyProductionEvaluationId = 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="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this._ReportDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this._Quarter = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string Quarters + { + get + { + return this._Quarters; + } + set + { + if ((this._Quarters != value)) + { + this._Quarters = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = 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.TableAttribute(Name="dbo.View_Information_SafetyQuarterlyReport")] public partial class View_Information_SafetyQuarterlyReport { diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index ac4045ee..a9b75034 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -69,7 +69,11 @@ + + + +