From 0a70ab9af7cad8fe894612d26bc09d2a4b8fc15c Mon Sep 17 00:00:00 2001 From: geh <1923421292@qq.com> Date: Wed, 19 Feb 2025 15:09:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_V2025-02-19-geh.sql | 334 ++++ SGGL/BLL/BLL.csproj | 5 + SGGL/BLL/Common/Const.cs | 19 + .../HSSE/Technique/AwardStandardsService.cs | 96 ++ .../Technique/ConstructionStandardsService.cs | 96 ++ .../Technique/ProtectionStandardsService.cs | 95 ++ .../SafetyResponsibilitiesService.cs | 97 ++ .../App_GlobalResources/Lan.en-US.resx | 2 +- .../App_GlobalResources/Lan.resx | 2 +- .../App_GlobalResources/Lan.zh-CN.resx | 2 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 68 +- .../HSSE/Technique/AwardStandards.aspx | 108 ++ .../HSSE/Technique/AwardStandards.aspx.cs | 319 ++++ .../Technique/AwardStandards.aspx.designer.cs | 170 +++ .../HSSE/Technique/AwardStandardsEdit.aspx | 72 + .../HSSE/Technique/AwardStandardsEdit.aspx.cs | 221 +++ .../AwardStandardsEdit.aspx.designer.cs | 152 ++ .../HSSE/Technique/ConstructionStandards.aspx | 108 ++ .../Technique/ConstructionStandards.aspx.cs | 319 ++++ .../ConstructionStandards.aspx.designer.cs | 170 +++ .../Technique/ConstructionStandardsEdit.aspx | 72 + .../ConstructionStandardsEdit.aspx.cs | 221 +++ ...ConstructionStandardsEdit.aspx.designer.cs | 152 ++ .../HSSE/Technique/ProtectionStandards.aspx | 108 ++ .../Technique/ProtectionStandards.aspx.cs | 319 ++++ .../ProtectionStandards.aspx.designer.cs | 170 +++ .../Technique/ProtectionStandardsEdit.aspx | 73 + .../Technique/ProtectionStandardsEdit.aspx.cs | 223 +++ .../ProtectionStandardsEdit.aspx.designer.cs | 152 ++ .../Technique/SafetyResponsibilities.aspx | 108 ++ .../Technique/SafetyResponsibilities.aspx.cs | 319 ++++ .../SafetyResponsibilities.aspx.designer.cs | 170 +++ .../Technique/SafetyResponsibilitiesEdit.aspx | 72 + .../SafetyResponsibilitiesEdit.aspx.cs | 221 +++ ...afetyResponsibilitiesEdit.aspx.designer.cs | 152 ++ SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx | 33 +- .../common/mainMenu_HSSE.aspx.cs | 179 ++- .../common/mainMenu_HSSE.aspx.designer.cs | 58 +- SGGL/Model/Model.cs | 1348 +++++++++++++++++ 39 files changed, 6541 insertions(+), 64 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2025-02-19-geh.sql create mode 100644 SGGL/BLL/HSSE/Technique/AwardStandardsService.cs create mode 100644 SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs create mode 100644 SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs create mode 100644 SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2025-02-19-geh.sql b/DataBase/版本日志/SGGLDB_V2025-02-19-geh.sql new file mode 100644 index 0000000..3590e0d --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-02-19-geh.sql @@ -0,0 +1,334 @@ +CREATE TABLE [dbo].[Technique_ProtectionStandards] ( + [ProtectionStandardsId] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [ProtectionStandardsCode] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [ProtectionStandardsName] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL, + [CompileMan] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [CompileDate] datetime NULL, + [AttachUrl] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL, + [AuditMan] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [AuditDate] datetime NULL, + [IsPass] bit NULL, + [IsBuild] bit NULL, + [UpState] char(1) COLLATE Chinese_PRC_CI_AS NULL, + CONSTRAINT [PK_Technique_ProtectionStandards] PRIMARY KEY CLUSTERED ([ProtectionStandardsId]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY], + +) +ON [PRIMARY] +GO + +ALTER TABLE [dbo].[Technique_ProtectionStandards] SET (LOCK_ESCALATION = TABLE) +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'编号', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ProtectionStandards', +'COLUMN', N'ProtectionStandardsCode' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'名称', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ProtectionStandards', +'COLUMN', N'ProtectionStandardsName' +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'编制人', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ProtectionStandards', +'COLUMN', N'CompileMan' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'编制日期', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ProtectionStandards', +'COLUMN', N'CompileDate' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'附件', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ProtectionStandards', +'COLUMN', N'AttachUrl' +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'防护标准表', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ProtectionStandards' + +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed], [MenuEnName]) +VALUES (N'8E3A5EDC-62CA-4F64-A4E7-CD3D473A6201', N'防护标准', NULL, N'HSSE/Technique/ProtectionStandards.aspx', 90, N'D70D9BF5-C72E-414D-941B-CF9B4065F6BA', N'Menu_DigData', '1', '1', '1', NULL); + + + +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'8E3A5EDC-62CA-4F64-A4E7-CD3D473A6201', N'增加', 1); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'8E3A5EDC-62CA-4F64-A4E7-CD3D473A6201', N'修改', 2); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'8E3A5EDC-62CA-4F64-A4E7-CD3D473A6201', N'删除', 3); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'8E3A5EDC-62CA-4F64-A4E7-CD3D473A6201', N'保存', 4); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'8E3A5EDC-62CA-4F64-A4E7-CD3D473A6201', N'导出', 5); + + + +CREATE TABLE [dbo].[Technique_SafetyResponsibilities] ( + [SafetyResponsibilitiesId] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [SafetyResponsibilitiesCode] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [SafetyResponsibilitiesName] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL, + [CompileMan] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [CompileDate] datetime NULL, + [AttachUrl] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL, + [AuditMan] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [AuditDate] datetime NULL, + [IsPass] bit NULL, + [IsBuild] bit NULL, + [UpState] char(1) COLLATE Chinese_PRC_CI_AS NULL, + CONSTRAINT [PK_Technique_SafetyResponsibilities] PRIMARY KEY CLUSTERED ([SafetyResponsibilitiesId]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY], + +) +ON [PRIMARY] +GO + +ALTER TABLE [dbo].[Technique_SafetyResponsibilities] SET (LOCK_ESCALATION = TABLE) +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'编号', +'SCHEMA', N'dbo', +'TABLE', N'Technique_SafetyResponsibilities', +'COLUMN', N'SafetyResponsibilitiesCode' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'名称', +'SCHEMA', N'dbo', +'TABLE', N'Technique_SafetyResponsibilities', +'COLUMN', N'SafetyResponsibilitiesName' +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'编制人', +'SCHEMA', N'dbo', +'TABLE', N'Technique_SafetyResponsibilities', +'COLUMN', N'CompileMan' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'编制日期', +'SCHEMA', N'dbo', +'TABLE', N'Technique_SafetyResponsibilities', +'COLUMN', N'CompileDate' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'附件', +'SCHEMA', N'dbo', +'TABLE', N'Technique_SafetyResponsibilities', +'COLUMN', N'AttachUrl' +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'安全职责表', +'SCHEMA', N'dbo', +'TABLE', N'Technique_SafetyResponsibilities' + +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed], [MenuEnName]) +VALUES (N'6D75EA6C-0E49-4B04-850B-930B628EE1DF', N'安全职责', NULL, N'HSSE/Technique/SafetyResponsibilities.aspx', 100, N'D70D9BF5-C72E-414D-941B-CF9B4065F6BA', N'Menu_DigData', '1', '1', '1', NULL); + +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'6D75EA6C-0E49-4B04-850B-930B628EE1DF', N'增加', 1); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'6D75EA6C-0E49-4B04-850B-930B628EE1DF', N'修改', 2); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'6D75EA6C-0E49-4B04-850B-930B628EE1DF', N'删除', 3); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'6D75EA6C-0E49-4B04-850B-930B628EE1DF', N'保存', 4); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'6D75EA6C-0E49-4B04-850B-930B628EE1DF', N'导出', 5); + + + +CREATE TABLE [dbo].[Technique_ConstructionStandards] ( + [ConstructionStandardsId] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [ConstructionStandardsCode] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [ConstructionStandardsName] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL, + [CompileMan] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [CompileDate] datetime NULL, + [AttachUrl] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL, + [AuditMan] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [AuditDate] datetime NULL, + [IsPass] bit NULL, + [IsBuild] bit NULL, + [UpState] char(1) COLLATE Chinese_PRC_CI_AS NULL, + CONSTRAINT [PK_Technique_ConstructionStandards] PRIMARY KEY CLUSTERED ([ConstructionStandardsId]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY], + +) +ON [PRIMARY] +GO + +ALTER TABLE [dbo].[Technique_ConstructionStandards] SET (LOCK_ESCALATION = TABLE) +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'编号', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ConstructionStandards', +'COLUMN', N'ConstructionStandardsCode' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'名称', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ConstructionStandards', +'COLUMN', N'ConstructionStandardsName' +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'编制人', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ConstructionStandards', +'COLUMN', N'CompileMan' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'编制日期', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ConstructionStandards', +'COLUMN', N'CompileDate' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'附件', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ConstructionStandards', +'COLUMN', N'AttachUrl' +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'队伍文明施工标准表', +'SCHEMA', N'dbo', +'TABLE', N'Technique_ConstructionStandards' + + +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed], [MenuEnName]) +VALUES (N'23ACEE2E-0E56-4136-9DFB-C971B3C4EA60', N'队伍文明施工标准', NULL, N'HSSE/Technique/ConstructionStandards.aspx', 110, N'D70D9BF5-C72E-414D-941B-CF9B4065F6BA', N'Menu_DigData', '1', '1', '1', NULL); + +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'23ACEE2E-0E56-4136-9DFB-C971B3C4EA60', N'增加', 1); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'23ACEE2E-0E56-4136-9DFB-C971B3C4EA60', N'修改', 2); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'23ACEE2E-0E56-4136-9DFB-C971B3C4EA60', N'删除', 3); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'23ACEE2E-0E56-4136-9DFB-C971B3C4EA60', N'保存', 4); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'23ACEE2E-0E56-4136-9DFB-C971B3C4EA60', N'导出', 5); + + + +CREATE TABLE [dbo].[Technique_AwardStandards] ( + [AwardStandardsId] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [AwardStandardsCode] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [AwardStandardsName] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL, + [CompileMan] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [CompileDate] datetime NULL, + [AttachUrl] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL, + [AuditMan] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [AuditDate] datetime NULL, + [IsPass] bit NULL, + [IsBuild] bit NULL, + [UpState] char(1) COLLATE Chinese_PRC_CI_AS NULL, + CONSTRAINT [PK_Technique_AwardStandards] PRIMARY KEY CLUSTERED ([AwardStandardsId]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY], + +) +ON [PRIMARY] +GO + +ALTER TABLE [dbo].[Technique_AwardStandards] SET (LOCK_ESCALATION = TABLE) +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'编号', +'SCHEMA', N'dbo', +'TABLE', N'Technique_AwardStandards', +'COLUMN', N'AwardStandardsCode' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'名称', +'SCHEMA', N'dbo', +'TABLE', N'Technique_AwardStandards', +'COLUMN', N'AwardStandardsName' +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'编制人', +'SCHEMA', N'dbo', +'TABLE', N'Technique_AwardStandards', +'COLUMN', N'CompileMan' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'编制日期', +'SCHEMA', N'dbo', +'TABLE', N'Technique_AwardStandards', +'COLUMN', N'CompileDate' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'附件', +'SCHEMA', N'dbo', +'TABLE', N'Technique_AwardStandards', +'COLUMN', N'AttachUrl' +GO + + +EXEC sp_addextendedproperty +'MS_Description', N'奖罚标准表', +'SCHEMA', N'dbo', +'TABLE', N'Technique_AwardStandards' + +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed], [MenuEnName]) +VALUES (N'E4FD28A8-9715-452F-BB16-5FF87BE7D32B', N'奖罚标准', NULL, N'HSSE/Technique/AwardStandards.aspx', 120, N'D70D9BF5-C72E-414D-941B-CF9B4065F6BA', N'Menu_DigData', '1', '1', '1', NULL); + +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'E4FD28A8-9715-452F-BB16-5FF87BE7D32B', N'增加', 1); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'E4FD28A8-9715-452F-BB16-5FF87BE7D32B', N'修改', 2); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'E4FD28A8-9715-452F-BB16-5FF87BE7D32B', N'删除', 3); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'E4FD28A8-9715-452F-BB16-5FF87BE7D32B', N'保存', 4); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (NewID(), N'E4FD28A8-9715-452F-BB16-5FF87BE7D32B', N'导出', 5); + + +alter table dbo.Technique_ProtectionStandards add Remark nvarchar(500); +alter table dbo.Technique_SafetyResponsibilities add Remark nvarchar(500); +alter table dbo.Technique_ConstructionStandards add Remark nvarchar(500); +alter table dbo.Technique_AwardStandards add Remark nvarchar(500); \ No newline at end of file diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 63e2e63..eb4f501 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -81,6 +81,7 @@ False ..\Lib\Microsoft.SQLServer.ManagedDTS.dll + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll @@ -715,13 +716,17 @@ + + + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 8504eaf..6679842 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -1877,6 +1877,25 @@ namespace BLL /// 施工方案 /// public const string SpecialSchemeMenuId = "3E2F2FFD-ED2E-4914-8370-D97A68398814"; + + /// + /// 防护标准 + /// + public const string ProtectionStandardsMenuId = "8E3A5EDC-62CA-4F64-A4E7-CD3D473A6201"; + + /// + /// 安全职责 + /// + public const string SafetyResponsibilitiesMenuId = "6D75EA6C-0E49-4B04-850B-930B628EE1DF"; + /// + /// 队伍文明施工标准 + /// + public const string ConstructionStandardsMenuId = "23ACEE2E-0E56-4136-9DFB-C971B3C4EA60"; + /// + /// 奖罚标准 + /// + public const string AwardStandardsMenuId = "E4FD28A8-9715-452F-BB16-5FF87BE7D32B"; + #endregion #region 标牌管理 diff --git a/SGGL/BLL/HSSE/Technique/AwardStandardsService.cs b/SGGL/BLL/HSSE/Technique/AwardStandardsService.cs new file mode 100644 index 0000000..c00ddf7 --- /dev/null +++ b/SGGL/BLL/HSSE/Technique/AwardStandardsService.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +namespace BLL; + +public class AwardStandardsService +{ + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取 + /// + /// + /// + public static Model.Technique_AwardStandards GetAwardStandardsListById(string AwardStandardsId) + { + return Funs.DB.Technique_AwardStandards.FirstOrDefault(e => + e.AwardStandardsId == AwardStandardsId); + } + + + + /// + /// 添加 + /// + /// + public static void AddAwardStandardsList(Model.Technique_AwardStandards AwardStandardsList) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_AwardStandards newAwardStandardsList = new Model.Technique_AwardStandards + { + AwardStandardsId = AwardStandardsList.AwardStandardsId, + AwardStandardsCode = AwardStandardsList.AwardStandardsCode, + AwardStandardsName = AwardStandardsList.AwardStandardsName, + AttachUrl = AwardStandardsList.AttachUrl, + CompileMan = AwardStandardsList.CompileMan, + CompileDate = AwardStandardsList.CompileDate, + }; + newAwardStandardsList.CompileMan = AwardStandardsList.CompileMan; + newAwardStandardsList.CompileDate = AwardStandardsList.CompileDate; + newAwardStandardsList.IsPass = AwardStandardsList.IsPass; + newAwardStandardsList.UpState = AwardStandardsList.UpState; + newAwardStandardsList.Remark = AwardStandardsList.Remark; + db.Technique_AwardStandards.InsertOnSubmit(newAwardStandardsList); + db.SubmitChanges(); + } + + /// + /// 修改 + /// + /// + public static void UpdateAwardStandardsList(Model.Technique_AwardStandards AwardStandardsList) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_AwardStandards newAwardStandardsList = + db.Technique_AwardStandards.FirstOrDefault(e => + e.AwardStandardsId == AwardStandardsList.AwardStandardsId); + if (newAwardStandardsList != null) + { + newAwardStandardsList.AwardStandardsCode = AwardStandardsList.AwardStandardsCode; + newAwardStandardsList.AwardStandardsName = AwardStandardsList.AwardStandardsName; + newAwardStandardsList.AttachUrl = AwardStandardsList.AttachUrl; + newAwardStandardsList.CompileMan = AwardStandardsList.CompileMan; + newAwardStandardsList.CompileDate = AwardStandardsList.CompileDate; + newAwardStandardsList.UpState = AwardStandardsList.UpState; + newAwardStandardsList.Remark = AwardStandardsList.Remark; + db.SubmitChanges(); + } + } + + + /// + ///根据主键删除 + /// + /// + public static void DeleteAwardStandardsListById(string AwardStandardsId) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_AwardStandards AwardStandardsList = + db.Technique_AwardStandards.FirstOrDefault(e => e.AwardStandardsId == AwardStandardsId); + if (AwardStandardsList != null) + { + if (!string.IsNullOrEmpty(AwardStandardsList.AttachUrl)) + { + BLL.UploadFileService.DeleteFile(Funs.RootPath, AwardStandardsList.AttachUrl); + } + + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(AwardStandardsList.AwardStandardsId); + + db.Technique_AwardStandards.DeleteOnSubmit(AwardStandardsList); + db.SubmitChanges(); + } + } +} \ No newline at end of file diff --git a/SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs b/SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs new file mode 100644 index 0000000..2bc3497 --- /dev/null +++ b/SGGL/BLL/HSSE/Technique/ConstructionStandardsService.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +namespace BLL; + +public class ConstructionStandardsService +{ + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取 + /// + /// + /// + public static Model.Technique_ConstructionStandards GetConstructionStandardsListById(string ConstructionStandardsId) + { + return Funs.DB.Technique_ConstructionStandards.FirstOrDefault(e => + e.ConstructionStandardsId == ConstructionStandardsId); + } + + + /// + /// 添加 + /// + /// + public static void AddConstructionStandardsList(Model.Technique_ConstructionStandards ConstructionStandardsList) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_ConstructionStandards newConstructionStandardsList = new Model.Technique_ConstructionStandards + { + ConstructionStandardsId = ConstructionStandardsList.ConstructionStandardsId, + ConstructionStandardsCode = ConstructionStandardsList.ConstructionStandardsCode, + ConstructionStandardsName = ConstructionStandardsList.ConstructionStandardsName, + AttachUrl = ConstructionStandardsList.AttachUrl, + CompileMan = ConstructionStandardsList.CompileMan, + CompileDate = ConstructionStandardsList.CompileDate, + }; + newConstructionStandardsList.CompileMan = ConstructionStandardsList.CompileMan; + newConstructionStandardsList.CompileDate = ConstructionStandardsList.CompileDate; + newConstructionStandardsList.IsPass = ConstructionStandardsList.IsPass; + newConstructionStandardsList.UpState = ConstructionStandardsList.UpState; + newConstructionStandardsList.Remark = ConstructionStandardsList.Remark; + db.Technique_ConstructionStandards.InsertOnSubmit(newConstructionStandardsList); + db.SubmitChanges(); + } + + /// + /// 修改 + /// + /// + public static void UpdateConstructionStandardsList(Model.Technique_ConstructionStandards ConstructionStandardsList) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_ConstructionStandards newConstructionStandardsList = + db.Technique_ConstructionStandards.FirstOrDefault(e => + e.ConstructionStandardsId == ConstructionStandardsList.ConstructionStandardsId); + if (newConstructionStandardsList != null) + { + newConstructionStandardsList.ConstructionStandardsCode = ConstructionStandardsList.ConstructionStandardsCode; + newConstructionStandardsList.ConstructionStandardsName = ConstructionStandardsList.ConstructionStandardsName; + newConstructionStandardsList.AttachUrl = ConstructionStandardsList.AttachUrl; + newConstructionStandardsList.CompileMan = ConstructionStandardsList.CompileMan; + newConstructionStandardsList.CompileDate = ConstructionStandardsList.CompileDate; + newConstructionStandardsList.UpState = ConstructionStandardsList.UpState; + newConstructionStandardsList.Remark = ConstructionStandardsList.Remark; + db.SubmitChanges(); + } + } + + + + /// + ///根据主键删除 + /// + /// + public static void DeleteConstructionStandardsListById(string ConstructionStandardsId) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_ConstructionStandards ConstructionStandardsList = + db.Technique_ConstructionStandards.FirstOrDefault(e => e.ConstructionStandardsId == ConstructionStandardsId); + if (ConstructionStandardsList != null) + { + if (!string.IsNullOrEmpty(ConstructionStandardsList.AttachUrl)) + { + BLL.UploadFileService.DeleteFile(Funs.RootPath, ConstructionStandardsList.AttachUrl); + } + + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(ConstructionStandardsList.ConstructionStandardsId); + + db.Technique_ConstructionStandards.DeleteOnSubmit(ConstructionStandardsList); + db.SubmitChanges(); + } + } +} \ No newline at end of file diff --git a/SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs b/SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs new file mode 100644 index 0000000..c15290d --- /dev/null +++ b/SGGL/BLL/HSSE/Technique/ProtectionStandardsService.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL; + +public class ProtectionStandardsService +{ + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取 + /// + /// + /// + public static Model.Technique_ProtectionStandards GetProtectionStandardsListById(string ProtectionStandardsId) + { + return Funs.DB.Technique_ProtectionStandards.FirstOrDefault(e => + e.ProtectionStandardsId == ProtectionStandardsId); + } + + /// + /// 添加 + /// + /// + public static void AddProtectionStandardsList(Model.Technique_ProtectionStandards ProtectionStandardsList) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_ProtectionStandards newProtectionStandardsList = new Model.Technique_ProtectionStandards + { + ProtectionStandardsId = ProtectionStandardsList.ProtectionStandardsId, + ProtectionStandardsCode = ProtectionStandardsList.ProtectionStandardsCode, + ProtectionStandardsName = ProtectionStandardsList.ProtectionStandardsName, + AttachUrl = ProtectionStandardsList.AttachUrl, + CompileMan = ProtectionStandardsList.CompileMan, + CompileDate = ProtectionStandardsList.CompileDate, + }; + newProtectionStandardsList.CompileMan = ProtectionStandardsList.CompileMan; + newProtectionStandardsList.CompileDate = ProtectionStandardsList.CompileDate; + newProtectionStandardsList.IsPass = ProtectionStandardsList.IsPass; + newProtectionStandardsList.UpState = ProtectionStandardsList.UpState; + newProtectionStandardsList.Remark = ProtectionStandardsList.Remark; + db.Technique_ProtectionStandards.InsertOnSubmit(newProtectionStandardsList); + db.SubmitChanges(); + } + + /// + /// 修改 + /// + /// + public static void UpdateProtectionStandardsList(Model.Technique_ProtectionStandards ProtectionStandardsList) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_ProtectionStandards newProtectionStandardsList = + db.Technique_ProtectionStandards.FirstOrDefault(e => + e.ProtectionStandardsId == ProtectionStandardsList.ProtectionStandardsId); + if (newProtectionStandardsList != null) + { + newProtectionStandardsList.ProtectionStandardsCode = ProtectionStandardsList.ProtectionStandardsCode; + newProtectionStandardsList.ProtectionStandardsName = ProtectionStandardsList.ProtectionStandardsName; + newProtectionStandardsList.AttachUrl = ProtectionStandardsList.AttachUrl; + newProtectionStandardsList.CompileMan = ProtectionStandardsList.CompileMan; + newProtectionStandardsList.CompileDate = ProtectionStandardsList.CompileDate; + newProtectionStandardsList.UpState = ProtectionStandardsList.UpState; + newProtectionStandardsList.Remark = ProtectionStandardsList.Remark; + db.SubmitChanges(); + } + } + + + /// + ///根据主键删除 + /// + /// + public static void DeleteProtectionStandardsListById(string ProtectionStandardsId) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_ProtectionStandards ProtectionStandardsList = + db.Technique_ProtectionStandards.FirstOrDefault(e => e.ProtectionStandardsId == ProtectionStandardsId); + if (ProtectionStandardsList != null) + { + if (!string.IsNullOrEmpty(ProtectionStandardsList.AttachUrl)) + { + BLL.UploadFileService.DeleteFile(Funs.RootPath, ProtectionStandardsList.AttachUrl); + } + + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(ProtectionStandardsList.ProtectionStandardsId); + + db.Technique_ProtectionStandards.DeleteOnSubmit(ProtectionStandardsList); + db.SubmitChanges(); + } + } +} \ No newline at end of file diff --git a/SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs b/SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs new file mode 100644 index 0000000..622f11c --- /dev/null +++ b/SGGL/BLL/HSSE/Technique/SafetyResponsibilitiesService.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +namespace BLL; + +public class SafetyResponsibilitiesService +{ + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键 + /// + /// + /// + public static Model.Technique_SafetyResponsibilities GetSafetyResponsibilitiesListById(string SafetyResponsibilitiesId) + { + return Funs.DB.Technique_SafetyResponsibilities.FirstOrDefault(e => + e.SafetyResponsibilitiesId == SafetyResponsibilitiesId); + } + + + + /// + /// 添加专项方案 + /// + /// + public static void AddSafetyResponsibilitiesList(Model.Technique_SafetyResponsibilities SafetyResponsibilitiesList) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_SafetyResponsibilities newSafetyResponsibilitiesList = new Model.Technique_SafetyResponsibilities + { + SafetyResponsibilitiesId = SafetyResponsibilitiesList.SafetyResponsibilitiesId, + SafetyResponsibilitiesCode = SafetyResponsibilitiesList.SafetyResponsibilitiesCode, + SafetyResponsibilitiesName = SafetyResponsibilitiesList.SafetyResponsibilitiesName, + AttachUrl = SafetyResponsibilitiesList.AttachUrl, + CompileMan = SafetyResponsibilitiesList.CompileMan, + CompileDate = SafetyResponsibilitiesList.CompileDate, + }; + newSafetyResponsibilitiesList.CompileMan = SafetyResponsibilitiesList.CompileMan; + newSafetyResponsibilitiesList.CompileDate = SafetyResponsibilitiesList.CompileDate; + newSafetyResponsibilitiesList.IsPass = SafetyResponsibilitiesList.IsPass; + newSafetyResponsibilitiesList.UpState = SafetyResponsibilitiesList.UpState; + newSafetyResponsibilitiesList.Remark = SafetyResponsibilitiesList.Remark; + db.Technique_SafetyResponsibilities.InsertOnSubmit(newSafetyResponsibilitiesList); + db.SubmitChanges(); + } + + /// + /// 修改 + /// + /// + public static void UpdateSafetyResponsibilitiesList(Model.Technique_SafetyResponsibilities SafetyResponsibilitiesList) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_SafetyResponsibilities newSafetyResponsibilitiesList = + db.Technique_SafetyResponsibilities.FirstOrDefault(e => + e.SafetyResponsibilitiesId == SafetyResponsibilitiesList.SafetyResponsibilitiesId); + if (newSafetyResponsibilitiesList != null) + { + newSafetyResponsibilitiesList.SafetyResponsibilitiesCode = SafetyResponsibilitiesList.SafetyResponsibilitiesCode; + newSafetyResponsibilitiesList.SafetyResponsibilitiesName = SafetyResponsibilitiesList.SafetyResponsibilitiesName; + newSafetyResponsibilitiesList.AttachUrl = SafetyResponsibilitiesList.AttachUrl; + newSafetyResponsibilitiesList.CompileMan = SafetyResponsibilitiesList.CompileMan; + newSafetyResponsibilitiesList.CompileDate = SafetyResponsibilitiesList.CompileDate; + newSafetyResponsibilitiesList.UpState = SafetyResponsibilitiesList.UpState; + newSafetyResponsibilitiesList.Remark = SafetyResponsibilitiesList.Remark; + db.SubmitChanges(); + } + } + + + + /// + ///根据主键删 + /// + /// + public static void DeleteSafetyResponsibilitiesListById(string SafetyResponsibilitiesId) + { + Model.SGGLDB db = Funs.DB; + Model.Technique_SafetyResponsibilities SafetyResponsibilitiesList = + db.Technique_SafetyResponsibilities.FirstOrDefault(e => e.SafetyResponsibilitiesId == SafetyResponsibilitiesId); + if (SafetyResponsibilitiesList != null) + { + if (!string.IsNullOrEmpty(SafetyResponsibilitiesList.AttachUrl)) + { + BLL.UploadFileService.DeleteFile(Funs.RootPath, SafetyResponsibilitiesList.AttachUrl); + } + + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(SafetyResponsibilitiesList.SafetyResponsibilitiesId); + + db.Technique_SafetyResponsibilities.DeleteOnSubmit(SafetyResponsibilitiesList); + db.SubmitChanges(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx index 82cb308..55e1f44 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx @@ -175,7 +175,7 @@ Schedule manage - 进度管理 + 工程管理 Choice language diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx index 79978a1..49eb719 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx @@ -160,7 +160,7 @@ 刷新本页 - 进度管理 + 工程管理 选择语言 diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx index 9b48139..63324e0 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx @@ -160,7 +160,7 @@ 刷新本页 - 进度管理 + 工程管理 选择语言 diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index f4b84e4..5f29de3 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -2290,11 +2290,15 @@ + + + + @@ -2308,10 +2312,14 @@ + + + + @@ -12734,7 +12742,9 @@ TaskNoticeEdit.aspx - + + ASPXCodeBehind + TrainTestRecordEdit.aspx @@ -15634,6 +15644,20 @@ SolutionTemplateView.aspx + + AwardStandards.aspx + ASPXCodeBehind + + + AwardStandards.aspx + + + AwardStandardsEdit.aspx + ASPXCodeBehind + + + AwardStandardsEdit.aspx + CheckItemDetailEdit.aspx ASPXCodeBehind @@ -15669,6 +15693,20 @@ CompanyHazardList.aspx + + ConstructionStandards.aspx + ASPXCodeBehind + + + ConstructionStandards.aspx + + + ConstructionStandardsEdit.aspx + ASPXCodeBehind + + + ConstructionStandardsEdit.aspx + Emergency.aspx ASPXCodeBehind @@ -15760,6 +15798,20 @@ HazardListTypeEdit.aspx + + ProtectionStandards.aspx + ASPXCodeBehind + + + ProtectionStandards.aspx + + + ProtectionStandardsEdit.aspx + ASPXCodeBehind + + + ProtectionStandardsEdit.aspx + Rectify.aspx ASPXCodeBehind @@ -15788,6 +15840,20 @@ RectifySelectCloumn.aspx + + SafetyResponsibilities.aspx + ASPXCodeBehind + + + SafetyResponsibilities.aspx + + + SafetyResponsibilitiesEdit.aspx + ASPXCodeBehind + + + SafetyResponsibilitiesEdit.aspx + SpecialScheme.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx new file mode 100644 index 0000000..045d655 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx @@ -0,0 +1,108 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AwardStandards.aspx.cs" Inherits="FineUIPro.Web.HSSE.Technique.AwardStandards" %> + + + + + + 奖罚标准 + + + +
+ + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx.cs new file mode 100644 index 0000000..6ed1667 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx.cs @@ -0,0 +1,319 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; +using System.Web.UI; + +namespace FineUIPro.Web.HSSE.Technique +{ + public partial class AwardStandards : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + btnNew.OnClientClick = Window1.GetShowReference("AwardStandardsEdit.aspx") + "return false;"; + // btnSelectColumns.OnClientClick = Window4.GetShowReference("AwardStandardsSelectCloumn.aspx"); + + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT AwardStandardsId,AwardStandardsCode,AwardStandardsName,CompileMan,CompileDate,AttachUrl,AuditMan,AuditDate,IsPass,IsBuild,UpState + FROM dbo.Technique_AwardStandards + WHERE 1 =1 "; + + List listStr = new List(); + + if (!string.IsNullOrEmpty(this.AwardStandardsName.Text.Trim())) + { + strSql += " AND AwardStandardsName LIKE @AwardStandardsName"; + listStr.Add(new SqlParameter("@AwardStandardsName", "%" + this.AwardStandardsName.Text.Trim() + "%")); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 删除方法 + /// + private void DeleteData() + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var getV = BLL.AwardStandardsService.GetAwardStandardsListById(rowID); + if (getV != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, getV.AwardStandardsCode, getV.AwardStandardsId, BLL.Const.AwardStandardsMenuId, Const.BtnDelete); + + BLL.AwardStandardsService.DeleteAwardStandardsListById(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region 编辑 + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string AwardStandardsId = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AwardStandardsEdit.aspx?AwardStandardsId={0}", AwardStandardsId, "编辑 - "))); + + } + #endregion + + #region Grid行双击事件 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + #endregion + + #region 输入框查询事件 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, string.Empty, BLL.Const.AwardStandardsMenuId, Const.BtnQuery); + + } + #endregion + + #region 导出 + /// + /// 关闭导出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + Response.ClearContent(); + Response.AddHeader("content-disposition", "attachment; filename=MyExcelFile.xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1, e.CloseArgument.Split('#'))); + Response.End(); + } + + /// + /// 导出 + /// + /// + /// + /// + private string GetGridTableHtml(Grid grid, string[] columns) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + List columnHeaderTexts = new List(columns); + List columnIndexs = new List(); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (columnHeaderTexts.Contains(column.HeaderText)) + { + sb.AppendFormat("", column.HeaderText); + columnIndexs.Add(column.ColumnIndex); + } + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + int columnIndex = 0; + foreach (object value in row.Values) + { + if (columnIndexs.Contains(columnIndex)) + { + string html = value.ToString(); + if (html.StartsWith(Grid.TEMPLATE_PLACEHOLDER_PREFIX)) + { + // 模板列 + string templateID = html.Substring(Grid.TEMPLATE_PLACEHOLDER_PREFIX.Length); + Control templateCtrl = row.FindControl(templateID); + html = GetRenderedHtmlSource(templateCtrl); + } + sb.AppendFormat("", html); + } + columnIndex++; + } + sb.Append(""); + } + sb.Append("
{0}
{0}
"); + return sb.ToString(); + } + + /// + /// 获取控件渲染后的HTML源代码 + /// + /// + /// + private string GetRenderedHtmlSource(Control ctrl) + { + if (ctrl != null) + { + using (StringWriter sw = new StringWriter()) + { + using (HtmlTextWriter htw = new HtmlTextWriter(sw)) + { + ctrl.RenderControl(htw); + return sw.ToString(); + } + } + } + return String.Empty; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.AwardStandardsMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnOut)) + { + // this.btnSelectColumns.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx.designer.cs new file mode 100644 index 0000000..abfd62a --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandards.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Technique +{ + + + public partial class AwardStandards + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// AwardStandardsName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox AwardStandardsName; + + /// + /// btnQuery control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnQuery; + + /// + /// btnNew control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnNew; + + /// + /// ToolbarSeparator1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window4; + + /// + /// WindowAtt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx new file mode 100644 index 0000000..86cc5dc --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx @@ -0,0 +1,72 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AwardStandardsEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Technique.AwardStandardsEdit" %> + + + + + + 编辑奖罚标准 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx.cs new file mode 100644 index 0000000..14c135e --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx.cs @@ -0,0 +1,221 @@ +using BLL; +using System; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HSSE.Technique +{ + public partial class AwardStandardsEdit : PageBase + { + #region 定义变量 + /// + /// 防护标准ID + /// + public string AwardStandardsId + { + get + { + return (string)ViewState["AwardStandardsId"]; + } + set + { + ViewState["AwardStandardsId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + //人员 + UserService.InitUserDropDownList(this.ddlCompileMan, string.Empty, true); + + //加载默认整理人、整理日期 + this.ddlCompileMan.SelectedValue = this.CurrUser.UserId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + + this.AwardStandardsId = Request.Params["AwardStandardsId"]; + if (!string.IsNullOrEmpty(this.AwardStandardsId)) + { + var AwardStandards = BLL.AwardStandardsService.GetAwardStandardsListById(this.AwardStandardsId); + if (AwardStandards != null) + { + this.txtAwardStandardsCode.Text = AwardStandards.AwardStandardsCode; + this.txtAwardStandardsName.Text = AwardStandards.AwardStandardsName; + this.txtRemark.Text = AwardStandards.Remark; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", AwardStandards.CompileDate); + + if (!string.IsNullOrEmpty(AwardStandards.CompileMan)) + { + this.ddlCompileMan.SelectedItem.Text = AwardStandards.CompileMan; + } + } + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + SaveData(); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 保存数据 + /// + private void SaveData() + { + Model.Technique_AwardStandards AwardStandards = new Model.Technique_AwardStandards(); + if (!string.IsNullOrEmpty(this.txtAwardStandardsCode.Text.Trim())) + { + AwardStandards.AwardStandardsCode = this.txtAwardStandardsCode.Text.Trim(); + } + else + { + ShowNotify("请输入编号", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(this.txtAwardStandardsName.Text.Trim())) + { + AwardStandards.AwardStandardsName = this.txtAwardStandardsName.Text.Trim(); + } + else + { + ShowNotify("请输入名称", MessageBoxIcon.Warning); + return; + } + + if (this.ddlCompileMan.SelectedValue != null) + { + AwardStandards.CompileMan = this.ddlCompileMan.SelectedItem.Text; + } + else + { + AwardStandards.CompileMan = this.CurrUser.UserName; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text)) + { + AwardStandards.CompileDate = Convert.ToDateTime(this.dpkCompileDate.Text); + } + else + { + AwardStandards.CompileDate = DateTime.Now; + } + if (txtRemark.Text.Trim() != string.Empty) + { + AwardStandards.Remark = txtRemark.Text.Trim(); + } + if (string.IsNullOrEmpty(this.AwardStandardsId)) + { + AwardStandards.IsPass = true; + this.AwardStandardsId = AwardStandards.AwardStandardsId = SQLHelper.GetNewID(typeof(Model.Technique_AwardStandards)); + BLL.AwardStandardsService.AddAwardStandardsList(AwardStandards); + + BLL.LogService.AddSys_Log(this.CurrUser, AwardStandards.AwardStandardsCode, AwardStandards.AwardStandardsId, BLL.Const.AwardStandardsMenuId, Const.BtnAdd); + } + else + { + AwardStandards.AwardStandardsId = this.AwardStandardsId; + BLL.AwardStandardsService.UpdateAwardStandardsList(AwardStandards); + BLL.LogService.AddSys_Log(this.CurrUser, AwardStandards.AwardStandardsCode, AwardStandards.AwardStandardsId, BLL.Const.AwardStandardsMenuId, Const.BtnModify); + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件资源 + /// + /// + /// + protected void btnUploadResources_Click(object sender, EventArgs e) + { + if (this.btnSave.Hidden) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/AwardStandards&type=-1", this.AwardStandardsId))); + } + else + { + if (string.IsNullOrEmpty(this.txtAwardStandardsCode.Text.Trim())) + { + ShowNotify("请输入方案编号", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(this.txtAwardStandardsName.Text.Trim())) + { + ShowNotify("请输入方案名称", MessageBoxIcon.Warning); + return; + } + + if (string.IsNullOrEmpty(this.AwardStandardsId)) + { + SaveData(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/AwardStandards&menuId={1}", this.AwardStandardsId, BLL.Const.AwardStandardsMenuId))); + } + } + #endregion + + #region 验证方案编号、名称是否存在 + /// + /// 验证方案编号、名称是否存在 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + var q = Funs.DB.Technique_AwardStandards.FirstOrDefault(x => x.IsPass == true && x.AwardStandardsCode == this.txtAwardStandardsCode.Text.Trim() && (x.AwardStandardsId != this.AwardStandardsId || (this.AwardStandardsId == null && x.AwardStandardsId != null))); + if (q != null) + { + ShowNotify("输入的方案编号已存在!", MessageBoxIcon.Warning); + } + var q2 = Funs.DB.Technique_AwardStandards.FirstOrDefault(x => x.IsPass == true && x.AwardStandardsName == this.txtAwardStandardsName.Text.Trim() && (x.AwardStandardsId != this.AwardStandardsId || (this.AwardStandardsId == null && x.AwardStandardsId != null))); + if (q2 != null) + { + ShowNotify("输入的方案名称已存在!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.AwardStandardsMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx.designer.cs new file mode 100644 index 0000000..41cc450 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/AwardStandardsEdit.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Technique +{ + + + public partial class AwardStandardsEdit + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtAwardStandardsCode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox txtAwardStandardsCode; + + /// + /// txtAwardStandardsName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox txtAwardStandardsName; + + /// + /// ddlCompileMan control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DropDownList ddlCompileMan; + + /// + /// dpkCompileDate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// txtRemark control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// Toolbar1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// ToolbarFill1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx new file mode 100644 index 0000000..c2f4414 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx @@ -0,0 +1,108 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructionStandards.aspx.cs" Inherits="FineUIPro.Web.HSSE.Technique.ConstructionStandards" %> + + + + + + 队伍文明施工标准 + + + +
+ + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx.cs new file mode 100644 index 0000000..6e3f621 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx.cs @@ -0,0 +1,319 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; +using System.Web.UI; + +namespace FineUIPro.Web.HSSE.Technique +{ + public partial class ConstructionStandards : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + btnNew.OnClientClick = Window1.GetShowReference("ConstructionStandardsEdit.aspx") + "return false;"; + // btnSelectColumns.OnClientClick = Window4.GetShowReference("ConstructionStandardsSelectCloumn.aspx"); + + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT ConstructionStandardsId,ConstructionStandardsCode,ConstructionStandardsName,CompileMan,CompileDate,AttachUrl,AuditMan,AuditDate,IsPass,IsBuild,UpState + FROM dbo.Technique_ConstructionStandards + WHERE 1 =1 "; + + List listStr = new List(); + + if (!string.IsNullOrEmpty(this.ConstructionStandardsName.Text.Trim())) + { + strSql += " AND ConstructionStandardsName LIKE @ConstructionStandardsName"; + listStr.Add(new SqlParameter("@ConstructionStandardsName", "%" + this.ConstructionStandardsName.Text.Trim() + "%")); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 删除方法 + /// + private void DeleteData() + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var getV = BLL.ConstructionStandardsService.GetConstructionStandardsListById(rowID); + if (getV != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, getV.ConstructionStandardsCode, getV.ConstructionStandardsId, BLL.Const.ConstructionStandardsMenuId, Const.BtnDelete); + + BLL.ConstructionStandardsService.DeleteConstructionStandardsListById(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region 编辑 + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string ConstructionStandardsId = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionStandardsEdit.aspx?ConstructionStandardsId={0}", ConstructionStandardsId, "编辑 - "))); + + } + #endregion + + #region Grid行双击事件 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + #endregion + + #region 输入框查询事件 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, string.Empty, BLL.Const.ConstructionStandardsMenuId, Const.BtnQuery); + + } + #endregion + + #region 导出 + /// + /// 关闭导出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + Response.ClearContent(); + Response.AddHeader("content-disposition", "attachment; filename=MyExcelFile.xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1, e.CloseArgument.Split('#'))); + Response.End(); + } + + /// + /// 导出 + /// + /// + /// + /// + private string GetGridTableHtml(Grid grid, string[] columns) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + List columnHeaderTexts = new List(columns); + List columnIndexs = new List(); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (columnHeaderTexts.Contains(column.HeaderText)) + { + sb.AppendFormat("", column.HeaderText); + columnIndexs.Add(column.ColumnIndex); + } + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + int columnIndex = 0; + foreach (object value in row.Values) + { + if (columnIndexs.Contains(columnIndex)) + { + string html = value.ToString(); + if (html.StartsWith(Grid.TEMPLATE_PLACEHOLDER_PREFIX)) + { + // 模板列 + string templateID = html.Substring(Grid.TEMPLATE_PLACEHOLDER_PREFIX.Length); + Control templateCtrl = row.FindControl(templateID); + html = GetRenderedHtmlSource(templateCtrl); + } + sb.AppendFormat("", html); + } + columnIndex++; + } + sb.Append(""); + } + sb.Append("
{0}
{0}
"); + return sb.ToString(); + } + + /// + /// 获取控件渲染后的HTML源代码 + /// + /// + /// + private string GetRenderedHtmlSource(Control ctrl) + { + if (ctrl != null) + { + using (StringWriter sw = new StringWriter()) + { + using (HtmlTextWriter htw = new HtmlTextWriter(sw)) + { + ctrl.RenderControl(htw); + return sw.ToString(); + } + } + } + return String.Empty; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ConstructionStandardsMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnOut)) + { + // this.btnSelectColumns.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx.designer.cs new file mode 100644 index 0000000..a37007c --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandards.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Technique +{ + + + public partial class ConstructionStandards + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// ConstructionStandardsName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox ConstructionStandardsName; + + /// + /// btnQuery control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnQuery; + + /// + /// btnNew control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnNew; + + /// + /// ToolbarSeparator1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window4; + + /// + /// WindowAtt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx new file mode 100644 index 0000000..dfbecd8 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx @@ -0,0 +1,72 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructionStandardsEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Technique.ConstructionStandardsEdit" %> + + + + + + 编辑队伍文明施工标准 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx.cs new file mode 100644 index 0000000..7e60ba8 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx.cs @@ -0,0 +1,221 @@ +using BLL; +using System; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HSSE.Technique +{ + public partial class ConstructionStandardsEdit : PageBase + { + #region 定义变量 + /// + /// 防护标准ID + /// + public string ConstructionStandardsId + { + get + { + return (string)ViewState["ConstructionStandardsId"]; + } + set + { + ViewState["ConstructionStandardsId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + //人员 + UserService.InitUserDropDownList(this.ddlCompileMan, string.Empty, true); + + //加载默认整理人、整理日期 + this.ddlCompileMan.SelectedValue = this.CurrUser.UserId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + + this.ConstructionStandardsId = Request.Params["ConstructionStandardsId"]; + if (!string.IsNullOrEmpty(this.ConstructionStandardsId)) + { + var ConstructionStandards = BLL.ConstructionStandardsService.GetConstructionStandardsListById(this.ConstructionStandardsId); + if (ConstructionStandards != null) + { + this.txtConstructionStandardsCode.Text = ConstructionStandards.ConstructionStandardsCode; + this.txtConstructionStandardsName.Text = ConstructionStandards.ConstructionStandardsName; + this.txtRemark.Text = ConstructionStandards.Remark; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", ConstructionStandards.CompileDate); + + if (!string.IsNullOrEmpty(ConstructionStandards.CompileMan)) + { + this.ddlCompileMan.SelectedItem.Text = ConstructionStandards.CompileMan; + } + } + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + SaveData(); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 保存数据 + /// + private void SaveData() + { + Model.Technique_ConstructionStandards ConstructionStandards = new Model.Technique_ConstructionStandards(); + if (!string.IsNullOrEmpty(this.txtConstructionStandardsCode.Text.Trim())) + { + ConstructionStandards.ConstructionStandardsCode = this.txtConstructionStandardsCode.Text.Trim(); + } + else + { + ShowNotify("请输入编号", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(this.txtConstructionStandardsName.Text.Trim())) + { + ConstructionStandards.ConstructionStandardsName = this.txtConstructionStandardsName.Text.Trim(); + } + else + { + ShowNotify("请输入名称", MessageBoxIcon.Warning); + return; + } + + if (this.ddlCompileMan.SelectedValue != null) + { + ConstructionStandards.CompileMan = this.ddlCompileMan.SelectedItem.Text; + } + else + { + ConstructionStandards.CompileMan = this.CurrUser.UserName; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text)) + { + ConstructionStandards.CompileDate = Convert.ToDateTime(this.dpkCompileDate.Text); + } + else + { + ConstructionStandards.CompileDate = DateTime.Now; + } + if (txtRemark.Text.Trim() != string.Empty) + { + ConstructionStandards.Remark = txtRemark.Text.Trim(); + } + if (string.IsNullOrEmpty(this.ConstructionStandardsId)) + { + ConstructionStandards.IsPass = true; + this.ConstructionStandardsId = ConstructionStandards.ConstructionStandardsId = SQLHelper.GetNewID(typeof(Model.Technique_ConstructionStandards)); + BLL.ConstructionStandardsService.AddConstructionStandardsList(ConstructionStandards); + + BLL.LogService.AddSys_Log(this.CurrUser, ConstructionStandards.ConstructionStandardsCode, ConstructionStandards.ConstructionStandardsId, BLL.Const.ConstructionStandardsMenuId, Const.BtnAdd); + } + else + { + ConstructionStandards.ConstructionStandardsId = this.ConstructionStandardsId; + BLL.ConstructionStandardsService.UpdateConstructionStandardsList(ConstructionStandards); + BLL.LogService.AddSys_Log(this.CurrUser, ConstructionStandards.ConstructionStandardsCode, ConstructionStandards.ConstructionStandardsId, BLL.Const.ConstructionStandardsMenuId, Const.BtnModify); + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件资源 + /// + /// + /// + protected void btnUploadResources_Click(object sender, EventArgs e) + { + if (this.btnSave.Hidden) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ConstructionStandards&type=-1", this.ConstructionStandardsId))); + } + else + { + if (string.IsNullOrEmpty(this.txtConstructionStandardsCode.Text.Trim())) + { + ShowNotify("请输入方案编号", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(this.txtConstructionStandardsName.Text.Trim())) + { + ShowNotify("请输入方案名称", MessageBoxIcon.Warning); + return; + } + + if (string.IsNullOrEmpty(this.ConstructionStandardsId)) + { + SaveData(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ConstructionStandards&menuId={1}", this.ConstructionStandardsId, BLL.Const.ConstructionStandardsMenuId))); + } + } + #endregion + + #region 验证方案编号、名称是否存在 + /// + /// 验证方案编号、名称是否存在 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + var q = Funs.DB.Technique_ConstructionStandards.FirstOrDefault(x => x.IsPass == true && x.ConstructionStandardsCode == this.txtConstructionStandardsCode.Text.Trim() && (x.ConstructionStandardsId != this.ConstructionStandardsId || (this.ConstructionStandardsId == null && x.ConstructionStandardsId != null))); + if (q != null) + { + ShowNotify("输入的方案编号已存在!", MessageBoxIcon.Warning); + } + var q2 = Funs.DB.Technique_ConstructionStandards.FirstOrDefault(x => x.IsPass == true && x.ConstructionStandardsName == this.txtConstructionStandardsName.Text.Trim() && (x.ConstructionStandardsId != this.ConstructionStandardsId || (this.ConstructionStandardsId == null && x.ConstructionStandardsId != null))); + if (q2 != null) + { + ShowNotify("输入的方案名称已存在!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ConstructionStandardsMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx.designer.cs new file mode 100644 index 0000000..ab61c82 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ConstructionStandardsEdit.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Technique +{ + + + public partial class ConstructionStandardsEdit + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtConstructionStandardsCode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox txtConstructionStandardsCode; + + /// + /// txtConstructionStandardsName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox txtConstructionStandardsName; + + /// + /// ddlCompileMan control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DropDownList ddlCompileMan; + + /// + /// dpkCompileDate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// txtRemark control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// Toolbar1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// ToolbarFill1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx new file mode 100644 index 0000000..d3c4e7c --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx @@ -0,0 +1,108 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProtectionStandards.aspx.cs" Inherits="FineUIPro.Web.HSSE.Technique.ProtectionStandards" %> + + + + + + 防护标准 + + + +
+ + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx.cs new file mode 100644 index 0000000..ec8bf46 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx.cs @@ -0,0 +1,319 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; +using System.Web.UI; + +namespace FineUIPro.Web.HSSE.Technique +{ + public partial class ProtectionStandards : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + btnNew.OnClientClick = Window1.GetShowReference("ProtectionStandardsEdit.aspx") + "return false;"; + // btnSelectColumns.OnClientClick = Window4.GetShowReference("ProtectionStandardsSelectCloumn.aspx"); + + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT ProtectionStandardsId,ProtectionStandardsCode,ProtectionStandardsName,CompileMan,CompileDate,AttachUrl,AuditMan,AuditDate,IsPass,IsBuild,UpState + FROM dbo.Technique_ProtectionStandards + WHERE 1 =1 "; + + List listStr = new List(); + + if (!string.IsNullOrEmpty(this.ProtectionStandardsName.Text.Trim())) + { + strSql += " AND ProtectionStandardsName LIKE @ProtectionStandardsName"; + listStr.Add(new SqlParameter("@ProtectionStandardsName", "%" + this.ProtectionStandardsName.Text.Trim() + "%")); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 删除方法 + /// + private void DeleteData() + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var getV = BLL.ProtectionStandardsService.GetProtectionStandardsListById(rowID); + if (getV != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, getV.ProtectionStandardsCode, getV.ProtectionStandardsId, BLL.Const.ProtectionStandardsMenuId, Const.BtnDelete); + + BLL.ProtectionStandardsService.DeleteProtectionStandardsListById(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region 编辑 + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string ProtectionStandardsId = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProtectionStandardsEdit.aspx?ProtectionStandardsId={0}", ProtectionStandardsId, "编辑 - "))); + + } + #endregion + + #region Grid行双击事件 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + #endregion + + #region 输入框查询事件 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, string.Empty, BLL.Const.ProtectionStandardsMenuId, Const.BtnQuery); + + } + #endregion + + #region 导出 + /// + /// 关闭导出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + Response.ClearContent(); + Response.AddHeader("content-disposition", "attachment; filename=MyExcelFile.xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1, e.CloseArgument.Split('#'))); + Response.End(); + } + + /// + /// 导出 + /// + /// + /// + /// + private string GetGridTableHtml(Grid grid, string[] columns) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + List columnHeaderTexts = new List(columns); + List columnIndexs = new List(); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (columnHeaderTexts.Contains(column.HeaderText)) + { + sb.AppendFormat("", column.HeaderText); + columnIndexs.Add(column.ColumnIndex); + } + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + int columnIndex = 0; + foreach (object value in row.Values) + { + if (columnIndexs.Contains(columnIndex)) + { + string html = value.ToString(); + if (html.StartsWith(Grid.TEMPLATE_PLACEHOLDER_PREFIX)) + { + // 模板列 + string templateID = html.Substring(Grid.TEMPLATE_PLACEHOLDER_PREFIX.Length); + Control templateCtrl = row.FindControl(templateID); + html = GetRenderedHtmlSource(templateCtrl); + } + sb.AppendFormat("", html); + } + columnIndex++; + } + sb.Append(""); + } + sb.Append("
{0}
{0}
"); + return sb.ToString(); + } + + /// + /// 获取控件渲染后的HTML源代码 + /// + /// + /// + private string GetRenderedHtmlSource(Control ctrl) + { + if (ctrl != null) + { + using (StringWriter sw = new StringWriter()) + { + using (HtmlTextWriter htw = new HtmlTextWriter(sw)) + { + ctrl.RenderControl(htw); + return sw.ToString(); + } + } + } + return String.Empty; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProtectionStandardsMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnOut)) + { + // this.btnSelectColumns.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx.designer.cs new file mode 100644 index 0000000..e98fb59 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandards.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Technique +{ + + + public partial class ProtectionStandards + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// ProtectionStandardsName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox ProtectionStandardsName; + + /// + /// btnQuery control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnQuery; + + /// + /// btnNew control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnNew; + + /// + /// ToolbarSeparator1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window4; + + /// + /// WindowAtt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx new file mode 100644 index 0000000..2cee9cf --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx @@ -0,0 +1,73 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProtectionStandardsEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Technique.ProtectionStandardsEdit" %> + + + + + + 编辑防护标准 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx.cs new file mode 100644 index 0000000..d1c3f66 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx.cs @@ -0,0 +1,223 @@ +using BLL; +using System; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HSSE.Technique +{ + public partial class ProtectionStandardsEdit : PageBase + { + #region 定义变量 + /// + /// 防护标准ID + /// + public string ProtectionStandardsId + { + get + { + return (string)ViewState["ProtectionStandardsId"]; + } + set + { + ViewState["ProtectionStandardsId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + //人员 + UserService.InitUserDropDownList(this.ddlCompileMan, string.Empty, true); + + //加载默认整理人、整理日期 + this.ddlCompileMan.SelectedValue = this.CurrUser.UserId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + + this.ProtectionStandardsId = Request.Params["ProtectionStandardsId"]; + if (!string.IsNullOrEmpty(this.ProtectionStandardsId)) + { + var ProtectionStandards = BLL.ProtectionStandardsService.GetProtectionStandardsListById(this.ProtectionStandardsId); + if (ProtectionStandards != null) + { + this.txtProtectionStandardsCode.Text = ProtectionStandards.ProtectionStandardsCode; + this.txtProtectionStandardsName.Text = ProtectionStandards.ProtectionStandardsName; + this.txtRemark.Text = ProtectionStandards.Remark; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", ProtectionStandards.CompileDate); + + if (!string.IsNullOrEmpty(ProtectionStandards.CompileMan)) + { + this.ddlCompileMan.SelectedItem.Text = ProtectionStandards.CompileMan; + } + } + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + SaveData(); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 保存数据 + /// + private void SaveData() + { + Model.Technique_ProtectionStandards ProtectionStandards = new Model.Technique_ProtectionStandards(); + if (!string.IsNullOrEmpty(this.txtProtectionStandardsCode.Text.Trim())) + { + ProtectionStandards.ProtectionStandardsCode = this.txtProtectionStandardsCode.Text.Trim(); + } + else + { + ShowNotify("请输入编号", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(this.txtProtectionStandardsName.Text.Trim())) + { + ProtectionStandards.ProtectionStandardsName = this.txtProtectionStandardsName.Text.Trim(); + } + else + { + ShowNotify("请输入名称", MessageBoxIcon.Warning); + return; + } + + if (this.ddlCompileMan.SelectedValue != null) + { + ProtectionStandards.CompileMan = this.ddlCompileMan.SelectedItem.Text; + } + else + { + ProtectionStandards.CompileMan = this.CurrUser.UserName; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text)) + { + ProtectionStandards.CompileDate = Convert.ToDateTime(this.dpkCompileDate.Text); + } + else + { + ProtectionStandards.CompileDate = DateTime.Now; + } + + if (txtRemark.Text.Trim() != string.Empty) + { + ProtectionStandards.Remark = txtRemark.Text.Trim(); + } + + if (string.IsNullOrEmpty(this.ProtectionStandardsId)) + { + ProtectionStandards.IsPass = true; + this.ProtectionStandardsId = ProtectionStandards.ProtectionStandardsId = SQLHelper.GetNewID(typeof(Model.Technique_ProtectionStandards)); + BLL.ProtectionStandardsService.AddProtectionStandardsList(ProtectionStandards); + + BLL.LogService.AddSys_Log(this.CurrUser, ProtectionStandards.ProtectionStandardsCode, ProtectionStandards.ProtectionStandardsId, BLL.Const.ProtectionStandardsMenuId, Const.BtnAdd); + } + else + { + ProtectionStandards.ProtectionStandardsId = this.ProtectionStandardsId; + BLL.ProtectionStandardsService.UpdateProtectionStandardsList(ProtectionStandards); + BLL.LogService.AddSys_Log(this.CurrUser, ProtectionStandards.ProtectionStandardsCode, ProtectionStandards.ProtectionStandardsId, BLL.Const.ProtectionStandardsMenuId, Const.BtnModify); + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件资源 + /// + /// + /// + protected void btnUploadResources_Click(object sender, EventArgs e) + { + if (this.btnSave.Hidden) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ProtectionStandards&type=-1", this.ProtectionStandardsId))); + } + else + { + if (string.IsNullOrEmpty(this.txtProtectionStandardsCode.Text.Trim())) + { + ShowNotify("请输入方案编号", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(this.txtProtectionStandardsName.Text.Trim())) + { + ShowNotify("请输入方案名称", MessageBoxIcon.Warning); + return; + } + + if (string.IsNullOrEmpty(this.ProtectionStandardsId)) + { + SaveData(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ProtectionStandards&menuId={1}", this.ProtectionStandardsId, BLL.Const.ProtectionStandardsMenuId))); + } + } + #endregion + + #region 验证方案编号、名称是否存在 + /// + /// 验证方案编号、名称是否存在 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + var q = Funs.DB.Technique_ProtectionStandards.FirstOrDefault(x => x.IsPass == true && x.ProtectionStandardsCode == this.txtProtectionStandardsCode.Text.Trim() && (x.ProtectionStandardsId != this.ProtectionStandardsId || (this.ProtectionStandardsId == null && x.ProtectionStandardsId != null))); + if (q != null) + { + ShowNotify("输入的方案编号已存在!", MessageBoxIcon.Warning); + } + var q2 = Funs.DB.Technique_ProtectionStandards.FirstOrDefault(x => x.IsPass == true && x.ProtectionStandardsName == this.txtProtectionStandardsName.Text.Trim() && (x.ProtectionStandardsId != this.ProtectionStandardsId || (this.ProtectionStandardsId == null && x.ProtectionStandardsId != null))); + if (q2 != null) + { + ShowNotify("输入的方案名称已存在!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProtectionStandardsMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx.designer.cs new file mode 100644 index 0000000..2e274dc --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/ProtectionStandardsEdit.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Technique +{ + + + public partial class ProtectionStandardsEdit + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtProtectionStandardsCode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox txtProtectionStandardsCode; + + /// + /// txtProtectionStandardsName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox txtProtectionStandardsName; + + /// + /// ddlCompileMan control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DropDownList ddlCompileMan; + + /// + /// dpkCompileDate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// txtRemark control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// Toolbar1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// ToolbarFill1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx new file mode 100644 index 0000000..120857f --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx @@ -0,0 +1,108 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyResponsibilities.aspx.cs" Inherits="FineUIPro.Web.HSSE.Technique.SafetyResponsibilities" %> + + + + + + 安全职责 + + + +
+ + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx.cs new file mode 100644 index 0000000..2b5bed7 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx.cs @@ -0,0 +1,319 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; +using System.Web.UI; + +namespace FineUIPro.Web.HSSE.Technique +{ + public partial class SafetyResponsibilities : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + btnNew.OnClientClick = Window1.GetShowReference("SafetyResponsibilitiesEdit.aspx") + "return false;"; + // btnSelectColumns.OnClientClick = Window4.GetShowReference("SafetyResponsibilitiesSelectCloumn.aspx"); + + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT SafetyResponsibilitiesId,SafetyResponsibilitiesCode,SafetyResponsibilitiesName,CompileMan,CompileDate,AttachUrl,AuditMan,AuditDate,IsPass,IsBuild,UpState + FROM dbo.Technique_SafetyResponsibilities + WHERE 1 =1 "; + + List listStr = new List(); + + if (!string.IsNullOrEmpty(this.SafetyResponsibilitiesName.Text.Trim())) + { + strSql += " AND SafetyResponsibilitiesName LIKE @SafetyResponsibilitiesName"; + listStr.Add(new SqlParameter("@SafetyResponsibilitiesName", "%" + this.SafetyResponsibilitiesName.Text.Trim() + "%")); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 删除方法 + /// + private void DeleteData() + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var getV = BLL.SafetyResponsibilitiesService.GetSafetyResponsibilitiesListById(rowID); + if (getV != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, getV.SafetyResponsibilitiesCode, getV.SafetyResponsibilitiesId, BLL.Const.SafetyResponsibilitiesMenuId, Const.BtnDelete); + + BLL.SafetyResponsibilitiesService.DeleteSafetyResponsibilitiesListById(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region 编辑 + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string SafetyResponsibilitiesId = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyResponsibilitiesEdit.aspx?SafetyResponsibilitiesId={0}", SafetyResponsibilitiesId, "编辑 - "))); + + } + #endregion + + #region Grid行双击事件 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + #endregion + + #region 输入框查询事件 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, string.Empty, BLL.Const.SafetyResponsibilitiesMenuId, Const.BtnQuery); + + } + #endregion + + #region 导出 + /// + /// 关闭导出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + Response.ClearContent(); + Response.AddHeader("content-disposition", "attachment; filename=MyExcelFile.xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1, e.CloseArgument.Split('#'))); + Response.End(); + } + + /// + /// 导出 + /// + /// + /// + /// + private string GetGridTableHtml(Grid grid, string[] columns) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + List columnHeaderTexts = new List(columns); + List columnIndexs = new List(); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (columnHeaderTexts.Contains(column.HeaderText)) + { + sb.AppendFormat("", column.HeaderText); + columnIndexs.Add(column.ColumnIndex); + } + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + int columnIndex = 0; + foreach (object value in row.Values) + { + if (columnIndexs.Contains(columnIndex)) + { + string html = value.ToString(); + if (html.StartsWith(Grid.TEMPLATE_PLACEHOLDER_PREFIX)) + { + // 模板列 + string templateID = html.Substring(Grid.TEMPLATE_PLACEHOLDER_PREFIX.Length); + Control templateCtrl = row.FindControl(templateID); + html = GetRenderedHtmlSource(templateCtrl); + } + sb.AppendFormat("", html); + } + columnIndex++; + } + sb.Append(""); + } + sb.Append("
{0}
{0}
"); + return sb.ToString(); + } + + /// + /// 获取控件渲染后的HTML源代码 + /// + /// + /// + private string GetRenderedHtmlSource(Control ctrl) + { + if (ctrl != null) + { + using (StringWriter sw = new StringWriter()) + { + using (HtmlTextWriter htw = new HtmlTextWriter(sw)) + { + ctrl.RenderControl(htw); + return sw.ToString(); + } + } + } + return String.Empty; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SafetyResponsibilitiesMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnOut)) + { + // this.btnSelectColumns.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx.designer.cs new file mode 100644 index 0000000..3e27611 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilities.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Technique +{ + + + public partial class SafetyResponsibilities + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar3 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// SafetyResponsibilitiesName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox SafetyResponsibilitiesName; + + /// + /// btnQuery control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnQuery; + + /// + /// btnNew control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnNew; + + /// + /// ToolbarSeparator1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window4 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window Window4; + + /// + /// WindowAtt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx new file mode 100644 index 0000000..ce130f9 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx @@ -0,0 +1,72 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyResponsibilitiesEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Technique.SafetyResponsibilitiesEdit" %> + + + + + + 编辑安全职责 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx.cs new file mode 100644 index 0000000..b2e9f34 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx.cs @@ -0,0 +1,221 @@ +using BLL; +using System; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HSSE.Technique +{ + public partial class SafetyResponsibilitiesEdit : PageBase + { + #region 定义变量 + /// + /// 防护标准ID + /// + public string SafetyResponsibilitiesId + { + get + { + return (string)ViewState["SafetyResponsibilitiesId"]; + } + set + { + ViewState["SafetyResponsibilitiesId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + //人员 + UserService.InitUserDropDownList(this.ddlCompileMan, string.Empty, true); + + //加载默认整理人、整理日期 + this.ddlCompileMan.SelectedValue = this.CurrUser.UserId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + + this.SafetyResponsibilitiesId = Request.Params["SafetyResponsibilitiesId"]; + if (!string.IsNullOrEmpty(this.SafetyResponsibilitiesId)) + { + var SafetyResponsibilities = BLL.SafetyResponsibilitiesService.GetSafetyResponsibilitiesListById(this.SafetyResponsibilitiesId); + if (SafetyResponsibilities != null) + { + this.txtSafetyResponsibilitiesCode.Text = SafetyResponsibilities.SafetyResponsibilitiesCode; + this.txtSafetyResponsibilitiesName.Text = SafetyResponsibilities.SafetyResponsibilitiesName; + this.txtRemark.Text = SafetyResponsibilities.Remark; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", SafetyResponsibilities.CompileDate); + + if (!string.IsNullOrEmpty(SafetyResponsibilities.CompileMan)) + { + this.ddlCompileMan.SelectedItem.Text = SafetyResponsibilities.CompileMan; + } + } + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + SaveData(); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 保存数据 + /// + private void SaveData() + { + Model.Technique_SafetyResponsibilities SafetyResponsibilities = new Model.Technique_SafetyResponsibilities(); + if (!string.IsNullOrEmpty(this.txtSafetyResponsibilitiesCode.Text.Trim())) + { + SafetyResponsibilities.SafetyResponsibilitiesCode = this.txtSafetyResponsibilitiesCode.Text.Trim(); + } + else + { + ShowNotify("请输入编号", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(this.txtSafetyResponsibilitiesName.Text.Trim())) + { + SafetyResponsibilities.SafetyResponsibilitiesName = this.txtSafetyResponsibilitiesName.Text.Trim(); + } + else + { + ShowNotify("请输入名称", MessageBoxIcon.Warning); + return; + } + + if (this.ddlCompileMan.SelectedValue != null) + { + SafetyResponsibilities.CompileMan = this.ddlCompileMan.SelectedItem.Text; + } + else + { + SafetyResponsibilities.CompileMan = this.CurrUser.UserName; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text)) + { + SafetyResponsibilities.CompileDate = Convert.ToDateTime(this.dpkCompileDate.Text); + } + else + { + SafetyResponsibilities.CompileDate = DateTime.Now; + } + if (txtRemark.Text.Trim() != string.Empty) + { + SafetyResponsibilities.Remark = txtRemark.Text.Trim(); + } + if (string.IsNullOrEmpty(this.SafetyResponsibilitiesId)) + { + SafetyResponsibilities.IsPass = true; + this.SafetyResponsibilitiesId = SafetyResponsibilities.SafetyResponsibilitiesId = SQLHelper.GetNewID(typeof(Model.Technique_SafetyResponsibilities)); + BLL.SafetyResponsibilitiesService.AddSafetyResponsibilitiesList(SafetyResponsibilities); + + BLL.LogService.AddSys_Log(this.CurrUser, SafetyResponsibilities.SafetyResponsibilitiesCode, SafetyResponsibilities.SafetyResponsibilitiesId, BLL.Const.SafetyResponsibilitiesMenuId, Const.BtnAdd); + } + else + { + SafetyResponsibilities.SafetyResponsibilitiesId = this.SafetyResponsibilitiesId; + BLL.SafetyResponsibilitiesService.UpdateSafetyResponsibilitiesList(SafetyResponsibilities); + BLL.LogService.AddSys_Log(this.CurrUser, SafetyResponsibilities.SafetyResponsibilitiesCode, SafetyResponsibilities.SafetyResponsibilitiesId, BLL.Const.SafetyResponsibilitiesMenuId, Const.BtnModify); + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件资源 + /// + /// + /// + protected void btnUploadResources_Click(object sender, EventArgs e) + { + if (this.btnSave.Hidden) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafetyResponsibilities&type=-1", this.SafetyResponsibilitiesId))); + } + else + { + if (string.IsNullOrEmpty(this.txtSafetyResponsibilitiesCode.Text.Trim())) + { + ShowNotify("请输入方案编号", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(this.txtSafetyResponsibilitiesName.Text.Trim())) + { + ShowNotify("请输入方案名称", MessageBoxIcon.Warning); + return; + } + + if (string.IsNullOrEmpty(this.SafetyResponsibilitiesId)) + { + SaveData(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafetyResponsibilities&menuId={1}", this.SafetyResponsibilitiesId, BLL.Const.SafetyResponsibilitiesMenuId))); + } + } + #endregion + + #region 验证方案编号、名称是否存在 + /// + /// 验证方案编号、名称是否存在 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + var q = Funs.DB.Technique_SafetyResponsibilities.FirstOrDefault(x => x.IsPass == true && x.SafetyResponsibilitiesCode == this.txtSafetyResponsibilitiesCode.Text.Trim() && (x.SafetyResponsibilitiesId != this.SafetyResponsibilitiesId || (this.SafetyResponsibilitiesId == null && x.SafetyResponsibilitiesId != null))); + if (q != null) + { + ShowNotify("输入的方案编号已存在!", MessageBoxIcon.Warning); + } + var q2 = Funs.DB.Technique_SafetyResponsibilities.FirstOrDefault(x => x.IsPass == true && x.SafetyResponsibilitiesName == this.txtSafetyResponsibilitiesName.Text.Trim() && (x.SafetyResponsibilitiesId != this.SafetyResponsibilitiesId || (this.SafetyResponsibilitiesId == null && x.SafetyResponsibilitiesId != null))); + if (q2 != null) + { + ShowNotify("输入的方案名称已存在!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SafetyResponsibilitiesMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx.designer.cs new file mode 100644 index 0000000..0dccb8e --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Technique/SafetyResponsibilitiesEdit.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Technique +{ + + + public partial class SafetyResponsibilitiesEdit + { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtSafetyResponsibilitiesCode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox txtSafetyResponsibilitiesCode; + + /// + /// txtSafetyResponsibilitiesName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextBox txtSafetyResponsibilitiesName; + + /// + /// ddlCompileMan control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DropDownList ddlCompileMan; + + /// + /// dpkCompileDate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// txtRemark control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// Toolbar1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// ToolbarFill1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx index 41b8b01..ef680bc 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx @@ -250,13 +250,20 @@
-
当前现场总人数
-
-
0
-
0
-
0
-
0
-
+
当日现场人数
+
+
0
+
0
+
0
+
0
+
+
当月现场人数
+
+
0
+
0
+
0
+
0
+
@@ -315,9 +322,9 @@
-
施工分包商
+ <%--
施工分包商
--%>
-
问题类别
+
问题类别
@@ -686,20 +693,20 @@ var basePath = '<%= ResolveUrl("~/") %>'; // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option) } - var four1 =<%=Four1 %>; - var xArr = four1.categories + var four2 =<%=Four2 %>; + var xArr = four2.categories var series = [{ name: '待整改', type: 'bar', barWidth: 20, barGap:0.05, - data: four1.series[0].data, + data: four2.series[0].data, itemStyle: { normal: { color: '#88cc00' } } }, { name: '全部', type: 'bar', barWidth: 20, - data: four1.series[0].data2, + data: four2.series[0].data2, itemStyle: { normal: { color: '#AE4B23' } } }]; category_Four('four', xArr, series) diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.cs index 247bcab..41d3c40 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.cs @@ -5,6 +5,8 @@ using System; using System.CodeDom; using System.Collections.Generic; using System.Linq; +using System.Data; +using System.Data.SqlClient; namespace FineUIPro.Web { @@ -43,48 +45,151 @@ namespace FineUIPro.Web /// private void getSitePerson() { - int AllCount = 0; - //var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now.AddDays(-1)); - DateTime dateValue = DateTime.Now.AddDays(-1); - List getallin = new List(); - var getInMaxs = from x in Funs.DB.SitePerson_Person - join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId - where x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true - select new Model.PageDataPersonInOutItem - { - PersonId = x.PersonId, - PostType = y.PostType, - WorkPostId = x.WorkPostId, - }; - if (getInMaxs.Count() > 0) + // int AllCount = 0; + // //var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now.AddDays(-1)); + // DateTime dateValue = DateTime.Now.AddDays(-1); + // List getallin = new List(); + // var getInMaxs = from x in Funs.DB.SitePerson_Person + // join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + // where x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true + // select new Model.PageDataPersonInOutItem + // { + // PersonId = x.PersonId, + // PostType = y.PostType, + // WorkPostId = x.WorkPostId, + // }; + // if (getInMaxs.Count() > 0) + // { + // getallin = getInMaxs.Distinct().ToList(); + // } + // //AllCount = getallin.Count(); + // var getEmployInOutRecords = (from x in Funs.DB.T_d_EmployInOutRecord + // join y in Funs.DB.SitePerson_Person on new { ss1 = x.ProjectId, ss = x.IDCardNo } equals new { ss1 = y.ProjectId, ss = y.IdentityCard } + // where y.ProjectId == this.CurrUser.LoginProjectId && y.IsUsed == true && x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date + // select x.IDCardNo).Distinct(); + // + // //if (AllCount > 0) + // //{ + // // ////总人数 + // // this.divperson.InnerHtml = ((AllCount % 10000) / 1000).ToString(); + // // this.person00.InnerHtml = ((AllCount % 1000) / 100).ToString(); + // // this.person01.InnerHtml = ((AllCount % 100) / 10).ToString(); + // // this.person02.InnerHtml = (AllCount % 10).ToString(); + // //} + // + // + // AllCount = getEmployInOutRecords.Count(); + // if (AllCount > 0) + // { + // ////总人数 + // this.divperson.InnerHtml = ((AllCount % 10000) / 1000).ToString(); + // this.person00.InnerHtml = ((AllCount % 1000) / 100).ToString(); + // this.person01.InnerHtml = ((AllCount % 100) / 10).ToString(); + // this.person02.InnerHtml = (AllCount % 10).ToString(); + // } + + string strSql = @"SELECT DISTINCT ProjectUser.ProjectUserId,ProjectUser.ProjectId,ProjectUser.UserId,ProjectUser.WorkAreaId,Users.UserCode,Users.UserName,ProjectUser.UnitId,Unit.UnitCode,Unit.UnitName,ProjectUnit.UnitType,sysConst.ConstText AS UnitTypeName,ProjectUser.RoleId,ProjectUser.IsPost,(CASE WHEN ProjectUser.IsPost = 1 THEN '在岗' ELSE '离岗' END) AS IsPostName,WorkPost.WorkPostName,UnitCode" + + @" ,RoleName= STUFF(( SELECT ',' + RoleName FROM dbo.Sys_Role where PATINDEX('%,' + RTRIM(RoleId) + ',%',',' +ProjectUser.RoleId + ',')>0 FOR XML PATH('')), 1, 1,'')" + + @" FROM Project_ProjectUser AS ProjectUser " + + @" LEFT JOIN Base_Project AS Project ON ProjectUser.ProjectId = Project.ProjectId " + + @" LEFT JOIN Sys_User AS Users ON ProjectUser.UserId = Users.UserId " + + @" LEFT JOIN Sys_Role AS Role ON ProjectUser.RoleId = Role.RoleId " + + @" LEFT JOIN Project_ProjectUnit AS ProjectUnit ON ProjectUser.UnitId = ProjectUnit.UnitId AND ProjectUser.ProjectId= ProjectUnit.ProjectId " + + @" LEFT JOIN Base_Unit AS Unit ON ProjectUser.UnitId = Unit.UnitId " + + @" LEFT JOIN SitePerson_Person AS Person ON ProjectUser.ProjectId =Person.ProjectId AND Users.IdentityCard = Person.IdentityCard " + + @" LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId " + + @" LEFT JOIN Sys_Const AS sysConst ON sysConst.GroupId = '" + BLL.ConstValue.Group_ProjectUnitType + "' AND ProjectUnit.UnitType=sysConst.ConstValue " + + @" WHERE 1=1 "; + + + List listStr = new List(); + strSql += " AND ProjectUser.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + var projectPeople = tb.Rows.Count; + + + //当前日 + // 获取当前日期的00点 + DateTime now = DateTime.Now; + DateTime StartDate = DateTime.Now.Date; + + DateTime EndDate = new DateTime(now.Year, now.Month, now.Day, 23, 59, 59); + //当前月 + // 获取当前年份和月份 + int year = DateTime.Now.Year; + int month = DateTime.Now.Month; + // 获取当前月份的开始00点 + DateTime startOfMonth = new DateTime(year, month, 1); + DateTime startOfNextMonth = startOfMonth.AddMonths(1); + // 如果你需要当前月份的最后一天的23:59:59 + DateTime endOfMonth = startOfNextMonth.AddSeconds(-1); + + string strSql1 = "SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,CodeRecords.Code AS ClassMeetingCode,Unit.UnitId,Unit.UnitName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States " + + @" ,(CASE WHEN ClassMeeting.States = " + BLL.Const.State_0 + " OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.UserName,Users.UserName)+']提交' WHEN ClassMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName" + + @" FROM Meeting_ClassMeeting AS ClassMeeting " + + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON ClassMeeting.ClassMeetingId = CodeRecords.DataId " + + @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON ClassMeeting.ClassMeetingId = FlowOperate.DataId AND FlowOperate.IsClosed <> 1" + + @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId" + + @" LEFT JOIN Sys_User AS Users ON ClassMeeting.CompileMan = Users.UserId" + + @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 "; + List listStr1 = new List(); + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) { - getallin = getInMaxs.Distinct().ToList(); + strSql1 += " AND ClassMeeting.ProjectId = @ProjectId"; + listStr1.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); } - //AllCount = getallin.Count(); - var getEmployInOutRecords = (from x in Funs.DB.T_d_EmployInOutRecord - join y in Funs.DB.SitePerson_Person on new { ss1 = x.ProjectId, ss = x.IDCardNo } equals new { ss1 = y.ProjectId, ss = y.IdentityCard } - where y.ProjectId == this.CurrUser.LoginProjectId && y.IsUsed == true && x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date - select x.IDCardNo).Distinct(); - - //if (AllCount > 0) - //{ - // ////总人数 - // this.divperson.InnerHtml = ((AllCount % 10000) / 1000).ToString(); - // this.person00.InnerHtml = ((AllCount % 1000) / 100).ToString(); - // this.person01.InnerHtml = ((AllCount % 100) / 10).ToString(); - // this.person02.InnerHtml = (AllCount % 10).ToString(); - //} - - - AllCount = getEmployInOutRecords.Count(); - if (AllCount > 0) + strSql1 += " AND ClassMeeting.ClassMeetingDate BETWEEN @StartDate AND @EndDate"; + listStr1.Add(new SqlParameter("@StartDate", StartDate)); + listStr1.Add(new SqlParameter("@EndDate", EndDate)); + SqlParameter[] parameter1 = listStr1.ToArray(); + DataTable tb1 = SQLHelper.GetDataTableRunText(strSql1, parameter1); + var dr = tb1.Rows.Count; + + + string strSql2 = "SELECT ClassMeeting.ClassMeetingId,ClassMeeting.ProjectId,CodeRecords.Code AS ClassMeetingCode,Unit.UnitId,Unit.UnitName,ClassMeeting.ClassMeetingName,ClassMeeting.ClassMeetingDate,ClassMeeting.CompileMan,ClassMeeting.ClassMeetingContents,ClassMeeting.CompileDate,ClassMeeting.States " + + @" ,(CASE WHEN ClassMeeting.States = " + BLL.Const.State_0 + " OR ClassMeeting.States IS NULL THEN '待['+ISNULL(OperateUser.UserName,Users.UserName)+']提交' WHEN ClassMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName" + + @" FROM Meeting_ClassMeeting AS ClassMeeting " + + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON ClassMeeting.ClassMeetingId = CodeRecords.DataId " + + @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON ClassMeeting.ClassMeetingId = FlowOperate.DataId AND FlowOperate.IsClosed <> 1" + + @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId" + + @" LEFT JOIN Sys_User AS Users ON ClassMeeting.CompileMan = Users.UserId" + + @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 "; + List listStr2 = new List(); + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + strSql2 += " AND ClassMeeting.ProjectId = @ProjectId"; + listStr2.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + } + strSql2 += " AND ClassMeeting.ClassMeetingDate BETWEEN @StartDate AND @EndDate"; + listStr2.Add(new SqlParameter("@StartDate", startOfMonth)); + listStr2.Add(new SqlParameter("@EndDate", endOfMonth)); + SqlParameter[] parameter2 = listStr2.ToArray(); + DataTable tb2 = SQLHelper.GetDataTableRunText(strSql2, parameter2); + + var dy = tb2.Rows.Count; + + var count1 = projectPeople + dr; + var count2 = projectPeople + dy; + if (count1 > 0) { ////总人数 - this.divperson.InnerHtml = ((AllCount % 10000) / 1000).ToString(); - this.person00.InnerHtml = ((AllCount % 1000) / 100).ToString(); - this.person01.InnerHtml = ((AllCount % 100) / 10).ToString(); - this.person02.InnerHtml = (AllCount % 10).ToString(); + this.divperson.InnerHtml = ((count1 % 10000) / 1000).ToString(); + this.person00.InnerHtml = ((count1 % 1000) / 100).ToString(); + this.person01.InnerHtml = ((count1 % 100) / 10).ToString(); + this.person02.InnerHtml = (count1 % 10).ToString(); } + + if (count2 > 0) + { + ////总人数 + this.divperson1.InnerHtml = ((count2 % 10000) / 1000).ToString(); + this.person001.InnerHtml = ((count2 % 1000) / 100).ToString(); + this.person011.InnerHtml = ((count2 % 100) / 10).ToString(); + this.person021.InnerHtml = (count2 % 10).ToString(); + } + } #endregion diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.designer.cs b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.designer.cs index f61efdb..c86f1b2 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web { - - - public partial class mainMenu_HSSE { - +namespace FineUIPro.Web +{ + + + public partial class mainMenu_HSSE + { + /// /// Head1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - + /// /// divperson 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divperson; - + /// /// person00 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl person00; - + /// /// person01 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl person01; - + /// /// person02 控件。 /// @@ -56,7 +58,43 @@ namespace FineUIPro.Web { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl person02; - + + /// + /// divperson1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divperson1; + + /// + /// person001 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl person001; + + /// + /// person011 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl person011; + + /// + /// person021 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl person021; + /// /// xmb 控件。 /// diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index b92bba9..affdc5a 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -2414,12 +2414,18 @@ namespace Model partial void InsertTechnique_Appraise(Technique_Appraise instance); partial void UpdateTechnique_Appraise(Technique_Appraise instance); partial void DeleteTechnique_Appraise(Technique_Appraise instance); + partial void InsertTechnique_AwardStandards(Technique_AwardStandards instance); + partial void UpdateTechnique_AwardStandards(Technique_AwardStandards instance); + partial void DeleteTechnique_AwardStandards(Technique_AwardStandards instance); partial void InsertTechnique_CheckItemDetail(Technique_CheckItemDetail instance); partial void UpdateTechnique_CheckItemDetail(Technique_CheckItemDetail instance); partial void DeleteTechnique_CheckItemDetail(Technique_CheckItemDetail instance); partial void InsertTechnique_CheckItemSet(Technique_CheckItemSet instance); partial void UpdateTechnique_CheckItemSet(Technique_CheckItemSet instance); partial void DeleteTechnique_CheckItemSet(Technique_CheckItemSet instance); + partial void InsertTechnique_ConstructionStandards(Technique_ConstructionStandards instance); + partial void UpdateTechnique_ConstructionStandards(Technique_ConstructionStandards instance); + partial void DeleteTechnique_ConstructionStandards(Technique_ConstructionStandards instance); partial void InsertTechnique_Emergency(Technique_Emergency instance); partial void UpdateTechnique_Emergency(Technique_Emergency instance); partial void DeleteTechnique_Emergency(Technique_Emergency instance); @@ -2441,12 +2447,18 @@ namespace Model partial void InsertTechnique_ProjectSolutionTemplete(Technique_ProjectSolutionTemplete instance); partial void UpdateTechnique_ProjectSolutionTemplete(Technique_ProjectSolutionTemplete instance); partial void DeleteTechnique_ProjectSolutionTemplete(Technique_ProjectSolutionTemplete instance); + partial void InsertTechnique_ProtectionStandards(Technique_ProtectionStandards instance); + partial void UpdateTechnique_ProtectionStandards(Technique_ProtectionStandards instance); + partial void DeleteTechnique_ProtectionStandards(Technique_ProtectionStandards instance); partial void InsertTechnique_Rectify(Technique_Rectify instance); partial void UpdateTechnique_Rectify(Technique_Rectify instance); partial void DeleteTechnique_Rectify(Technique_Rectify instance); partial void InsertTechnique_RectifyItem(Technique_RectifyItem instance); partial void UpdateTechnique_RectifyItem(Technique_RectifyItem instance); partial void DeleteTechnique_RectifyItem(Technique_RectifyItem instance); + partial void InsertTechnique_SafetyResponsibilities(Technique_SafetyResponsibilities instance); + partial void UpdateTechnique_SafetyResponsibilities(Technique_SafetyResponsibilities instance); + partial void DeleteTechnique_SafetyResponsibilities(Technique_SafetyResponsibilities instance); partial void InsertTechnique_SpecialScheme(Technique_SpecialScheme instance); partial void UpdateTechnique_SpecialScheme(Technique_SpecialScheme instance); partial void DeleteTechnique_SpecialScheme(Technique_SpecialScheme instance); @@ -9110,6 +9122,14 @@ namespace Model } } + public System.Data.Linq.Table Technique_AwardStandards + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Technique_CheckItemDetail { get @@ -9126,6 +9146,14 @@ namespace Model } } + public System.Data.Linq.Table Technique_ConstructionStandards + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Technique_Emergency { get @@ -9182,6 +9210,14 @@ namespace Model } } + public System.Data.Linq.Table Technique_ProtectionStandards + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Technique_Rectify { get @@ -9198,6 +9234,14 @@ namespace Model } } + public System.Data.Linq.Table Technique_SafetyResponsibilities + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Technique_SpecialScheme { get @@ -388947,6 +388991,332 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Technique_AwardStandards")] + public partial class Technique_AwardStandards : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _AwardStandardsId; + + private string _AwardStandardsCode; + + private string _AwardStandardsName; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _AttachUrl; + + private string _AuditMan; + + private System.Nullable _AuditDate; + + private System.Nullable _IsPass; + + private System.Nullable _IsBuild; + + private string _UpState; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnAwardStandardsIdChanging(string value); + partial void OnAwardStandardsIdChanged(); + partial void OnAwardStandardsCodeChanging(string value); + partial void OnAwardStandardsCodeChanged(); + partial void OnAwardStandardsNameChanging(string value); + partial void OnAwardStandardsNameChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnAuditDateChanging(System.Nullable value); + partial void OnAuditDateChanged(); + partial void OnIsPassChanging(System.Nullable value); + partial void OnIsPassChanged(); + partial void OnIsBuildChanging(System.Nullable value); + partial void OnIsBuildChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Technique_AwardStandards() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AwardStandardsId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string AwardStandardsId + { + get + { + return this._AwardStandardsId; + } + set + { + if ((this._AwardStandardsId != value)) + { + this.OnAwardStandardsIdChanging(value); + this.SendPropertyChanging(); + this._AwardStandardsId = value; + this.SendPropertyChanged("AwardStandardsId"); + this.OnAwardStandardsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AwardStandardsCode", DbType="NVarChar(50)")] + public string AwardStandardsCode + { + get + { + return this._AwardStandardsCode; + } + set + { + if ((this._AwardStandardsCode != value)) + { + this.OnAwardStandardsCodeChanging(value); + this.SendPropertyChanging(); + this._AwardStandardsCode = value; + this.SendPropertyChanged("AwardStandardsCode"); + this.OnAwardStandardsCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AwardStandardsName", DbType="NVarChar(500)")] + public string AwardStandardsName + { + get + { + return this._AwardStandardsName; + } + set + { + if ((this._AwardStandardsName != value)) + { + this.OnAwardStandardsNameChanging(value); + this.SendPropertyChanging(); + this._AwardStandardsName = value; + this.SendPropertyChanged("AwardStandardsName"); + this.OnAwardStandardsNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditDate", DbType="DateTime")] + public System.Nullable AuditDate + { + get + { + return this._AuditDate; + } + set + { + if ((this._AuditDate != value)) + { + this.OnAuditDateChanging(value); + this.SendPropertyChanging(); + this._AuditDate = value; + this.SendPropertyChanged("AuditDate"); + this.OnAuditDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPass", DbType="Bit")] + public System.Nullable IsPass + { + get + { + return this._IsPass; + } + set + { + if ((this._IsPass != value)) + { + this.OnIsPassChanging(value); + this.SendPropertyChanging(); + this._IsPass = value; + this.SendPropertyChanged("IsPass"); + this.OnIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsBuild", DbType="Bit")] + public System.Nullable IsBuild + { + get + { + return this._IsBuild; + } + set + { + if ((this._IsBuild != value)) + { + this.OnIsBuildChanging(value); + this.SendPropertyChanging(); + this._IsBuild = value; + this.SendPropertyChanged("IsBuild"); + this.OnIsBuildChanged(); + } + } + } + + [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="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Technique_CheckItemDetail")] public partial class Technique_CheckItemDetail : INotifyPropertyChanging, INotifyPropertyChanged { @@ -389432,6 +389802,332 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Technique_ConstructionStandards")] + public partial class Technique_ConstructionStandards : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ConstructionStandardsId; + + private string _ConstructionStandardsCode; + + private string _ConstructionStandardsName; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _AttachUrl; + + private string _AuditMan; + + private System.Nullable _AuditDate; + + private System.Nullable _IsPass; + + private System.Nullable _IsBuild; + + private string _UpState; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnConstructionStandardsIdChanging(string value); + partial void OnConstructionStandardsIdChanged(); + partial void OnConstructionStandardsCodeChanging(string value); + partial void OnConstructionStandardsCodeChanged(); + partial void OnConstructionStandardsNameChanging(string value); + partial void OnConstructionStandardsNameChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnAuditDateChanging(System.Nullable value); + partial void OnAuditDateChanged(); + partial void OnIsPassChanging(System.Nullable value); + partial void OnIsPassChanged(); + partial void OnIsBuildChanging(System.Nullable value); + partial void OnIsBuildChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Technique_ConstructionStandards() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionStandardsId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ConstructionStandardsId + { + get + { + return this._ConstructionStandardsId; + } + set + { + if ((this._ConstructionStandardsId != value)) + { + this.OnConstructionStandardsIdChanging(value); + this.SendPropertyChanging(); + this._ConstructionStandardsId = value; + this.SendPropertyChanged("ConstructionStandardsId"); + this.OnConstructionStandardsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionStandardsCode", DbType="NVarChar(50)")] + public string ConstructionStandardsCode + { + get + { + return this._ConstructionStandardsCode; + } + set + { + if ((this._ConstructionStandardsCode != value)) + { + this.OnConstructionStandardsCodeChanging(value); + this.SendPropertyChanging(); + this._ConstructionStandardsCode = value; + this.SendPropertyChanged("ConstructionStandardsCode"); + this.OnConstructionStandardsCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionStandardsName", DbType="NVarChar(500)")] + public string ConstructionStandardsName + { + get + { + return this._ConstructionStandardsName; + } + set + { + if ((this._ConstructionStandardsName != value)) + { + this.OnConstructionStandardsNameChanging(value); + this.SendPropertyChanging(); + this._ConstructionStandardsName = value; + this.SendPropertyChanged("ConstructionStandardsName"); + this.OnConstructionStandardsNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditDate", DbType="DateTime")] + public System.Nullable AuditDate + { + get + { + return this._AuditDate; + } + set + { + if ((this._AuditDate != value)) + { + this.OnAuditDateChanging(value); + this.SendPropertyChanging(); + this._AuditDate = value; + this.SendPropertyChanged("AuditDate"); + this.OnAuditDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPass", DbType="Bit")] + public System.Nullable IsPass + { + get + { + return this._IsPass; + } + set + { + if ((this._IsPass != value)) + { + this.OnIsPassChanging(value); + this.SendPropertyChanging(); + this._IsPass = value; + this.SendPropertyChanged("IsPass"); + this.OnIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsBuild", DbType="Bit")] + public System.Nullable IsBuild + { + get + { + return this._IsBuild; + } + set + { + if ((this._IsBuild != value)) + { + this.OnIsBuildChanging(value); + this.SendPropertyChanging(); + this._IsBuild = value; + this.SendPropertyChanged("IsBuild"); + this.OnIsBuildChanged(); + } + } + } + + [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="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Technique_Emergency")] public partial class Technique_Emergency : INotifyPropertyChanging, INotifyPropertyChanged { @@ -392869,6 +393565,332 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Technique_ProtectionStandards")] + public partial class Technique_ProtectionStandards : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ProtectionStandardsId; + + private string _ProtectionStandardsCode; + + private string _ProtectionStandardsName; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _AttachUrl; + + private string _AuditMan; + + private System.Nullable _AuditDate; + + private System.Nullable _IsPass; + + private System.Nullable _IsBuild; + + private string _UpState; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnProtectionStandardsIdChanging(string value); + partial void OnProtectionStandardsIdChanged(); + partial void OnProtectionStandardsCodeChanging(string value); + partial void OnProtectionStandardsCodeChanged(); + partial void OnProtectionStandardsNameChanging(string value); + partial void OnProtectionStandardsNameChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnAuditDateChanging(System.Nullable value); + partial void OnAuditDateChanged(); + partial void OnIsPassChanging(System.Nullable value); + partial void OnIsPassChanged(); + partial void OnIsBuildChanging(System.Nullable value); + partial void OnIsBuildChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Technique_ProtectionStandards() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProtectionStandardsId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ProtectionStandardsId + { + get + { + return this._ProtectionStandardsId; + } + set + { + if ((this._ProtectionStandardsId != value)) + { + this.OnProtectionStandardsIdChanging(value); + this.SendPropertyChanging(); + this._ProtectionStandardsId = value; + this.SendPropertyChanged("ProtectionStandardsId"); + this.OnProtectionStandardsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProtectionStandardsCode", DbType="NVarChar(50)")] + public string ProtectionStandardsCode + { + get + { + return this._ProtectionStandardsCode; + } + set + { + if ((this._ProtectionStandardsCode != value)) + { + this.OnProtectionStandardsCodeChanging(value); + this.SendPropertyChanging(); + this._ProtectionStandardsCode = value; + this.SendPropertyChanged("ProtectionStandardsCode"); + this.OnProtectionStandardsCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProtectionStandardsName", DbType="NVarChar(500)")] + public string ProtectionStandardsName + { + get + { + return this._ProtectionStandardsName; + } + set + { + if ((this._ProtectionStandardsName != value)) + { + this.OnProtectionStandardsNameChanging(value); + this.SendPropertyChanging(); + this._ProtectionStandardsName = value; + this.SendPropertyChanged("ProtectionStandardsName"); + this.OnProtectionStandardsNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditDate", DbType="DateTime")] + public System.Nullable AuditDate + { + get + { + return this._AuditDate; + } + set + { + if ((this._AuditDate != value)) + { + this.OnAuditDateChanging(value); + this.SendPropertyChanging(); + this._AuditDate = value; + this.SendPropertyChanged("AuditDate"); + this.OnAuditDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPass", DbType="Bit")] + public System.Nullable IsPass + { + get + { + return this._IsPass; + } + set + { + if ((this._IsPass != value)) + { + this.OnIsPassChanging(value); + this.SendPropertyChanging(); + this._IsPass = value; + this.SendPropertyChanged("IsPass"); + this.OnIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsBuild", DbType="Bit")] + public System.Nullable IsBuild + { + get + { + return this._IsBuild; + } + set + { + if ((this._IsBuild != value)) + { + this.OnIsBuildChanging(value); + this.SendPropertyChanging(); + this._IsBuild = value; + this.SendPropertyChanged("IsBuild"); + this.OnIsBuildChanged(); + } + } + } + + [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="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Technique_Rectify")] public partial class Technique_Rectify : INotifyPropertyChanging, INotifyPropertyChanged { @@ -393563,6 +394585,332 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Technique_SafetyResponsibilities")] + public partial class Technique_SafetyResponsibilities : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SafetyResponsibilitiesId; + + private string _SafetyResponsibilitiesCode; + + private string _SafetyResponsibilitiesName; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _AttachUrl; + + private string _AuditMan; + + private System.Nullable _AuditDate; + + private System.Nullable _IsPass; + + private System.Nullable _IsBuild; + + private string _UpState; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSafetyResponsibilitiesIdChanging(string value); + partial void OnSafetyResponsibilitiesIdChanged(); + partial void OnSafetyResponsibilitiesCodeChanging(string value); + partial void OnSafetyResponsibilitiesCodeChanged(); + partial void OnSafetyResponsibilitiesNameChanging(string value); + partial void OnSafetyResponsibilitiesNameChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnAuditDateChanging(System.Nullable value); + partial void OnAuditDateChanged(); + partial void OnIsPassChanging(System.Nullable value); + partial void OnIsPassChanged(); + partial void OnIsBuildChanging(System.Nullable value); + partial void OnIsBuildChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Technique_SafetyResponsibilities() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyResponsibilitiesId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SafetyResponsibilitiesId + { + get + { + return this._SafetyResponsibilitiesId; + } + set + { + if ((this._SafetyResponsibilitiesId != value)) + { + this.OnSafetyResponsibilitiesIdChanging(value); + this.SendPropertyChanging(); + this._SafetyResponsibilitiesId = value; + this.SendPropertyChanged("SafetyResponsibilitiesId"); + this.OnSafetyResponsibilitiesIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyResponsibilitiesCode", DbType="NVarChar(50)")] + public string SafetyResponsibilitiesCode + { + get + { + return this._SafetyResponsibilitiesCode; + } + set + { + if ((this._SafetyResponsibilitiesCode != value)) + { + this.OnSafetyResponsibilitiesCodeChanging(value); + this.SendPropertyChanging(); + this._SafetyResponsibilitiesCode = value; + this.SendPropertyChanged("SafetyResponsibilitiesCode"); + this.OnSafetyResponsibilitiesCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyResponsibilitiesName", DbType="NVarChar(500)")] + public string SafetyResponsibilitiesName + { + get + { + return this._SafetyResponsibilitiesName; + } + set + { + if ((this._SafetyResponsibilitiesName != value)) + { + this.OnSafetyResponsibilitiesNameChanging(value); + this.SendPropertyChanging(); + this._SafetyResponsibilitiesName = value; + this.SendPropertyChanged("SafetyResponsibilitiesName"); + this.OnSafetyResponsibilitiesNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this.OnAttachUrlChanging(value); + this.SendPropertyChanging(); + this._AttachUrl = value; + this.SendPropertyChanged("AttachUrl"); + this.OnAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditDate", DbType="DateTime")] + public System.Nullable AuditDate + { + get + { + return this._AuditDate; + } + set + { + if ((this._AuditDate != value)) + { + this.OnAuditDateChanging(value); + this.SendPropertyChanging(); + this._AuditDate = value; + this.SendPropertyChanged("AuditDate"); + this.OnAuditDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPass", DbType="Bit")] + public System.Nullable IsPass + { + get + { + return this._IsPass; + } + set + { + if ((this._IsPass != value)) + { + this.OnIsPassChanging(value); + this.SendPropertyChanging(); + this._IsPass = value; + this.SendPropertyChanged("IsPass"); + this.OnIsPassChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsBuild", DbType="Bit")] + public System.Nullable IsBuild + { + get + { + return this._IsBuild; + } + set + { + if ((this._IsBuild != value)) + { + this.OnIsBuildChanging(value); + this.SendPropertyChanging(); + this._IsBuild = value; + this.SendPropertyChanged("IsBuild"); + this.OnIsBuildChanged(); + } + } + } + + [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="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Technique_SpecialScheme")] public partial class Technique_SpecialScheme : INotifyPropertyChanging, INotifyPropertyChanged {