From f4b1c42fa9114d04e76c0e67ec69f315856912da Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Tue, 30 May 2023 08:52:00 +0800 Subject: [PATCH] =?UTF-8?q?20230530=E9=9B=86=E5=9B=A2=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=A5=E6=BA=90=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0-5综合管理(Menu_ZHGL).sql | 90 + .../1-3安全管理(Menu_HSSE).sql | 27 + SGGL/BLL/BLL.csproj | 12 + SGGL/BLL/BaseInfo/CertificateService.cs | 4 + SGGL/BLL/Common/Const.cs | 38 +- .../Accident/AccidentPersonRecordService.cs | 2 + .../Check/Check_ProjectLeaderCheckService.cs | 214 ++ .../SafetyLeaderGroupMeetingService.cs | 152 + .../SitePerson/SitePerson_PersonService.cs | 6 +- SGGL/BLL/Person/Person_PersonsService.cs | 14 +- SGGL/BLL/SysManage/UnitService.cs | 29 +- .../Emergency/UnitDrillRecordListService.cs | 155 + .../Emergency/UnitEmergencyListService.cs | 150 + .../Meeting/CompanySafetyMeetingService.cs | 142 + .../Meeting/CompanySpecialMeetingService.cs | 142 + .../SubUnitCheckRectifyItemService.cs | 84 + .../Supervise/SubUnitCheckRectifyService.cs | 90 + .../SuperviseCheckRectifyItemService.cs | 86 + .../Supervise/SuperviseCheckRectifyService.cs | 97 + .../SuperviseCheckReportItemService.cs | 90 + .../Supervise/SuperviseCheckReportService.cs | 87 + SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx | 47 +- .../BaseInfo/Certificate.aspx.cs | 78 +- .../BaseInfo/Certificate.aspx.designer.cs | 20 +- .../FineUIPro.Web/DataShow/ProjectPerson.aspx | 2 +- .../DataShow/ProjectPerson.aspx.cs | 8 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 202 +- .../Accident/AccidentPersonRecord.aspx.cs | 2 +- .../Accident/AccidentPersonRecordEdit.aspx | 13 +- .../Accident/AccidentPersonRecordEdit.aspx.cs | 13 +- .../AccidentPersonRecordEdit.aspx.designer.cs | 85 +- .../Accident/AccidentPersonRecordView.aspx | 13 +- .../Accident/AccidentPersonRecordView.aspx.cs | 4 + .../AccidentPersonRecordView.aspx.designer.cs | 81 +- .../HSSE/Check/ProjectLeaderCheck.aspx | 141 + .../HSSE/Check/ProjectLeaderCheck.aspx.cs | 326 ++ .../Check/ProjectLeaderCheck.aspx.designer.cs | 222 ++ .../HSSE/Check/ProjectLeaderCheckEdit.aspx | 90 + .../HSSE/Check/ProjectLeaderCheckEdit.aspx.cs | 187 ++ .../ProjectLeaderCheckEdit.aspx.designer.cs | 159 + .../HSSE/Check/ProjectLeaderCheckView.aspx | 83 + .../HSSE/Check/ProjectLeaderCheckView.aspx.cs | 110 + .../ProjectLeaderCheckView.aspx.designer.cs | 152 + .../Meeting/SafetyLeaderGroupMeeting.aspx | 151 + .../Meeting/SafetyLeaderGroupMeeting.aspx.cs | 305 ++ .../SafetyLeaderGroupMeeting.aspx.designer.cs | 215 ++ .../Meeting/SafetyLeaderGroupMeetingEdit.aspx | 90 + .../SafetyLeaderGroupMeetingEdit.aspx.cs | 235 ++ ...etyLeaderGroupMeetingEdit.aspx.designer.cs | 204 ++ .../Meeting/SafetyLeaderGroupMeetingView.aspx | 84 + .../SafetyLeaderGroupMeetingView.aspx.cs | 95 + ...etyLeaderGroupMeetingView.aspx.designer.cs | 195 ++ .../Person/ProjectPersonEdit.aspx | 4 +- .../Person/ProjectPersonEdit.aspx.cs | 5 + .../Person/ProjectPersonEdit.aspx.designer.cs | 9 + .../Person/ProjectPersonView.aspx | 5 +- .../Person/ProjectPersonView.aspx.cs | 4 + .../Person/ProjectPersonView.aspx.designer.cs | 9 + .../ZHGL/Emergency/DrillRecordList.aspx | 131 + .../ZHGL/Emergency/DrillRecordList.aspx.cs | 305 ++ .../DrillRecordList.aspx.designer.cs | 179 + .../ZHGL/Emergency/DrillRecordListEdit.aspx | 92 + .../Emergency/DrillRecordListEdit.aspx.cs | 202 ++ .../DrillRecordListEdit.aspx.designer.cs | 161 + .../ZHGL/Emergency/DrillRecordListView.aspx | 72 + .../Emergency/DrillRecordListView.aspx.cs | 90 + .../DrillRecordListView.aspx.designer.cs | 152 + .../ZHGL/Emergency/EmergencyList.aspx | 132 + .../ZHGL/Emergency/EmergencyList.aspx.cs | 277 ++ .../Emergency/EmergencyList.aspx.designer.cs | 179 + .../ZHGL/Emergency/EmergencyListEdit.aspx | 93 + .../ZHGL/Emergency/EmergencyListEdit.aspx.cs | 210 ++ .../EmergencyListEdit.aspx.designer.cs | 170 + .../ZHGL/Emergency/EmergencyListView.aspx | 75 + .../ZHGL/Emergency/EmergencyListView.aspx.cs | 85 + .../EmergencyListView.aspx.designer.cs | 161 + .../ZHGL/Meeting/CompanySafetyMeeting.aspx | 123 + .../ZHGL/Meeting/CompanySafetyMeeting.aspx.cs | 256 ++ .../CompanySafetyMeeting.aspx.designer.cs | 197 ++ .../Meeting/CompanySafetyMeetingEdit.aspx | 90 + .../Meeting/CompanySafetyMeetingEdit.aspx.cs | 201 ++ .../CompanySafetyMeetingEdit.aspx.designer.cs | 204 ++ .../Meeting/CompanySafetyMeetingView.aspx | 84 + .../Meeting/CompanySafetyMeetingView.aspx.cs | 95 + .../CompanySafetyMeetingView.aspx.designer.cs | 195 ++ .../ZHGL/Meeting/CompanySpecialMeeting.aspx | 123 + .../Meeting/CompanySpecialMeeting.aspx.cs | 256 ++ .../CompanySpecialMeeting.aspx.designer.cs | 197 ++ .../Meeting/CompanySpecialMeetingEdit.aspx | 89 + .../Meeting/CompanySpecialMeetingEdit.aspx.cs | 201 ++ ...CompanySpecialMeetingEdit.aspx.designer.cs | 204 ++ .../Meeting/CompanySpecialMeetingView.aspx | 84 + .../Meeting/CompanySpecialMeetingView.aspx.cs | 96 + ...CompanySpecialMeetingView.aspx.designer.cs | 195 ++ .../ZHGL/Supervise/ShowFileUpload.aspx | 62 + .../ZHGL/Supervise/ShowFileUpload.aspx.cs | 134 + .../Supervise/ShowFileUpload.aspx.designer.cs | 123 + .../ZHGL/Supervise/ShowRectifyItem.aspx | 98 + .../ZHGL/Supervise/ShowRectifyItem.aspx.cs | 236 ++ .../ShowRectifyItem.aspx.designer.cs | 159 + .../Supervise/SubUnitCheckRectifyEdit.aspx | 218 ++ .../Supervise/SubUnitCheckRectifyEdit.aspx.cs | 402 +++ .../SubUnitCheckRectifyEdit.aspx.designer.cs | 312 ++ .../ZHGL/Supervise/SuperviseCheckRectify.aspx | 151 + .../Supervise/SuperviseCheckRectify.aspx.cs | 498 +++ .../SuperviseCheckRectify.aspx.designer.cs | 168 + .../Supervise/SuperviseCheckRectifyEdit.aspx | 185 + .../SuperviseCheckRectifyEdit.aspx.cs | 271 ++ ...SuperviseCheckRectifyEdit.aspx.designer.cs | 276 ++ .../ZHGL/Supervise/SuperviseCheckReport.aspx | 140 + .../Supervise/SuperviseCheckReport.aspx.cs | 602 ++++ .../SuperviseCheckReport.aspx.designer.cs | 195 ++ .../Supervise/SuperviseCheckReportEdit.aspx | 158 + .../SuperviseCheckReportEdit.aspx.cs | 415 +++ .../SuperviseCheckReportEdit.aspx.designer.cs | 251 ++ SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 2 + SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 9 + SGGL/Model/Model.cs | 2991 +++++++++++++++++ 118 files changed, 18934 insertions(+), 137 deletions(-) create mode 100644 SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs create mode 100644 SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs create mode 100644 SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs create mode 100644 SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs create mode 100644 SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs create mode 100644 SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs create mode 100644 SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs create mode 100644 SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs create mode 100644 SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs create mode 100644 SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyService.cs create mode 100644 SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs create mode 100644 SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.designer.cs diff --git a/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql b/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql index 90b63f76..60deae17 100644 --- a/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql +++ b/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql @@ -204,6 +204,96 @@ GO VALUES('EF4D5271-ECEF-4AF3-941C-02580696179E','B9ADD006-BA46-4191-BCD1-CCB56767C82B','保存',2) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('ABB667AF-2C50-40A6-9FC9-FC34A96582E3','文件柜','',40,'0','Menu_ZHGL',0,1,1) GO + +--安全会议 +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('BFFBE172-7473-486E-9833-49F13B359C6C','安全会议','',50,'0','Menu_ZHGL',1,0,1) +GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('B911B4F8-DDFD-4F37-9EAC-EB104F753432','企业安委会','ZHGL/Meeting/CompanySafetyMeeting.aspx',10,'BFFBE172-7473-486E-9833-49F13B359C6C','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('27DD0084-A559-4723-90B9-5F68DF3B61C4','B911B4F8-DDFD-4F37-9EAC-EB104F753432','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1F841CFB-1AFC-4C9C-A56F-681E407B52F9','B911B4F8-DDFD-4F37-9EAC-EB104F753432','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('60142F0A-3362-4264-876C-F27FFB533891','B911B4F8-DDFD-4F37-9EAC-EB104F753432','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('05901FC0-D482-442D-9764-7DE5EA4ED991','B911B4F8-DDFD-4F37-9EAC-EB104F753432','保存',4) + GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2497EF13-C052-4228-B388-EBC5C18963BC','企业专题会','ZHGL/Meeting/CompanySpecialMeeting.aspx',20,'BFFBE172-7473-486E-9833-49F13B359C6C','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('58BC6E5C-E45F-47A2-A7FC-D02F91DEF058','2497EF13-C052-4228-B388-EBC5C18963BC','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('92627BA3-A14A-4886-805E-038324E9747A','2497EF13-C052-4228-B388-EBC5C18963BC','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('395E1B2B-AF35-4867-A8F0-E471FB10C25D','2497EF13-C052-4228-B388-EBC5C18963BC','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1DF4AADF-2207-4A9E-83D0-8899E21E91BA','2497EF13-C052-4228-B388-EBC5C18963BC','保存',4) + GO + +--企业安全大检查 +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('CD9FC4C8-4B02-4619-8B02-50DA6AE6146E','企业安全大检查','',60,'0','Menu_ZHGL',1,0,1) +GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('40387C48-95A0-435C-82FB-57AF0A81B9D4','安全监督检查报告','ZHGL/Supervise/SuperviseCheckReport.aspx',10,'CD9FC4C8-4B02-4619-8B02-50DA6AE6146E','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D5465075-BB0C-447D-95EC-4030A25A98ED','40387C48-95A0-435C-82FB-57AF0A81B9D4','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('126A4582-EB43-4A46-9E28-E0A780E425ED','40387C48-95A0-435C-82FB-57AF0A81B9D4','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('ACA5D163-C3B4-403F-A1D0-13F343289DF4','40387C48-95A0-435C-82FB-57AF0A81B9D4','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('CF9ED9A9-D40F-4501-A4D4-929E6FCCB97A','40387C48-95A0-435C-82FB-57AF0A81B9D4','保存',4) + GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A02E0365-383C-49A0-BF1A-B3E42052959B','安全监督检查整改','ZHGL/Supervise/SuperviseCheckRectify.aspx',20,'CD9FC4C8-4B02-4619-8B02-50DA6AE6146E','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('ECE3BCFB-4B56-4FDD-8557-D5128A3172DD','A02E0365-383C-49A0-BF1A-B3E42052959B','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7A4EE5DF-FC8C-418B-A130-88ECA4EFADDE','A02E0365-383C-49A0-BF1A-B3E42052959B','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C8656544-FF83-4D68-AE09-EFAB5DE7EF23','A02E0365-383C-49A0-BF1A-B3E42052959B','保存',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C01A5167-2001-43E9-9DEE-EEA406FF1FF9','A02E0365-383C-49A0-BF1A-B3E42052959B','保存并上报',5) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','应急信息','',70,'0','Menu_ZHGL',0,0,1) +GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('D12C2412-E12A-4F78-9AEF-1EE8AC84A561','应急预案管理清单','ZHGL/Emergency/EmergencyList.aspx',10,'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','Menu_ZHGL',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('4A638D22-1515-4967-B149-8362F81E3A95','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('11F44E2B-F3EB-4189-B324-69DB226CF39B','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('826C9DEB-7A48-4B70-9312-FC5D0D5D2555','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C4A17D4C-25A7-4F37-B6CF-F07526AECBC2','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','保存',4) + GO + + INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','应急演练开展情况','ZHGL/Emergency/DrillRecordList.aspx',20,'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','Menu_ZHGL',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9F63FB64-5F34-4CD4-B266-59F6E8FF4FA5','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2193449B-4C40-49DA-9C23-82A94126AE05','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7C866795-2E56-47CD-B937-C468C46DB007','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('27E0EE6E-D96F-4300-9574-423F378D79C4','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','保存',4) + GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql index 062329ac..7fe02396 100644 --- a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql +++ b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql @@ -506,6 +506,20 @@ GO INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('6886FA5A-7217-4FB2-805A-BD56EB1DD3E5','C198EBA8-9E23-4654-92E1-09C61105C522','',4) GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('355265DE-901A-4110-B934-B4DA067C4334','쵼','HSSE/Check/ProjectLeaderCheck.aspx',35,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) + GO + --쵼鰴ť + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E0860211-E41A-4D51-B5B4-99A5D0676C73','355265DE-901A-4110-B934-B4DA067C4334','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('87B6E85C-48DA-4BD3-8518-35968E564557','355265DE-901A-4110-B934-B4DA067C4334','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B07D2E39-60CE-4F59-895B-7D0763A65341','355265DE-901A-4110-B934-B4DA067C4334','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AAB617C6-A800-4D59-8761-AC134C7885D3','355265DE-901A-4110-B934-B4DA067C4334','',4) + GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('C3B6B222-44DC-46F3-B783-B1FC0F743C48','ĵ','HSSE/Check/RectifyNotices.aspx',40,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) @@ -612,6 +626,19 @@ GO VALUES('CCDAF139-FA43-4C52-960C-CFB9588C9BBF','F8ADCDBC-AAAD-4884-9935-2B63562E4779','',4) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','ȫ쵼С','HSSE/Meeting/SafetyLeaderGroupMeeting.aspx',60,'5309E7E0-395E-4F11-8F5E-D52E11526A2A','Menu_HSSE',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('0A65A42F-2701-4DD3-9C72-7B39F1ECD560','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DCAB0B09-EA07-443C-9B04-2E86D9E8C2DC','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('FE3476FB-1D5B-4E8E-801E-E4B9B4D287F0','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('739A0815-D4B3-4B9F-B001-5D04EB94B9EF','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',4) + GO + --HSSEɹ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('473A87D2-1365-4A68-BD38-06F312F81BC2','ҵ','',120,'0','Menu_HSSE',0,0,1) diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 6f7c6a81..8d9c4c86 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -402,6 +402,7 @@ + @@ -478,6 +479,7 @@ + @@ -672,6 +674,8 @@ + + @@ -699,6 +703,8 @@ + + @@ -706,6 +712,12 @@ + + + + + + diff --git a/SGGL/BLL/BaseInfo/CertificateService.cs b/SGGL/BLL/BaseInfo/CertificateService.cs index 9a0bbdfe..04f8b360 100644 --- a/SGGL/BLL/BaseInfo/CertificateService.cs +++ b/SGGL/BLL/BaseInfo/CertificateService.cs @@ -32,6 +32,8 @@ namespace BLL CertificateId = certificate.CertificateId, CertificateCode = certificate.CertificateCode, CertificateName = certificate.CertificateName, + CertificateType = certificate.CertificateType, + IsRegisterHSSE = certificate.IsRegisterHSSE, Remark = certificate.Remark }; db.Base_Certificate.InsertOnSubmit(newCertificate); @@ -50,6 +52,8 @@ namespace BLL { newCertificate.CertificateCode = certificate.CertificateCode; newCertificate.CertificateName = certificate.CertificateName; + newCertificate.CertificateType = certificate.CertificateType; + newCertificate.IsRegisterHSSE = certificate.IsRegisterHSSE; newCertificate.Remark = certificate.Remark; db.SubmitChanges(); } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 87ffe3aa..43a5c3c4 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -789,11 +789,18 @@ /// public const string CheckNoticeMenuId = "C502FC6D-DE43-4646-AE28-168D8C7BF4C0"; + /// + /// 公司两级领导带班检查 + /// + public const string ServerCheckTwolevelMenuId = "6CBF1000-5E3C-4FBD-A7EC-965765F6F52D"; + + /// /// 发起检查 /// public const string CheckInfoMenuId = "6090DD54-FE59-4011-92EE-9906C9BC69B6"; public const string Base_FactoryMenuId = "CD167198-1667-4552-9876-E768C2542C30"; + /// /// 实业 /// @@ -907,6 +914,16 @@ /// public const string ProjectEnergyReportMenuId = "9DE996D9-A2CF-40C8-86D3-6A472AB30E5D"; + /// + /// HSSE应急预案管理清单 + /// + public const string UnitEmergencyListMenuId = "D12C2412-E12A-4F78-9AEF-1EE8AC84A561"; + + /// + /// 应急演练 + /// + public const string UnitDrillRecordListMenuId = "172F25E0-F5E2-42E3-AD67-AC824D4E0FBB"; + #region 系统设置 /// /// 单位设置 @@ -1686,6 +1703,18 @@ /// public const string ServerTestRankingMenuId = "19FB0C6D-E2CA-4352-B635-060347D45C4A"; #endregion + + #region 公司安全会议 + /// + /// 企业安委会 + /// + public const string CompanySafetyMeetingMenuId = "B911B4F8-DDFD-4F37-9EAC-EB104F753432"; + + /// + /// 企业专题会 + /// + public const string CompanySpecialMeetingMenuId = "2497EF13-C052-4228-B388-EBC5C18963BC"; + #endregion #endregion #region 人员管理 @@ -1734,7 +1763,6 @@ #region 项目菜单 - #region 安全体系 /// /// 安全组织机构 @@ -2123,6 +2151,10 @@ /// 联系单 /// public const string ProjectContactListMenuId = "F057C207-4549-48AE-B838-A1920E5709D8"; + /// + /// 领导带班检查 + /// + public const string ProjectLeaderCheckMenuId = "355265DE-901A-4110-B934-B4DA067C4334"; #endregion #region APP检查管理 @@ -2209,6 +2241,10 @@ /// 班前会 /// public const string ProjectClassMeetingMenuId = "F8ADCDBC-AAAD-4884-9935-2B63562E4779"; + /// + /// 安全领导小组会议 + /// + public const string ProjectSafetyLeaderGroupMeetingMenuId = "DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF"; #endregion #region 出入场管理 diff --git a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs index 12d86ad4..9df35c8f 100644 --- a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs +++ b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs @@ -43,6 +43,7 @@ namespace BLL FileContent = accidentPersonRecord.FileContent, CompileMan = accidentPersonRecord.CompileMan, CompileDate = accidentPersonRecord.CompileDate, + IsAttempt = accidentPersonRecord.IsAttempt, States = accidentPersonRecord.States }; db.Accident_AccidentPersonRecord.InsertOnSubmit(newAccidentPersonRecord); @@ -73,6 +74,7 @@ namespace BLL newAccidentPersonRecord.FileContent = accidentPersonRecord.FileContent; newAccidentPersonRecord.CompileMan = accidentPersonRecord.CompileMan; newAccidentPersonRecord.CompileDate = accidentPersonRecord.CompileDate; + newAccidentPersonRecord.IsAttempt = accidentPersonRecord.IsAttempt; newAccidentPersonRecord.States = accidentPersonRecord.States; db.SubmitChanges(); } diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs new file mode 100644 index 00000000..00b98cce --- /dev/null +++ b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs @@ -0,0 +1,214 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace BLL +{ + /// + /// 领导带班检查 + /// + public static class Check_ProjectLeaderCheckService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取领导带班检查 + /// + /// + /// + public static Model.Check_ProjectLeaderCheck GetProjectLeaderCheckById(string ProjectLeaderCheckId) + { + return Funs.DB.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheckId); + } + + #region 公司两级领导带班检查列表 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in db.Check_ProjectLeaderCheck + select x; + + /// + /// 数据列表 + /// + /// + /// + /// + public static IEnumerable getListData(string projectId, string startTime, string endTime, Grid Grid1) + { + IQueryable getDataList = getDataLists; + if (!string.IsNullOrEmpty(projectId)) + { + getDataList = getDataList.Where(x => x.ProjectId == projectId); + } + if (!string.IsNullOrEmpty(startTime)) + { + DateTime? startTimeD = Funs.GetNewDateTime(startTime); + if (startTimeD.HasValue) + { + getDataList = getDataList.Where(x => x.CheckDate >= startTimeD); + } + } + if (!string.IsNullOrEmpty(endTime)) + { + DateTime? endTimeD = Funs.GetNewDateTime(endTime); + if (endTimeD.HasValue) + { + getDataList = getDataList.Where(x => x.CheckDate <= endTimeD); + } + } + count = getDataList.Count(); + if (count == 0) + { + return null; + } + getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getDataList + join y in db.Base_Project on x.ProjectId equals y.ProjectId + into ps + from y in ps.DefaultIfEmpty() + select new + { + x.ProjectLeaderCheckId, + x.ProjectId, + db.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName, + x.CheckCode, + x.UnitIds, + x.LeaderIds, + x.LeaderNames, + x.QuestionDef, + x.CheckDate, + x.IsHoldMeet, + IsHoldMeetName = x.IsHoldMeet == true ? "是" : "否", + x.Requirement, + }; + } + #endregion + + /// + /// 根据日期获取领导带班检查集合 + /// + /// 开始时间 + /// 结束时间 + /// 项目号 + /// 领导带班检查集合 + public static List GetProjectLeaderCheckListsByDate(DateTime startTime, DateTime endTime, string projectId) + { + return (from x in Funs.DB.Check_ProjectLeaderCheck where x.CheckDate >= startTime && x.CheckDate <= endTime && x.ProjectId == projectId orderby x.CheckDate select x).ToList(); + } + + /// + /// 根据时间段获取HSE领导带班检查集合 + /// + /// 开始时间 + /// 结束时间 + /// 项目Id + /// 时间段内的HSE领导带班检查集合 + public static int GetCountByDate(DateTime startTime, DateTime endTime, string projectId) + { + return (from x in Funs.DB.Check_ProjectLeaderCheck where x.CheckDate >= startTime && x.CheckDate <= endTime && x.ProjectId == projectId select x).Count(); + } + + /// + /// 添加领导带班检查 + /// + /// + public static void AddProjectLeaderCheck(Model.Check_ProjectLeaderCheck ProjectLeaderCheck) + { + Model.SGGLDB db = Funs.DB; + Model.Check_ProjectLeaderCheck newProjectLeaderCheck = new Model.Check_ProjectLeaderCheck + { + ProjectLeaderCheckId = ProjectLeaderCheck.ProjectLeaderCheckId, + ProjectId = ProjectLeaderCheck.ProjectId, + UnitIds = ProjectLeaderCheck.UnitIds, + CheckCode = ProjectLeaderCheck.CheckCode, + LeaderIds = ProjectLeaderCheck.LeaderIds, + CheckDate = ProjectLeaderCheck.CheckDate, + QuestionDef = ProjectLeaderCheck.QuestionDef, + IsHoldMeet = ProjectLeaderCheck.IsHoldMeet, + Requirement = ProjectLeaderCheck.Requirement, + LeaderNames = ProjectLeaderCheck.LeaderNames, + CompileMan = ProjectLeaderCheck.CompileMan, + CompileDate = ProjectLeaderCheck.CompileDate, + }; + db.Check_ProjectLeaderCheck.InsertOnSubmit(newProjectLeaderCheck); + db.SubmitChanges(); + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectLeaderCheckMenuId, ProjectLeaderCheck.ProjectId, null, ProjectLeaderCheck.ProjectLeaderCheckId, ProjectLeaderCheck.CheckDate); + } + + /// + /// 修改领导带班检查 + /// + /// + public static void UpdateProjectLeaderCheck(Model.Check_ProjectLeaderCheck ProjectLeaderCheck) + { + Model.SGGLDB db = Funs.DB; + Model.Check_ProjectLeaderCheck newProjectLeaderCheck = db.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheck.ProjectLeaderCheckId); + if (newProjectLeaderCheck != null) + { + newProjectLeaderCheck.UnitIds = ProjectLeaderCheck.UnitIds; + newProjectLeaderCheck.CheckCode = ProjectLeaderCheck.CheckCode; + newProjectLeaderCheck.LeaderIds = ProjectLeaderCheck.LeaderIds; + newProjectLeaderCheck.CheckDate = ProjectLeaderCheck.CheckDate; + newProjectLeaderCheck.QuestionDef = ProjectLeaderCheck.QuestionDef; + newProjectLeaderCheck.IsHoldMeet = ProjectLeaderCheck.IsHoldMeet; + newProjectLeaderCheck.Requirement = ProjectLeaderCheck.Requirement; + newProjectLeaderCheck.LeaderNames = ProjectLeaderCheck.LeaderNames; + newProjectLeaderCheck.CompileMan = ProjectLeaderCheck.CompileMan; + newProjectLeaderCheck.CompileDate = ProjectLeaderCheck.CompileDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除领导带班检查 + /// + /// + public static void DeleteProjectLeaderCheckById(string ProjectLeaderCheckId) + { + Model.SGGLDB db = Funs.DB; + Model.Check_ProjectLeaderCheck ProjectLeaderCheck = db.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheckId); + if (ProjectLeaderCheck != null) + { + CodeRecordsService.DeleteCodeRecordsByDataId(ProjectLeaderCheckId); + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(ProjectLeaderCheckId); + db.Check_ProjectLeaderCheck.DeleteOnSubmit(ProjectLeaderCheck); + db.SubmitChanges(); + } + } + + public static string getLeaderName(object ProjectLeaderCheckId) + { + string name = string.Empty; + if (ProjectLeaderCheckId != null) + { + var getData = Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(ProjectLeaderCheckId.ToString()); + if (getData != null) + { + if (!string.IsNullOrEmpty(getData.LeaderIds)) + { + name = Person_PersonsService.getPersonsNamesPersonIds(getData.LeaderIds); + } + if (!string.IsNullOrEmpty(getData.LeaderNames)) + { + name += "," + getData.LeaderNames; + } + } + } + return name; + } + } +} diff --git a/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs new file mode 100644 index 00000000..3f6e11c7 --- /dev/null +++ b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 安全领导小组会议 + /// + public static class SafetyLeaderGroupMeetingService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取安全领导小组会议 + /// + /// + /// + public static Model.Meeting_SafetyLeaderGroupMeeting GetSafetyLeaderGroupMeetingById(string SafetyLeaderGroupMeetingId) + { + return Funs.DB.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeetingId); + } + + /// + /// 根据时间段获取安全领导小组会议集合 + /// + /// + /// + /// + /// + public static int GetCountByTime(DateTime startTime, DateTime endTime, string projectId) + { + return (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x).Count(); + } + + /// + /// 根据时间段获取安全领导小组会议参会人数 + /// + /// + /// + /// + /// + public static int? GetSumAttentPersonNumByMeetingDate(DateTime startTime, DateTime endTime, string projectId) + { + int? sumAttentPersonNum = (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x.AttentPersonNum).Sum(); + if (sumAttentPersonNum == null) + { + return 0; + } + return sumAttentPersonNum; + } + + /// + /// 根据日期和类型获取会议记录集合 + /// + /// 开始时间 + /// 结束时间 + /// 项目号 + /// 会议记录集合 + public static List GetMeetingListsByDate(DateTime startTime, DateTime endTime, string projectId) + { + return (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate <= endTime && x.ProjectId == projectId orderby x.SafetyLeaderGroupMeetingDate select x).ToList(); + } + + /// + /// 添加安全领导小组会议 + /// + /// + public static void AddSafetyLeaderGroupMeeting(Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_SafetyLeaderGroupMeeting newSafetyLeaderGroupMeeting = new Model.Meeting_SafetyLeaderGroupMeeting + { + SafetyLeaderGroupMeetingId = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId, + ProjectId = SafetyLeaderGroupMeeting.ProjectId, + UnitId = SafetyLeaderGroupMeeting.UnitId, + SafetyLeaderGroupMeetingCode = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode, + SafetyLeaderGroupMeetingName = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName, + SafetyLeaderGroupMeetingDate = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate, + CompileMan = SafetyLeaderGroupMeeting.CompileMan, + SafetyLeaderGroupMeetingContents = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents, + CompileDate = SafetyLeaderGroupMeeting.CompileDate, + States = SafetyLeaderGroupMeeting.States, + AttentPersonNum = SafetyLeaderGroupMeeting.AttentPersonNum, + MeetingHours = SafetyLeaderGroupMeeting.MeetingHours, + MeetingHostMan = SafetyLeaderGroupMeeting.MeetingHostMan, + AttentPerson = SafetyLeaderGroupMeeting.AttentPerson, + MeetingPlace = SafetyLeaderGroupMeeting.MeetingPlace, + MeetingHostManId = SafetyLeaderGroupMeeting.MeetingHostManId, + AttentPersonIds = SafetyLeaderGroupMeeting.AttentPersonIds, + MeetingHostManOther = SafetyLeaderGroupMeeting.MeetingHostManOther + }; + db.Meeting_SafetyLeaderGroupMeeting.InsertOnSubmit(newSafetyLeaderGroupMeeting); + db.SubmitChanges(); + ////增加一条编码记录 + BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId, SafetyLeaderGroupMeeting.ProjectId, null, SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId, SafetyLeaderGroupMeeting.CompileDate); + } + + /// + /// 修改安全领导小组会议 + /// + /// + public static void UpdateSafetyLeaderGroupMeeting(Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_SafetyLeaderGroupMeeting newSafetyLeaderGroupMeeting = db.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId); + if (newSafetyLeaderGroupMeeting != null) + { + //newSafetyLeaderGroupMeeting.ProjectId = SafetyLeaderGroupMeeting.ProjectId; + newSafetyLeaderGroupMeeting.UnitId = SafetyLeaderGroupMeeting.UnitId; + newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode; + newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName; + newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate; + newSafetyLeaderGroupMeeting.CompileMan = SafetyLeaderGroupMeeting.CompileMan; + newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents; + newSafetyLeaderGroupMeeting.CompileDate = SafetyLeaderGroupMeeting.CompileDate; + newSafetyLeaderGroupMeeting.States = SafetyLeaderGroupMeeting.States; + newSafetyLeaderGroupMeeting.AttentPersonNum = SafetyLeaderGroupMeeting.AttentPersonNum; + newSafetyLeaderGroupMeeting.MeetingHours = SafetyLeaderGroupMeeting.MeetingHours; + newSafetyLeaderGroupMeeting.MeetingHostMan = SafetyLeaderGroupMeeting.MeetingHostMan; + newSafetyLeaderGroupMeeting.AttentPerson = SafetyLeaderGroupMeeting.AttentPerson; + newSafetyLeaderGroupMeeting.MeetingPlace = SafetyLeaderGroupMeeting.MeetingPlace; + newSafetyLeaderGroupMeeting.MeetingHostManId = SafetyLeaderGroupMeeting.MeetingHostManId; + newSafetyLeaderGroupMeeting.AttentPersonIds = SafetyLeaderGroupMeeting.AttentPersonIds; + newSafetyLeaderGroupMeeting.MeetingHostManOther = SafetyLeaderGroupMeeting.MeetingHostManOther; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除安全领导小组会议 + /// + /// + public static void DeleteSafetyLeaderGroupMeetingById(string SafetyLeaderGroupMeetingId) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting = db.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeetingId); + if (SafetyLeaderGroupMeeting != null) + { + ///删除编码表记录 + BLL.CodeRecordsService.DeleteCodeRecordsByDataId(SafetyLeaderGroupMeetingId); + BLL.CommonService.DeleteAttachFileById(SafetyLeaderGroupMeetingId); + ////删除流程表 + BLL.CommonService.DeleteFlowOperateByID(SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId); + db.Meeting_SafetyLeaderGroupMeeting.DeleteOnSubmit(SafetyLeaderGroupMeeting); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index 620aae67..356dfb93 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -45,7 +45,7 @@ namespace BLL /// public static IEnumerable getListData(string projetcId, string unitId, string workPostId, string name, string idCard, string states, string personType, Grid Grid1) { - IQueryable getDataList = getDataLists.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId); + IQueryable getDataList = getDataLists; if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null) { getDataList = getDataList.Where(e => e.ProjectId == projetcId); @@ -79,7 +79,7 @@ namespace BLL { return null; } - getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + getDataList = SortConditionHelper.SortingAndPaging(getDataList.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId), Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); return from x in getDataList select new { @@ -698,6 +698,7 @@ namespace BLL InTime = person.InTime.HasValue ? person.InTime : DateTime.Now, Isprint = "0", States = person.States, + IsSafetyMonitoring=person.IsSafetyMonitoring, }; ////现场人员项目出入场记录 @@ -767,6 +768,7 @@ namespace BLL newPerson.States = person.States; setPersonItemInOut = true; } + newPerson.IsSafetyMonitoring = person.IsSafetyMonitoring; db.SubmitChanges(); if (!setPersonItemInOut) diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index 7b437e32..81ff991c 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -639,10 +639,16 @@ namespace BLL using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { List list = new List(); - list = (from x in db.Person_Persons - where x.UnitId == unitId && x.DepartId == DepartId - orderby x.PersonName - select x).ToList(); + var getPersons = from x in db.Person_Persons select x; + if (!string.IsNullOrEmpty(unitId)) + { + getPersons = getPersons.Where(x => x.UnitId == unitId); + } + if (!string.IsNullOrEmpty(DepartId)) + { + getPersons = getPersons.Where(x => x.DepartId == DepartId); + } + list = getPersons.OrderBy(x=>x.UnitId).OrderBy(x=>x.PersonName).ToList(); return list; } } diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index 15d73e67..b5cfae88 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -289,24 +289,37 @@ namespace BLL using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { List unitList = new List(); - if (unitType != Const.ProjectUnitType_2) + if (!string.IsNullOrEmpty(unitType)) { - unitList = (from x in db.Base_Unit - join y in db.Project_ProjectUnit - on x.UnitId equals y.UnitId - where y.ProjectId == projectId && y.UnitType == unitType - orderby x.UnitCode - select x).ToList(); + if (unitType != Const.ProjectUnitType_2) + { + unitList = (from x in db.Base_Unit + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + where y.ProjectId == projectId && y.UnitType == unitType + orderby x.UnitCode + select x).ToList(); + } + else + { + unitList = (from x in db.Base_Unit + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + where y.ProjectId == projectId && (y.UnitType == BLL.Const.ProjectUnitType_2 || y.UnitType == BLL.Const.ProjectUnitType_6) + orderby x.UnitCode + select x).ToList(); + } } else { unitList = (from x in db.Base_Unit join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId - where y.ProjectId == projectId && (y.UnitType == BLL.Const.ProjectUnitType_2 || y.UnitType == BLL.Const.ProjectUnitType_6) + where y.ProjectId == projectId orderby x.UnitCode select x).ToList(); } + return unitList; } } diff --git a/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs b/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs new file mode 100644 index 00000000..47545cb0 --- /dev/null +++ b/SGGL/BLL/ZHGL/Emergency/UnitDrillRecordListService.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 应急演练 + /// + public static class UnitDrillRecordListService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取应急演练 + /// + /// + /// + public static Model.Emergency_DrillRecordList_Unit GetDrillRecordListById(string DrillRecordListId) + { + return Funs.DB.Emergency_DrillRecordList_Unit.FirstOrDefault(e => e.DrillRecordListId == DrillRecordListId); + } + + /// + /// 根据时间获取应急演练信息 + /// + /// 开始时间 + /// 结束时间 + /// 应急演练信息 + public static List GetDrillRecordListsByDrillRecordDate(DateTime startTime, DateTime endTime, string projectId) + { + return (from x in Funs.DB.Emergency_DrillRecordList_Unit where x.DrillRecordDate >= startTime && x.DrillRecordDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x).ToList(); + } + + /// + /// 根据时间段获取HSE应急演练 + /// + /// 开始时间 + /// 结束时间 + /// 项目Id + /// 时间段内的HSE应急演练数量 + public static int GetCountByDate(DateTime startTime, DateTime endTime, string projectId) + { + return (from x in Funs.DB.Emergency_DrillRecordList_Unit where x.DrillRecordDate >= startTime && x.DrillRecordDate <= endTime && x.ProjectId == projectId select x).Count(); + } + + /// + /// 根据时间段获取HSE应急演练 + /// + /// 开始时间 + /// 结束时间 + /// 项目Id + /// 时间段内的HSE应急演练数量 + public static int GetCountByDate2(DateTime startTime, DateTime endTime, string projectId) + { + return (from x in Funs.DB.Emergency_DrillRecordList_Unit where x.DrillRecordDate >= startTime && x.DrillRecordDate < endTime && x.ProjectId == projectId select x).Count(); + } + + /// + /// 获取HSE应急演练 + /// + /// 开始时间 + /// 结束时间 + /// 项目Id + /// 时间段内的HSE应急演练数量 + public static int GetCount(string projectId) + { + return (from x in Funs.DB.Emergency_DrillRecordList_Unit where x.ProjectId == projectId select x).Count(); + } + + /// + /// 添加应急演练 + /// + /// + public static void AddDrillRecordList(Model.Emergency_DrillRecordList_Unit DrillRecordList) + { + Model.SGGLDB db = Funs.DB; + Model.Emergency_DrillRecordList_Unit newDrillRecordList = new Model.Emergency_DrillRecordList_Unit + { + DrillRecordListId = DrillRecordList.DrillRecordListId, + ProjectId = DrillRecordList.ProjectId, + DrillRecordCode = DrillRecordList.DrillRecordCode, + DrillRecordName = DrillRecordList.DrillRecordName, + UnitIds = DrillRecordList.UnitIds, + UnitNames = DrillRecordList.UnitNames, + UserIds = DrillRecordList.UserIds, + UserNames = DrillRecordList.UserNames, + DrillRecordDate = DrillRecordList.DrillRecordDate, + DrillRecordContents = DrillRecordList.DrillRecordContents, + CompileMan = DrillRecordList.CompileMan, + CompileDate = System.DateTime.Now, + States = DrillRecordList.States, + AttachUrl = DrillRecordList.AttachUrl, + DrillRecordType = DrillRecordList.DrillRecordType, + JointPersonNum = DrillRecordList.JointPersonNum, + DrillCost = DrillRecordList.DrillCost + }; + db.Emergency_DrillRecordList_Unit.InsertOnSubmit(newDrillRecordList); + db.SubmitChanges(); + ////增加一条编码记录 + BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectDrillRecordListMenuId, DrillRecordList.ProjectId, null, DrillRecordList.DrillRecordListId, DrillRecordList.DrillRecordDate); + } + + /// + /// 修改应急演练 + /// + /// + public static void UpdateDrillRecordList(Model.Emergency_DrillRecordList_Unit DrillRecordList) + { + Model.SGGLDB db = Funs.DB; + Model.Emergency_DrillRecordList_Unit newDrillRecordList = db.Emergency_DrillRecordList_Unit.FirstOrDefault(e => e.DrillRecordListId == DrillRecordList.DrillRecordListId); + if (newDrillRecordList != null) + { + newDrillRecordList.DrillRecordCode = DrillRecordList.DrillRecordCode; + newDrillRecordList.DrillRecordName = DrillRecordList.DrillRecordName; + newDrillRecordList.UnitIds = DrillRecordList.UnitIds; + newDrillRecordList.UnitNames = DrillRecordList.UnitNames; + newDrillRecordList.UserIds = DrillRecordList.UserIds; + newDrillRecordList.UserNames = DrillRecordList.UserNames; + newDrillRecordList.DrillRecordDate = DrillRecordList.DrillRecordDate; + newDrillRecordList.DrillRecordContents = DrillRecordList.DrillRecordContents; + newDrillRecordList.CompileMan = DrillRecordList.CompileMan; + //newDrillRecordList.CompileDate = DrillRecordList.CompileDate; + newDrillRecordList.States = DrillRecordList.States; + newDrillRecordList.AttachUrl = DrillRecordList.AttachUrl; + newDrillRecordList.DrillRecordType = DrillRecordList.DrillRecordType; + newDrillRecordList.JointPersonNum = DrillRecordList.JointPersonNum; + newDrillRecordList.DrillCost = DrillRecordList.DrillCost; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除应急演练 + /// + /// + public static void DeleteDrillRecordListById(string DrillRecordListId) + { + Model.SGGLDB db = Funs.DB; + Model.Emergency_DrillRecordList_Unit DrillRecordList = db.Emergency_DrillRecordList_Unit.FirstOrDefault(e => e.DrillRecordListId == DrillRecordListId); + if (DrillRecordList != null) + { + ///删除编码表记录 + BLL.CodeRecordsService.DeleteCodeRecordsByDataId(DrillRecordList.DrillRecordListId); + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(DrillRecordList.DrillRecordListId); + ////删除流程表 + BLL.CommonService.DeleteFlowOperateByID(DrillRecordList.DrillRecordListId); + db.Emergency_DrillRecordList_Unit.DeleteOnSubmit(DrillRecordList); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs b/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs new file mode 100644 index 00000000..955669a7 --- /dev/null +++ b/SGGL/BLL/ZHGL/Emergency/UnitEmergencyListService.cs @@ -0,0 +1,150 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 应急预案管理 + /// + public static class UnitEmergencyListService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取应急预案管理 + /// + /// + /// + public static Model.Emergency_EmergencyList_Unit GetEmergencyListById(string EmergencyListId) + { + return Funs.DB.Emergency_EmergencyList_Unit.FirstOrDefault(e => e.EmergencyListId == EmergencyListId); + } + + /// + /// 获取时间段文件、方案修编情况说明 + /// + /// + /// + /// + /// + public static List GetEmergencyListByDate(string projectId, DateTime startTime, DateTime endTime) + { + return (from x in Funs.DB.Emergency_EmergencyList_Unit where x.ProjectId == projectId && x.CompileDate >= startTime && x.CompileDate <= endTime select x).ToList(); + } + + /// + /// 根据应急预案类型获取应急预案信息集合 + /// + /// 应急预案类型 + /// 项目号 + /// 应急预案实体集合 + public static List GetEmergencyListsByEmergencyType(string emergencyType, string projectId, DateTime startTime, DateTime endTime) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + return (from x in db.Emergency_EmergencyList_Unit + join y in db.Base_EmergencyType + on x.EmergencyTypeId equals y.EmergencyTypeId + where y.EmergencyTypeName.Contains(emergencyType) && x.ProjectId == projectId && x.CompileDate >= startTime && x.CompileDate < endTime + select x).ToList(); + } + } + + /// + /// 根据应急预案类型获取其他应急预案信息集合 + /// + /// 应急预案类型 + /// 项目号 + /// 其他应急预案实体集合 + public static List GetOtherEmergencyListsByEmergencyType(string emergencyType, string projectId, DateTime startTime, DateTime endTime) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + return (from x in db.Emergency_EmergencyList_Unit + join y in db.Base_EmergencyType + on x.EmergencyTypeId equals y.EmergencyTypeId + where !y.EmergencyTypeName.Contains(emergencyType) && x.ProjectId == projectId && x.CompileDate >= startTime && x.CompileDate < endTime + select x).ToList(); + } + } + + /// + /// 添加应急预案管理 + /// + /// + public static void AddEmergencyList(Model.Emergency_EmergencyList_Unit EmergencyList) + { + Model.SGGLDB db = Funs.DB; + Model.Emergency_EmergencyList_Unit newEmergencyList = new Model.Emergency_EmergencyList_Unit + { + EmergencyListId = EmergencyList.EmergencyListId, + ProjectId = EmergencyList.ProjectId, + EmergencyCode = EmergencyList.EmergencyCode, + EmergencyName = EmergencyList.EmergencyName, + UnitId = EmergencyList.UnitId, + EmergencyTypeId = EmergencyList.EmergencyTypeId, + VersionCode = EmergencyList.VersionCode, + EmergencyContents = EmergencyList.EmergencyContents, + CompileMan = EmergencyList.CompileMan, + CompileDate = EmergencyList.CompileDate, + States = EmergencyList.States, + AttachUrl = EmergencyList.AttachUrl, + AuditMan = EmergencyList.AuditMan, + ApproveMan = EmergencyList.ApproveMan + }; + db.Emergency_EmergencyList_Unit.InsertOnSubmit(newEmergencyList); + db.SubmitChanges(); + ////增加一条编码记录 + BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectEmergencyListMenuId, EmergencyList.ProjectId, null, EmergencyList.EmergencyListId, EmergencyList.CompileDate); + } + + /// + /// 修改应急预案管理 + /// + /// + public static void UpdateEmergencyList(Model.Emergency_EmergencyList_Unit EmergencyList) + { + Model.SGGLDB db = Funs.DB; + Model.Emergency_EmergencyList_Unit newEmergencyList = db.Emergency_EmergencyList_Unit.FirstOrDefault(e => e.EmergencyListId == EmergencyList.EmergencyListId); + if (newEmergencyList != null) + { + newEmergencyList.EmergencyCode = EmergencyList.EmergencyCode; + newEmergencyList.EmergencyName = EmergencyList.EmergencyName; + newEmergencyList.UnitId = EmergencyList.UnitId; + newEmergencyList.EmergencyTypeId = EmergencyList.EmergencyTypeId; + newEmergencyList.VersionCode = EmergencyList.VersionCode; + newEmergencyList.EmergencyContents = EmergencyList.EmergencyContents; + newEmergencyList.CompileMan = EmergencyList.CompileMan; + newEmergencyList.CompileDate = EmergencyList.CompileDate; + newEmergencyList.States = EmergencyList.States; + newEmergencyList.AttachUrl = EmergencyList.AttachUrl; + newEmergencyList.AuditMan = EmergencyList.AuditMan; + newEmergencyList.ApproveMan = EmergencyList.ApproveMan; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除应急预案管理 + /// + /// + public static void DeleteEmergencyListById(string EmergencyListId) + { + Model.SGGLDB db = Funs.DB; + Model.Emergency_EmergencyList_Unit EmergencyList = db.Emergency_EmergencyList_Unit.FirstOrDefault(e => e.EmergencyListId == EmergencyListId); + if (EmergencyList != null) + { + ///删除编码表记录 + BLL.CodeRecordsService.DeleteCodeRecordsByDataId(EmergencyList.EmergencyListId); + ////删除附件表 + BLL.CommonService.DeleteAttachFileById(EmergencyList.EmergencyListId); + ////删除流程表 + BLL.CommonService.DeleteFlowOperateByID(EmergencyList.EmergencyListId); + db.Emergency_EmergencyList_Unit.DeleteOnSubmit(EmergencyList); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs b/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs new file mode 100644 index 00000000..002877c0 --- /dev/null +++ b/SGGL/BLL/ZHGL/Meeting/CompanySafetyMeetingService.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 企业安委会 + /// + public static class CompanySafetyMeetingService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取企业安委会 + /// + /// + /// + public static Model.Meeting_CompanySafetyMeeting GetCompanySafetyMeetingById(string CompanySafetyMeetingId) + { + return Funs.DB.Meeting_CompanySafetyMeeting.FirstOrDefault(e => e.CompanySafetyMeetingId == CompanySafetyMeetingId); + } + + /// + /// 根据时间段获取月例会集合 + /// + /// + /// + /// + /// + public static int GetCountByTime(DateTime startTime, DateTime endTime) + { + return (from x in Funs.DB.Meeting_CompanySafetyMeeting where x.CompanySafetyMeetingDate >= startTime && x.CompanySafetyMeetingDate < endTime select x).Count(); + } + + /// + /// 根据时间段获取月例会参会人数 + /// + /// + /// + /// + /// + public static int? GetSumAttentPersonNumByMeetingDate(DateTime startTime, DateTime endTime) + { + int? sumAttentPersonNum = (from x in Funs.DB.Meeting_CompanySafetyMeeting where x.CompanySafetyMeetingDate >= startTime && x.CompanySafetyMeetingDate < endTime select x.AttentPersonNum).Sum(); + if (sumAttentPersonNum == null) + { + return 0; + } + return sumAttentPersonNum; + } + + /// + /// 根据日期和类型获取会议记录集合 + /// + /// 开始时间 + /// 结束时间 + /// 项目号 + /// 会议记录集合 + public static List GetMeetingListsByDate(DateTime startTime, DateTime endTime) + { + return (from x in Funs.DB.Meeting_CompanySafetyMeeting where x.CompanySafetyMeetingDate >= startTime && x.CompanySafetyMeetingDate <= endTime orderby x.CompanySafetyMeetingDate select x).ToList(); + } + + /// + /// 添加企业安委会 + /// + /// + public static void AddCompanySafetyMeeting(Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_CompanySafetyMeeting newCompanySafetyMeeting = new Model.Meeting_CompanySafetyMeeting + { + CompanySafetyMeetingId = CompanySafetyMeeting.CompanySafetyMeetingId, + CompanySafetyMeetingCode = CompanySafetyMeeting.CompanySafetyMeetingCode, + CompanySafetyMeetingName = CompanySafetyMeeting.CompanySafetyMeetingName, + CompanySafetyMeetingDate = CompanySafetyMeeting.CompanySafetyMeetingDate, + CompileMan = CompanySafetyMeeting.CompileMan, + CompanySafetyMeetingContents = CompanySafetyMeeting.CompanySafetyMeetingContents, + CompileDate = CompanySafetyMeeting.CompileDate, + AttentPersonNum = CompanySafetyMeeting.AttentPersonNum, + MeetingHours = CompanySafetyMeeting.MeetingHours, + MeetingHostMan = CompanySafetyMeeting.MeetingHostMan, + AttentPerson = CompanySafetyMeeting.AttentPerson, + MeetingPlace = CompanySafetyMeeting.MeetingPlace, + MeetingHostManId = CompanySafetyMeeting.MeetingHostManId, + AttentPersonIds = CompanySafetyMeeting.AttentPersonIds, + MeetingHostManOther = CompanySafetyMeeting.MeetingHostManOther + }; + db.Meeting_CompanySafetyMeeting.InsertOnSubmit(newCompanySafetyMeeting); + db.SubmitChanges(); + ////增加一条编码记录 + BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.CompanySafetyMeetingMenuId, null, null, CompanySafetyMeeting.CompanySafetyMeetingId, CompanySafetyMeeting.CompileDate); + } + + /// + /// 修改企业安委会 + /// + /// + public static void UpdateCompanySafetyMeeting(Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_CompanySafetyMeeting newCompanySafetyMeeting = db.Meeting_CompanySafetyMeeting.FirstOrDefault(e => e.CompanySafetyMeetingId == CompanySafetyMeeting.CompanySafetyMeetingId); + if (newCompanySafetyMeeting != null) + { + newCompanySafetyMeeting.CompanySafetyMeetingCode = CompanySafetyMeeting.CompanySafetyMeetingCode; + newCompanySafetyMeeting.CompanySafetyMeetingName = CompanySafetyMeeting.CompanySafetyMeetingName; + newCompanySafetyMeeting.CompanySafetyMeetingDate = CompanySafetyMeeting.CompanySafetyMeetingDate; + newCompanySafetyMeeting.CompileMan = CompanySafetyMeeting.CompileMan; + newCompanySafetyMeeting.CompanySafetyMeetingContents = CompanySafetyMeeting.CompanySafetyMeetingContents; + newCompanySafetyMeeting.CompileDate = CompanySafetyMeeting.CompileDate; + newCompanySafetyMeeting.AttentPersonNum = CompanySafetyMeeting.AttentPersonNum; + newCompanySafetyMeeting.MeetingHours = CompanySafetyMeeting.MeetingHours; + newCompanySafetyMeeting.MeetingHostMan = CompanySafetyMeeting.MeetingHostMan; + newCompanySafetyMeeting.AttentPerson = CompanySafetyMeeting.AttentPerson; + newCompanySafetyMeeting.MeetingPlace = CompanySafetyMeeting.MeetingPlace; + newCompanySafetyMeeting.MeetingHostManId = CompanySafetyMeeting.MeetingHostManId; + newCompanySafetyMeeting.AttentPersonIds = CompanySafetyMeeting.AttentPersonIds; + newCompanySafetyMeeting.MeetingHostManOther = CompanySafetyMeeting.MeetingHostManOther; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除企业安委会 + /// + /// + public static void DeleteCompanySafetyMeetingById(string CompanySafetyMeetingId) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting = db.Meeting_CompanySafetyMeeting.FirstOrDefault(e => e.CompanySafetyMeetingId == CompanySafetyMeetingId); + if (CompanySafetyMeeting != null) + { + ///删除编码表记录 + BLL.CodeRecordsService.DeleteCodeRecordsByDataId(CompanySafetyMeetingId); + BLL.CommonService.DeleteAttachFileById(CompanySafetyMeetingId); + db.Meeting_CompanySafetyMeeting.DeleteOnSubmit(CompanySafetyMeeting); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs b/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs new file mode 100644 index 00000000..1e8886ee --- /dev/null +++ b/SGGL/BLL/ZHGL/Meeting/CompanySpecialMeetingService.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 企业专题会 + /// + public static class CompanySpecialMeetingService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取企业专题会 + /// + /// + /// + public static Model.Meeting_CompanySpecialMeeting GetCompanySpecialMeetingById(string CompanySpecialMeetingId) + { + return Funs.DB.Meeting_CompanySpecialMeeting.FirstOrDefault(e => e.CompanySpecialMeetingId == CompanySpecialMeetingId); + } + + /// + /// 根据时间段获取月例会集合 + /// + /// + /// + /// + /// + public static int GetCountByTime(DateTime startTime, DateTime endTime) + { + return (from x in Funs.DB.Meeting_CompanySpecialMeeting where x.CompanySpecialMeetingDate >= startTime && x.CompanySpecialMeetingDate < endTime select x).Count(); + } + + /// + /// 根据时间段获取月例会参会人数 + /// + /// + /// + /// + /// + public static int? GetSumAttentPersonNumByMeetingDate(DateTime startTime, DateTime endTime) + { + int? sumAttentPersonNum = (from x in Funs.DB.Meeting_CompanySpecialMeeting where x.CompanySpecialMeetingDate >= startTime && x.CompanySpecialMeetingDate < endTime select x.AttentPersonNum).Sum(); + if (sumAttentPersonNum == null) + { + return 0; + } + return sumAttentPersonNum; + } + + /// + /// 根据日期和类型获取会议记录集合 + /// + /// 开始时间 + /// 结束时间 + /// 项目号 + /// 会议记录集合 + public static List GetMeetingListsByDate(DateTime startTime, DateTime endTime) + { + return (from x in Funs.DB.Meeting_CompanySpecialMeeting where x.CompanySpecialMeetingDate >= startTime && x.CompanySpecialMeetingDate <= endTime orderby x.CompanySpecialMeetingDate select x).ToList(); + } + + /// + /// 添加企业专题会 + /// + /// + public static void AddCompanySpecialMeeting(Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_CompanySpecialMeeting newCompanySpecialMeeting = new Model.Meeting_CompanySpecialMeeting + { + CompanySpecialMeetingId = CompanySpecialMeeting.CompanySpecialMeetingId, + CompanySpecialMeetingCode = CompanySpecialMeeting.CompanySpecialMeetingCode, + CompanySpecialMeetingName = CompanySpecialMeeting.CompanySpecialMeetingName, + CompanySpecialMeetingDate = CompanySpecialMeeting.CompanySpecialMeetingDate, + CompileMan = CompanySpecialMeeting.CompileMan, + CompanySpecialMeetingContents = CompanySpecialMeeting.CompanySpecialMeetingContents, + CompileDate = CompanySpecialMeeting.CompileDate, + AttentPersonNum = CompanySpecialMeeting.AttentPersonNum, + MeetingHours = CompanySpecialMeeting.MeetingHours, + MeetingHostMan = CompanySpecialMeeting.MeetingHostMan, + AttentPerson = CompanySpecialMeeting.AttentPerson, + MeetingPlace = CompanySpecialMeeting.MeetingPlace, + MeetingHostManId = CompanySpecialMeeting.MeetingHostManId, + AttentPersonIds = CompanySpecialMeeting.AttentPersonIds, + MeetingHostManOther = CompanySpecialMeeting.MeetingHostManOther + }; + db.Meeting_CompanySpecialMeeting.InsertOnSubmit(newCompanySpecialMeeting); + db.SubmitChanges(); + ////增加一条编码记录 + BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.CompanySpecialMeetingMenuId, null, null, CompanySpecialMeeting.CompanySpecialMeetingId, CompanySpecialMeeting.CompileDate); + } + + /// + /// 修改企业专题会 + /// + /// + public static void UpdateCompanySpecialMeeting(Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_CompanySpecialMeeting newCompanySpecialMeeting = db.Meeting_CompanySpecialMeeting.FirstOrDefault(e => e.CompanySpecialMeetingId == CompanySpecialMeeting.CompanySpecialMeetingId); + if (newCompanySpecialMeeting != null) + { + newCompanySpecialMeeting.CompanySpecialMeetingCode = CompanySpecialMeeting.CompanySpecialMeetingCode; + newCompanySpecialMeeting.CompanySpecialMeetingName = CompanySpecialMeeting.CompanySpecialMeetingName; + newCompanySpecialMeeting.CompanySpecialMeetingDate = CompanySpecialMeeting.CompanySpecialMeetingDate; + newCompanySpecialMeeting.CompileMan = CompanySpecialMeeting.CompileMan; + newCompanySpecialMeeting.CompanySpecialMeetingContents = CompanySpecialMeeting.CompanySpecialMeetingContents; + newCompanySpecialMeeting.CompileDate = CompanySpecialMeeting.CompileDate; + newCompanySpecialMeeting.AttentPersonNum = CompanySpecialMeeting.AttentPersonNum; + newCompanySpecialMeeting.MeetingHours = CompanySpecialMeeting.MeetingHours; + newCompanySpecialMeeting.MeetingHostMan = CompanySpecialMeeting.MeetingHostMan; + newCompanySpecialMeeting.AttentPerson = CompanySpecialMeeting.AttentPerson; + newCompanySpecialMeeting.MeetingPlace = CompanySpecialMeeting.MeetingPlace; + newCompanySpecialMeeting.MeetingHostManId = CompanySpecialMeeting.MeetingHostManId; + newCompanySpecialMeeting.AttentPersonIds = CompanySpecialMeeting.AttentPersonIds; + newCompanySpecialMeeting.MeetingHostManOther = CompanySpecialMeeting.MeetingHostManOther; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除企业专题会 + /// + /// + public static void DeleteCompanySpecialMeetingById(string CompanySpecialMeetingId) + { + Model.SGGLDB db = Funs.DB; + Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting = db.Meeting_CompanySpecialMeeting.FirstOrDefault(e => e.CompanySpecialMeetingId == CompanySpecialMeetingId); + if (CompanySpecialMeeting != null) + { + ///删除编码表记录 + BLL.CodeRecordsService.DeleteCodeRecordsByDataId(CompanySpecialMeetingId); + BLL.CommonService.DeleteAttachFileById(CompanySpecialMeetingId); + db.Meeting_CompanySpecialMeeting.DeleteOnSubmit(CompanySpecialMeeting); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs new file mode 100644 index 00000000..11bde67b --- /dev/null +++ b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyItemService.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 监督检查报告明细 + /// + public static class SubUnitCheckRectifyItemService + { + /// + /// 根据评价报告主键获取所有明细信息 + /// + /// + /// + public static List GetSubUnitCheckRectifyItemList(string subUnitCheckRectifyId) + { + return (from x in Funs.DB.Supervise_SubUnitCheckRectifyItem where x.SubUnitCheckRectifyId == subUnitCheckRectifyId orderby x.CheckDate descending select x).ToList(); + } + + /// + /// 添加监督评价报告明细 + /// + /// + public static void AddSubUnitCheckRectifyItem(Model.Supervise_SubUnitCheckRectifyItem item) + { + Model.Supervise_SubUnitCheckRectifyItem newItem = new Model.Supervise_SubUnitCheckRectifyItem + { + SubUnitCheckRectifyItemId = item.SubUnitCheckRectifyItemId, + SubUnitCheckRectifyId = item.SubUnitCheckRectifyId, + Name = item.Name, + Sex = item.Sex, + UnitName = item.UnitName, + PostName = item.PostName, + WorkTitle = item.WorkTitle, + CheckPostName = item.CheckPostName, + CheckDate = item.CheckDate + }; + Funs.DB.Supervise_SubUnitCheckRectifyItem.InsertOnSubmit(newItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 根据评价报告主键删除所有相关明细信息 + /// + /// + public static void DeleteSubUnitCheckRectifyItemsList(string subUnitCheckRectifyId) + { + var q = (from x in Funs.DB.Supervise_SubUnitCheckRectifyItem where x.SubUnitCheckRectifyId == subUnitCheckRectifyId select x).ToList(); + if (q != null) + { + Funs.DB.Supervise_SubUnitCheckRectifyItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + + /// + /// + /// + /// + public static void DeleteSubUnitCheckRectifyBySuperviseCheckReportId(string superviseCheckReportId) + { + var q = (from x in Funs.DB.Supervise_SubUnitCheckRectify where x.SuperviseCheckReportId == superviseCheckReportId select x); + if (q.Count() > 0) + { + foreach (var item in q) + { + var subUnitCheckRectifyItem = from x in Funs.DB.Supervise_SubUnitCheckRectifyItem where x.SubUnitCheckRectifyId == item.SubUnitCheckRectifyId select x; + if (subUnitCheckRectifyItem.Count() > 0) + { + Funs.DB.Supervise_SubUnitCheckRectifyItem.DeleteAllOnSubmit(subUnitCheckRectifyItem); + Funs.DB.SubmitChanges(); + } + Funs.DB.Supervise_SubUnitCheckRectify.DeleteOnSubmit(item); + Funs.DB.SubmitChanges(); + } + + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs new file mode 100644 index 00000000..b0ba9ed7 --- /dev/null +++ b/SGGL/BLL/ZHGL/Supervise/SubUnitCheckRectifyService.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 监督评价报告 + /// + public static class SubUnitCheckRectifyService + { + /// + /// 根据安全监督检查报告id获取监督评价信息 + /// + /// + /// + public static Model.Supervise_SubUnitCheckRectify GetSubUnitCheckRectifyBySuperviseCheckReportId(string superviseCheckReportId) + { + return Funs.DB.Supervise_SubUnitCheckRectify.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReportId); + } + + /// + /// 根据主键获取监督评价信息 + /// + /// + /// + public static Model.Supervise_SubUnitCheckRectify GetSubUnitCheckRectifyById(string subUnitCheckRectifyId) + { + return Funs.DB.Supervise_SubUnitCheckRectify.FirstOrDefault(e => e.SubUnitCheckRectifyId == subUnitCheckRectifyId); + } + + /// + /// 添加监督评价报告 + /// + /// + public static void AddSubUnitCheckRectify(Model.Supervise_SubUnitCheckRectify subUnitCheckRectify) + { + Model.Supervise_SubUnitCheckRectify newSubUnitCheckRectify = new Model.Supervise_SubUnitCheckRectify + { + SubUnitCheckRectifyId = subUnitCheckRectify.SubUnitCheckRectifyId, + SuperviseCheckReportId = subUnitCheckRectify.SuperviseCheckReportId, + UnitId = subUnitCheckRectify.UnitId, + CheckRectType = subUnitCheckRectify.CheckRectType, + Values1 = subUnitCheckRectify.Values1, + Values2 = subUnitCheckRectify.Values2, + Values3 = subUnitCheckRectify.Values3, + Values4 = subUnitCheckRectify.Values4, + Values5 = subUnitCheckRectify.Values5, + Values6 = subUnitCheckRectify.Values6, + Values7 = subUnitCheckRectify.Values7, + Values8 = subUnitCheckRectify.Values8, + AttachUrl = subUnitCheckRectify.AttachUrl, + UpDateTime = subUnitCheckRectify.UpDateTime, + CheckEndDate = subUnitCheckRectify.CheckEndDate, + UpState = subUnitCheckRectify.UpState + }; + Funs.DB.Supervise_SubUnitCheckRectify.InsertOnSubmit(newSubUnitCheckRectify); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改监督评价报告 + /// + /// + public static void UpdateSubUnitCheckRectify(Model.Supervise_SubUnitCheckRectify subUnitCheckRectify) + { + Model.Supervise_SubUnitCheckRectify newSubUnitCheckRectify = Funs.DB.Supervise_SubUnitCheckRectify.FirstOrDefault(e => e.SubUnitCheckRectifyId == subUnitCheckRectify.SubUnitCheckRectifyId); + if (newSubUnitCheckRectify != null) + { + newSubUnitCheckRectify.UnitId = subUnitCheckRectify.UnitId; + newSubUnitCheckRectify.CheckRectType = subUnitCheckRectify.CheckRectType; + newSubUnitCheckRectify.Values1 = subUnitCheckRectify.Values1; + newSubUnitCheckRectify.Values2 = subUnitCheckRectify.Values2; + newSubUnitCheckRectify.Values3 = subUnitCheckRectify.Values3; + newSubUnitCheckRectify.Values4 = subUnitCheckRectify.Values4; + newSubUnitCheckRectify.Values5 = subUnitCheckRectify.Values5; + newSubUnitCheckRectify.Values6 = subUnitCheckRectify.Values6; + newSubUnitCheckRectify.Values7 = subUnitCheckRectify.Values7; + newSubUnitCheckRectify.Values8 = subUnitCheckRectify.Values8; + newSubUnitCheckRectify.AttachUrl = subUnitCheckRectify.AttachUrl; + newSubUnitCheckRectify.UpDateTime = subUnitCheckRectify.UpDateTime; + newSubUnitCheckRectify.UpState = subUnitCheckRectify.UpState; + newSubUnitCheckRectify.CheckEndDate = subUnitCheckRectify.CheckEndDate; + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs new file mode 100644 index 00000000..9b3ba215 --- /dev/null +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 安全监督检查整改明细表 + /// + public static class SuperviseCheckRectifyItemService + { + /// + /// 根据主键获取安全监督检查整改明细信息 + /// + /// + /// + public static Model.Supervise_SuperviseCheckRectifyItem GetSuperviseCheckRectifyItemById(string superviseCheckRectifyItemId) + { + return Funs.DB.Supervise_SuperviseCheckRectifyItem.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == superviseCheckRectifyItemId); + } + + /// + /// 根据安全监督检查整改id获取所有相关明细信息 + /// + /// + /// + public static List GetSuperviseCheckRectifyItemBySuperviseCheckRectifyId(string superviseCheckRectifyId) + { + return (from x in Funs.DB.Supervise_SuperviseCheckRectifyItem where x.SuperviseCheckRectifyId == superviseCheckRectifyId select x).ToList(); + } + + /// + /// 添加安全监督检查整改明细信息 + /// + /// + public static void AddSuperviseCheckRectifyItem(Model.Supervise_SuperviseCheckRectifyItem superviseCheckRectifyItem) + { + Model.Supervise_SuperviseCheckRectifyItem newSuperviseCheckRectifyItem = new Model.Supervise_SuperviseCheckRectifyItem + { + SuperviseCheckRectifyItemId = superviseCheckRectifyItem.SuperviseCheckRectifyItemId, + SuperviseCheckRectifyId = superviseCheckRectifyItem.SuperviseCheckRectifyId, + RectifyItemId = superviseCheckRectifyItem.RectifyItemId, + ConfirmMan = superviseCheckRectifyItem.ConfirmMan, + ConfirmDate = superviseCheckRectifyItem.ConfirmDate, + OrderEndDate = superviseCheckRectifyItem.OrderEndDate, + OrderEndPerson = superviseCheckRectifyItem.OrderEndPerson, + RealEndDate = superviseCheckRectifyItem.RealEndDate, + AttachUrl = superviseCheckRectifyItem.AttachUrl, + VerifierName=superviseCheckRectifyItem.VerifierName, + VerifierDate=superviseCheckRectifyItem.VerifierDate, + }; + Funs.DB.Supervise_SuperviseCheckRectifyItem.InsertOnSubmit(newSuperviseCheckRectifyItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 根据主键删除安全监督检查整改明细信息 + /// + /// + public static void DeleteSuperviseCheckRectifyItem(string superviseCheckRectifyItemId) + { + Model.Supervise_SuperviseCheckRectifyItem superviseCheckRectifyItem = Funs.DB.Supervise_SuperviseCheckRectifyItem.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == superviseCheckRectifyItemId); + if (superviseCheckRectifyItem != null) + { + Funs.DB.Supervise_SuperviseCheckRectifyItem.DeleteOnSubmit(superviseCheckRectifyItem); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据安全监督检查整改ID删除所有相关明细信息 + /// + /// + public static void DeleteSuperviseCheckRectifyItemBySuperviseCheckRectifyId(string superviseCheckRectifyId) + { + var q = (from x in Funs.DB.Supervise_SuperviseCheckRectifyItem where x.SuperviseCheckRectifyId == superviseCheckRectifyId select x).ToList(); + if (q != null) + { + Funs.DB.Supervise_SuperviseCheckRectifyItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyService.cs new file mode 100644 index 00000000..5b62af73 --- /dev/null +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyService.cs @@ -0,0 +1,97 @@ +using System.Linq; + +namespace BLL +{ + /// + /// 安全监督检查整改 + /// + public static class SuperviseCheckRectifyService + { + /// + /// 根据主键获取安全监督检查整改 + /// + /// + /// + public static Model.Supervise_SuperviseCheckRectify GetSuperviseCheckRectifyById(string superviseCheckRectifyId) + { + return Funs.DB.Supervise_SuperviseCheckRectify.FirstOrDefault(e => e.SuperviseCheckRectifyId == superviseCheckRectifyId); + } + + /// + /// 根据检查报告id获取整改 + /// + /// + /// + public static Model.Supervise_SuperviseCheckRectify GetSuperviseCheckRectifyBySuperviseCheckReportId(string superviseCheckReportId) + { + return Funs.DB.Supervise_SuperviseCheckRectify.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReportId); + } + + /// + /// 添加安全监督检查整改 + /// + /// + public static void AddSuperviseCheckRectify(Model.Supervise_SuperviseCheckRectify superviseCheckRectify) + { + Model.Supervise_SuperviseCheckRectify newSuperviseCheckRectify = new Model.Supervise_SuperviseCheckRectify + { + SuperviseCheckRectifyId = superviseCheckRectify.SuperviseCheckRectifyId, + SuperviseCheckRectifyCode = superviseCheckRectify.SuperviseCheckRectifyCode, + ProjectId = superviseCheckRectify.ProjectId, + UnitId = superviseCheckRectify.UnitId, + CheckDate = superviseCheckRectify.CheckDate, + IssueMan = superviseCheckRectify.IssueMan, + IssueDate = superviseCheckRectify.IssueDate, + SuperviseCheckReportId = superviseCheckRectify.SuperviseCheckReportId, + HandleState = superviseCheckRectify.HandleState + }; + Funs.DB.Supervise_SuperviseCheckRectify.InsertOnSubmit(newSuperviseCheckRectify); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改安全监督检查整改 + /// + /// + public static void UpdateSuperviseCheckRectify(Model.Supervise_SuperviseCheckRectify superviseCheckRectify) + { + Model.Supervise_SuperviseCheckRectify newSuperviseCheckRectify = Funs.DB.Supervise_SuperviseCheckRectify.FirstOrDefault(e => e.SuperviseCheckRectifyId == superviseCheckRectify.SuperviseCheckRectifyId); + if (newSuperviseCheckRectify != null) + { + newSuperviseCheckRectify.SuperviseCheckRectifyCode = superviseCheckRectify.SuperviseCheckRectifyCode; + newSuperviseCheckRectify.ProjectId = superviseCheckRectify.ProjectId; + newSuperviseCheckRectify.UnitId = superviseCheckRectify.UnitId; + newSuperviseCheckRectify.CheckDate = superviseCheckRectify.CheckDate; + newSuperviseCheckRectify.IssueMan = superviseCheckRectify.IssueMan; + newSuperviseCheckRectify.IssueDate = superviseCheckRectify.IssueDate; + newSuperviseCheckRectify.SuperviseCheckReportId = superviseCheckRectify.SuperviseCheckReportId; + newSuperviseCheckRectify.HandleState = superviseCheckRectify.HandleState; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除安全监督检查整改 + /// + /// + public static void DeleteSuperviseCheckRectifyById(string superviseCheckRectifyId) + { + Model.Supervise_SuperviseCheckRectify superviseCheckRectify = Funs.DB.Supervise_SuperviseCheckRectify.FirstOrDefault(e => e.SuperviseCheckRectifyId == superviseCheckRectifyId); + if (superviseCheckRectify != null) + { + var superviseCheckRectifys = from x in Funs.DB.Supervise_SuperviseCheckRectify where x.SuperviseCheckReportId == superviseCheckRectify.SuperviseCheckReportId select x; + if (superviseCheckRectifys.Count() == 1) + { + var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(superviseCheckRectify.SuperviseCheckReportId); + if (report != null) + { + report.IsIssued = null; //已下发 + BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(report); + } + } + Funs.DB.Supervise_SuperviseCheckRectify.DeleteOnSubmit(superviseCheckRectify); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs new file mode 100644 index 00000000..75f09e57 --- /dev/null +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportItemService.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 安全监督检查报告明细表 + /// + public static class SuperviseCheckReportItemService + { + /// + /// 根据主键获取安全监督检查报告明细信息 + /// + /// + /// + public static Model.Supervise_SuperviseCheckReportItem GetSuperviseCheckReportItemById(string superviseCheckReportItemId) + { + return Funs.DB.Supervise_SuperviseCheckReportItem.FirstOrDefault(e => e.SuperviseCheckReportItemId == superviseCheckReportItemId); + } + + /// + /// 根据安全监督检查报告id获取所有相关明细信息 + /// + /// + /// + public static List GetSuperviseCheckReportItemBySuperviseCheckReportId(string superviseCheckReportId) + { + return (from x in Funs.DB.Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == superviseCheckReportId select x).ToList(); + } + + /// + /// 根据安全监督检查报告id获取所有选中的相关明细信息 + /// + /// + /// + public static List GetSelectedSuperviseCheckReportItemBySuperviseCheckReportId(string superviseCheckReportId) + { + return (from x in Funs.DB.Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == superviseCheckReportId && x.IsSelected == true select x).ToList(); + } + + /// + /// 添加安全监督检查报告明细信息 + /// + /// + public static void AddSuperviseCheckReportItem(Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem) + { + Model.Supervise_SuperviseCheckReportItem newSuperviseCheckReportItem = new Model.Supervise_SuperviseCheckReportItem + { + SuperviseCheckReportItemId = superviseCheckReportItem.SuperviseCheckReportItemId, + SuperviseCheckReportId = superviseCheckReportItem.SuperviseCheckReportId, + RectifyItemId = superviseCheckReportItem.RectifyItemId, + IsSelected = superviseCheckReportItem.IsSelected, + AttachUrl = superviseCheckReportItem.AttachUrl + }; + Funs.DB.Supervise_SuperviseCheckReportItem.InsertOnSubmit(newSuperviseCheckReportItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 根据主键删除安全监督检查报告明细信息 + /// + /// + public static void DeleteSuperviseCheckReportItem(string superviseCheckReportItemId) + { + Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem = Funs.DB.Supervise_SuperviseCheckReportItem.FirstOrDefault(e => e.SuperviseCheckReportItemId == superviseCheckReportItemId); + if (superviseCheckReportItem != null) + { + Funs.DB.Supervise_SuperviseCheckReportItem.DeleteOnSubmit(superviseCheckReportItem); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据安全监督检查报告ID删除所有相关明细信息 + /// + /// + public static void DeleteSuperviseCheckReportItemBySuperviseCheckReportId(string superviseCheckReportId) + { + var q = (from x in Funs.DB.Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == superviseCheckReportId select x).ToList(); + if (q != null) + { + Funs.DB.Supervise_SuperviseCheckReportItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs new file mode 100644 index 00000000..449b7fa1 --- /dev/null +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 安全监督检查报告表 + /// + public static class SuperviseCheckReportService + { + /// + /// 根据主键获取安全监督检查报告 + /// + /// + /// + public static Model.Supervise_SuperviseCheckReport GetSuperviseCheckReportById(string superviseCheckReportId) + { + return Funs.DB.Supervise_SuperviseCheckReport.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReportId); + } + + /// + /// 添加安全监督检查报告 + /// + /// + public static void AddSuperviseCheckReport(Model.Supervise_SuperviseCheckReport superviseCheckReport) + { + Model.Supervise_SuperviseCheckReport newSuperviseCheckReport = new Model.Supervise_SuperviseCheckReport + { + SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId, + SuperviseCheckReportCode = superviseCheckReport.SuperviseCheckReportCode, + CheckDate = superviseCheckReport.CheckDate, + ProjectId = superviseCheckReport.ProjectId, + UnitId = superviseCheckReport.UnitId, + CheckTeam = superviseCheckReport.CheckTeam, + EvaluationResult = superviseCheckReport.EvaluationResult, + CheckType = superviseCheckReport.CheckType, + AttachUrl = superviseCheckReport.AttachUrl, + IsIssued = superviseCheckReport.IsIssued + }; + Funs.DB.Supervise_SuperviseCheckReport.InsertOnSubmit(newSuperviseCheckReport); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改安全监督检查报告 + /// + /// + public static void UpdateSuperviseCheckReport(Model.Supervise_SuperviseCheckReport superviseCheckReport) + { + Model.Supervise_SuperviseCheckReport newSuperviseCheckReport = Funs.DB.Supervise_SuperviseCheckReport.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReport.SuperviseCheckReportId); + if (newSuperviseCheckReport != null) + { + newSuperviseCheckReport.SuperviseCheckReportCode = superviseCheckReport.SuperviseCheckReportCode; + newSuperviseCheckReport.CheckDate = superviseCheckReport.CheckDate; + newSuperviseCheckReport.ProjectId = superviseCheckReport.ProjectId; + newSuperviseCheckReport.UnitId = superviseCheckReport.UnitId; + newSuperviseCheckReport.CheckTeam = superviseCheckReport.CheckTeam; + newSuperviseCheckReport.EvaluationResult = superviseCheckReport.EvaluationResult; + newSuperviseCheckReport.CheckType = superviseCheckReport.CheckType; + newSuperviseCheckReport.AttachUrl = superviseCheckReport.AttachUrl; + newSuperviseCheckReport.IsIssued = superviseCheckReport.IsIssued; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除安全监督检查报告 + /// + /// + public static void DeleteSuperviseCheckReportById(string superviseCheckReportId) + { + Model.Supervise_SuperviseCheckReport superviseCheckReport = Funs.DB.Supervise_SuperviseCheckReport.FirstOrDefault(e => e.SuperviseCheckReportId == superviseCheckReportId); + if (superviseCheckReport != null) + { + if (!string.IsNullOrEmpty(superviseCheckReport.AttachUrl)) + { + BLL.UploadFileService.DeleteFile(Funs.RootPath, superviseCheckReport.AttachUrl);//删除附件 + } + Funs.DB.Supervise_SuperviseCheckReport.DeleteOnSubmit(superviseCheckReport); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx index 7d9d15fe..1fd9ae69 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx +++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx @@ -5,6 +5,18 @@ 特岗证书 +
@@ -24,6 +36,13 @@ + + + + @@ -45,32 +64,41 @@ - - + + + + + + + + - + - - + @@ -88,6 +116,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.cs new file mode 100644 index 00000000..807a4f3d --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.cs @@ -0,0 +1,326 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.HSSE.Check +{ + public partial class ProjectLeaderCheck : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + + ////权限按钮方法 + this.GetButtonPower(); + this.btnNew.OnClientClick = Window1.GetShowReference("ProjectLeaderCheckEdit.aspx") + "return false;"; + Funs.DropDownPageSize(this.ddlPageSize); + // 绑定表格 + this.BindGrid(); + } + } + /// + /// 绑定数据 + /// + private void BindGrid() + { + var getData = Check_ProjectLeaderCheckService.getListData(this.ProjectId, this.txtStartTime.Text, this.txtEndTime.Text, Grid1); + Grid1.RecordCount = Check_ProjectLeaderCheckService.count; + Grid1.DataSource = getData; + Grid1.DataBind(); + } + + #region 分页 排序 + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + var meeting = BLL.Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(id); + if (meeting != null) + { + if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectLeaderCheckView.aspx?ProjectLeaderCheckId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectLeaderCheckEdit.aspx?ProjectLeaderCheckId={0}", id, "编辑 - "))); + } + } + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var newCheckTwolevel = BLL.Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(rowID); + if (newCheckTwolevel != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, newCheckTwolevel.CheckCode, newCheckTwolevel.ProjectLeaderCheckId, BLL.Const.ProjectLeaderCheckMenuId, BLL.Const.BtnDelete); + BLL.Check_ProjectLeaderCheckService.DeleteProjectLeaderCheckById(rowID); + + } + } + Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SupervisionAndInspection); + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ProjectLeaderCheckMenuId); + 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; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("领导带班检查" + filename, Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridHtml(Grid1)); + Response.End(); + } + #endregion + + + /// + /// 导出方法 + /// + /// + /// + private string GetGridHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + string ID = row.DataKeys[0].ToString(); + string imageUrl = AttachFileService.getFileUrl(ID); + sb.Append(" "); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber" && (row.FindControl("lblNumber") as AspNet.Label) != null) + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + if (column.ColumnID == "tfUnitName" && (row.FindControl("lbUnitName") as AspNet.Label) != null) + { + html = (row.FindControl("lbUnitName") as AspNet.Label).Text; + } + if (column.ColumnID == "tfName" && (row.FindControl("lbName") as AspNet.Label) != null) + { + html = (row.FindControl("lbName") as AspNet.Label).Text; + } + if (column.ColumnID == "tfImageUrl" && !string.IsNullOrEmpty(imageUrl)) + { + List list = Funs.GetStrListByStr(imageUrl, ','); + if (list.Count == 1) + { + html = ""; + } + else + { + foreach (var item in list) + { + html += ""; + } + } + } + + sb.AppendFormat("", html); + } + sb.Append(""); + } + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + + protected void btnView_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectLeaderCheckView.aspx?ProjectLeaderCheckId={0}", Grid1.SelectedRowID, "查看 - "))); + } + + /// + /// 获取整改前图片(放于Img中) + /// + /// + /// + protected string ConvertImageUrlByImage(object CheckTwolevelId) + { + string url = string.Empty; + if (CheckTwolevelId != null) + { + var getdata = AttachFileService.getFileUrl(CheckTwolevelId.ToString()); + if (!string.IsNullOrEmpty(getdata)) + { + url = BLL.UploadAttachmentService.ShowImage("../../", getdata); + } + } + return url; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.designer.cs new file mode 100644 index 00000000..53ed4664 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx.designer.cs @@ -0,0 +1,222 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Check { + + + public partial class ProjectLeaderCheck { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// lbUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbUnitName; + + /// + /// lbName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbName; + + /// + /// lbtnImageUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbtnImageUrl; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx new file mode 100644 index 00000000..50dc206f --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx @@ -0,0 +1,90 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectLeaderCheckEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Check.ProjectLeaderCheckEdit" %> + + + + + + + 领导带班检查 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs new file mode 100644 index 00000000..6eb28d7a --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs @@ -0,0 +1,187 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; + +namespace FineUIPro.Web.HSSE.Check +{ + public partial class ProjectLeaderCheckEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string ProjectLeaderCheckId + { + get + { + return (string)ViewState["ProjectLeaderCheckId"]; + } + set + { + ViewState["ProjectLeaderCheckId"] = value; + } + } + /// + /// 单位 ID + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + /// + /// 菜单 ID + /// + public string MenuId + { + get + { + return (string)ViewState["MenuId"]; + } + set + { + ViewState["MenuId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpLeaderIds, this.CurrUser.LoginProjectId, null, true); + UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnits, this.CurrUser.LoginProjectId, null, true); + this.ProjectLeaderCheckId = Request.Params["ProjectLeaderCheckId"]; + this.UnitId = Request.Params["UnitId"]; + this.MenuId = Const.ProjectLeaderCheckMenuId; + if (!string.IsNullOrEmpty(this.ProjectLeaderCheckId)) + { + var getProjectLeaderCheck = BLL.Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(this.ProjectLeaderCheckId); + if (getProjectLeaderCheck != null) + { + if (!string.IsNullOrEmpty(getProjectLeaderCheck.UnitIds)) + { + this.drpUnits.SelectedValueArray = getProjectLeaderCheck.UnitIds.Split(','); + } + if (!string.IsNullOrEmpty(getProjectLeaderCheck.LeaderIds)) + { + this.drpLeaderIds.SelectedValueArray = getProjectLeaderCheck.LeaderIds.Split(','); + } + this.txtCheckCode.Text = getProjectLeaderCheck.CheckCode; + this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", getProjectLeaderCheck.CheckDate); + this.ckIsHoldMeet.Checked = getProjectLeaderCheck.IsHoldMeet.Value; + this.txtQuestionDef.Text = getProjectLeaderCheck.QuestionDef; + this.txtRequirement.Text = getProjectLeaderCheck.Requirement; + this.txtLeaderName.Text = getProjectLeaderCheck.LeaderNames; + } + } + else + { + ////自动生成编码 + this.txtCheckCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(this.MenuId, this.CurrUser.LoginProjectId, this.CurrUser.UnitId); + this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + this.SaveData(Const.BtnSubmit); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 保存数据 + /// + /// + private void SaveData(string type) + { + string unitIds = Funs.GetStringByArray(this.drpUnits.SelectedValueArray); + string LeaderIds = Funs.GetStringByArray(this.drpLeaderIds.SelectedValueArray); + if (string.IsNullOrEmpty(LeaderIds) && type == Const.BtnSubmit) + { + ShowNotify("请选择带班领导!", MessageBoxIcon.Warning); + return; + } + + Model.Check_ProjectLeaderCheck newProjectLeaderCheck = new Model.Check_ProjectLeaderCheck + { + ProjectId = this.CurrUser.LoginProjectId, + CheckCode = this.txtCheckCode.Text.Trim(), + CheckDate = Funs.GetNewDateTime(this.txtCheckDate.Text.Trim()), + UnitIds = unitIds, + LeaderIds = LeaderIds, + IsHoldMeet = this.ckIsHoldMeet.Checked, + QuestionDef = this.txtQuestionDef.Text.Trim(), + Requirement = this.txtRequirement.Text.Trim(), + LeaderNames = this.txtLeaderName.Text.Trim(), + }; + + if (!string.IsNullOrEmpty(this.ProjectLeaderCheckId)) + { + newProjectLeaderCheck.ProjectLeaderCheckId = this.ProjectLeaderCheckId; + BLL.Check_ProjectLeaderCheckService.UpdateProjectLeaderCheck(newProjectLeaderCheck); + BLL.LogService.AddSys_Log(this.CurrUser, newProjectLeaderCheck.CheckCode, newProjectLeaderCheck.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnModify); + } + else + { + this.ProjectLeaderCheckId = SQLHelper.GetNewID(); + newProjectLeaderCheck.ProjectLeaderCheckId = this.ProjectLeaderCheckId; + BLL.Check_ProjectLeaderCheckService.AddProjectLeaderCheck(newProjectLeaderCheck); + BLL.LogService.AddSys_Log(this.CurrUser, newProjectLeaderCheck.CheckCode, newProjectLeaderCheck.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnAdd); + } + Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SupervisionAndInspection); + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.ProjectLeaderCheckId)) + { + SaveData(BLL.Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ProjectLeaderCheckAttachUrl&menuId={1}", ProjectLeaderCheckId, this.MenuId))); + } + #endregion + + protected void drpUnits_SelectedIndexChanged(object sender, EventArgs e) + { + this.drpUnits.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpUnits.SelectedValueArray); + } + + protected void drpLeaderIds_SelectedIndexChanged(object sender, EventArgs e) + { + this.drpLeaderIds.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpLeaderIds.SelectedValueArray); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.designer.cs new file mode 100644 index 00000000..244e3e30 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Check { + + + public partial class ProjectLeaderCheckEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtCheckCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckCode; + + /// + /// txtCheckDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCheckDate; + + /// + /// drpUnits 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnits; + + /// + /// drpLeaderIds 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpLeaderIds; + + /// + /// txtLeaderName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLeaderName; + + /// + /// ckIsHoldMeet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckIsHoldMeet; + + /// + /// txtQuestionDef 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtQuestionDef; + + /// + /// txtRequirement 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRequirement; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx new file mode 100644 index 00000000..c65377b0 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx @@ -0,0 +1,83 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectLeaderCheckView.aspx.cs" Inherits="FineUIPro.Web.HSSE.Check.ProjectLeaderCheckView" %> + + + + + + + 领导带班检查 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.cs new file mode 100644 index 00000000..5cfb05d6 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; +using FineUIPro.Web.SysManage; + +namespace FineUIPro.Web.HSSE.Check +{ + public partial class ProjectLeaderCheckView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string ProjectLeaderCheckId + { + get + { + return (string)ViewState["ProjectLeaderCheckId"]; + } + set + { + ViewState["ProjectLeaderCheckId"] = value; + } + } + /// + /// 单位 ID + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + /// + /// 菜单 ID + /// + public string MenuId + { + get + { + return (string)ViewState["MenuId"]; + } + set + { + ViewState["MenuId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.ProjectLeaderCheckId = Request.Params["ProjectLeaderCheckId"]; + this.UnitId = Request.Params["UnitId"]; + this.MenuId = Const.ProjectLeaderCheckMenuId; + if (!string.IsNullOrEmpty(this.ProjectLeaderCheckId)) + { + var getProjectLeaderCheck = BLL.Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(this.ProjectLeaderCheckId); + if (getProjectLeaderCheck != null) + { + this.drpUnits.Text = UnitService.getUnitNamesUnitIds(getProjectLeaderCheck.UnitIds); + this.drpLeaderIds.Text = Person_PersonsService.GetPersonsNameById(getProjectLeaderCheck.LeaderIds); + this.txtCheckCode.Text = getProjectLeaderCheck.CheckCode; + this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", getProjectLeaderCheck.CheckDate); + this.ckIsHoldMeet.Checked = getProjectLeaderCheck.IsHoldMeet.Value; + this.txtQuestionDef.Text = getProjectLeaderCheck.QuestionDef; + this.txtRequirement.Text = getProjectLeaderCheck.Requirement; + this.txtLeaderName.Text = getProjectLeaderCheck.LeaderNames; + } + } + else + { + ////自动生成编码 + this.txtCheckCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(this.MenuId, this.CurrUser.LoginProjectId, this.CurrUser.UnitId); + this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&type=-1&path=FileUpload/ProjectLeaderCheckAttachUrl&menuId={1}", ProjectLeaderCheckId, this.MenuId))); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.designer.cs new file mode 100644 index 00000000..b2cee276 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckView.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Check +{ + + + public partial class ProjectLeaderCheckView + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtCheckCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckCode; + + /// + /// txtCheckDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCheckDate; + + /// + /// drpUnits 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox drpUnits; + + /// + /// drpLeaderIds 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox drpLeaderIds; + + /// + /// txtLeaderName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLeaderName; + + /// + /// ckIsHoldMeet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckIsHoldMeet; + + /// + /// txtQuestionDef 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtQuestionDef; + + /// + /// txtRequirement 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRequirement; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx new file mode 100644 index 00000000..69f0b998 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx @@ -0,0 +1,151 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyLeaderGroupMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.SafetyLeaderGroupMeeting" %> + + + + + + 安全领导小组会议 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + <%-- + --%> + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs new file mode 100644 index 00000000..9782d0b8 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs @@ -0,0 +1,305 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.HSSE.Meeting +{ + public partial class SafetyLeaderGroupMeeting : PageBase + { + #region 项目主键 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + + BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, false); + Funs.FineUIPleaseSelect(this.drpUnitId, "按单位查询"); + if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + { + this.drpUnitId.SelectedValue = this.CurrUser.UnitId; + this.drpUnitId.Enabled = false; + } + this.btnNew.OnClientClick = Window1.GetShowReference("SafetyLeaderGroupMeetingEdit.aspx") + "return false;"; + + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + // this.Grid1.Columns[0].Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); + } + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + if (!string.IsNullOrEmpty(this.ProjectId)) + { + string strSql = @"SELECT SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId,SafetyLeaderGroupMeeting.ProjectId,CodeRecords.Code AS SafetyLeaderGroupMeetingCode,Unit.UnitId,Unit.UnitName,SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName,SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate,SafetyLeaderGroupMeeting.CompileMan,SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents,SafetyLeaderGroupMeeting.CompileDate,SafetyLeaderGroupMeeting.States,SafetyLeaderGroupMeeting.MeetingHours,SafetyLeaderGroupMeeting.MeetingHostMan,SafetyLeaderGroupMeeting.AttentPersonNum,SafetyLeaderGroupMeeting.AttentPerson " + + @" ,(CASE WHEN SafetyLeaderGroupMeeting.States = " + BLL.Const.State_0 + " OR SafetyLeaderGroupMeeting.States IS NULL THEN '待['+OperateUser.PersonName+']提交' WHEN SafetyLeaderGroupMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName,Project.ProjectName" + + @" FROM Meeting_SafetyLeaderGroupMeeting AS SafetyLeaderGroupMeeting + LEFT JOIN Base_Project AS Project ON SafetyLeaderGroupMeeting.ProjectId=Project.ProjectId" + + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId=CodeRecords.DataId " + + @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1" + + @" LEFT JOIN Person_Persons AS OperateUser ON FlowOperate.OperaterId=OperateUser.PersonId" + + @" LEFT JOIN Person_Persons AS Users ON SafetyLeaderGroupMeeting.CompileMan=Users.PersonId" + + @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Users.UnitId WHERE 1=1 "; + List listStr = new List(); + strSql += " AND SafetyLeaderGroupMeeting.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + strSql += " AND Unit.UnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim())); + } + if (!string.IsNullOrEmpty(this.txtSafetyLeaderGroupMeetingCode.Text.Trim())) + { + strSql += " AND SafetyLeaderGroupMeetingCode LIKE @SafetyLeaderGroupMeetingCode"; + listStr.Add(new SqlParameter("@SafetyLeaderGroupMeetingCode", "%" + this.txtSafetyLeaderGroupMeetingCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtSafetyLeaderGroupMeetingName.Text.Trim())) + { + strSql += " AND SafetyLeaderGroupMeetingName LIKE @SafetyLeaderGroupMeetingName"; + listStr.Add(new SqlParameter("@SafetyLeaderGroupMeetingName", "%" + this.txtSafetyLeaderGroupMeetingName.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + } + + /// + /// 改变索引事件 + /// + /// + /// + 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) + { + BindGrid(); + } + + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + var meeting = BLL.SafetyLeaderGroupMeetingService.GetSafetyLeaderGroupMeetingById(id); + if (meeting != null) + { + if (this.btnMenuEdit.Hidden || meeting.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyLeaderGroupMeetingView.aspx?SafetyLeaderGroupMeetingId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyLeaderGroupMeetingEdit.aspx?SafetyLeaderGroupMeetingId={0}", id, "编辑 - "))); + } + } + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var meet = BLL.SafetyLeaderGroupMeetingService.GetSafetyLeaderGroupMeetingById(rowID); + if (meet != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, meet.SafetyLeaderGroupMeetingCode, meet.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId, BLL.Const.BtnDelete); + + BLL.SafetyLeaderGroupMeetingService.DeleteSafetyLeaderGroupMeetingById(rowID); + + } + } + Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SafetyMeeting); + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.PersonId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId); + 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; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("安全领导小组会议" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + protected void btnView_Click(object sender, EventArgs e) + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekMeetingView.aspx?WeekMeetingId={0}", id, "查看 - "))); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.designer.cs new file mode 100644 index 00000000..615ef064 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.designer.cs @@ -0,0 +1,215 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Meeting +{ + + + public partial class SafetyLeaderGroupMeeting + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtSafetyLeaderGroupMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSafetyLeaderGroupMeetingCode; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// txtSafetyLeaderGroupMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSafetyLeaderGroupMeetingName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnView; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx new file mode 100644 index 00000000..663f3272 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx @@ -0,0 +1,90 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyLeaderGroupMeetingEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.SafetyLeaderGroupMeetingEdit" ValidateRequest="false" %> + + + + + + + 编辑安全领导小组会议 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx.cs new file mode 100644 index 00000000..356a7c22 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx.cs @@ -0,0 +1,235 @@ +using BLL; +using System; +using System.Web; + +namespace FineUIPro.Web.HSSE.Meeting +{ + public partial class SafetyLeaderGroupMeetingEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string SafetyLeaderGroupMeetingId + { + get + { + return (string)ViewState["SafetyLeaderGroupMeetingId"]; + } + set + { + ViewState["SafetyLeaderGroupMeetingId"] = value; + } + } + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = this.CurrUser.LoginProjectId; + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.InitDropDownList(); + this.SafetyLeaderGroupMeetingId = Request.Params["SafetyLeaderGroupMeetingId"]; + if (!string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting = BLL.SafetyLeaderGroupMeetingService.GetSafetyLeaderGroupMeetingById(this.SafetyLeaderGroupMeetingId); + if (SafetyLeaderGroupMeeting != null) + { + this.ProjectId = SafetyLeaderGroupMeeting.ProjectId; + if (this.ProjectId != this.CurrUser.LoginProjectId) + { + this.InitDropDownList(); + } + this.txtSafetyLeaderGroupMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.SafetyLeaderGroupMeetingId); + this.txtSafetyLeaderGroupMeetingName.Text = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName; + this.txtSafetyLeaderGroupMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate); + if (!string.IsNullOrEmpty(SafetyLeaderGroupMeeting.CompileMan)) + { + this.drpCompileMan.SelectedValue = SafetyLeaderGroupMeeting.CompileMan; + } + if (SafetyLeaderGroupMeeting.AttentPersonNum != null) + { + this.txtAttentPersonNum.Text = SafetyLeaderGroupMeeting.AttentPersonNum.ToString(); + } + this.txtSafetyLeaderGroupMeetingContents.Text = HttpUtility.HtmlDecode(SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents); + this.txtMeetingHours.Text = Convert.ToString(SafetyLeaderGroupMeeting.MeetingHours); + this.txtMeetingHostMan.Text = SafetyLeaderGroupMeeting.MeetingHostMan; + this.txtAttentPerson.Text = SafetyLeaderGroupMeeting.AttentPerson; + } + } + else + { + this.drpCompileMan.SelectedValue = this.CurrUser.PersonId; + this.txtSafetyLeaderGroupMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + var codeTemplateRule = BLL.SysConstSetService.GetCodeTemplateRuleByMenuId(BLL.Const.ProjectWeekMeetingMenuId); + if (codeTemplateRule != null) + { + this.txtSafetyLeaderGroupMeetingContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template); + } + ////自动生成编码 + this.txtSafetyLeaderGroupMeetingCode.Text = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectSafetyLeaderGroupMeetingMenuId, this.ProjectId, this.CurrUser.UnitId); + this.txtSafetyLeaderGroupMeetingName.Text = this.SimpleForm1.Title; + this.txtMeetingHours.Text = "1"; + this.txtMeetingHostMan.Text = this.CurrUser.PersonName; + } + } + } + #endregion + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpCompileMan, this.ProjectId, null, null, true); + } + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + this.SaveData(BLL.Const.BtnSave); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 提交 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + this.SaveData(BLL.Const.BtnSubmit); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 保存数据 + /// + /// + private void SaveData(string type) + { + Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting = new Model.Meeting_SafetyLeaderGroupMeeting + { + ProjectId = this.ProjectId, + SafetyLeaderGroupMeetingCode = this.txtSafetyLeaderGroupMeetingCode.Text.Trim(), + SafetyLeaderGroupMeetingName = this.txtSafetyLeaderGroupMeetingName.Text.Trim(), + SafetyLeaderGroupMeetingDate = Funs.GetNewDateTime(this.txtSafetyLeaderGroupMeetingDate.Text.Trim()) + }; + if (this.drpCompileMan.SelectedValue != BLL.Const._Null) + { + SafetyLeaderGroupMeeting.CompileMan = this.drpCompileMan.SelectedValue; + } + SafetyLeaderGroupMeeting.AttentPersonNum = Funs.GetNewIntOrZero(this.txtAttentPersonNum.Text.Trim()); + SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents = HttpUtility.HtmlEncode(this.txtSafetyLeaderGroupMeetingContents.Text); + SafetyLeaderGroupMeeting.CompileDate = DateTime.Now; + SafetyLeaderGroupMeeting.States = BLL.Const.State_0; + SafetyLeaderGroupMeeting.MeetingHours = Funs.GetNewInt(this.txtMeetingHours.Text.Trim()); + SafetyLeaderGroupMeeting.MeetingHostMan = this.txtMeetingHostMan.Text.Trim(); + SafetyLeaderGroupMeeting.AttentPerson = this.txtAttentPerson.Text.Trim(); + if (!string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId = this.SafetyLeaderGroupMeetingId; + BLL.SafetyLeaderGroupMeetingService.UpdateSafetyLeaderGroupMeeting(SafetyLeaderGroupMeeting); + BLL.LogService.AddSys_Log(this.CurrUser, SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode, SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId, BLL.Const.BtnModify); + } + else + { + this.SafetyLeaderGroupMeetingId = SQLHelper.GetNewID(typeof(Model.Meeting_SafetyLeaderGroupMeeting)); + SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId = this.SafetyLeaderGroupMeetingId; + BLL.SafetyLeaderGroupMeetingService.AddSafetyLeaderGroupMeeting(SafetyLeaderGroupMeeting); + BLL.LogService.AddSys_Log(this.CurrUser, SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode, SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId, BLL.Const.BtnAdd); + } + Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SafetyMeeting); + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + SaveData(BLL.Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafetyLeaderGroupMeetingAttachUrl&menuId={1}", this.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId))); + } + #endregion + + protected void btnAttachUrl1_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + SaveData(Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=1", this.SafetyLeaderGroupMeetingId, Const.ProjectSafetyLeaderGroupMeetingMenuId))); + } + + protected void btnAttachUrl2_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + SaveData(Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=2", this.SafetyLeaderGroupMeetingId, Const.ProjectSafetyLeaderGroupMeetingMenuId))); + } + + /// + /// 计算参会人数 + /// + /// + /// + protected void txtAttentPerson_Blur(object sender, EventArgs e) + { + string str = this.txtAttentPerson.Text.Trim(); + if (!string.IsNullOrEmpty(str)) + { + if (str.Contains(",")) + { + this.txtAttentPersonNum.Text = str.Split(',').Length.ToString(); + } + else if (str.Contains(",")) + { + this.txtAttentPersonNum.Text = str.Split(',').Length.ToString(); + } + else if (str.Contains(";")) + { + this.txtAttentPersonNum.Text = str.Split(';').Length.ToString(); + } + else if (str.Contains(";")) + { + this.txtAttentPersonNum.Text = str.Split(';').Length.ToString(); + } + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx.designer.cs new file mode 100644 index 00000000..867b6d31 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingEdit.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Meeting { + + + public partial class SafetyLeaderGroupMeetingEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtSafetyLeaderGroupMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSafetyLeaderGroupMeetingCode; + + /// + /// txtSafetyLeaderGroupMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSafetyLeaderGroupMeetingName; + + /// + /// txtSafetyLeaderGroupMeetingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtSafetyLeaderGroupMeetingDate; + + /// + /// drpCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCompileMan; + + /// + /// txtMeetingHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMeetingHours; + + /// + /// txtMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMeetingHostMan; + + /// + /// txtAttentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAttentPersonNum; + + /// + /// txtAttentPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAttentPerson; + + /// + /// txtSafetyLeaderGroupMeetingContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtSafetyLeaderGroupMeetingContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnAttachUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl1; + + /// + /// btnAttachUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx new file mode 100644 index 00000000..2c616e17 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx @@ -0,0 +1,84 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyLeaderGroupMeetingView.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.SafetyLeaderGroupMeetingView" %> + + + + + + + 查看安全领导小组会议 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.cs new file mode 100644 index 00000000..f97777d2 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.cs @@ -0,0 +1,95 @@ +using BLL; +using System; +using System.Web; + +namespace FineUIPro.Web.HSSE.Meeting +{ + public partial class SafetyLeaderGroupMeetingView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string SafetyLeaderGroupMeetingId + { + get + { + return (string)ViewState["SafetyLeaderGroupMeetingId"]; + } + set + { + ViewState["SafetyLeaderGroupMeetingId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.SafetyLeaderGroupMeetingId = Request.Params["SafetyLeaderGroupMeetingId"]; + if (!string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting = BLL.SafetyLeaderGroupMeetingService.GetSafetyLeaderGroupMeetingById(this.SafetyLeaderGroupMeetingId); + if (SafetyLeaderGroupMeeting != null) + { + this.txtSafetyLeaderGroupMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.SafetyLeaderGroupMeetingId); + this.txtSafetyLeaderGroupMeetingName.Text = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName; + if (SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate != null) + { + this.txtSafetyLeaderGroupMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate); + } + this.txtCompileMan.Text = Person_PersonsService.GetPersonsNameById(SafetyLeaderGroupMeeting.CompileMan); + if (SafetyLeaderGroupMeeting.AttentPersonNum != null) + { + this.txtAttentPersonNum.Text = SafetyLeaderGroupMeeting.AttentPersonNum.ToString(); + } + this.txtSafetyLeaderGroupMeetingContents.Text = HttpUtility.HtmlDecode(SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents); + this.txtMeetingHours.Text = Convert.ToString(SafetyLeaderGroupMeeting.MeetingHours); + this.txtMeetingHostMan.Text = SafetyLeaderGroupMeeting.MeetingHostMan; + this.txtAttentPerson.Text = SafetyLeaderGroupMeeting.AttentPerson; + } + } + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafetyLeaderGroupMeetingAttachUrl&menuId={1}&type=-1", this.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId))); + } + } + #endregion + + protected void btnAttachUrl1_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=1&type=-1", this.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId))); + } + } + + protected void btnAttachUrl2_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.SafetyLeaderGroupMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=2&type=-1", this.SafetyLeaderGroupMeetingId, BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId))); + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.designer.cs new file mode 100644 index 00000000..f5a28569 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.designer.cs @@ -0,0 +1,195 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.Meeting { + + + public partial class SafetyLeaderGroupMeetingView { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtSafetyLeaderGroupMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSafetyLeaderGroupMeetingCode; + + /// + /// txtSafetyLeaderGroupMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSafetyLeaderGroupMeetingName; + + /// + /// txtSafetyLeaderGroupMeetingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSafetyLeaderGroupMeetingDate; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileMan; + + /// + /// txtMeetingHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMeetingHours; + + /// + /// txtMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMeetingHostMan; + + /// + /// txtAttentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAttentPersonNum; + + /// + /// txtAttentPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAttentPerson; + + /// + /// txtSafetyLeaderGroupMeetingContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtSafetyLeaderGroupMeetingContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnAttachUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl1; + + /// + /// btnAttachUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx index f0ae833f..360d28b8 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx @@ -162,12 +162,13 @@ - + + @@ -179,7 +180,6 @@ - diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs index 5f278026..81603d3e 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs @@ -351,6 +351,10 @@ namespace FineUIPro.Web.Person this.txtOutResult.Text = getProjectPerson.OutResult; this.txtRealNameTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getProjectPerson.RealNameAddTime); this.txtAuditorDate.Text = string.Format("{0:yyyy-MM-dd}", getProjectPerson.AuditorDate); + if (getProjectPerson.IsSafetyMonitoring.HasValue) + { + this.ckIsSafetyMonitoring.Checked = getProjectPerson.IsSafetyMonitoring.Value; + } } else { @@ -845,6 +849,7 @@ namespace FineUIPro.Web.Person OutTime = Funs.GetNewDateTime(this.txtOutTime.Text), OutResult = this.txtOutResult.Text.Trim(), States = string.IsNullOrEmpty(this.hdStates.Text) ? Const.ProjectPersonStates_0 : this.hdStates.Text, + IsSafetyMonitoring=this.ckIsSafetyMonitoring.Checked }; if (newPerson.States == Const.ProjectPersonStates_2 || newPerson.States == Const.ProjectPersonStates_R) { diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.designer.cs index 8449c38d..c0ed4227 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.designer.cs @@ -320,6 +320,15 @@ namespace FineUIPro.Web.Person /// protected global::FineUIPro.RadioButtonList rbPersonType; + /// + /// ckIsSafetyMonitoring 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckIsSafetyMonitoring; + /// /// drpAuditor 控件。 /// diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx b/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx index 4354ffe0..67f04136 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx @@ -144,12 +144,13 @@ - + - + + diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.cs index ae4359d2..59a1a619 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.cs @@ -246,6 +246,10 @@ namespace FineUIPro.Web.Person this.txtOutResult.Text = getProjectPerson.OutResult; this.txtRealNameTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getProjectPerson.RealNameAddTime); this.txtAuditorDate.Text = string.Format("{0:yyyy-MM-dd}", getProjectPerson.AuditorDate); + if (getProjectPerson.IsSafetyMonitoring.HasValue) + { + this.ckIsSafetyMonitoring.Checked = getProjectPerson.IsSafetyMonitoring.Value; + } } else { diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.designer.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.designer.cs index a60dc725..a275c253 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonView.aspx.designer.cs @@ -266,6 +266,15 @@ namespace FineUIPro.Web.Person /// protected global::FineUIPro.RadioButtonList rbPersonType; + /// + /// ckIsSafetyMonitoring 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckIsSafetyMonitoring; + /// /// drpAuditor 控件。 /// diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx new file mode 100644 index 00000000..ba9be4cd --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx @@ -0,0 +1,131 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillRecordList.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Emergency.DrillRecordList" %> + + + + + + + 应急演练 + + + +
+ + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs new file mode 100644 index 00000000..78add751 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs @@ -0,0 +1,305 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using BLL; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Emergency +{ + public partial class DrillRecordList : PageBase + { + #region 定义项 + /// + /// 项目id + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + this.UnitId = Const.UnitId_SEDIN; + this.btnNew.OnClientClick = Window1.GetShowReference("DrillRecordListEdit.aspx") + "return false;"; + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT DrillRecordList.DrillRecordListId,DrillRecordList.ProjectId,DrillRecordType.ConstText AS DrillRecordTypeName,DrillRecordList.JointPersonNum,DrillRecordList.DrillCost,CodeRecords.Code AS DrillRecordCode,DrillRecordList.DrillRecordName,DrillRecordList.DrillRecordDate,DrillRecordList.CompileMan,Users.PersonName AS CompileManName,DrillRecordList.UnitIds,DrillRecordList.UnitNames,DrillRecordList.UserNames,DrillRecordList.States " + + @" ,(CASE WHEN DrillRecordList.States = " + BLL.Const.State_0 + " OR DrillRecordList.States IS NULL THEN '待['+OperateUser.PersonName+']提交' WHEN DrillRecordList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName" + + @" FROM Emergency_DrillRecordList_Unit AS DrillRecordList " + + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON DrillRecordList.DrillRecordListId=CodeRecords.DataId " + + @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON DrillRecordList.DrillRecordListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1" + + @" LEFT JOIN Sys_Const AS DrillRecordType ON DrillRecordType.ConstValue = DrillRecordList.DrillRecordType and DrillRecordType.GroupId='DrillRecordType'" + + @" LEFT JOIN Person_Persons AS OperateUser ON FlowOperate.OperaterId=OperateUser.PersonId" + + @" LEFT JOIN Person_Persons AS Users ON DrillRecordList.CompileMan=Users.PersonId WHERE 1=1 "; + List listStr = new List(); + strSql += " AND DrillRecordList.UnitIds =@UnitId"; + if (!string.IsNullOrEmpty(this.UnitId)) ///是否文件柜查看页面传项目值 + { + listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + strSql += " AND DrillRecordList.States = @States"; ///状态为已完成 + listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); + } + else + { + listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + } + + if (!string.IsNullOrEmpty(this.txtDrillRecordCode.Text.Trim())) + { + strSql += " AND DrillRecordCode LIKE @DrillRecordCode"; + listStr.Add(new SqlParameter("@DrillRecordCode", "%" + this.txtDrillRecordCode.Text.Trim() + "%")); + } + + if (!string.IsNullOrEmpty(this.txtDrillRecordName.Text.Trim())) + { + strSql += " AND DrillRecordList.DrillRecordName LIKE @DrillRecordName"; + listStr.Add(new SqlParameter("@DrillRecordName", "%" + this.txtDrillRecordName.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(); + } + + #region 分页 排序 + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + var DrillRecord = BLL.UnitDrillRecordListService.GetDrillRecordListById(id); + if (DrillRecord != null) + { + if (this.btnMenuEdit.Hidden || DrillRecord.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrillRecordListView.aspx?DrillRecordListId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrillRecordListEdit.aspx?DrillRecordListId={0}", id, "编辑 - "))); + } + } + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var DrillRecordList = BLL.UnitDrillRecordListService.GetDrillRecordListById(rowID); + if (DrillRecordList != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, DrillRecordList.DrillRecordCode, DrillRecordList.DrillRecordListId, BLL.Const.UnitDrillRecordListMenuId, BLL.Const.BtnDelete); + + BLL.UnitDrillRecordListService.DeleteDrillRecordListById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("应急演练" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.UnitDrillRecordListMenuId); + 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; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs new file mode 100644 index 00000000..08d96442 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Emergency +{ + + + public partial class DrillRecordList + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtDrillRecordCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillRecordCode; + + /// + /// txtDrillRecordName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillRecordName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx new file mode 100644 index 00000000..3921f1d5 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx @@ -0,0 +1,92 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillRecordListEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Emergency.DrillRecordListEdit" ValidateRequest="false" %> + +<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> + + + + + + 编辑应急演练 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + --%> + + + + + + + + + + <%-- + --%> + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs new file mode 100644 index 00000000..8dc76970 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs @@ -0,0 +1,202 @@ +using BLL; +using System; +using System.Web; + +namespace FineUIPro.Web.ZHGL.Emergency +{ + public partial class DrillRecordListEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string DrillRecordListId + { + get + { + return (string)ViewState["DrillRecordListId"]; + } + set + { + ViewState["DrillRecordListId"] = value; + } + } + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.InitDropDownList(); + this.DrillRecordListId = Request.Params["DrillRecordListId"]; + if (!string.IsNullOrEmpty(this.DrillRecordListId)) + { + Model.Emergency_DrillRecordList_Unit DrillRecordList = BLL.UnitDrillRecordListService.GetDrillRecordListById(this.DrillRecordListId); + if (DrillRecordList != null) + { + ///读取编号 + this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.DrillRecordListId); + this.txtDrillRecordName.Text = DrillRecordList.DrillRecordName; + if (!string.IsNullOrEmpty(DrillRecordList.DrillRecordType)) + { + this.drpDrillRecordType.SelectedValue = DrillRecordList.DrillRecordType; + } + this.txtUnit.Text = DrillRecordList.UnitNames; + this.txtDrillRecordDate.Text = string.Format("{0:yyyy-MM-dd}", DrillRecordList.DrillRecordDate); + if (DrillRecordList.JointPersonNum != null) + { + this.txtJointPersonNum.Text = DrillRecordList.JointPersonNum.ToString(); + } + if (DrillRecordList.DrillCost != null) + { + this.txtDrillCost.Text = DrillRecordList.DrillCost.ToString(); + } + this.txtDrillRecordContents.Text = HttpUtility.HtmlDecode(DrillRecordList.DrillRecordContents); + } + } + else + { + this.txtDrillRecordDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + //var codeTemplateRule = BLL.ProjectData_CodeTemplateRuleService.GetProjectData_CodeTemplateRuleByMenuIdProjectId(BLL.Const.UnitDrillRecordListMenuId, this.ProjectId); + //if (codeTemplateRule != null) + //{ + // this.txtDrillRecordContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template); + //} + + ////自动生成编码 + this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitDrillRecordListMenuId, null, this.UnitId); + this.txtDrillRecordName.Text = this.SimpleForm1.Title; + } + + ///初始化审核菜单 + //this.ctlAuditFlow.MenuId = BLL.Const.UnitDrillRecordListMenuId; + //this.ctlAuditFlow.DataId = this.DrillRecordListId; + //this.ctlAuditFlow.ProjectId = this.ProjectId; + //this.ctlAuditFlow.UnitId = this.CurrUser.UnitId; + } + } + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + //BLL.UnitService.InitUnitDropDownList(this.drpUnits, this.ProjectId, false); + var thisUnit = UnitService.GetUnitByUnitId(Const.UnitId_SEDIN); + if (thisUnit != null) + { + this.txtUnit.Text = thisUnit.UnitName; + this.UnitId = thisUnit.UnitId; + } + BLL.ConstValue.InitConstValueDropDownList(this.drpDrillRecordType, BLL.ConstValue.Group_DrillRecordType, false); + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + this.SaveData(BLL.Const.BtnSave); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + //if (this.ctlAuditFlow.NextStep == BLL.Const.State_1 && this.ctlAuditFlow.NextPerson == BLL.Const._Null) + //{ + // ShowNotify("请选择下一步办理人!", MessageBoxIcon.Warning); + // return; + //} + this.SaveData(BLL.Const.BtnSubmit); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 保存数据 + /// + /// + private void SaveData(string type) + { + Model.Emergency_DrillRecordList_Unit DrillRecordList = new Model.Emergency_DrillRecordList_Unit + { + DrillRecordCode = this.txtDrillRecordCode.Text.Trim(), + DrillRecordName = this.txtDrillRecordName.Text.Trim(), + DrillRecordDate = Funs.GetNewDateTime(this.txtDrillRecordDate.Text.Trim()), + DrillRecordType = this.drpDrillRecordType.SelectedValue, + DrillRecordContents = HttpUtility.HtmlEncode(this.txtDrillRecordContents.Text), + JointPersonNum = Funs.GetNewIntOrZero(this.txtJointPersonNum.Text.Trim()), + DrillCost = Funs.GetNewDecimalOrZero(this.txtDrillCost.Text.Trim()) + }; + //参与单位 + DrillRecordList.UnitIds = this.UnitId; + DrillRecordList.UnitNames = this.txtUnit.Text; + + ////单据状态 + DrillRecordList.States = BLL.Const.State_2; + //if (type == BLL.Const.BtnSubmit) + //{ + // DrillRecordList.States = this.ctlAuditFlow.NextStep; + //} + if (!string.IsNullOrEmpty(this.DrillRecordListId)) + { + DrillRecordList.DrillRecordListId = this.DrillRecordListId; + BLL.UnitDrillRecordListService.UpdateDrillRecordList(DrillRecordList); + BLL.LogService.AddSys_Log(this.CurrUser, DrillRecordList.DrillRecordCode, DrillRecordList.DrillRecordListId, BLL.Const.UnitDrillRecordListMenuId, BLL.Const.BtnModify); + } + else + { + this.DrillRecordListId = SQLHelper.GetNewID(typeof(Model.Emergency_DrillRecordList_Unit)); + DrillRecordList.CompileMan = this.CurrUser.PersonId; + DrillRecordList.DrillRecordListId = this.DrillRecordListId; + BLL.UnitDrillRecordListService.AddDrillRecordList(DrillRecordList); + BLL.LogService.AddSys_Log(this.CurrUser, DrillRecordList.DrillRecordCode, DrillRecordList.DrillRecordListId, BLL.Const.UnitDrillRecordListMenuId, BLL.Const.BtnAdd); + } + ////保存流程审核数据 + //this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.UnitDrillRecordListMenuId, this.DrillRecordListId, (type == BLL.Const.BtnSubmit ? true : false), DrillRecordList.DrillRecordName, "../Emergency/DrillRecordListView.aspx?DrillRecordListId={0}"); + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.DrillRecordListId)) + { + SaveData(BLL.Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/DrillRecordListAttachUrl&menuId={1}", DrillRecordListId, BLL.Const.UnitDrillRecordListMenuId))); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs new file mode 100644 index 00000000..619a91aa --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Emergency +{ + + + public partial class DrillRecordListEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtDrillRecordCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillRecordCode; + + /// + /// txtDrillRecordName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillRecordName; + + /// + /// txtDrillRecordDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtDrillRecordDate; + + /// + /// txtUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnit; + + /// + /// drpDrillRecordType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpDrillRecordType; + + /// + /// txtJointPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtJointPersonNum; + + /// + /// txtDrillCost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDrillCost; + + /// + /// txtDrillRecordContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtDrillRecordContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx new file mode 100644 index 00000000..bf17a331 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx @@ -0,0 +1,72 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillRecordListView.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Emergency.DrillRecordListView" ValidateRequest="false" %> + +<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> + + + + + + 查看应急演练 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx.cs new file mode 100644 index 00000000..f0f9ad5c --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx.cs @@ -0,0 +1,90 @@ +using System; +using System.Linq; +using System.Web; + +namespace FineUIPro.Web.ZHGL.Emergency +{ + public partial class DrillRecordListView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string DrillRecordListId + { + get + { + return (string)ViewState["DrillRecordListId"]; + } + set + { + ViewState["DrillRecordListId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.DrillRecordListId = Request.Params["DrillRecordListId"]; + if (!string.IsNullOrEmpty(this.DrillRecordListId)) + { + Model.Emergency_DrillRecordList_Unit DrillRecordList = BLL.UnitDrillRecordListService.GetDrillRecordListById(this.DrillRecordListId); + if (DrillRecordList != null) + { + ///读取编号 + this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.DrillRecordListId); + this.txtDrillRecordName.Text = DrillRecordList.DrillRecordName; + this.txtDrillRecordDate.Text = string.Format("{0:yyyy-MM-dd}", DrillRecordList.DrillRecordDate); + this.txtUnits.Text = DrillRecordList.UnitNames; + if (!string.IsNullOrEmpty(DrillRecordList.DrillRecordType)) + { + Model.Sys_Const c = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_DrillRecordType).FirstOrDefault(x => x.ConstValue == DrillRecordList.DrillRecordType); + if (c != null) + { + this.txtDrillRecordType.Text = c.ConstText; + } + } + if (DrillRecordList.JointPersonNum != null) + { + this.txtJointPersonNum.Text = DrillRecordList.JointPersonNum.ToString(); + } + if (DrillRecordList.DrillCost != null) + { + this.txtDrillCost.Text = DrillRecordList.DrillCost.ToString(); + } + this.txtDrillRecordContents.Text = HttpUtility.HtmlDecode(DrillRecordList.DrillRecordContents); + } + } + + ///初始化审核菜单 + //this.ctlAuditFlow.MenuId = BLL.Const.UnitDrillRecordListMenuId; + //this.ctlAuditFlow.DataId = this.DrillRecordListId; + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.DrillRecordListId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/DrillRecordListAttachUrl&menuId={1}&type=-1", DrillRecordListId, BLL.Const.UnitDrillRecordListMenuId))); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx.designer.cs new file mode 100644 index 00000000..a07c52e6 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListView.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Emergency +{ + + + public partial class DrillRecordListView + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtDrillRecordCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillRecordCode; + + /// + /// txtDrillRecordName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillRecordName; + + /// + /// txtDrillRecordDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillRecordDate; + + /// + /// txtUnits 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtUnits; + + /// + /// txtDrillRecordType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillRecordType; + + /// + /// txtJointPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtJointPersonNum; + + /// + /// txtDrillCost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillCost; + + /// + /// txtDrillRecordContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtDrillRecordContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx new file mode 100644 index 00000000..883e5769 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx @@ -0,0 +1,132 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmergencyList.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Emergency.EmergencyList" %> + + + + + 应急预案管理清单 + + + +
+ + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + --%> + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs new file mode 100644 index 00000000..c674f4c9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs @@ -0,0 +1,277 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.Emergency +{ + public partial class EmergencyList : PageBase + { + /// + /// 项目id + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + this.UnitId = Const.UnitId_SEDIN; + //BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true); + //if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + //{ + // this.drpUnitId.SelectedValue = this.CurrUser.UnitId; + // this.drpUnitId.Enabled = false; + //} + this.btnNew.OnClientClick = Window1.GetShowReference("EmergencyListEdit.aspx") + "return false;"; + + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT EmergencyList.EmergencyListId,EmergencyList.ProjectId,CodeRecords.Code AS EmergencyCode,EmergencyList.UnitId,EmergencyList.EmergencyName,EmergencyList.CompileDate,EmergencyList.CompileMan,Users.PersonName AS CompileManName,EmergencyType.EmergencyTypeName,EmergencyList.VersionCode,Unit.UnitName,EmergencyList.States,AuditMan.PersonName AS AuditMan,ApproveMan.PersonName AS ApproveMan " + + @" ,(CASE WHEN EmergencyList.States = " + BLL.Const.State_0 + " OR EmergencyList.States IS NULL THEN '待['+OperateUser.PersonName+']提交' WHEN EmergencyList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName" + + @" FROM Emergency_EmergencyList_Unit AS EmergencyList " + + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON EmergencyList.EmergencyListId=CodeRecords.DataId " + + @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON EmergencyList.EmergencyListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1" + + @" LEFT JOIN Person_Persons AS OperateUser ON FlowOperate.OperaterId=OperateUser.PersonId" + + @" LEFT JOIN Base_Unit AS Unit ON EmergencyList.UnitId=Unit.UnitId " + + @" LEFT JOIN Base_EmergencyType AS EmergencyType ON EmergencyList.EmergencyTypeId=EmergencyType.EmergencyTypeId" + + @" LEFT JOIN Person_Persons AS AuditMan ON AuditMan.PersonId=EmergencyList.AuditMan" + + @" LEFT JOIN Person_Persons AS ApproveMan ON ApproveMan.PersonId=EmergencyList.ApproveMan" + + @" LEFT JOIN Person_Persons AS Users ON EmergencyList.CompileMan=Users.PersonId WHERE 1=1 "; + List listStr = new List(); + strSql += " AND EmergencyList.UnitId = @UnitId"; + if (!string.IsNullOrEmpty(this.UnitId)) ///是否文件柜查看页面传项目值 + { + listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + strSql += " AND EmergencyList.States = @States"; ///状态为已完成 + listStr.Add(new SqlParameter("@States", BLL.Const.State_2)); + } + else + { + listStr.Add(new SqlParameter("@UnitId", this.UnitId)); + } + + if (!string.IsNullOrEmpty(this.txtEmergencyCode.Text.Trim())) + { + strSql += " AND EmergencyCode LIKE @EmergencyCode"; + listStr.Add(new SqlParameter("@EmergencyCode", "%" + this.txtEmergencyCode.Text.Trim() + "%")); + } + //if (this.drpUnitId.SelectedValue != BLL.Const._Null) + //{ + // strSql += " AND EmergencyList.UnitId = @UnitId"; + // listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim())); + //} + if (!string.IsNullOrEmpty(this.txtEmergencyName.Text.Trim())) + { + strSql += " AND EmergencyList.EmergencyName LIKE @EmergencyName"; + listStr.Add(new SqlParameter("@EmergencyName", "%" + this.txtEmergencyName.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 分页 排序 + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + var Emergency = BLL.UnitEmergencyListService.GetEmergencyListById(id); + if (Emergency != null) + { + if (this.btnMenuEdit.Hidden || Emergency.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EmergencyListView.aspx?EmergencyListId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EmergencyListEdit.aspx?EmergencyListId={0}", id, "编辑 - "))); + } + } + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var EmergencyList = BLL.UnitEmergencyListService.GetEmergencyListById(rowID); + if (EmergencyList != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, EmergencyList.EmergencyCode, EmergencyList.EmergencyListId, BLL.Const.UnitEmergencyListMenuId, BLL.Const.BtnDelete); + + BLL.UnitEmergencyListService.DeleteEmergencyListById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.UnitEmergencyListMenuId); + 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; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("应急预案管理清单" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs new file mode 100644 index 00000000..8740591a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Emergency +{ + + + public partial class EmergencyList + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtEmergencyCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEmergencyCode; + + /// + /// txtEmergencyName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEmergencyName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx new file mode 100644 index 00000000..cc5284bf --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx @@ -0,0 +1,93 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmergencyListEdit.aspx.cs" + Inherits="FineUIPro.Web.ZHGL.Emergency.EmergencyListEdit" ValidateRequest="false" %> +<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> + + + + + 编辑应急预案管理清单 + + + +
+ + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + <%-- + + + --%> + + + + + + + + + <%-- + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.cs new file mode 100644 index 00000000..0a484f1a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.cs @@ -0,0 +1,210 @@ +using BLL; +using System; +using System.Web; + +namespace FineUIPro.Web.ZHGL.Emergency +{ + public partial class EmergencyListEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string EmergencyListId + { + get + { + return (string)ViewState["EmergencyListId"]; + } + set + { + ViewState["EmergencyListId"] = value; + } + } + /// + /// 单位 + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.InitDropDownList(); + + this.EmergencyListId = Request.Params["EmergencyListId"]; + if (!string.IsNullOrEmpty(this.EmergencyListId)) + { + Model.Emergency_EmergencyList_Unit EmergencyList = BLL.UnitEmergencyListService.GetEmergencyListById(this.EmergencyListId); + if (EmergencyList != null) + { + ///读取编号 + this.txtEmergencyCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.EmergencyListId); + this.txtEmergencyName.Text = EmergencyList.EmergencyName; + txtUnit.Text = BLL.UnitService.GetUnitNameByUnitId(EmergencyList.UnitId); + if (!string.IsNullOrEmpty(EmergencyList.EmergencyTypeId)) + { + this.drpEmergencyType.SelectedValue = EmergencyList.EmergencyTypeId; + } + this.txtVersionCode.Text = EmergencyList.VersionCode; + if (!string.IsNullOrEmpty(EmergencyList.CompileMan)) + { + this.drpCompileMan.SelectedValue = EmergencyList.CompileMan; + } + this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", EmergencyList.CompileDate); + + this.txtEmergencyContents.Text = HttpUtility.HtmlDecode(EmergencyList.EmergencyContents); + } + } + else + { + this.drpCompileMan.SelectedValue = this.CurrUser.PersonId; + this.txtVersionCode.Text = "V1.0"; + this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + //var codeTemplateRule = BLL.ProjectData_CodeTemplateRuleService.GetProjectData_CodeTemplateRuleByMenuIdProjectId(BLL.Const.UnitEmergencyListMenuId, this.ProjectId); + //if (codeTemplateRule != null) + //{ + // this.txtEmergencyContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template); + //} + ////自动生成编码 + this.txtEmergencyCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitEmergencyListMenuId, null, this.CurrUser.UnitId); + this.txtEmergencyName.Text = this.SimpleForm1.Title; + } + + ///初始化审核菜单 + //this.ctlAuditFlow.MenuId = BLL.Const.UnitEmergencyListMenuId; + //this.ctlAuditFlow.DataId = this.EmergencyListId; + //this.ctlAuditFlow.ProjectId = this.ProjectId; + //this.ctlAuditFlow.UnitId = this.CurrUser.UnitId; + } + } + #endregion + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + var thisUnit = UnitService.GetUnitByUnitId(Const.UnitId_SEDIN); + if (thisUnit != null) + { + this.txtUnit.Text = thisUnit.UnitName; + this.UnitId = thisUnit.UnitId; + } + // BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); + BLL.Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpCompileMan, this.UnitId, null, true); + BLL.EmergencyTypeService.InitEmergencyTypeDropDownList(this.drpEmergencyType, true); + } + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + this.SaveData(BLL.Const.BtnSave); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + //if (this.ctlAuditFlow.NextStep == BLL.Const.State_1 && this.ctlAuditFlow.NextPerson == BLL.Const._Null) + //{ + // ShowNotify("请选择下一步办理人!", MessageBoxIcon.Warning); + // return; + //} + this.SaveData(BLL.Const.BtnSubmit); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 保存数据 + /// + /// + private void SaveData(string type) + { + Model.Emergency_EmergencyList_Unit EmergencyList = new Model.Emergency_EmergencyList_Unit + { + UnitId = this.UnitId, + EmergencyCode = this.txtEmergencyCode.Text.Trim(), + EmergencyName = this.txtEmergencyName.Text.Trim() + }; + + if (this.drpEmergencyType.SelectedValue != BLL.Const._Null) + { + EmergencyList.EmergencyTypeId = this.drpEmergencyType.SelectedValue; + } + EmergencyList.VersionCode = this.txtVersionCode.Text.Trim(); + EmergencyList.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim()); + if (this.drpCompileMan.SelectedValue!=BLL.Const._Null) + { + EmergencyList.CompileMan = this.drpCompileMan.SelectedValue; + } + EmergencyList.EmergencyContents = HttpUtility.HtmlEncode(this.txtEmergencyContents.Text); + + ////单据状态 + EmergencyList.States = BLL.Const.State_2; + //if (type == BLL.Const.BtnSubmit) + //{ + // EmergencyList.States = this.ctlAuditFlow.NextStep; + //} + if (!string.IsNullOrEmpty(this.EmergencyListId)) + { + EmergencyList.EmergencyListId = this.EmergencyListId; + BLL.UnitEmergencyListService.UpdateEmergencyList(EmergencyList); + BLL.LogService.AddSys_Log(this.CurrUser, EmergencyList.EmergencyCode, EmergencyList.EmergencyListId, BLL.Const.UnitEmergencyListMenuId, BLL.Const.BtnModify); + } + else + { + this.EmergencyListId = SQLHelper.GetNewID(typeof(Model.Emergency_EmergencyList_Unit)); + EmergencyList.EmergencyListId = this.EmergencyListId; + BLL.UnitEmergencyListService.AddEmergencyList(EmergencyList); + BLL.LogService.AddSys_Log(this.CurrUser, EmergencyList.EmergencyCode, EmergencyList.EmergencyListId, BLL.Const.UnitEmergencyListMenuId, BLL.Const.BtnAdd); + } + ////保存流程审核数据 + //this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.UnitEmergencyListMenuId, this.EmergencyListId, (type == BLL.Const.BtnSubmit ? true : false), EmergencyList.EmergencyName, "../Emergency/EmergencyListView.aspx?EmergencyListId={0}"); + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.EmergencyListId)) + { + SaveData(BLL.Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/EmergencyListAttachUrl&menuId={1}", EmergencyListId,BLL.Const.UnitEmergencyListMenuId))); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.designer.cs new file mode 100644 index 00000000..9936dc2b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Emergency +{ + + + public partial class EmergencyListEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtEmergencyCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEmergencyCode; + + /// + /// txtEmergencyName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEmergencyName; + + /// + /// drpEmergencyType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpEmergencyType; + + /// + /// txtVersionCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVersionCode; + + /// + /// txtUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnit; + + /// + /// drpCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCompileMan; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompileDate; + + /// + /// txtEmergencyContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtEmergencyContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx new file mode 100644 index 00000000..e1ebea29 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx @@ -0,0 +1,75 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmergencyListView.aspx.cs" + Inherits="FineUIPro.Web.ZHGL.Emergency.EmergencyListView" ValidateRequest="false" %> +<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> + + + + + 编辑应急预案管理清单 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + --%> + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.cs new file mode 100644 index 00000000..5e4d6951 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; + +namespace FineUIPro.Web.ZHGL.Emergency +{ + public partial class EmergencyListView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string EmergencyListId + { + get + { + return (string)ViewState["EmergencyListId"]; + } + set + { + ViewState["EmergencyListId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.EmergencyListId = Request.Params["EmergencyListId"]; + if (!string.IsNullOrEmpty(this.EmergencyListId)) + { + Model.Emergency_EmergencyList_Unit EmergencyList = BLL.UnitEmergencyListService.GetEmergencyListById(this.EmergencyListId); + if (EmergencyList != null) + { + ///读取编号 + this.txtEmergencyCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.EmergencyListId); + this.txtEmergencyName.Text = EmergencyList.EmergencyName; + this.drpUnit.Text = BLL.UnitService.GetUnitNameByUnitId(EmergencyList.UnitId); + var emergencyType =BLL.EmergencyTypeService.GetEmergencyTypeById(EmergencyList.EmergencyTypeId); + if(emergencyType != null) + { + this.drpEmergencyType.Text = emergencyType.EmergencyTypeName; + } + this.txtVersionCode.Text = EmergencyList.VersionCode; + this.drpCompileMan.Text = BLL.Person_PersonsService.GetPersonsNameById(EmergencyList.CompileMan); + this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", EmergencyList.CompileDate); + this.txtEmergencyContents.Text = HttpUtility.HtmlDecode(EmergencyList.EmergencyContents); + } + } + + ///初始化审核菜单 + //this.ctlAuditFlow.MenuId = BLL.Const.UnitEmergencyListMenuId; + //this.ctlAuditFlow.DataId = this.EmergencyListId; + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.EmergencyListId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/EmergencyListAttachUrl&menuId={1}&type=-1", EmergencyListId, BLL.Const.UnitEmergencyListMenuId))); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.designer.cs new file mode 100644 index 00000000..ec09a7f2 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyListView.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Emergency +{ + + + public partial class EmergencyListView + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtEmergencyCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEmergencyCode; + + /// + /// txtEmergencyName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEmergencyName; + + /// + /// drpEmergencyType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox drpEmergencyType; + + /// + /// txtVersionCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVersionCode; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox drpUnit; + + /// + /// drpCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox drpCompileMan; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileDate; + + /// + /// lbtemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbtemp; + + /// + /// txtEmergencyContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtEmergencyContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx new file mode 100644 index 00000000..bb7cd118 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx @@ -0,0 +1,123 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanySafetyMeeting.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Meeting.CompanySafetyMeeting" %> + + + + + + 企业安委会 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs new file mode 100644 index 00000000..ebfc66ad --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs @@ -0,0 +1,256 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Meeting +{ + public partial class CompanySafetyMeeting : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + this.btnNew.OnClientClick = Window1.GetShowReference("CompanySafetyMeetingEdit.aspx") + "return false;"; + + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT CompanySafetyMeeting.CompanySafetyMeetingId,CodeRecords.Code AS CompanySafetyMeetingCode,CompanySafetyMeeting.CompanySafetyMeetingName,CompanySafetyMeeting.CompanySafetyMeetingDate,CompanySafetyMeeting.CompileMan,CompanySafetyMeeting.CompanySafetyMeetingContents,CompanySafetyMeeting.CompileDate,CompanySafetyMeeting.MeetingHours,CompanySafetyMeeting.MeetingHostMan,CompanySafetyMeeting.AttentPersonNum,CompanySafetyMeeting.AttentPerson " + + @" FROM Meeting_CompanySafetyMeeting AS CompanySafetyMeeting " + + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON CompanySafetyMeeting.CompanySafetyMeetingId=CodeRecords.DataId " + + @" LEFT JOIN Person_Persons AS Users ON CompanySafetyMeeting.CompileMan=Users.PersonId WHERE 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtCompanySafetyMeetingCode.Text.Trim())) + { + strSql += " AND CompanySafetyMeetingCode LIKE @CompanySafetyMeetingCode"; + listStr.Add(new SqlParameter("@CompanySafetyMeetingCode", "%" + this.txtCompanySafetyMeetingCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtCompanySafetyMeetingName.Text.Trim())) + { + strSql += " AND CompanySafetyMeetingName LIKE @CompanySafetyMeetingName"; + listStr.Add(new SqlParameter("@CompanySafetyMeetingName", "%" + this.txtCompanySafetyMeetingName.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + 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) + { + BindGrid(); + } + + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + var meeting = BLL.CompanySafetyMeetingService.GetCompanySafetyMeetingById(id); + if (meeting != null) + { + if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CompanySafetyMeetingView.aspx?CompanySafetyMeetingId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CompanySafetyMeetingEdit.aspx?CompanySafetyMeetingId={0}", id, "编辑 - "))); + } + } + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var meet = BLL.CompanySafetyMeetingService.GetCompanySafetyMeetingById(rowID); + if (meet != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, meet.CompanySafetyMeetingCode, meet.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId, BLL.Const.BtnDelete); + + BLL.CompanySafetyMeetingService.DeleteCompanySafetyMeetingById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.CompanySafetyMeetingMenuId); + 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; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("企业安委会" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btSearch_Click(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.designer.cs new file mode 100644 index 00000000..ad13bf3a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.designer.cs @@ -0,0 +1,197 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Meeting +{ + + + public partial class CompanySafetyMeeting + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtCompanySafetyMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySafetyMeetingCode; + + /// + /// txtCompanySafetyMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySafetyMeetingName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx new file mode 100644 index 00000000..8efbc986 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx @@ -0,0 +1,90 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanySafetyMeetingEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Meeting.CompanySafetyMeetingEdit" ValidateRequest="false" %> + + + + + + + 编辑企业安委会 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx.cs new file mode 100644 index 00000000..f6a80743 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx.cs @@ -0,0 +1,201 @@ +using BLL; +using System; +using System.Web; + +namespace FineUIPro.Web.ZHGL.Meeting +{ + public partial class CompanySafetyMeetingEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string CompanySafetyMeetingId + { + get + { + return (string)ViewState["CompanySafetyMeetingId"]; + } + set + { + ViewState["CompanySafetyMeetingId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.InitDropDownList(); + this.CompanySafetyMeetingId = Request.Params["CompanySafetyMeetingId"]; + if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting = BLL.CompanySafetyMeetingService.GetCompanySafetyMeetingById(this.CompanySafetyMeetingId); + if (CompanySafetyMeeting != null) + { + this.txtCompanySafetyMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.CompanySafetyMeetingId); + this.txtCompanySafetyMeetingName.Text = CompanySafetyMeeting.CompanySafetyMeetingName; + this.txtCompanySafetyMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", CompanySafetyMeeting.CompanySafetyMeetingDate); + if (!string.IsNullOrEmpty(CompanySafetyMeeting.CompileMan)) + { + this.drpCompileMan.SelectedValue = CompanySafetyMeeting.CompileMan; + } + if (CompanySafetyMeeting.AttentPersonNum != null) + { + this.txtAttentPersonNum.Text = CompanySafetyMeeting.AttentPersonNum.ToString(); + } + this.txtCompanySafetyMeetingContents.Text = HttpUtility.HtmlDecode(CompanySafetyMeeting.CompanySafetyMeetingContents); + this.txtMeetingHours.Text = Convert.ToString(CompanySafetyMeeting.MeetingHours); + this.txtMeetingHostMan.Text = CompanySafetyMeeting.MeetingHostMan; + this.txtAttentPerson.Text = CompanySafetyMeeting.AttentPerson; + } + } + else + { + this.drpCompileMan.SelectedValue = this.CurrUser.PersonId; + this.txtCompanySafetyMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + var codeTemplateRule = BLL.SysConstSetService.GetCodeTemplateRuleByMenuId(BLL.Const.ProjectWeekMeetingMenuId); + if (codeTemplateRule != null) + { + this.txtCompanySafetyMeetingContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template); + } + ////自动生成编码 + this.txtCompanySafetyMeetingCode.Text = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.CompanySafetyMeetingMenuId, null, this.CurrUser.UnitId); + this.txtCompanySafetyMeetingName.Text = this.SimpleForm1.Title; + this.txtMeetingHours.Text = "1"; + this.txtMeetingHostMan.Text = this.CurrUser.PersonName; + } + } + } + #endregion + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpCompileMan, Const.UnitId_SEDIN, null, true); + } + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + this.SaveData(BLL.Const.BtnSave); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 保存数据 + /// + /// + private void SaveData(string type) + { + Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting = new Model.Meeting_CompanySafetyMeeting + { + CompanySafetyMeetingCode = this.txtCompanySafetyMeetingCode.Text.Trim(), + CompanySafetyMeetingName = this.txtCompanySafetyMeetingName.Text.Trim(), + CompanySafetyMeetingDate = Funs.GetNewDateTime(this.txtCompanySafetyMeetingDate.Text.Trim()) + }; + if (this.drpCompileMan.SelectedValue != BLL.Const._Null) + { + CompanySafetyMeeting.CompileMan = this.drpCompileMan.SelectedValue; + } + CompanySafetyMeeting.AttentPersonNum = Funs.GetNewIntOrZero(this.txtAttentPersonNum.Text.Trim()); + CompanySafetyMeeting.CompanySafetyMeetingContents = HttpUtility.HtmlEncode(this.txtCompanySafetyMeetingContents.Text); + CompanySafetyMeeting.CompileDate = DateTime.Now; + CompanySafetyMeeting.MeetingHours = Funs.GetNewInt(this.txtMeetingHours.Text.Trim()); + CompanySafetyMeeting.MeetingHostMan = this.txtMeetingHostMan.Text.Trim(); + CompanySafetyMeeting.AttentPerson = this.txtAttentPerson.Text.Trim(); + if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + CompanySafetyMeeting.CompanySafetyMeetingId = this.CompanySafetyMeetingId; + BLL.CompanySafetyMeetingService.UpdateCompanySafetyMeeting(CompanySafetyMeeting); + BLL.LogService.AddSys_Log(this.CurrUser, CompanySafetyMeeting.CompanySafetyMeetingCode, CompanySafetyMeeting.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId, BLL.Const.BtnModify); + } + else + { + this.CompanySafetyMeetingId = SQLHelper.GetNewID(typeof(Model.Meeting_CompanySafetyMeeting)); + CompanySafetyMeeting.CompanySafetyMeetingId = this.CompanySafetyMeetingId; + BLL.CompanySafetyMeetingService.AddCompanySafetyMeeting(CompanySafetyMeeting); + BLL.LogService.AddSys_Log(this.CurrUser, CompanySafetyMeeting.CompanySafetyMeetingCode, CompanySafetyMeeting.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId, BLL.Const.BtnAdd); + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + SaveData(BLL.Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}", this.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId))); + } + #endregion + + protected void btnAttachUrl1_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + SaveData(Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}&strParam=1", this.CompanySafetyMeetingId, Const.CompanySafetyMeetingMenuId))); + } + + protected void btnAttachUrl2_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + SaveData(Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}&strParam=2", this.CompanySafetyMeetingId, Const.CompanySafetyMeetingMenuId))); + } + + /// + /// 计算参会人数 + /// + /// + /// + protected void txtAttentPerson_Blur(object sender, EventArgs e) + { + string str = this.txtAttentPerson.Text.Trim(); + if (!string.IsNullOrEmpty(str)) + { + if (str.Contains(",")) + { + this.txtAttentPersonNum.Text = str.Split(',').Length.ToString(); + } + else if (str.Contains(",")) + { + this.txtAttentPersonNum.Text = str.Split(',').Length.ToString(); + } + else if (str.Contains(";")) + { + this.txtAttentPersonNum.Text = str.Split(';').Length.ToString(); + } + else if (str.Contains(";")) + { + this.txtAttentPersonNum.Text = str.Split(';').Length.ToString(); + } + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx.designer.cs new file mode 100644 index 00000000..fc0ceade --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingEdit.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Meeting { + + + public partial class CompanySafetyMeetingEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtCompanySafetyMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySafetyMeetingCode; + + /// + /// txtCompanySafetyMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySafetyMeetingName; + + /// + /// txtCompanySafetyMeetingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompanySafetyMeetingDate; + + /// + /// drpCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCompileMan; + + /// + /// txtMeetingHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMeetingHours; + + /// + /// txtMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMeetingHostMan; + + /// + /// txtAttentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAttentPersonNum; + + /// + /// txtAttentPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAttentPerson; + + /// + /// txtCompanySafetyMeetingContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtCompanySafetyMeetingContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnAttachUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl1; + + /// + /// btnAttachUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx new file mode 100644 index 00000000..e354fe95 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx @@ -0,0 +1,84 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanySafetyMeetingView.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Meeting.CompanySafetyMeetingView" ValidateRequest="false" %> + + + + + + + 查看企业安委会 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.cs new file mode 100644 index 00000000..a7ff5b27 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.cs @@ -0,0 +1,95 @@ +using BLL; +using System; +using System.Web; + +namespace FineUIPro.Web.ZHGL.Meeting +{ + public partial class CompanySafetyMeetingView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string CompanySafetyMeetingId + { + get + { + return (string)ViewState["CompanySafetyMeetingId"]; + } + set + { + ViewState["CompanySafetyMeetingId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.CompanySafetyMeetingId = Request.Params["CompanySafetyMeetingId"]; + if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting = BLL.CompanySafetyMeetingService.GetCompanySafetyMeetingById(this.CompanySafetyMeetingId); + if (CompanySafetyMeeting != null) + { + this.txtCompanySafetyMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.CompanySafetyMeetingId); + this.txtCompanySafetyMeetingName.Text = CompanySafetyMeeting.CompanySafetyMeetingName; + if (CompanySafetyMeeting.CompanySafetyMeetingDate != null) + { + this.txtCompanySafetyMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", CompanySafetyMeeting.CompanySafetyMeetingDate); + } + this.txtCompileMan.Text = Person_PersonsService.GetPersonsNameById(CompanySafetyMeeting.CompileMan); + if (CompanySafetyMeeting.AttentPersonNum != null) + { + this.txtAttentPersonNum.Text = CompanySafetyMeeting.AttentPersonNum.ToString(); + } + this.txtCompanySafetyMeetingContents.Text = HttpUtility.HtmlDecode(CompanySafetyMeeting.CompanySafetyMeetingContents); + this.txtMeetingHours.Text = Convert.ToString(CompanySafetyMeeting.MeetingHours); + this.txtMeetingHostMan.Text = CompanySafetyMeeting.MeetingHostMan; + this.txtAttentPerson.Text = CompanySafetyMeeting.AttentPerson; + } + } + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}&type=-1", this.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId))); + } + } + #endregion + + protected void btnAttachUrl1_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}&strParam=1&type=-1", this.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId))); + } + } + + protected void btnAttachUrl2_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}&strParam=2&type=-1", this.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId))); + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.designer.cs new file mode 100644 index 00000000..b542d8a4 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.designer.cs @@ -0,0 +1,195 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Meeting { + + + public partial class CompanySafetyMeetingView { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtCompanySafetyMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySafetyMeetingCode; + + /// + /// txtCompanySafetyMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySafetyMeetingName; + + /// + /// txtCompanySafetyMeetingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySafetyMeetingDate; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileMan; + + /// + /// txtMeetingHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMeetingHours; + + /// + /// txtMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMeetingHostMan; + + /// + /// txtAttentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAttentPersonNum; + + /// + /// txtAttentPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAttentPerson; + + /// + /// txtCompanySafetyMeetingContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtCompanySafetyMeetingContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnAttachUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl1; + + /// + /// btnAttachUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx new file mode 100644 index 00000000..db2b014a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx @@ -0,0 +1,123 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanySpecialMeeting.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Meeting.CompanySpecialMeeting" %> + + + + + + 企业专题会 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs new file mode 100644 index 00000000..33148376 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs @@ -0,0 +1,256 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Meeting +{ + public partial class CompanySpecialMeeting : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + this.btnNew.OnClientClick = Window1.GetShowReference("CompanySpecialMeetingEdit.aspx") + "return false;"; + + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT CompanySpecialMeeting.CompanySpecialMeetingId,CodeRecords.Code AS CompanySpecialMeetingCode,CompanySpecialMeeting.CompanySpecialMeetingName,CompanySpecialMeeting.CompanySpecialMeetingDate,CompanySpecialMeeting.CompileMan,CompanySpecialMeeting.CompanySpecialMeetingContents,CompanySpecialMeeting.CompileDate,CompanySpecialMeeting.MeetingHours,CompanySpecialMeeting.MeetingHostMan,CompanySpecialMeeting.AttentPersonNum,CompanySpecialMeeting.AttentPerson + FROM Meeting_CompanySpecialMeeting AS CompanySpecialMeeting + LEFT JOIN Sys_CodeRecords AS CodeRecords ON CompanySpecialMeeting.CompanySpecialMeetingId=CodeRecords.DataId + LEFT JOIN Person_Persons AS Users ON CompanySpecialMeeting.CompileMan=Users.PersonId WHERE 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtCompanySpecialMeetingCode.Text.Trim())) + { + strSql += " AND CompanySpecialMeetingCode LIKE @CompanySpecialMeetingCode"; + listStr.Add(new SqlParameter("@CompanySpecialMeetingCode", "%" + this.txtCompanySpecialMeetingCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtCompanySpecialMeetingName.Text.Trim())) + { + strSql += " AND CompanySpecialMeetingName LIKE @CompanySpecialMeetingName"; + listStr.Add(new SqlParameter("@CompanySpecialMeetingName", "%" + this.txtCompanySpecialMeetingName.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + 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) + { + BindGrid(); + } + + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + var meeting = BLL.CompanySpecialMeetingService.GetCompanySpecialMeetingById(id); + if (meeting != null) + { + if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CompanySpecialMeetingView.aspx?CompanySpecialMeetingId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CompanySpecialMeetingEdit.aspx?CompanySpecialMeetingId={0}", id, "编辑 - "))); + } + } + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var meet = BLL.CompanySpecialMeetingService.GetCompanySpecialMeetingById(rowID); + if (meet != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, meet.CompanySpecialMeetingCode, meet.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId, BLL.Const.BtnDelete); + + BLL.CompanySpecialMeetingService.DeleteCompanySpecialMeetingById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.CompanySpecialMeetingMenuId); + 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; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("企业专题会" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btSearch_Click(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.designer.cs new file mode 100644 index 00000000..e409a07a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.designer.cs @@ -0,0 +1,197 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Meeting +{ + + + public partial class CompanySpecialMeeting + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtCompanySpecialMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySpecialMeetingCode; + + /// + /// txtCompanySpecialMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySpecialMeetingName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx new file mode 100644 index 00000000..edde247e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx @@ -0,0 +1,89 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanySpecialMeetingEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Meeting.CompanySpecialMeetingEdit" ValidateRequest="false" %> + + + + + + 编辑企业专题会 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx.cs new file mode 100644 index 00000000..ba60a507 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx.cs @@ -0,0 +1,201 @@ +using BLL; +using System; +using System.Web; + +namespace FineUIPro.Web.ZHGL.Meeting +{ + public partial class CompanySpecialMeetingEdit : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string CompanySpecialMeetingId + { + get + { + return (string)ViewState["CompanySpecialMeetingId"]; + } + set + { + ViewState["CompanySpecialMeetingId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.InitDropDownList(); + this.CompanySpecialMeetingId = Request.Params["CompanySpecialMeetingId"]; + if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting = BLL.CompanySpecialMeetingService.GetCompanySpecialMeetingById(this.CompanySpecialMeetingId); + if (CompanySpecialMeeting != null) + { + this.txtCompanySpecialMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.CompanySpecialMeetingId); + this.txtCompanySpecialMeetingName.Text = CompanySpecialMeeting.CompanySpecialMeetingName; + this.txtCompanySpecialMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", CompanySpecialMeeting.CompanySpecialMeetingDate); + if (!string.IsNullOrEmpty(CompanySpecialMeeting.CompileMan)) + { + this.drpCompileMan.SelectedValue = CompanySpecialMeeting.CompileMan; + } + if (CompanySpecialMeeting.AttentPersonNum != null) + { + this.txtAttentPersonNum.Text = CompanySpecialMeeting.AttentPersonNum.ToString(); + } + this.txtCompanySpecialMeetingContents.Text = HttpUtility.HtmlDecode(CompanySpecialMeeting.CompanySpecialMeetingContents); + this.txtMeetingHours.Text = Convert.ToString(CompanySpecialMeeting.MeetingHours); + this.txtMeetingHostMan.Text = CompanySpecialMeeting.MeetingHostMan; + this.txtAttentPerson.Text = CompanySpecialMeeting.AttentPerson; + } + } + else + { + this.drpCompileMan.SelectedValue = this.CurrUser.PersonId; + this.txtCompanySpecialMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + var codeTemplateRule = BLL.SysConstSetService.GetCodeTemplateRuleByMenuId(BLL.Const.ProjectWeekMeetingMenuId); + if (codeTemplateRule != null) + { + this.txtCompanySpecialMeetingContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template); + } + ////自动生成编码 + this.txtCompanySpecialMeetingCode.Text = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.CompanySpecialMeetingMenuId, null, this.CurrUser.UnitId); + this.txtCompanySpecialMeetingName.Text = this.SimpleForm1.Title; + this.txtMeetingHours.Text = "1"; + this.txtMeetingHostMan.Text = this.CurrUser.PersonName; + } + } + } + #endregion + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpCompileMan, Const.UnitId_SEDIN, null, true); + } + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + this.SaveData(BLL.Const.BtnSave); + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + /// + /// 保存数据 + /// + /// + private void SaveData(string type) + { + Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting = new Model.Meeting_CompanySpecialMeeting + { + CompanySpecialMeetingCode = this.txtCompanySpecialMeetingCode.Text.Trim(), + CompanySpecialMeetingName = this.txtCompanySpecialMeetingName.Text.Trim(), + CompanySpecialMeetingDate = Funs.GetNewDateTime(this.txtCompanySpecialMeetingDate.Text.Trim()) + }; + if (this.drpCompileMan.SelectedValue != BLL.Const._Null) + { + CompanySpecialMeeting.CompileMan = this.drpCompileMan.SelectedValue; + } + CompanySpecialMeeting.AttentPersonNum = Funs.GetNewIntOrZero(this.txtAttentPersonNum.Text.Trim()); + CompanySpecialMeeting.CompanySpecialMeetingContents = HttpUtility.HtmlEncode(this.txtCompanySpecialMeetingContents.Text); + CompanySpecialMeeting.CompileDate = DateTime.Now; + CompanySpecialMeeting.MeetingHours = Funs.GetNewInt(this.txtMeetingHours.Text.Trim()); + CompanySpecialMeeting.MeetingHostMan = this.txtMeetingHostMan.Text.Trim(); + CompanySpecialMeeting.AttentPerson = this.txtAttentPerson.Text.Trim(); + if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + CompanySpecialMeeting.CompanySpecialMeetingId = this.CompanySpecialMeetingId; + BLL.CompanySpecialMeetingService.UpdateCompanySpecialMeeting(CompanySpecialMeeting); + BLL.LogService.AddSys_Log(this.CurrUser, CompanySpecialMeeting.CompanySpecialMeetingCode, CompanySpecialMeeting.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId, BLL.Const.BtnModify); + } + else + { + this.CompanySpecialMeetingId = SQLHelper.GetNewID(typeof(Model.Meeting_CompanySpecialMeeting)); + CompanySpecialMeeting.CompanySpecialMeetingId = this.CompanySpecialMeetingId; + BLL.CompanySpecialMeetingService.AddCompanySpecialMeeting(CompanySpecialMeeting); + BLL.LogService.AddSys_Log(this.CurrUser, CompanySpecialMeeting.CompanySpecialMeetingCode, CompanySpecialMeeting.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId, BLL.Const.BtnAdd); + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + SaveData(BLL.Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}", this.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId))); + } + #endregion + + protected void btnAttachUrl1_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + SaveData(Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}&strParam=1", this.CompanySpecialMeetingId, Const.CompanySpecialMeetingMenuId))); + } + + protected void btnAttachUrl2_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + SaveData(Const.BtnSave); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}&strParam=2", this.CompanySpecialMeetingId, Const.CompanySpecialMeetingMenuId))); + } + + /// + /// 计算参会人数 + /// + /// + /// + protected void txtAttentPerson_Blur(object sender, EventArgs e) + { + string str = this.txtAttentPerson.Text.Trim(); + if (!string.IsNullOrEmpty(str)) + { + if (str.Contains(",")) + { + this.txtAttentPersonNum.Text = str.Split(',').Length.ToString(); + } + else if (str.Contains(",")) + { + this.txtAttentPersonNum.Text = str.Split(',').Length.ToString(); + } + else if (str.Contains(";")) + { + this.txtAttentPersonNum.Text = str.Split(';').Length.ToString(); + } + else if (str.Contains(";")) + { + this.txtAttentPersonNum.Text = str.Split(';').Length.ToString(); + } + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx.designer.cs new file mode 100644 index 00000000..86af9a07 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingEdit.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Meeting { + + + public partial class CompanySpecialMeetingEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtCompanySpecialMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySpecialMeetingCode; + + /// + /// txtCompanySpecialMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySpecialMeetingName; + + /// + /// txtCompanySpecialMeetingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCompanySpecialMeetingDate; + + /// + /// drpCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCompileMan; + + /// + /// txtMeetingHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMeetingHours; + + /// + /// txtMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMeetingHostMan; + + /// + /// txtAttentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAttentPersonNum; + + /// + /// txtAttentPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAttentPerson; + + /// + /// txtCompanySpecialMeetingContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtCompanySpecialMeetingContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnAttachUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl1; + + /// + /// btnAttachUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx new file mode 100644 index 00000000..96239165 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx @@ -0,0 +1,84 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanySpecialMeetingView.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Meeting.CompanySpecialMeetingView" ValidateRequest="false" %> + + + + + + + 查看企业专题会 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs new file mode 100644 index 00000000..65b0551d --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs @@ -0,0 +1,96 @@ +using BLL; +using System; +using System.Web; + +namespace FineUIPro.Web.ZHGL.Meeting +{ + public partial class CompanySpecialMeetingView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + public string CompanySpecialMeetingId + { + get + { + return (string)ViewState["CompanySpecialMeetingId"]; + } + set + { + ViewState["CompanySpecialMeetingId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.CompanySpecialMeetingId = Request.Params["CompanySpecialMeetingId"]; + if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting = BLL.CompanySpecialMeetingService.GetCompanySpecialMeetingById(this.CompanySpecialMeetingId); + if (CompanySpecialMeeting != null) + { + this.txtCompanySpecialMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.CompanySpecialMeetingId); + this.txtCompanySpecialMeetingName.Text = CompanySpecialMeeting.CompanySpecialMeetingName; + if (CompanySpecialMeeting.CompanySpecialMeetingDate != null) + { + this.txtCompanySpecialMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", CompanySpecialMeeting.CompanySpecialMeetingDate); + } + + this.txtCompileMan.Text =Person_PersonsService.GetPersonsNameById(CompanySpecialMeeting.CompileMan); + if (CompanySpecialMeeting.AttentPersonNum != null) + { + this.txtAttentPersonNum.Text = CompanySpecialMeeting.AttentPersonNum.ToString(); + } + this.txtCompanySpecialMeetingContents.Text = HttpUtility.HtmlDecode(CompanySpecialMeeting.CompanySpecialMeetingContents); + this.txtMeetingHours.Text = Convert.ToString(CompanySpecialMeeting.MeetingHours); + this.txtMeetingHostMan.Text = CompanySpecialMeeting.MeetingHostMan; + this.txtAttentPerson.Text = CompanySpecialMeeting.AttentPerson; + } + } + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}&type=-1", this.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId))); + } + } + #endregion + + protected void btnAttachUrl1_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}&strParam=1&type=-1", this.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId))); + } + } + + protected void btnAttachUrl2_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}&strParam=2&type=-1", this.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId))); + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.designer.cs new file mode 100644 index 00000000..8e690bf8 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.designer.cs @@ -0,0 +1,195 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Meeting { + + + public partial class CompanySpecialMeetingView { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtCompanySpecialMeetingCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySpecialMeetingCode; + + /// + /// txtCompanySpecialMeetingName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySpecialMeetingName; + + /// + /// txtCompanySpecialMeetingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompanySpecialMeetingDate; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileMan; + + /// + /// txtMeetingHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMeetingHours; + + /// + /// txtMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMeetingHostMan; + + /// + /// txtAttentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAttentPersonNum; + + /// + /// txtAttentPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAttentPerson; + + /// + /// txtCompanySpecialMeetingContents 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HtmlEditor txtCompanySpecialMeetingContents; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// btnAttachUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl1; + + /// + /// btnAttachUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx new file mode 100644 index 00000000..1bbbaa54 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx @@ -0,0 +1,62 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowFileUpload.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.ShowFileUpload" %> + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx.cs new file mode 100644 index 00000000..140521c9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx.cs @@ -0,0 +1,134 @@ +using BLL; +using System; +using System.IO; +using System.Web.UI; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class ShowFileUpload : PageBase + { + #region 定义变量 + /// + /// 附件路径 + /// + public string FullAttachUrl + { + get + { + return (string)ViewState["FullAttachUrl"]; + } + set + { + ViewState["FullAttachUrl"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + LoadData(); + } + } + + private void LoadData() + { + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(FullAttachUrl) + + ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region 附件上传 + /// + /// 附件上传 + /// + /// + /// + protected void btnUpFile_Click(object sender, EventArgs e) + { + if (fuAttachUrl.HasFile) + { + this.lbAttachUrl.Text = fuAttachUrl.ShortFileName; + if (ValidateFileTypes(this.lbAttachUrl.Text)) + { + ShowNotify("无效的文件类型!", MessageBoxIcon.Warning); + return; + } + this.FullAttachUrl = BLL.UploadFileService.UploadAttachment(BLL.Funs.RootPath, this.fuAttachUrl, this.FullAttachUrl, UploadFileService.SuperviseCheckReportFilePath); + if (string.IsNullOrEmpty(this.FullAttachUrl)) + { + ShowNotify("文件名已经存在!", MessageBoxIcon.Warning); + return; + } + else + { + ShowNotify("文件上传成功!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("上传文件不存在!", MessageBoxIcon.Warning); + } + } + + /// + /// 查看附件 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + string filePath = BLL.Funs.RootPath + this.FullAttachUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(filePath); + if (info.Exists) + { + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(filePath, 0, fileSize); + Response.Flush(); + Response.Close(); + this.SimpleForm1.Reset(); + } + else + { + ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "alert('模板不存在,请联系管理员!')", true); + } + } + + /// + /// 删除附件 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + this.fuAttachUrl.Reset(); + this.lbAttachUrl.Text = string.Empty; + this.FullAttachUrl = string.Empty; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx.designer.cs new file mode 100644 index 00000000..1b1cdae1 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise { + + + public partial class ShowFileUpload { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// lbAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbAttachUrl; + + /// + /// templb 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label templb; + + /// + /// btnUpFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpFile; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx new file mode 100644 index 00000000..f31c7804 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx @@ -0,0 +1,98 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowRectifyItem.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.ShowRectifyItem" %> + + + + + + + 安全隐患 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs new file mode 100644 index 00000000..4b846d45 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs @@ -0,0 +1,236 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class ShowRectifyItem : PageBase + { + #region 定义集合 + /// + /// 定义集合 + /// + private static List list = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + list = new List(); + string lists = Request.Params["lists"]; + list = Funs.GetStrListByStr(lists, ','); + InitTreeMenu(); + } + } + #endregion + + #region 加载树 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.trRectify.Nodes.Clear(); + this.trRectify.ShowBorder = false; + this.trRectify.ShowHeader = false; + this.trRectify.EnableIcons = true; + this.trRectify.AutoScroll = true; + this.trRectify.EnableSingleClickExpand = true; + TreeNode rootNode = new TreeNode + { + Text = "作业类别", + NodeID = "0", + Expanded = true + }; + this.trRectify.Nodes.Add(rootNode); + BoundTree(rootNode.Nodes, "0"); + } + + /// + /// 加载树 + /// + /// + /// + private void BoundTree(TreeNodeCollection nodes, string menuId) + { + var dt = BLL.RectifyService.GetRectifyBySupRectifyId(menuId); + if (dt.Count() > 0) + { + TreeNode tn = null; + foreach (var dr in dt) + { + tn = new TreeNode + { + Text = dr.RectifyName, + NodeID = dr.RectifyId, + EnableClickEvent = true + }; + nodes.Add(tn); + BoundTree(tn.Nodes, dr.RectifyId); + } + } + } + #endregion + + #region 树点击事件 + /// + /// tree点击事件 + /// + /// + /// + protected void trRectify_NodeCommand(object sender, TreeCommandEventArgs e) + { + BindGrid(); + } + #endregion + + #region 加载Grid + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = "select * from View_Technique_RectifyItem where RectifyId=@RectifyId and IsPass=@IsPass"; + SqlParameter[] parameter = new SqlParameter[] + { + new SqlParameter("@RectifyId",this.trRectify.SelectedNode.NodeID), + new SqlParameter("@IsPass",true) + }; + 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(); + + if (list.Count() > 0) + { + for (int i = 0; i < Grid1.Rows.Count; i++) + { + string id = Grid1.DataKeys[i][0].ToString(); + if (list.Contains(id)) + { + Grid1.Rows[i].Values[0] = true; + } + } + } + } + #endregion + + #region 过滤表头、分页、排序、关闭窗口 + /// + /// 过滤表头 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid(); + } + + /// + /// + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// Grid1排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + #endregion + + #region 确认按钮 + /// + /// 确认按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (list.Count == 0) + { + ShowNotify("请至少选择一项!", MessageBoxIcon.Warning); + return; + } + string str = string.Empty; + foreach (var item in list) + { + str += item + ","; + } + if (!string.IsNullOrEmpty(str)) + { + str = str.Substring(0, str.LastIndexOf(",")); + } + PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(str) + + ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region Grid行点击事件 + /// + /// Grid1行点击事件 + /// + /// + /// + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + if (e.CommandName == "IsSelected") + { + CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); + if (checkField.GetCheckedState(e.RowIndex)) + { + if (!list.Contains(rowID)) + { + list.Add(rowID); + } + } + else + { + if (list.Contains(rowID)) + { + list.Remove(rowID); + } + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.designer.cs new file mode 100644 index 00000000..fabef587 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise { + + + public partial class ShowRectifyItem { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// trRectify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trRectify; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx new file mode 100644 index 00000000..6d9a26a1 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx @@ -0,0 +1,218 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SubUnitCheckRectifyEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.SubUnitCheckRectifyEdit" Async="true" %> + + + + + + + 安全监督检查报告 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx.cs new file mode 100644 index 00000000..0e67a1ad --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx.cs @@ -0,0 +1,402 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class SubUnitCheckRectifyEdit : PageBase + { + #region 定义变量 + /// + /// 监督检查报告主键 + /// + public string SuperviseCheckReportId + { + get + { + return (string)ViewState["SuperviseCheckReportId"]; + } + set + { + ViewState["SuperviseCheckReportId"] = value; + } + } + + /// + /// 监督评价报告主键 + /// + public string SubUnitCheckRectifyId + { + get + { + return (string)ViewState["SubUnitCheckRectifyId"]; + } + set + { + ViewState["SubUnitCheckRectifyId"] = value; + } + } + + /// + /// 附件路径 + /// + public string FullAttachUrl + { + get + { + return (string)ViewState["FullAttachUrl"]; + } + set + { + ViewState["FullAttachUrl"] = value; + } + } + + /// + /// 定义集合 + /// + private static List subUnitCheckRectifyItems = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + subUnitCheckRectifyItems.Clear(); + this.drpUnitId.SelectedValue = this.CurrUser.UnitId; + this.dpkUpDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + + this.drpUnitId.DataTextField = "UnitName"; + this.drpUnitId.DataValueField = "UnitId"; + this.drpUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + this.drpUnitId.DataBind(); + + this.drpCheckRectType.DataTextField = "ConstText"; + this.drpCheckRectType.DataValueField = "ConstValue"; + this.drpCheckRectType.DataSource = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_CheckRectType); + this.drpCheckRectType.DataBind(); + + this.SuperviseCheckReportId = Request.Params["SuperviseCheckReportId"]; + if (!string.IsNullOrEmpty(this.SuperviseCheckReportId)) + { + Model.Supervise_SubUnitCheckRectify subUnitCheckRectify = BLL.SubUnitCheckRectifyService.GetSubUnitCheckRectifyBySuperviseCheckReportId(this.SuperviseCheckReportId); + if (subUnitCheckRectify != null) + { + this.SubUnitCheckRectifyId = subUnitCheckRectify.SubUnitCheckRectifyId; + if (!string.IsNullOrEmpty(subUnitCheckRectify.UnitId)) + { + this.drpUnitId.SelectedValue = subUnitCheckRectify.UnitId; + } + this.drpCheckRectType.SelectedValue = subUnitCheckRectify.CheckRectType; + if (subUnitCheckRectify.UpDateTime.HasValue) + { + this.dpkUpDateTime.Text = string.Format("{0:yyyy-MM-dd}", subUnitCheckRectify.UpDateTime); + } + if (subUnitCheckRectify.CheckEndDate.HasValue) + { + this.dpkCheckEndDate.Text = string.Format("{0:yyyy-MM-dd}", subUnitCheckRectify.CheckEndDate); + } + this.txtValues1.Text = subUnitCheckRectify.Values1.Trim(); + this.txtValues2.Text = subUnitCheckRectify.Values2.Trim(); + this.txtValues3.Text = subUnitCheckRectify.Values3.Trim(); + this.txtValues4.Text = subUnitCheckRectify.Values4.Trim(); + this.txtValues5.Text = subUnitCheckRectify.Values5.Trim(); + this.txtValues6.Text = subUnitCheckRectify.Values6.Trim(); + this.txtValues7.Text = subUnitCheckRectify.Values7.Trim(); + this.txtValues8.Text = subUnitCheckRectify.Values8.Trim(); + if (!string.IsNullOrEmpty(subUnitCheckRectify.AttachUrl)) + { + this.FullAttachUrl = subUnitCheckRectify.AttachUrl; + this.lbAttachUrl.Text = subUnitCheckRectify.AttachUrl.Substring(subUnitCheckRectify.AttachUrl.IndexOf("~") + 1); + } + subUnitCheckRectifyItems = BLL.SubUnitCheckRectifyItemService.GetSubUnitCheckRectifyItemList(this.SubUnitCheckRectifyId); + + int i = subUnitCheckRectifyItems.Count * 10; + int count = subUnitCheckRectifyItems.Count; + if (count < 10) + { + for (int j = 0; j < (10 - count); j++) + { + Model.Supervise_SubUnitCheckRectifyItem newItem = new Model.Supervise_SubUnitCheckRectifyItem + { + SubUnitCheckRectifyItemId = SQLHelper.GetNewID(typeof(Model.Supervise_SubUnitCheckRectifyItem)) + }; + subUnitCheckRectifyItems.Add(newItem); + } + } + this.Grid1.DataSource = subUnitCheckRectifyItems; + this.Grid1.DataBind(); + } + else + { + for (int i = 0; i < 10; i++) + { + Model.Supervise_SubUnitCheckRectifyItem newItem = new Model.Supervise_SubUnitCheckRectifyItem + { + SubUnitCheckRectifyItemId = SQLHelper.GetNewID(typeof(Model.Supervise_SubUnitCheckRectifyItem)) + }; + subUnitCheckRectifyItems.Add(newItem); + } + Grid1.DataSource = subUnitCheckRectifyItems; + Grid1.DataBind(); + } + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + SaveData(BLL.Const.UpState_1); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 保存数据 + /// + private void SaveData(string upState) + { + Model.Supervise_SubUnitCheckRectify subUnitCheckRectify = new Model.Supervise_SubUnitCheckRectify + { + SuperviseCheckReportId = this.SuperviseCheckReportId + }; + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + subUnitCheckRectify.UnitId = this.drpUnitId.SelectedValue; + } + if (this.drpCheckRectType.SelectedValue != BLL.Const._Null) + { + subUnitCheckRectify.CheckRectType = this.drpCheckRectType.SelectedValue; + } + subUnitCheckRectify.Values1 = this.txtValues1.Text.Trim(); + subUnitCheckRectify.Values2 = this.txtValues2.Text.Trim(); + subUnitCheckRectify.Values3 = this.txtValues3.Text.Trim(); + subUnitCheckRectify.Values4 = this.txtValues4.Text.Trim(); + subUnitCheckRectify.Values5 = this.txtValues5.Text.Trim(); + subUnitCheckRectify.Values6 = this.txtValues6.Text.Trim(); + subUnitCheckRectify.Values7 = this.txtValues7.Text.Trim(); + subUnitCheckRectify.Values8 = this.txtValues8.Text.Trim(); + subUnitCheckRectify.AttachUrl = this.FullAttachUrl; + subUnitCheckRectify.UpState = upState; + subUnitCheckRectify.UpDateTime = Funs.GetNewDateTime(this.dpkUpDateTime.Text.Trim()); + subUnitCheckRectify.CheckEndDate = Funs.GetNewDateTime(this.dpkCheckEndDate.Text.Trim()); + if (!string.IsNullOrEmpty(this.SubUnitCheckRectifyId)) + { + subUnitCheckRectify.SubUnitCheckRectifyId = this.SubUnitCheckRectifyId; + BLL.SubUnitCheckRectifyService.UpdateSubUnitCheckRectify(subUnitCheckRectify); + BLL.SubUnitCheckRectifyItemService.DeleteSubUnitCheckRectifyItemsList(this.SubUnitCheckRectifyId); + BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, subUnitCheckRectify.SubUnitCheckRectifyId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnModify); + } + else + { + subUnitCheckRectify.SubUnitCheckRectifyId = SQLHelper.GetNewID(typeof(Model.Supervise_SubUnitCheckRectify)); + BLL.SubUnitCheckRectifyService.AddSubUnitCheckRectify(subUnitCheckRectify); + BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, subUnitCheckRectify.SubUnitCheckRectifyId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnAdd); + } + this.GetItems(subUnitCheckRectify.SubUnitCheckRectifyId); + foreach (var item in subUnitCheckRectifyItems) + { + if (!string.IsNullOrEmpty(item.Name)) + { + BLL.SubUnitCheckRectifyItemService.AddSubUnitCheckRectifyItem(item); + } + } + } + + /// + /// 获取明细 + /// + /// + private void GetItems(string subUnitCheckRectifyId) + { + subUnitCheckRectifyItems.Clear(); + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + Model.Supervise_SubUnitCheckRectifyItem item = new Model.Supervise_SubUnitCheckRectifyItem(); + if (values["SubUnitCheckRectifyItemId"].ToString() != "") + { + item.SubUnitCheckRectifyItemId = values.Value("SubUnitCheckRectifyItemId"); + } + item.SubUnitCheckRectifyId = subUnitCheckRectifyId; + if (values["Name"].ToString() != "") + { + item.Name = values.Value("Name"); + } + if (values["Sex"].ToString() != "") + { + item.Sex = values.Value("Sex"); + } + if (values["UnitName"].ToString() != "") + { + item.UnitName = values.Value("UnitName"); + } + if (values["PostName"].ToString() != "") + { + item.PostName = values.Value("PostName"); + } + if (values["WorkTitle"].ToString() != "") + { + item.WorkTitle = values.Value("WorkTitle"); + } + if (values["CheckPostName"].ToString() != "") + { + item.CheckPostName = values.Value("CheckPostName"); + } + if (values["CheckDate"].ToString() != "") + { + item.CheckDate = Convert.ToDateTime(values.Value("CheckDate")); + } + subUnitCheckRectifyItems.Add(item); + } + } + + #endregion + + #region Grid点击事件 + /// + /// Grid1行点击事件 + /// + /// + /// + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + GetItems(string.Empty); + if (e.CommandName == "Add") + { + Model.Supervise_SubUnitCheckRectifyItem newItem = new Model.Supervise_SubUnitCheckRectifyItem + { + SubUnitCheckRectifyItemId = SQLHelper.GetNewID(typeof(Model.Supervise_SubUnitCheckRectifyItem)) + }; + subUnitCheckRectifyItems.Add(newItem); + Grid1.DataSource = subUnitCheckRectifyItems; + Grid1.DataBind(); + } + if (e.CommandName == "Delete") + { + foreach (var item in subUnitCheckRectifyItems) + { + if (item.SubUnitCheckRectifyItemId == rowID) + { + subUnitCheckRectifyItems.Remove(item); + break; + } + } + Grid1.DataSource = subUnitCheckRectifyItems; + Grid1.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 附件上传 + /// + /// 附件上传 + /// + /// + /// + protected void btnUpAttachUrl_Click(object sender, EventArgs e) + { + if (fuAttachUrl.HasFile) + { + this.lbAttachUrl.Text = fuAttachUrl.ShortFileName; + if (ValidateFileTypes(this.lbAttachUrl.Text)) + { + ShowNotify("无效的文件类型!", MessageBoxIcon.Warning); + return; + } + this.FullAttachUrl = BLL.UploadFileService.UploadAttachment(BLL.Funs.RootPath, this.fuAttachUrl, this.FullAttachUrl, UploadFileService.SubUnitCheckRectifyFilePath); + if (string.IsNullOrEmpty(this.FullAttachUrl)) + { + ShowNotify("文件名已经存在!", MessageBoxIcon.Warning); + return; + } + else + { + ShowNotify("文件上传成功!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("上传文件不存在!", MessageBoxIcon.Warning); + } + } + + /// + /// 查看附件 + /// + /// + /// + protected void btnSeeAttachUrl_Click(object sender, EventArgs e) + { + string filePath = BLL.Funs.RootPath + this.FullAttachUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(filePath); + if (info.Exists) + { + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(filePath, 0, fileSize); + Response.Flush(); + Response.Close(); + this.SimpleForm1.Reset(); + } + else + { + ShowNotify("文件不存在!", MessageBoxIcon.Warning); + } + } + + /// + /// 删除附件 + /// + /// + /// + protected void btnDeleteAttachUrl_Click(object sender, EventArgs e) + { + this.fuAttachUrl.Reset(); + this.lbAttachUrl.Text = string.Empty; + this.FullAttachUrl = string.Empty; + } + #endregion + + #region 权限设置 + /// + /// 权限设置 + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SuperviseCheckReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnUpAttachUrl.Hidden = false; + this.btnDeleteAttachUrl.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx.designer.cs new file mode 100644 index 00000000..8157f9a4 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx.designer.cs @@ -0,0 +1,312 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise { + + + public partial class SubUnitCheckRectifyEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// drpCheckRectType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckRectType; + + /// + /// dpkUpDateTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkUpDateTime; + + /// + /// dpkCheckEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCheckEndDate; + + /// + /// txtValues1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValues1; + + /// + /// txtValues2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValues2; + + /// + /// txtValues3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValues3; + + /// + /// txtValues4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValues4; + + /// + /// txtValues5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValues5; + + /// + /// txtValues6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValues6; + + /// + /// txtValues7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValues7; + + /// + /// txtValues8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValues8; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label6; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// txtSex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSex; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnitName; + + /// + /// txtPostName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPostName; + + /// + /// txtWorkTitle 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkTitle; + + /// + /// txtCheckPostName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckPostName; + + /// + /// dpkCheckDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCheckDate; + + /// + /// txtSubUnitCheckRectifyItemId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSubUnitCheckRectifyItemId; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// lbAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbAttachUrl; + + /// + /// btnUpAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpAttachUrl; + + /// + /// btnDeleteAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDeleteAttachUrl; + + /// + /// btnSeeAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSeeAttachUrl; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx new file mode 100644 index 00000000..ac244cc3 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx @@ -0,0 +1,151 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SuperviseCheckRectify.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.SuperviseCheckRectify" %> + + + + + + + 安全监督检查整改 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs new file mode 100644 index 00000000..26763e89 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs @@ -0,0 +1,498 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using BLL; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class SuperviseCheckRectify : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + //btnNew.OnClientClick = Window1.GetShowReference("SuperviseCheckRectifyEdit.aspx") + "return false;"; + btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!"); + btnDelete.ConfirmText = String.Format("你确定要删除选中的  行数据吗?", Grid1.GetSelectedCountReference()); + + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + + strSql = "select * from View_Supervise_SuperviseCheckRectify WHERE 1= 1"; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + strSql += " AND (SuperviseCheckRectifyCode like @name OR ProjectName like @name OR UnitName like @name OR HandleState like @name)"; + listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%")); + } + + if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && Const.UnitId_SEDIN != this.CurrUser.UnitId) + { + strSql += " AND ProjectUnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId)); + } + 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(); + for (int i = 0; i < Grid1.Rows.Count; i++) + { + Model.Supervise_SuperviseCheckRectify rectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyById(Grid1.Rows[i].DataKeys[0].ToString()); + if (rectify != null) + { + if (rectify.HandleState == "1") + { + Grid1.Rows[i].RowCssClass = "green"; + } + if (rectify.HandleState == "2") + { + Grid1.Rows[i].RowCssClass = "yellow"; + } + else if (rectify.HandleState == "3") + { + Grid1.Rows[i].RowCssClass = "red"; + } + } + } + } + #endregion + + #region 表头过滤、分页、排序、关闭窗口 + /// + /// 过滤表头 + /// + /// + /// + //protected void Grid1_FilterChange(object sender, EventArgs e) + //{ + // BindGrid(); + //} + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region Grid行点击事件 + /// + /// Grid行事件 + /// + /// + /// + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + + if (e.CommandName == "Delete") + { + Model.Supervise_SuperviseCheckRectify rectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyById(rowID); + if (rectify != null) + { + Model.Supervise_SuperviseCheckReport report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(rectify.SuperviseCheckReportId); + if (report != null) + { + report.IsIssued = "0"; //未下发 + BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(report); + } + } + BLL.SuperviseCheckRectifyItemService.DeleteSuperviseCheckRectifyItemBySuperviseCheckRectifyId(rowID); + BLL.SuperviseCheckRectifyService.DeleteSuperviseCheckRectifyById(rowID); + + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region Grid行双击事件 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + btnEdit_Click(null, null); + } + #endregion + + #region 数据编辑事件 + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string SuperviseCheckRectifyId = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SuperviseCheckRectifyEdit.aspx?SuperviseCheckRectifyId={0}", SuperviseCheckRectifyId, "编辑 - "))); + + } + #endregion + + #region 删除数据 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 批量删除 + /// + /// + /// + protected void btnDelete_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(); + BLL.SuperviseCheckRectifyItemService.DeleteSuperviseCheckRectifyItemBySuperviseCheckRectifyId(rowID); + BLL.SuperviseCheckRectifyService.DeleteSuperviseCheckRectifyById(rowID); + } + + BindGrid(); + ShowNotify("删除数据成功!"); + } + + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SuperviseCheckRectifyMenuId); + if (buttonList.Count() > 0) + { + + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + this.btnMenuDelete.Hidden = false; + } + + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("安全监督检查整改" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtmls(Grid1)); + Response.End(); + + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtmls(Grid grid) + { + StringBuilder sb = new StringBuilder(); + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(Grid1.Columns); + sb.Append(""); + sb.Append(""); + foreach (List rows in mht.MultiTable) + { + sb.Append(""); + foreach (object[] cell in rows) + { + int rowspan = Convert.ToInt32(cell[0]); + int colspan = Convert.ToInt32(cell[1]); + GridColumn column = cell[2] as GridColumn; + + sb.AppendFormat("{3}", + rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "", + colspan != 1 ? " colspan=\"" + colspan + "\"" : "", + colspan != 1 ? " style=\"text-align:center;\"" : "", + column.HeaderText); + } + sb.Append(""); + } + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in mht.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + sb.Append(""); + } + sb.Append("
{0}
"); + return sb.ToString(); + } + + #region 多表头处理 + /// + /// 多表头处理 + /// + public class MultiHeaderTable + { + // 包含 rowspan,colspan 的多表头,方便生成 HTML 的 table 标签 + public List> MultiTable = new List>(); + // 最终渲染的列数组 + public List Columns = new List(); + public void ResolveMultiHeaderTable(GridColumnCollection columns) + { + List row = new List(); + foreach (GridColumn column in columns) + { + object[] cell = new object[4]; + cell[0] = 1; // rowspan + cell[1] = 1; // colspan + cell[2] = column; + cell[3] = null; + row.Add(cell); + } + ResolveMultiTable(row, 0); + ResolveColumns(row); + } + + private void ResolveColumns(List row) + { + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + List subrow = new List(); + foreach (GridColumn column in groupField.Columns) + { + subrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + ResolveColumns(subrow); + } + else + { + Columns.Add(cell[2] as GridColumn); + } + } + } + + private void ResolveMultiTable(List row, int level) + { + List nextrow = new List(); + + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // 如果当前列包含子列,则更改当前列的 colspan,以及增加父列(向上递归)的colspan + cell[1] = Convert.ToInt32(groupField.Columns.Count); + PlusColspan(level - 1, cell[3] as GridColumn, groupField.Columns.Count - 1); + + foreach (GridColumn column in groupField.Columns) + { + nextrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + } + } + MultiTable.Add(row); + // 如果当前下一行,则增加上一行(向上递归)中没有子列的列的 rowspan + if (nextrow.Count > 0) + { + PlusRowspan(level); + ResolveMultiTable(nextrow, level + 1); + } + } + + private void PlusRowspan(int level) + { + if (level < 0) + { + return; + } + foreach (object[] cells in MultiTable[level]) + { + GroupField groupField = cells[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // ... + } + else + { + cells[0] = Convert.ToInt32(cells[0]) + 1; + } + } + PlusRowspan(level - 1); + } + + private void PlusColspan(int level, GridColumn parent, int plusCount) + { + if (level < 0) + { + return; + } + + foreach (object[] cells in MultiTable[level]) + { + GridColumn column = cells[2] as GridColumn; + if (column == parent) + { + cells[1] = Convert.ToInt32(cells[1]) + plusCount; + + PlusColspan(level - 1, cells[3] as GridColumn, plusCount); + } + } + } + } + #endregion + #endregion + + /// + /// 查询 + /// + /// + /// + protected void txtName_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.designer.cs new file mode 100644 index 00000000..a74ba5b1 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.designer.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise { + + + public partial class SuperviseCheckRectify { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx new file mode 100644 index 00000000..7f73123b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx @@ -0,0 +1,185 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SuperviseCheckRectifyEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.SuperviseCheckRectifyEdit" %> + + + + + + + 编辑安全监督检查整改 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.cs new file mode 100644 index 00000000..ca4c73a1 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.cs @@ -0,0 +1,271 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class SuperviseCheckRectifyEdit : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string SuperviseCheckRectifyId + { + get + { + return (string)ViewState["SuperviseCheckRectifyId"]; + } + set + { + ViewState["SuperviseCheckRectifyId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List superviseCheckRectifyItems = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ////权限按钮方法 + this.GetButtonPower(); + this.SuperviseCheckRectifyId = Request.Params["SuperviseCheckRectifyId"]; + if (!string.IsNullOrEmpty(this.SuperviseCheckRectifyId)) + { + var rectify = Funs.DB.View_Supervise_SuperviseCheckRectify.FirstOrDefault(x => x.SuperviseCheckRectifyId == this.SuperviseCheckRectifyId); + if (rectify != null) + { + this.lbUnitName.Text = rectify.UnitName; + this.lbProjectName.Text = rectify.ProjectName; + this.lbSuperviseCheckRectifyCode.Text = rectify.SuperviseCheckRectifyCode; + if (!string.IsNullOrEmpty(rectify.IssueMan)) + { + this.txtIssueMan.Text = rectify.IssueMan; + } + else + { + this.txtIssueMan.Text = this.CurrUser.PersonName; + } + if (rectify.IssueDate != null) + { + this.txtIssueDate.Text = string.Format("{0:yyyy-MM-dd}", rectify.IssueDate); + } + else + { + this.txtIssueDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + + //this.btnUpdata.Hidden = true; + //if (rectify.IsFromMainUnit == true) + //{ + // this.btnUpdata.Hidden = false; + //} + superviseCheckRectifyItems = (from x in Funs.DB.View_Supervise_SuperviseCheckRectifyItem where x.SuperviseCheckRectifyId == this.SuperviseCheckRectifyId orderby x.RectifyCode select x).ToList(); + Grid1.DataSource = superviseCheckRectifyItems; + Grid1.DataBind(); + } + } + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + //protected void btnUpdata_Click(object sender, EventArgs e) + //{ + // Save("updata"); + //} + + /// + /// 保存 + /// + /// + private void Save(string type) + { + Model.Supervise_SuperviseCheckRectify superviseCheckRectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyById(Request.Params["SuperviseCheckRectifyId"]); + superviseCheckRectify.IssueMan = this.txtIssueMan.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtIssueDate.Text.Trim())) + { + superviseCheckRectify.IssueDate = Convert.ToDateTime(this.txtIssueDate.Text.Trim()); + } + BLL.SuperviseCheckRectifyItemService.DeleteSuperviseCheckRectifyItemBySuperviseCheckRectifyId(Request.Params["SuperviseCheckRectifyId"]); + jerqueSaveList(); + bool result = true; + bool resultAll = true; + foreach (var item in superviseCheckRectifyItems) + { + Model.Supervise_SuperviseCheckRectifyItem newSuperviseCheckRectifyItem = new Model.Supervise_SuperviseCheckRectifyItem + { + SuperviseCheckRectifyItemId = item.SuperviseCheckRectifyItemId, + SuperviseCheckRectifyId = item.SuperviseCheckRectifyId, + RectifyItemId = item.RectifyItemId, + ConfirmMan = item.ConfirmMan, + ConfirmDate = item.ConfirmDate, + OrderEndDate = item.OrderEndDate, + OrderEndPerson = item.OrderEndPerson, + RealEndDate = item.RealEndDate, + AttachUrl = item.AttachUrl, + VerifierName = item.VerifierName, + VerifierDate = item.VerifierDate, + }; + if (!item.RealEndDate.HasValue) + { + result = false; + } + if (!item.VerifierDate.HasValue || string.IsNullOrEmpty(item.VerifierName)) + { + resultAll = false; + } + BLL.SuperviseCheckRectifyItemService.AddSuperviseCheckRectifyItem(newSuperviseCheckRectifyItem); + } + if (result) //已全部确认完成 + { + superviseCheckRectify.HandleState = "3"; //待验收 + if (resultAll) + { + superviseCheckRectify.HandleState = "4"; //已闭环 + } + } + else + { + superviseCheckRectify.HandleState = "2"; //已签发但未完成 + } + BLL.SuperviseCheckRectifyService.UpdateSuperviseCheckRectify(superviseCheckRectify); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckRectify.SuperviseCheckRectifyCode, superviseCheckRectify.SuperviseCheckRectifyId, BLL.Const.SuperviseCheckRectifyMenuId, Const.BtnModify); + if (type == "updata" && superviseCheckRectify.IsFromMainUnit == true) //保存并上报 + { + Update(this.SuperviseCheckRectifyId); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region 上传到集团公司 + /// + /// 上传到集团公司 + /// + /// + private void Update(string superviseCheckRectifyId) + { + /////创建客户端服务 + //var poxy = Web.ServiceProxy.CreateServiceClient(); + //poxy.DataInsertSupervise_SuperviseCheckRectifyTableCompleted += new EventHandler(poxy_DataInsertSupervise_SuperviseCheckRectifyTableCompleted); + //var rectify = from x in Funs.DB.View_SuperviseCheckRectify + // where x.RealEndDate != null && x.SuperviseCheckRectifyId == superviseCheckRectifyId && x.IsFromMainUnit == true + // select new HSSEService.Supervise_SuperviseCheckRectify + // { + // SuperviseCheckRectifyId = x.SuperviseCheckRectifyId, + // SuperviseCheckRectifyCode = x.SuperviseCheckRectifyCode, + // ProjectId = x.ProjectId, + // UnitId = x.UnitId, + // CheckDate = x.CheckDate, + // IssueMan = x.IssueMan, + // IssueDate = x.IssueDate, + // SuperviseCheckReportId = x.SuperviseCheckReportId, + // HandleState = x.HandleState, + // SuperviseCheckRectifyItemId = x.SuperviseCheckRectifyItemId, + // RectifyItemId = x.RectifyItemId, + // ConfirmMan = x.ConfirmMan, + // ConfirmDate = x.ConfirmDate, + // OrderEndDate = x.OrderEndDate, + // OrderEndPerson = x.OrderEndPerson, + // RealEndDate = x.RealEndDate, + // }; + //poxy.DataInsertSupervise_SuperviseCheckRectifyTableAsync(rectify.ToList()); + } + #endregion + + #region 安全监督检查整改 + /// + /// 安全监督检查整改 + /// + /// + /// + //private void poxy_DataInsertSupervise_SuperviseCheckRectifyTableCompleted(object sender, HSSEService.DataInsertSupervise_SuperviseCheckRectifyTableCompletedEventArgs e) + //{ + // if (e.Error == null) + // { + // var idList = e.Result; + // BLL.LogService.AddSys_Log(this.CurrUser, "【安全监督检查整改】上传到服务器" + idList.Count.ToString() + "条数据;", string.Empty, BLL.Const.SuperviseCheckRectifyMenuId, Const.BtnUploadResources); + // } + // else + // { + // BLL.LogService.AddSys_Log(this.CurrUser, "【安全监督检查整改】上传到服务器失败;", string.Empty, BLL.Const.SuperviseCheckRectifyMenuId, Const.BtnUploadResources); + // } + //} + #endregion + + #region 保存集合 + /// + /// 保存集合 + /// + private void jerqueSaveList() + { + JArray mergedData = Grid1.GetMergedData(); + foreach (JObject mergedRow in mergedData) + { + string status = mergedRow.Value("status"); + JObject values = mergedRow.Value("values"); + var item = superviseCheckRectifyItems.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == values.Value("SuperviseCheckRectifyItemId")); + item.ConfirmMan = values.Value("ConfirmMan"); + item.ConfirmDate = Funs.GetNewDateTime(values.Value("ConfirmDate")); + item.OrderEndDate = Funs.GetNewDateTime(values.Value("OrderEndDate")); + item.OrderEndPerson = values.Value("OrderEndPerson"); + item.RealEndDate = Funs.GetNewDateTime(values.Value("RealEndDate")); + + item.VerifierName = values.Value("VerifierName"); + item.VerifierDate = Funs.GetNewDateTime(values.Value("VerifierDate")); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SuperviseCheckRectifyMenuId); + if (buttonList.Count() > 0) + { + this.btnSave.Hidden = false; + + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + //} + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.designer.cs new file mode 100644 index 00000000..9794f00d --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.designer.cs @@ -0,0 +1,276 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise { + + + public partial class SuperviseCheckRectifyEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Panel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel4; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// lbUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUnitName; + + /// + /// lbProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbProjectName; + + /// + /// Panel5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel5; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// Label22 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label22; + + /// + /// lbSuperviseCheckRectifyCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbSuperviseCheckRectifyCode; + + /// + /// txtIssueMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIssueMan; + + /// + /// txtIssueDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtIssueDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label15 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label15; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label24 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label24; + + /// + /// txtConfirmMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConfirmMan; + + /// + /// txtConfirmDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtConfirmDate; + + /// + /// txtOrderEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtOrderEndDate; + + /// + /// txtOrderEndPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOrderEndPerson; + + /// + /// txtRealEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtRealEndDate; + + /// + /// TextBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox TextBox1; + + /// + /// DatePicker1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker DatePicker1; + + /// + /// txtSuperviseCheckRectifyItemId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSuperviseCheckRectifyItemId; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window6; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx new file mode 100644 index 00000000..2c6e53b5 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx @@ -0,0 +1,140 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SuperviseCheckReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.SuperviseCheckReport" %> + + + + + + + 安全监督检查报告 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx.cs new file mode 100644 index 00000000..6bc09edb --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx.cs @@ -0,0 +1,602 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class SuperviseCheckReport : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + // 表头过滤 + //FilterDataRowItem = FilterDataRowItemImplement; + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + btnNew.OnClientClick = Window1.GetShowReference("SuperviseCheckReportEdit.aspx") + "return false;"; + btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!"); + btnDelete.ConfirmText = String.Format("你确定要删除选中的  行数据吗?", Grid1.GetSelectedCountReference()); + + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT S.SuperviseCheckReportId,S.SuperviseCheckReportCode,S.CheckDate,S.ProjectId,P.ProjectName,S.UnitId,u.UnitName,S.CheckTeam,S.EvaluationResult,S.AttachUrl,S.IsIssued,case S.CheckType when '1' then '企业负责人带班检查' when '2' then '企业综合检查' when '3' then '企业专项检查' else '' end as CheckTypeName" + + @" FROM dbo.Supervise_SuperviseCheckReport AS S" + + @" LEFT JOIN dbo.Base_Project AS P ON P.ProjectId=S.ProjectId" + + @" LEFT JOIN dbo.Base_Unit AS U ON U.UnitId=S.UnitId" + + @" WHERE 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtName.Text.Trim())) + { + strSql += " AND (S.SuperviseCheckReportCode like @name OR P.ProjectName like @name OR u.UnitName like @name OR S.CheckTeam like @name OR S.EvaluationResult like @name)"; + listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%")); + } + + if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && Const.UnitId_SEDIN != this.CurrUser.UnitId) + { + strSql += " AND P.UnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId)); + } + 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(); + for (int i = 0; i < Grid1.Rows.Count; i++) + { + System.Web.UI.WebControls.LinkButton lbtnRectify = (System.Web.UI.WebControls.LinkButton)(Grid1.Rows[i].FindControl("lbtnRectify")); + System.Web.UI.WebControls.Label lblRectify = (System.Web.UI.WebControls.Label)(Grid1.Rows[i].FindControl("lblRectify")); + Model.Supervise_SuperviseCheckReport report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(lbtnRectify.CommandArgument); + if (report != null) + { + if (report.IsIssued == "1") //已下发 + { + lbtnRectify.Visible = false; + Model.Supervise_SuperviseCheckRectify rectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyBySuperviseCheckReportId(lbtnRectify.CommandArgument); + string code = string.Empty; + if (rectify != null) + { + code = rectify.SuperviseCheckRectifyCode; + } + lblRectify.Text = "已下发:" + code; + + } + else + { + lbtnRectify.Visible = true; + lblRectify.Text = string.Empty; + Grid1.Rows[i].RowCssClass = "red"; + } + + Model.Supervise_SubUnitCheckRectify sub = BLL.SubUnitCheckRectifyService.GetSubUnitCheckRectifyBySuperviseCheckReportId(lbtnRectify.CommandArgument); + if (sub != null && sub.UpState == BLL.Const.UpState_3) + { + lbtnSubRec.Text = "报告单(已上报)"; + } + else + { + lbtnSubRec.Text = "报告单"; + } + } + } + } + #endregion + + #region 过滤表头、排序、分页、关闭窗口 + /// + /// 过滤表头 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid(); + } + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + protected void Window2_Close1(object sender, WindowCloseEventArgs e) + { + BindGrid(); + System.Web.UI.WebControls.LinkButton lbtnSubRec = sender as System.Web.UI.WebControls.LinkButton; + if (lbtnSubRec != null) + { + Model.Supervise_SubUnitCheckRectify sub = BLL.SubUnitCheckRectifyService.GetSubUnitCheckRectifyBySuperviseCheckReportId(lbtnSubRec.CommandArgument); + if (sub != null && sub.UpState == BLL.Const.UpState_3) + { + lbtnSubRec.Text = "报告(已上报)"; + } + } + } + #endregion + + #region Grid行点击事件 + /// + /// Grid行事件 + /// + /// + /// + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + if (e.CommandName == "Delete") + { + Model.Supervise_SuperviseCheckRectify retify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyBySuperviseCheckReportId(rowID); + if (retify != null) + { + ShowNotify("该检查报告已下发检查整改记录,请先删除对应检查整改记录!", MessageBoxIcon.Warning); + return; + } + BLL.SubUnitCheckRectifyItemService.DeleteSubUnitCheckRectifyBySuperviseCheckReportId(rowID); + BLL.SuperviseCheckReportItemService.DeleteSuperviseCheckReportItemBySuperviseCheckReportId(rowID); + BLL.SuperviseCheckReportService.DeleteSuperviseCheckReportById(rowID); + + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region Grid双击事件 + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + btnEdit_Click(null, null); + } + #endregion + + #region 下发整改单 + /// + /// 下发整改单 + /// + /// + /// + protected void lbtnRectify_Click(object sender, EventArgs e) + { + System.Web.UI.WebControls.LinkButton lbtnRectify = sender as System.Web.UI.WebControls.LinkButton; + Model.Supervise_SuperviseCheckReport report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(lbtnRectify.CommandArgument); + if (report != null) + { + var superviseCheckRectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyBySuperviseCheckReportId(report.SuperviseCheckReportId); + + if (superviseCheckRectify == null) + { + if (BLL.SuperviseCheckReportItemService.GetSelectedSuperviseCheckReportItemBySuperviseCheckReportId(lbtnRectify.CommandArgument).Count == 0) + { + ShowNotify("尚未选择检查隐患,无法下发!", MessageBoxIcon.Warning); + return; + } + + Model.Supervise_SuperviseCheckRectify rectify = new Model.Supervise_SuperviseCheckRectify + { + SuperviseCheckRectifyId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckRectify)), + SuperviseCheckRectifyCode = report.SuperviseCheckReportCode + "-R", + ProjectId = report.ProjectId, + UnitId = report.UnitId, + SuperviseCheckReportId = report.SuperviseCheckReportId, + CheckDate = report.CheckDate, + HandleState = "1" //未签发 + }; + BLL.SuperviseCheckRectifyService.AddSuperviseCheckRectify(rectify); + var reportItems = BLL.SuperviseCheckReportItemService.GetSuperviseCheckReportItemBySuperviseCheckReportId(lbtnRectify.CommandArgument); + foreach (var item in reportItems) + { + if (item.IsSelected == true) + { + Model.Supervise_SuperviseCheckRectifyItem newItem = new Model.Supervise_SuperviseCheckRectifyItem + { + SuperviseCheckRectifyItemId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckRectifyItem)), + SuperviseCheckRectifyId = rectify.SuperviseCheckRectifyId, + RectifyItemId = item.RectifyItemId, + ConfirmMan = this.CurrUser.PersonName, + ConfirmDate = DateTime.Now, + AttachUrl = item.AttachUrl + }; + BLL.SuperviseCheckRectifyItemService.AddSuperviseCheckRectifyItem(newItem); + } + } + report.IsIssued = "1"; //已下发 + BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(report); + ShowNotify("已下发完成!", MessageBoxIcon.Success); + BindGrid(); + } + else + { + ShowNotify("已下发整改单!", MessageBoxIcon.Warning); + return; + } + } + + } + #endregion + + #region 编辑 + /// + /// 编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string SuperviseCheckReportId = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SuperviseCheckReportEdit.aspx?SuperviseCheckReportId={0}", SuperviseCheckReportId, "编辑 - "))); + + } + #endregion + + #region 删除 + /// + /// 批量删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + Model.Supervise_SuperviseCheckRectify retify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyBySuperviseCheckReportId(rowID); + if (retify != null) + { + ShowNotify("删除的检查报告中已下发检查整改记录,请先删除对应检查整改记录!", MessageBoxIcon.Warning); + return; + } + BLL.SubUnitCheckRectifyItemService.DeleteSubUnitCheckRectifyBySuperviseCheckReportId(rowID); + BLL.SuperviseCheckReportItemService.DeleteSuperviseCheckReportItemBySuperviseCheckReportId(rowID); + BLL.SuperviseCheckReportService.DeleteSuperviseCheckReportById(rowID); + } + + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region 报告报告 + /// + /// 报告报告 + /// + /// + /// + protected void lbtnSubRec_Click(object sender, EventArgs e) + { + System.Web.UI.WebControls.LinkButton lbtnSubRec = sender as System.Web.UI.WebControls.LinkButton; + Model.Supervise_SuperviseCheckReport report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(lbtnSubRec.CommandArgument); + if (report != null) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("SubUnitCheckRectifyEdit.aspx?SuperviseCheckReportId={0}", lbtnSubRec.CommandArgument, "编辑 - "))); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SuperviseCheckReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("安全监督检查报告" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtmlThis(Grid1)); + Response.End(); + + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtmlThis(Grid grid) + { + StringBuilder sb = new StringBuilder(); + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(Grid1.Columns); + sb.Append(""); + sb.Append(""); + foreach (List rows in mht.MultiTable) + { + sb.Append(""); + foreach (object[] cell in rows) + { + int rowspan = Convert.ToInt32(cell[0]); + int colspan = Convert.ToInt32(cell[1]); + GridColumn column = cell[2] as GridColumn; + + sb.AppendFormat("{3}", + rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "", + colspan != 1 ? " colspan=\"" + colspan + "\"" : "", + colspan != 1 ? " style=\"text-align:center;\"" : "", + column.HeaderText); + } + sb.Append(""); + } + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in mht.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + if (column.ColumnID == "tfRectify") + { + html = (row.FindControl("lbtnRectify") as AspNet.LinkButton).Text; + } + if (column.ColumnID == "tfSubRec") + { + html = (row.FindControl("lbtnSubRec") as AspNet.LinkButton).Text; + } + sb.AppendFormat("", html); + } + sb.Append(""); + } + sb.Append("
{0}
"); + return sb.ToString(); + } + + #region 多表头处理 + /// + /// 多表头处理 + /// + public class MultiHeaderTable + { + // 包含 rowspan,colspan 的多表头,方便生成 HTML 的 table 标签 + public List> MultiTable = new List>(); + // 最终渲染的列数组 + public List Columns = new List(); + public void ResolveMultiHeaderTable(GridColumnCollection columns) + { + List row = new List(); + foreach (GridColumn column in columns) + { + object[] cell = new object[4]; + cell[0] = 1; // rowspan + cell[1] = 1; // colspan + cell[2] = column; + cell[3] = null; + row.Add(cell); + } + ResolveMultiTable(row, 0); + ResolveColumns(row); + } + + private void ResolveColumns(List row) + { + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + List subrow = new List(); + foreach (GridColumn column in groupField.Columns) + { + subrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + ResolveColumns(subrow); + } + else + { + Columns.Add(cell[2] as GridColumn); + } + } + } + + private void ResolveMultiTable(List row, int level) + { + List nextrow = new List(); + + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // 如果当前列包含子列,则更改当前列的 colspan,以及增加父列(向上递归)的colspan + cell[1] = Convert.ToInt32(groupField.Columns.Count); + PlusColspan(level - 1, cell[3] as GridColumn, groupField.Columns.Count - 1); + + foreach (GridColumn column in groupField.Columns) + { + nextrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + } + } + MultiTable.Add(row); + // 如果当前下一行,则增加上一行(向上递归)中没有子列的列的 rowspan + if (nextrow.Count > 0) + { + PlusRowspan(level); + ResolveMultiTable(nextrow, level + 1); + } + } + + private void PlusRowspan(int level) + { + if (level < 0) + { + return; + } + foreach (object[] cells in MultiTable[level]) + { + GroupField groupField = cells[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // ... + } + else + { + cells[0] = Convert.ToInt32(cells[0]) + 1; + } + } + PlusRowspan(level - 1); + } + + private void PlusColspan(int level, GridColumn parent, int plusCount) + { + if (level < 0) + { + return; + } + + foreach (object[] cells in MultiTable[level]) + { + GridColumn column = cells[2] as GridColumn; + if (column == parent) + { + cells[1] = Convert.ToInt32(cells[1]) + plusCount; + + PlusColspan(level - 1, cells[3] as GridColumn, plusCount); + } + } + } + } + #endregion + + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void txtName_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx.designer.cs new file mode 100644 index 00000000..08b418eb --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx.designer.cs @@ -0,0 +1,195 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise { + + + public partial class SuperviseCheckReport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// lbtnRectify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.LinkButton lbtnRectify; + + /// + /// lblRectify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblRectify; + + /// + /// lbtnSubRec 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.LinkButton lbtnSubRec; + + /// + /// lblSubRec 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblSubRec; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx new file mode 100644 index 00000000..6f0c46dc --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx @@ -0,0 +1,158 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SuperviseCheckReportEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.SuperviseCheckReportEdit" %> + + + + + + + 编辑安全监督检查报告 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs new file mode 100644 index 00000000..3e583ab2 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs @@ -0,0 +1,415 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Supervise +{ + public partial class SuperviseCheckReportEdit : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string SuperviseCheckReportId + { + get + { + return (string)ViewState["SuperviseCheckReportId"]; + } + set + { + ViewState["SuperviseCheckReportId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List superviseCheckReportItems = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + hdItemId.Text = string.Empty; + hdAttachUrl.Text = string.Empty; + hdId.Text = string.Empty; + btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + superviseCheckReportItems.Clear(); + if (Request.Params["type"] != "-1") + { + ////权限按钮方法 + this.GetButtonPower(); + } + + BLL.ProjectService.InitProjectDropDownList(this.ddlProjectId, true); + BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true); + Funs.FineUIPleaseSelect(this.drpCheckType); + this.SuperviseCheckReportId = Request.Params["SuperviseCheckReportId"]; + var superviseCheckReport = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId); + if (superviseCheckReport != null) + { + this.txtSuperviseCheckReportCode.Text = superviseCheckReport.SuperviseCheckReportCode; + if (superviseCheckReport.CheckDate != null) + { + this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", superviseCheckReport.CheckDate); + } + if (!string.IsNullOrEmpty(superviseCheckReport.CheckType)) + { + this.drpCheckType.SelectedValue = superviseCheckReport.CheckType; + } + if (!string.IsNullOrEmpty(superviseCheckReport.ProjectId)) + { + this.ddlProjectId.SelectedValue = superviseCheckReport.ProjectId; + + this.ddlUnitId.Items.Clear(); + BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true); + if (!string.IsNullOrEmpty(superviseCheckReport.UnitId)) + { + this.ddlUnitId.SelectedValue = superviseCheckReport.UnitId; + } + } + this.txtCheckTeam.Text = superviseCheckReport.CheckTeam; + superviseCheckReportItems = (from x in Funs.DB.View_Supervise_SuperviseCheckReportItem where x.SuperviseCheckReportId == this.SuperviseCheckReportId orderby x.RectifyCode select x).ToList(); + + + var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId); + if (report != null && report.IsIssued == "1") //已下发 + { + this.btnSave.Hidden = true; + this.btnSelect.Hidden = true; + Grid1.Columns[10].Hidden = true; + } + } + else + { + this.txtCheckTeam.Text = BLL.UnitService.GetUnitNameByUnitId(this.CurrUser.UnitId) + this.CurrUser.PersonName; + this.dpkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + Grid1.DataSource = superviseCheckReportItems; + Grid1.DataBind(); + GetCheckItem(); + } + } + + private void GetCheckItem() + { + for (int i = 0; i < Grid1.Rows.Count; i++) + { + var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == Grid1.Rows[i].Values[7].ToString()); + if (item != null) + { + if (item.IsSelected == true) + { + Grid1.Rows[i].Values[6] = "True"; + } + } + } + } + #endregion + + #region Grid行点击事件 + /// + /// Grid行事件 + /// + /// + /// + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + if (e.CommandName == "IsSelected") + { + CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); + if (checkField.GetCheckedState(e.RowIndex)) + { + hdId.Text = rowID; + PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdAttachUrl.ClientID) + + Window1.GetShowReference("ShowFileUpload.aspx")); + } + } + if (e.CommandName == "Attach") + { + var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == Grid1.Rows[e.RowIndex].Values[7].ToString()); + if (item != null) + { + PageBase.ShowFileEvent(item.AttachUrl); + } + } + + if (e.CommandName == "Delete") + { + jerqueSaveList(); + superviseCheckReportItems = (from x in superviseCheckReportItems where x.SuperviseCheckReportItemId != rowID select x).ToList(); + Grid1.DataSource = superviseCheckReportItems; + Grid1.DataBind(); + GetCheckItem(); + + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 选择按钮 + /// + /// 选择按钮 + /// + /// + /// + protected void btnSelect_Click(object sender, EventArgs e) + { + jerqueSaveList(); + string lists = string.Empty; + foreach (var item in superviseCheckReportItems) + { + lists += item.RectifyItemId + ","; + } + if (!string.IsNullOrEmpty(lists)) + { + lists = lists.Substring(0, lists.LastIndexOf(",")); + } + + string window = String.Format("ShowRectifyItem.aspx?lists={0}", lists, "选择 - "); + PageContext.RegisterStartupScript(Window2.GetSaveStateReference(hdItemId.ClientID) + + Window2.GetShowReference(window)); + } + #endregion + + #region 关闭窗口 + /// + /// 关闭窗口 + /// + /// + /// + protected void Window2_Close(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdItemId.Text)) + { + if (superviseCheckReportItems.Count == 0) + { + List itemIds = hdItemId.Text.Split(',').ToList(); + var rectifyItem = from x in Funs.DB.View_Technique_RectifyItem where itemIds.Contains(x.RectifyItemId) orderby x.RectifyCode select x; + foreach (var item in rectifyItem) + { + Model.View_Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.View_Supervise_SuperviseCheckReportItem + { + SuperviseCheckReportItemId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReportItem)), + SuperviseCheckReportId = this.SuperviseCheckReportId, + RectifyItemId = item.RectifyItemId, + HazardSourcePoint = item.HazardSourcePoint, + RiskAnalysis = item.RiskAnalysis, + RiskPrevention = item.RiskPrevention, + SimilarRisk = item.SimilarRisk, + RectifyName = item.RectifyName, + RectifyCode = item.RectifyCode, + IsSelected = false + }; + superviseCheckReportItems.Add(superviseCheckReportItem); + } + } + else + { + List itemIds = hdItemId.Text.Split(',').ToList(); + List superviseCheckReportItemsRectifyItemIds = superviseCheckReportItems.Select(x => x.RectifyItemId).ToList(); + foreach (var item in itemIds) + { + if (!superviseCheckReportItemsRectifyItemIds.Contains(item)) + { + var rectifyItem = (from x in Funs.DB.View_Technique_RectifyItem where x.RectifyItemId == item orderby x.RectifyCode select x).FirstOrDefault(); + if (rectifyItem != null) + { + Model.View_Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.View_Supervise_SuperviseCheckReportItem + { + SuperviseCheckReportItemId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReportItem)), + SuperviseCheckReportId = this.SuperviseCheckReportId, + RectifyItemId = rectifyItem.RectifyItemId, + HazardSourcePoint = rectifyItem.HazardSourcePoint, + RiskAnalysis = rectifyItem.RiskAnalysis, + RiskPrevention = rectifyItem.RiskPrevention, + SimilarRisk = rectifyItem.SimilarRisk, + RectifyName = rectifyItem.RectifyName, + RectifyCode = rectifyItem.RectifyCode, + IsSelected = false + }; + superviseCheckReportItems.Add(superviseCheckReportItem); + } + } + } + superviseCheckReportItems = (from x in superviseCheckReportItems + join y in Funs.DB.View_Technique_RectifyItem + on x.RectifyItemId equals y.RectifyItemId + orderby y.RectifyCode + select x).ToList(); + } + Grid1.DataSource = superviseCheckReportItems; + Grid1.DataBind(); + hdItemId.Text = string.Empty; + } + } + #endregion + + #region 保存按钮 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.drpCheckType.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("检查类别不能为空!", MessageBoxIcon.Warning); + return; + } + Model.Supervise_SuperviseCheckReport superviseCheckReport = new Model.Supervise_SuperviseCheckReport + { + SuperviseCheckReportCode = this.txtSuperviseCheckReportCode.Text.Trim() + }; + if (!string.IsNullOrEmpty(this.dpkCheckDate.Text.Trim())) + { + superviseCheckReport.CheckDate = Convert.ToDateTime(this.dpkCheckDate.Text.Trim()); + } + if (this.drpCheckType.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.CheckType = this.drpCheckType.SelectedValue; + } + if (this.ddlProjectId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.ProjectId = this.ddlProjectId.SelectedValue; + } + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + superviseCheckReport.UnitId = this.ddlUnitId.SelectedValue; + } + superviseCheckReport.CheckTeam = this.txtCheckTeam.Text.Trim(); + if (string.IsNullOrEmpty(this.SuperviseCheckReportId)) + { + superviseCheckReport.SuperviseCheckReportId = SQLHelper.GetNewID(typeof(Model.Supervise_SuperviseCheckReport)); + BLL.SuperviseCheckReportService.AddSuperviseCheckReport(superviseCheckReport); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnAdd); + } + else + { + var report = BLL.SuperviseCheckReportService.GetSuperviseCheckReportById(this.SuperviseCheckReportId); + if (report.IsIssued == "1") //已下发 + { + ShowNotify("已下发检查整改,无法修改!", MessageBoxIcon.Warning); + return; + } + superviseCheckReport.SuperviseCheckReportId = this.SuperviseCheckReportId; + BLL.SuperviseCheckReportService.UpdateSuperviseCheckReport(superviseCheckReport); + BLL.SuperviseCheckReportItemService.DeleteSuperviseCheckReportItemBySuperviseCheckReportId(this.SuperviseCheckReportId); + BLL.LogService.AddSys_Log(this.CurrUser, superviseCheckReport.SuperviseCheckReportCode, superviseCheckReport.SuperviseCheckReportId, BLL.Const.SuperviseCheckReportMenuId, Const.BtnModify); + } + jerqueSaveList(); + foreach (var item in superviseCheckReportItems) + { + Model.Supervise_SuperviseCheckReportItem superviseCheckReportItem = new Model.Supervise_SuperviseCheckReportItem + { + SuperviseCheckReportItemId = item.SuperviseCheckReportItemId, + SuperviseCheckReportId = superviseCheckReport.SuperviseCheckReportId, + RectifyItemId = item.RectifyItemId, + IsSelected = item.IsSelected, + AttachUrl = item.AttachUrl + }; + BLL.SuperviseCheckReportItemService.AddSuperviseCheckReportItem(superviseCheckReportItem); + } + + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion + + #region 关闭弹出窗 + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + jerqueSaveList(); + if (!string.IsNullOrEmpty(hdAttachUrl.Text)) + { + var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == hdId.Text); + item.AttachUrl = hdAttachUrl.Text; + item.AttachUrlName = hdAttachUrl.Text.Substring((hdAttachUrl.Text.LastIndexOf("~") + 1), (hdAttachUrl.Text.Length - hdAttachUrl.Text.LastIndexOf("~") - 1)); + } + Grid1.DataSource = superviseCheckReportItems; + Grid1.DataBind(); + GetCheckItem(); + hdId.Text = string.Empty; + hdAttachUrl.Text = string.Empty; + } + #endregion + + #region 保存集合 + /// + /// 保存集合 + /// + private void jerqueSaveList() + { + for (int i = 0; i < Grid1.Rows.Count; i++) + { + if (Grid1.Rows[i].Values[7] != null && Grid1.Rows[i].Values[7].ToString() != "") + { + var item = superviseCheckReportItems.FirstOrDefault(e => e.SuperviseCheckReportItemId == Grid1.Rows[i].Values[7].ToString()); + //item.IsSelected = ((System.Web.UI.WebControls.CheckBox)(Grid1.Rows[i].FindControl("ckbIsSelected"))).Checked; + CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); + item.IsSelected = checkField.GetCheckedState(i); + item.AttachUrl = Grid1.Rows[i].Values[8].ToString(); + } + } + } + #endregion + + #region 验证检查编号是否存在 + /// + /// 验证检查编号是否存在 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + var standard = Funs.DB.Supervise_SuperviseCheckReport.FirstOrDefault(x => x.SuperviseCheckReportCode == this.txtSuperviseCheckReportCode.Text.Trim() && (x.SuperviseCheckReportId != this.SuperviseCheckReportId || (this.SuperviseCheckReportId == null && x.SuperviseCheckReportId != null))); + if (standard != null) + { + ShowNotify("输入的检查编号已存在!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SuperviseCheckReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + + protected void ddlProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + this.ddlUnitId.Items.Clear(); + BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.designer.cs new file mode 100644 index 00000000..baa5c2e4 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.designer.cs @@ -0,0 +1,251 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Supervise +{ + + + public partial class SuperviseCheckReportEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtSuperviseCheckReportCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSuperviseCheckReportCode; + + /// + /// drpCheckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckType; + + /// + /// dpkCheckDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCheckDate; + + /// + /// ddlProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlProjectId; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// txtCheckTeam 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCheckTeam; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdItemId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdItemId; + + /// + /// btnSelect 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSelect; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// txtSuperviseCheckReportItemId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSuperviseCheckReportItemId; + + /// + /// txtAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAttachUrl; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// hdId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdId; + + /// + /// hdAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdAttachUrl; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + } +} diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index b0728327..658c8c3f 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -48,6 +48,7 @@ + @@ -58,6 +59,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 408a0d4a..9a07f5bf 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -31,6 +31,15 @@ + + + + + + + + + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index f41a62c1..28b5186b 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1391,6 +1391,18 @@ namespace Model partial void InsertSolution_SolutionTemplate(Solution_SolutionTemplate instance); partial void UpdateSolution_SolutionTemplate(Solution_SolutionTemplate instance); partial void DeleteSolution_SolutionTemplate(Solution_SolutionTemplate instance); + partial void InsertSupervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify instance); + partial void UpdateSupervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify instance); + partial void DeleteSupervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify instance); + partial void InsertSupervise_SubUnitCheckRectifyItem(Supervise_SubUnitCheckRectifyItem instance); + partial void UpdateSupervise_SubUnitCheckRectifyItem(Supervise_SubUnitCheckRectifyItem instance); + partial void DeleteSupervise_SubUnitCheckRectifyItem(Supervise_SubUnitCheckRectifyItem instance); + partial void InsertSupervise_SuperviseCheckRectify(Supervise_SuperviseCheckRectify instance); + partial void UpdateSupervise_SuperviseCheckRectify(Supervise_SuperviseCheckRectify instance); + partial void DeleteSupervise_SuperviseCheckRectify(Supervise_SuperviseCheckRectify instance); + partial void InsertSupervise_SuperviseCheckRectifyItem(Supervise_SuperviseCheckRectifyItem instance); + partial void UpdateSupervise_SuperviseCheckRectifyItem(Supervise_SuperviseCheckRectifyItem instance); + partial void DeleteSupervise_SuperviseCheckRectifyItem(Supervise_SuperviseCheckRectifyItem instance); partial void InsertSupervise_SuperviseCheckReport(Supervise_SuperviseCheckReport instance); partial void UpdateSupervise_SuperviseCheckReport(Supervise_SuperviseCheckReport instance); partial void DeleteSupervise_SuperviseCheckReport(Supervise_SuperviseCheckReport instance); @@ -5323,6 +5335,38 @@ namespace Model } } + public System.Data.Linq.Table Supervise_SubUnitCheckRectify + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Supervise_SubUnitCheckRectifyItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Supervise_SuperviseCheckRectify + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Supervise_SuperviseCheckRectifyItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Supervise_SuperviseCheckReport { get @@ -6451,6 +6495,30 @@ namespace Model } } + public System.Data.Linq.Table View_Supervise_SuperviseCheckRectify + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_Supervise_SuperviseCheckRectifyItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_Supervise_SuperviseCheckReportItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_Sys_RoleItem { get @@ -6467,6 +6535,14 @@ namespace Model } } + public System.Data.Linq.Table View_Technique_RectifyItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_Technique_SpecialScheme { get @@ -7375,6 +7451,8 @@ namespace Model private string _States; + private string _IsAttempt; + private EntityRef _Base_AccidentType; private EntityRef _Base_Project; @@ -7421,6 +7499,8 @@ namespace Model partial void OnCompileDateChanged(); partial void OnStatesChanging(string value); partial void OnStatesChanged(); + partial void OnIsAttemptChanging(string value); + partial void OnIsAttemptChanged(); #endregion public Accident_AccidentPersonRecord() @@ -7773,6 +7853,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAttempt", DbType="Char(1)")] + public string IsAttempt + { + get + { + return this._IsAttempt; + } + set + { + if ((this._IsAttempt != value)) + { + this.OnIsAttemptChanging(value); + this.SendPropertyChanging(); + this._IsAttempt = value; + this.SendPropertyChanged("IsAttempt"); + this.OnIsAttemptChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentPersonRecord_Base_AccidentType", Storage="_Base_AccidentType", ThisKey="AccidentTypeId", OtherKey="AccidentTypeId", IsForeignKey=true)] public Base_AccidentType Base_AccidentType { @@ -20839,6 +20939,8 @@ namespace Model private EntitySet _Solution_SolutionTemplate; + private EntitySet _Supervise_SuperviseCheckRectify; + private EntitySet _Supervise_SuperviseCheckReport; private EntitySet _Sys_CodeRecords; @@ -21095,6 +21197,7 @@ namespace Model this._Solution_LargerHazardList = new EntitySet(new Action(this.attach_Solution_LargerHazardList), new Action(this.detach_Solution_LargerHazardList)); this._Solution_LargerHazard = new EntitySet(new Action(this.attach_Solution_LargerHazard), new Action(this.detach_Solution_LargerHazard)); this._Solution_SolutionTemplate = new EntitySet(new Action(this.attach_Solution_SolutionTemplate), new Action(this.detach_Solution_SolutionTemplate)); + this._Supervise_SuperviseCheckRectify = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckRectify), new Action(this.detach_Supervise_SuperviseCheckRectify)); this._Supervise_SuperviseCheckReport = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReport), new Action(this.detach_Supervise_SuperviseCheckReport)); this._Sys_CodeRecords = new EntitySet(new Action(this.attach_Sys_CodeRecords), new Action(this.detach_Sys_CodeRecords)); this._Sys_FlowOperate = new EntitySet(new Action(this.attach_Sys_FlowOperate), new Action(this.detach_Sys_FlowOperate)); @@ -23629,6 +23732,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectify_Base_Project", Storage="_Supervise_SuperviseCheckRectify", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SuperviseCheckRectify + { + get + { + return this._Supervise_SuperviseCheckRectify; + } + set + { + this._Supervise_SuperviseCheckRectify.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_Project", Storage="_Supervise_SuperviseCheckReport", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Supervise_SuperviseCheckReport { @@ -25676,6 +25792,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Supervise_SuperviseCheckRectify(Supervise_SuperviseCheckRectify entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Supervise_SuperviseCheckRectify(Supervise_SuperviseCheckRectify entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Supervise_SuperviseCheckReport(Supervise_SuperviseCheckReport entity) { this.SendPropertyChanging(); @@ -29738,6 +29866,10 @@ namespace Model private EntitySet _Solution_LargerHazardListItem; + private EntitySet _Supervise_SubUnitCheckRectify; + + private EntitySet _Supervise_SuperviseCheckRectify; + private EntitySet _Supervise_SuperviseCheckReport; private EntitySet _Technical_TechnicalDisclose; @@ -29920,6 +30052,8 @@ namespace Model this._Solution_ConstructSolution = new EntitySet(new Action(this.attach_Solution_ConstructSolution), new Action(this.detach_Solution_ConstructSolution)); this._Solution_CQMSConstructSolution = new EntitySet(new Action(this.attach_Solution_CQMSConstructSolution), new Action(this.detach_Solution_CQMSConstructSolution)); this._Solution_LargerHazardListItem = new EntitySet(new Action(this.attach_Solution_LargerHazardListItem), new Action(this.detach_Solution_LargerHazardListItem)); + this._Supervise_SubUnitCheckRectify = new EntitySet(new Action(this.attach_Supervise_SubUnitCheckRectify), new Action(this.detach_Supervise_SubUnitCheckRectify)); + this._Supervise_SuperviseCheckRectify = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckRectify), new Action(this.detach_Supervise_SuperviseCheckRectify)); this._Supervise_SuperviseCheckReport = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReport), new Action(this.detach_Supervise_SuperviseCheckReport)); this._Technical_TechnicalDisclose = new EntitySet(new Action(this.attach_Technical_TechnicalDisclose), new Action(this.detach_Technical_TechnicalDisclose)); this._Technique_SpecialScheme = new EntitySet(new Action(this.attach_Technique_SpecialScheme), new Action(this.detach_Technique_SpecialScheme)); @@ -31841,6 +31975,32 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SubUnitCheckRectify_Base_Unit", Storage="_Supervise_SubUnitCheckRectify", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SubUnitCheckRectify + { + get + { + return this._Supervise_SubUnitCheckRectify; + } + set + { + this._Supervise_SubUnitCheckRectify.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectify_Base_Unit", Storage="_Supervise_SuperviseCheckRectify", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SuperviseCheckRectify + { + get + { + return this._Supervise_SuperviseCheckRectify; + } + set + { + this._Supervise_SuperviseCheckRectify.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_Unit", Storage="_Supervise_SuperviseCheckReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Supervise_SuperviseCheckReport { @@ -33285,6 +33445,30 @@ namespace Model entity.Base_Unit = null; } + private void attach_Supervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Supervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_Supervise_SuperviseCheckRectify(Supervise_SuperviseCheckRectify entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Supervise_SuperviseCheckRectify(Supervise_SuperviseCheckRectify entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Supervise_SuperviseCheckReport(Supervise_SuperviseCheckReport entity) { this.SendPropertyChanging(); @@ -222590,6 +222774,1605 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_SubUnitCheckRectify")] + public partial class Supervise_SubUnitCheckRectify : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SubUnitCheckRectifyId; + + private string _SuperviseCheckReportId; + + private string _UnitId; + + private string _CheckRectType; + + private string _Values1; + + private string _Values2; + + private string _Values3; + + private string _Values4; + + private string _Values5; + + private string _Values6; + + private string _Values7; + + private string _Values8; + + private string _AttachUrl; + + private System.Nullable _UpDateTime; + + private string _UpState; + + private System.Nullable _CheckEndDate; + + private EntityRef _Base_Unit; + + private EntityRef _Supervise_SuperviseCheckReport; + + private EntitySet _Supervise_SubUnitCheckRectifyItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSubUnitCheckRectifyIdChanging(string value); + partial void OnSubUnitCheckRectifyIdChanged(); + partial void OnSuperviseCheckReportIdChanging(string value); + partial void OnSuperviseCheckReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnCheckRectTypeChanging(string value); + partial void OnCheckRectTypeChanged(); + partial void OnValues1Changing(string value); + partial void OnValues1Changed(); + partial void OnValues2Changing(string value); + partial void OnValues2Changed(); + partial void OnValues3Changing(string value); + partial void OnValues3Changed(); + partial void OnValues4Changing(string value); + partial void OnValues4Changed(); + partial void OnValues5Changing(string value); + partial void OnValues5Changed(); + partial void OnValues6Changing(string value); + partial void OnValues6Changed(); + partial void OnValues7Changing(string value); + partial void OnValues7Changed(); + partial void OnValues8Changing(string value); + partial void OnValues8Changed(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnUpDateTimeChanging(System.Nullable value); + partial void OnUpDateTimeChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnCheckEndDateChanging(System.Nullable value); + partial void OnCheckEndDateChanged(); + #endregion + + public Supervise_SubUnitCheckRectify() + { + this._Base_Unit = default(EntityRef); + this._Supervise_SuperviseCheckReport = default(EntityRef); + this._Supervise_SubUnitCheckRectifyItem = new EntitySet(new Action(this.attach_Supervise_SubUnitCheckRectifyItem), new Action(this.detach_Supervise_SubUnitCheckRectifyItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubUnitCheckRectifyId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SubUnitCheckRectifyId + { + get + { + return this._SubUnitCheckRectifyId; + } + set + { + if ((this._SubUnitCheckRectifyId != value)) + { + this.OnSubUnitCheckRectifyIdChanging(value); + this.SendPropertyChanging(); + this._SubUnitCheckRectifyId = value; + this.SendPropertyChanged("SubUnitCheckRectifyId"); + this.OnSubUnitCheckRectifyIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckReportId", DbType="NVarChar(50)")] + public string SuperviseCheckReportId + { + get + { + return this._SuperviseCheckReportId; + } + set + { + if ((this._SuperviseCheckReportId != value)) + { + if (this._Supervise_SuperviseCheckReport.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSuperviseCheckReportIdChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckReportId = value; + this.SendPropertyChanged("SuperviseCheckReportId"); + this.OnSuperviseCheckReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckRectType", DbType="Char(1)")] + public string CheckRectType + { + get + { + return this._CheckRectType; + } + set + { + if ((this._CheckRectType != value)) + { + this.OnCheckRectTypeChanging(value); + this.SendPropertyChanging(); + this._CheckRectType = value; + this.SendPropertyChanged("CheckRectType"); + this.OnCheckRectTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Values1", DbType="NVarChar(4000)")] + public string Values1 + { + get + { + return this._Values1; + } + set + { + if ((this._Values1 != value)) + { + this.OnValues1Changing(value); + this.SendPropertyChanging(); + this._Values1 = value; + this.SendPropertyChanged("Values1"); + this.OnValues1Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Values2", DbType="NVarChar(4000)")] + public string Values2 + { + get + { + return this._Values2; + } + set + { + if ((this._Values2 != value)) + { + this.OnValues2Changing(value); + this.SendPropertyChanging(); + this._Values2 = value; + this.SendPropertyChanged("Values2"); + this.OnValues2Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Values3", DbType="NVarChar(4000)")] + public string Values3 + { + get + { + return this._Values3; + } + set + { + if ((this._Values3 != value)) + { + this.OnValues3Changing(value); + this.SendPropertyChanging(); + this._Values3 = value; + this.SendPropertyChanged("Values3"); + this.OnValues3Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Values4", DbType="NVarChar(4000)")] + public string Values4 + { + get + { + return this._Values4; + } + set + { + if ((this._Values4 != value)) + { + this.OnValues4Changing(value); + this.SendPropertyChanging(); + this._Values4 = value; + this.SendPropertyChanged("Values4"); + this.OnValues4Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Values5", DbType="NVarChar(4000)")] + public string Values5 + { + get + { + return this._Values5; + } + set + { + if ((this._Values5 != value)) + { + this.OnValues5Changing(value); + this.SendPropertyChanging(); + this._Values5 = value; + this.SendPropertyChanged("Values5"); + this.OnValues5Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Values6", DbType="NVarChar(4000)")] + public string Values6 + { + get + { + return this._Values6; + } + set + { + if ((this._Values6 != value)) + { + this.OnValues6Changing(value); + this.SendPropertyChanging(); + this._Values6 = value; + this.SendPropertyChanged("Values6"); + this.OnValues6Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Values7", DbType="NVarChar(4000)")] + public string Values7 + { + get + { + return this._Values7; + } + set + { + if ((this._Values7 != value)) + { + this.OnValues7Changing(value); + this.SendPropertyChanging(); + this._Values7 = value; + this.SendPropertyChanged("Values7"); + this.OnValues7Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Values8", DbType="NVarChar(4000)")] + public string Values8 + { + get + { + return this._Values8; + } + set + { + if ((this._Values8 != value)) + { + this.OnValues8Changing(value); + this.SendPropertyChanging(); + this._Values8 = value; + this.SendPropertyChanged("Values8"); + this.OnValues8Changed(); + } + } + } + + [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="_UpDateTime", DbType="DateTime")] + public System.Nullable UpDateTime + { + get + { + return this._UpDateTime; + } + set + { + if ((this._UpDateTime != value)) + { + this.OnUpDateTimeChanging(value); + this.SendPropertyChanging(); + this._UpDateTime = value; + this.SendPropertyChanged("UpDateTime"); + this.OnUpDateTimeChanged(); + } + } + } + + [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="_CheckEndDate", DbType="DateTime")] + public System.Nullable CheckEndDate + { + get + { + return this._CheckEndDate; + } + set + { + if ((this._CheckEndDate != value)) + { + this.OnCheckEndDateChanging(value); + this.SendPropertyChanging(); + this._CheckEndDate = value; + this.SendPropertyChanged("CheckEndDate"); + this.OnCheckEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SubUnitCheckRectify_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Supervise_SubUnitCheckRectify.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Supervise_SubUnitCheckRectify.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SubUnitCheckRectify_Supervise_SuperviseCheckReport", Storage="_Supervise_SuperviseCheckReport", ThisKey="SuperviseCheckReportId", OtherKey="SuperviseCheckReportId", IsForeignKey=true)] + public Supervise_SuperviseCheckReport Supervise_SuperviseCheckReport + { + get + { + return this._Supervise_SuperviseCheckReport.Entity; + } + set + { + Supervise_SuperviseCheckReport previousValue = this._Supervise_SuperviseCheckReport.Entity; + if (((previousValue != value) + || (this._Supervise_SuperviseCheckReport.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Supervise_SuperviseCheckReport.Entity = null; + previousValue.Supervise_SubUnitCheckRectify.Remove(this); + } + this._Supervise_SuperviseCheckReport.Entity = value; + if ((value != null)) + { + value.Supervise_SubUnitCheckRectify.Add(this); + this._SuperviseCheckReportId = value.SuperviseCheckReportId; + } + else + { + this._SuperviseCheckReportId = default(string); + } + this.SendPropertyChanged("Supervise_SuperviseCheckReport"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SubUnitCheckRectifyItem_Supervise_SubUnitCheckRectify", Storage="_Supervise_SubUnitCheckRectifyItem", ThisKey="SubUnitCheckRectifyId", OtherKey="SubUnitCheckRectifyId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SubUnitCheckRectifyItem + { + get + { + return this._Supervise_SubUnitCheckRectifyItem; + } + set + { + this._Supervise_SubUnitCheckRectifyItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Supervise_SubUnitCheckRectifyItem(Supervise_SubUnitCheckRectifyItem entity) + { + this.SendPropertyChanging(); + entity.Supervise_SubUnitCheckRectify = this; + } + + private void detach_Supervise_SubUnitCheckRectifyItem(Supervise_SubUnitCheckRectifyItem entity) + { + this.SendPropertyChanging(); + entity.Supervise_SubUnitCheckRectify = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_SubUnitCheckRectifyItem")] + public partial class Supervise_SubUnitCheckRectifyItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SubUnitCheckRectifyItemId; + + private string _SubUnitCheckRectifyId; + + private string _Name; + + private string _Sex; + + private string _UnitName; + + private string _PostName; + + private string _WorkTitle; + + private string _CheckPostName; + + private System.Nullable _CheckDate; + + private EntityRef _Supervise_SubUnitCheckRectify; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSubUnitCheckRectifyItemIdChanging(string value); + partial void OnSubUnitCheckRectifyItemIdChanged(); + partial void OnSubUnitCheckRectifyIdChanging(string value); + partial void OnSubUnitCheckRectifyIdChanged(); + partial void OnNameChanging(string value); + partial void OnNameChanged(); + partial void OnSexChanging(string value); + partial void OnSexChanged(); + partial void OnUnitNameChanging(string value); + partial void OnUnitNameChanged(); + partial void OnPostNameChanging(string value); + partial void OnPostNameChanged(); + partial void OnWorkTitleChanging(string value); + partial void OnWorkTitleChanged(); + partial void OnCheckPostNameChanging(string value); + partial void OnCheckPostNameChanged(); + partial void OnCheckDateChanging(System.Nullable value); + partial void OnCheckDateChanged(); + #endregion + + public Supervise_SubUnitCheckRectifyItem() + { + this._Supervise_SubUnitCheckRectify = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubUnitCheckRectifyItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SubUnitCheckRectifyItemId + { + get + { + return this._SubUnitCheckRectifyItemId; + } + set + { + if ((this._SubUnitCheckRectifyItemId != value)) + { + this.OnSubUnitCheckRectifyItemIdChanging(value); + this.SendPropertyChanging(); + this._SubUnitCheckRectifyItemId = value; + this.SendPropertyChanged("SubUnitCheckRectifyItemId"); + this.OnSubUnitCheckRectifyItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubUnitCheckRectifyId", DbType="NVarChar(50)")] + public string SubUnitCheckRectifyId + { + get + { + return this._SubUnitCheckRectifyId; + } + set + { + if ((this._SubUnitCheckRectifyId != value)) + { + if (this._Supervise_SubUnitCheckRectify.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSubUnitCheckRectifyIdChanging(value); + this.SendPropertyChanging(); + this._SubUnitCheckRectifyId = value; + this.SendPropertyChanged("SubUnitCheckRectifyId"); + this.OnSubUnitCheckRectifyIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this.OnNameChanging(value); + this.SendPropertyChanging(); + this._Name = value; + this.SendPropertyChanged("Name"); + this.OnNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sex", DbType="NVarChar(50)")] + public string Sex + { + get + { + return this._Sex; + } + set + { + if ((this._Sex != value)) + { + this.OnSexChanging(value); + this.SendPropertyChanging(); + this._Sex = value; + this.SendPropertyChanged("Sex"); + this.OnSexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(500)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this.OnUnitNameChanging(value); + this.SendPropertyChanging(); + this._UnitName = value; + this.SendPropertyChanged("UnitName"); + this.OnUnitNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostName", DbType="NVarChar(200)")] + public string PostName + { + get + { + return this._PostName; + } + set + { + if ((this._PostName != value)) + { + this.OnPostNameChanging(value); + this.SendPropertyChanging(); + this._PostName = value; + this.SendPropertyChanged("PostName"); + this.OnPostNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkTitle", DbType="NVarChar(200)")] + public string WorkTitle + { + get + { + return this._WorkTitle; + } + set + { + if ((this._WorkTitle != value)) + { + this.OnWorkTitleChanging(value); + this.SendPropertyChanging(); + this._WorkTitle = value; + this.SendPropertyChanged("WorkTitle"); + this.OnWorkTitleChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckPostName", DbType="NVarChar(200)")] + public string CheckPostName + { + get + { + return this._CheckPostName; + } + set + { + if ((this._CheckPostName != value)) + { + this.OnCheckPostNameChanging(value); + this.SendPropertyChanging(); + this._CheckPostName = value; + this.SendPropertyChanged("CheckPostName"); + this.OnCheckPostNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this.OnCheckDateChanging(value); + this.SendPropertyChanging(); + this._CheckDate = value; + this.SendPropertyChanged("CheckDate"); + this.OnCheckDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SubUnitCheckRectifyItem_Supervise_SubUnitCheckRectify", Storage="_Supervise_SubUnitCheckRectify", ThisKey="SubUnitCheckRectifyId", OtherKey="SubUnitCheckRectifyId", IsForeignKey=true)] + public Supervise_SubUnitCheckRectify Supervise_SubUnitCheckRectify + { + get + { + return this._Supervise_SubUnitCheckRectify.Entity; + } + set + { + Supervise_SubUnitCheckRectify previousValue = this._Supervise_SubUnitCheckRectify.Entity; + if (((previousValue != value) + || (this._Supervise_SubUnitCheckRectify.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Supervise_SubUnitCheckRectify.Entity = null; + previousValue.Supervise_SubUnitCheckRectifyItem.Remove(this); + } + this._Supervise_SubUnitCheckRectify.Entity = value; + if ((value != null)) + { + value.Supervise_SubUnitCheckRectifyItem.Add(this); + this._SubUnitCheckRectifyId = value.SubUnitCheckRectifyId; + } + else + { + this._SubUnitCheckRectifyId = default(string); + } + this.SendPropertyChanged("Supervise_SubUnitCheckRectify"); + } + } + } + + 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.Supervise_SuperviseCheckRectify")] + public partial class Supervise_SuperviseCheckRectify : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SuperviseCheckRectifyId; + + private string _SuperviseCheckRectifyCode; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _CheckDate; + + private string _IssueMan; + + private System.Nullable _IssueDate; + + private string _SuperviseCheckReportId; + + private string _HandleState; + + private System.Nullable _IsFromMainUnit; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntitySet _Supervise_SuperviseCheckRectifyItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSuperviseCheckRectifyIdChanging(string value); + partial void OnSuperviseCheckRectifyIdChanged(); + partial void OnSuperviseCheckRectifyCodeChanging(string value); + partial void OnSuperviseCheckRectifyCodeChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnCheckDateChanging(System.Nullable value); + partial void OnCheckDateChanged(); + partial void OnIssueManChanging(string value); + partial void OnIssueManChanged(); + partial void OnIssueDateChanging(System.Nullable value); + partial void OnIssueDateChanged(); + partial void OnSuperviseCheckReportIdChanging(string value); + partial void OnSuperviseCheckReportIdChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnIsFromMainUnitChanging(System.Nullable value); + partial void OnIsFromMainUnitChanged(); + #endregion + + public Supervise_SuperviseCheckRectify() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Supervise_SuperviseCheckRectifyItem = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckRectifyItem), new Action(this.detach_Supervise_SuperviseCheckRectifyItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckRectifyId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SuperviseCheckRectifyId + { + get + { + return this._SuperviseCheckRectifyId; + } + set + { + if ((this._SuperviseCheckRectifyId != value)) + { + this.OnSuperviseCheckRectifyIdChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckRectifyId = value; + this.SendPropertyChanged("SuperviseCheckRectifyId"); + this.OnSuperviseCheckRectifyIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckRectifyCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SuperviseCheckRectifyCode + { + get + { + return this._SuperviseCheckRectifyCode; + } + set + { + if ((this._SuperviseCheckRectifyCode != value)) + { + this.OnSuperviseCheckRectifyCodeChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckRectifyCode = value; + this.SendPropertyChanged("SuperviseCheckRectifyCode"); + this.OnSuperviseCheckRectifyCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this.OnCheckDateChanging(value); + this.SendPropertyChanging(); + this._CheckDate = value; + this.SendPropertyChanged("CheckDate"); + this.OnCheckDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueMan", DbType="NVarChar(50)")] + public string IssueMan + { + get + { + return this._IssueMan; + } + set + { + if ((this._IssueMan != value)) + { + this.OnIssueManChanging(value); + this.SendPropertyChanging(); + this._IssueMan = value; + this.SendPropertyChanged("IssueMan"); + this.OnIssueManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueDate", DbType="DateTime")] + public System.Nullable IssueDate + { + get + { + return this._IssueDate; + } + set + { + if ((this._IssueDate != value)) + { + this.OnIssueDateChanging(value); + this.SendPropertyChanging(); + this._IssueDate = value; + this.SendPropertyChanged("IssueDate"); + this.OnIssueDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckReportId", DbType="NVarChar(50)")] + public string SuperviseCheckReportId + { + get + { + return this._SuperviseCheckReportId; + } + set + { + if ((this._SuperviseCheckReportId != value)) + { + this.OnSuperviseCheckReportIdChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckReportId = value; + this.SendPropertyChanged("SuperviseCheckReportId"); + this.OnSuperviseCheckReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsFromMainUnit", DbType="Bit")] + public System.Nullable IsFromMainUnit + { + get + { + return this._IsFromMainUnit; + } + set + { + if ((this._IsFromMainUnit != value)) + { + this.OnIsFromMainUnitChanging(value); + this.SendPropertyChanging(); + this._IsFromMainUnit = value; + this.SendPropertyChanged("IsFromMainUnit"); + this.OnIsFromMainUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectify_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Supervise_SuperviseCheckRectify.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Supervise_SuperviseCheckRectify.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectify_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Supervise_SuperviseCheckRectify.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Supervise_SuperviseCheckRectify.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectifyItem_Supervise_SuperviseCheckRectify", Storage="_Supervise_SuperviseCheckRectifyItem", ThisKey="SuperviseCheckRectifyId", OtherKey="SuperviseCheckRectifyId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SuperviseCheckRectifyItem + { + get + { + return this._Supervise_SuperviseCheckRectifyItem; + } + set + { + this._Supervise_SuperviseCheckRectifyItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Supervise_SuperviseCheckRectifyItem(Supervise_SuperviseCheckRectifyItem entity) + { + this.SendPropertyChanging(); + entity.Supervise_SuperviseCheckRectify = this; + } + + private void detach_Supervise_SuperviseCheckRectifyItem(Supervise_SuperviseCheckRectifyItem entity) + { + this.SendPropertyChanging(); + entity.Supervise_SuperviseCheckRectify = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Supervise_SuperviseCheckRectifyItem")] + public partial class Supervise_SuperviseCheckRectifyItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SuperviseCheckRectifyItemId; + + private string _SuperviseCheckRectifyId; + + private string _RectifyItemId; + + private string _ConfirmMan; + + private System.Nullable _ConfirmDate; + + private System.Nullable _OrderEndDate; + + private string _OrderEndPerson; + + private System.Nullable _RealEndDate; + + private string _AttachUrl; + + private string _VerifierName; + + private System.Nullable _VerifierDate; + + private EntityRef _Supervise_SuperviseCheckRectify; + + private EntityRef _Technique_RectifyItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSuperviseCheckRectifyItemIdChanging(string value); + partial void OnSuperviseCheckRectifyItemIdChanged(); + partial void OnSuperviseCheckRectifyIdChanging(string value); + partial void OnSuperviseCheckRectifyIdChanged(); + partial void OnRectifyItemIdChanging(string value); + partial void OnRectifyItemIdChanged(); + partial void OnConfirmManChanging(string value); + partial void OnConfirmManChanged(); + partial void OnConfirmDateChanging(System.Nullable value); + partial void OnConfirmDateChanged(); + partial void OnOrderEndDateChanging(System.Nullable value); + partial void OnOrderEndDateChanged(); + partial void OnOrderEndPersonChanging(string value); + partial void OnOrderEndPersonChanged(); + partial void OnRealEndDateChanging(System.Nullable value); + partial void OnRealEndDateChanged(); + partial void OnAttachUrlChanging(string value); + partial void OnAttachUrlChanged(); + partial void OnVerifierNameChanging(string value); + partial void OnVerifierNameChanged(); + partial void OnVerifierDateChanging(System.Nullable value); + partial void OnVerifierDateChanged(); + #endregion + + public Supervise_SuperviseCheckRectifyItem() + { + this._Supervise_SuperviseCheckRectify = default(EntityRef); + this._Technique_RectifyItem = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckRectifyItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SuperviseCheckRectifyItemId + { + get + { + return this._SuperviseCheckRectifyItemId; + } + set + { + if ((this._SuperviseCheckRectifyItemId != value)) + { + this.OnSuperviseCheckRectifyItemIdChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckRectifyItemId = value; + this.SendPropertyChanged("SuperviseCheckRectifyItemId"); + this.OnSuperviseCheckRectifyItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckRectifyId", DbType="NVarChar(50)")] + public string SuperviseCheckRectifyId + { + get + { + return this._SuperviseCheckRectifyId; + } + set + { + if ((this._SuperviseCheckRectifyId != value)) + { + if (this._Supervise_SuperviseCheckRectify.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSuperviseCheckRectifyIdChanging(value); + this.SendPropertyChanging(); + this._SuperviseCheckRectifyId = value; + this.SendPropertyChanged("SuperviseCheckRectifyId"); + this.OnSuperviseCheckRectifyIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyItemId", DbType="NVarChar(50)")] + public string RectifyItemId + { + get + { + return this._RectifyItemId; + } + set + { + if ((this._RectifyItemId != value)) + { + if (this._Technique_RectifyItem.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnRectifyItemIdChanging(value); + this.SendPropertyChanging(); + this._RectifyItemId = value; + this.SendPropertyChanged("RectifyItemId"); + this.OnRectifyItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmMan", DbType="NVarChar(50)")] + public string ConfirmMan + { + get + { + return this._ConfirmMan; + } + set + { + if ((this._ConfirmMan != value)) + { + this.OnConfirmManChanging(value); + this.SendPropertyChanging(); + this._ConfirmMan = value; + this.SendPropertyChanged("ConfirmMan"); + this.OnConfirmManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmDate", DbType="DateTime")] + public System.Nullable ConfirmDate + { + get + { + return this._ConfirmDate; + } + set + { + if ((this._ConfirmDate != value)) + { + this.OnConfirmDateChanging(value); + this.SendPropertyChanging(); + this._ConfirmDate = value; + this.SendPropertyChanged("ConfirmDate"); + this.OnConfirmDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderEndDate", DbType="DateTime")] + public System.Nullable OrderEndDate + { + get + { + return this._OrderEndDate; + } + set + { + if ((this._OrderEndDate != value)) + { + this.OnOrderEndDateChanging(value); + this.SendPropertyChanging(); + this._OrderEndDate = value; + this.SendPropertyChanged("OrderEndDate"); + this.OnOrderEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderEndPerson", DbType="NVarChar(50)")] + public string OrderEndPerson + { + get + { + return this._OrderEndPerson; + } + set + { + if ((this._OrderEndPerson != value)) + { + this.OnOrderEndPersonChanging(value); + this.SendPropertyChanging(); + this._OrderEndPerson = value; + this.SendPropertyChanged("OrderEndPerson"); + this.OnOrderEndPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealEndDate", DbType="DateTime")] + public System.Nullable RealEndDate + { + get + { + return this._RealEndDate; + } + set + { + if ((this._RealEndDate != value)) + { + this.OnRealEndDateChanging(value); + this.SendPropertyChanging(); + this._RealEndDate = value; + this.SendPropertyChanged("RealEndDate"); + this.OnRealEndDateChanged(); + } + } + } + + [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="_VerifierName", DbType="NVarChar(50)")] + public string VerifierName + { + get + { + return this._VerifierName; + } + set + { + if ((this._VerifierName != value)) + { + this.OnVerifierNameChanging(value); + this.SendPropertyChanging(); + this._VerifierName = value; + this.SendPropertyChanged("VerifierName"); + this.OnVerifierNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VerifierDate", DbType="DateTime")] + public System.Nullable VerifierDate + { + get + { + return this._VerifierDate; + } + set + { + if ((this._VerifierDate != value)) + { + this.OnVerifierDateChanging(value); + this.SendPropertyChanging(); + this._VerifierDate = value; + this.SendPropertyChanged("VerifierDate"); + this.OnVerifierDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectifyItem_Supervise_SuperviseCheckRectify", Storage="_Supervise_SuperviseCheckRectify", ThisKey="SuperviseCheckRectifyId", OtherKey="SuperviseCheckRectifyId", IsForeignKey=true)] + public Supervise_SuperviseCheckRectify Supervise_SuperviseCheckRectify + { + get + { + return this._Supervise_SuperviseCheckRectify.Entity; + } + set + { + Supervise_SuperviseCheckRectify previousValue = this._Supervise_SuperviseCheckRectify.Entity; + if (((previousValue != value) + || (this._Supervise_SuperviseCheckRectify.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Supervise_SuperviseCheckRectify.Entity = null; + previousValue.Supervise_SuperviseCheckRectifyItem.Remove(this); + } + this._Supervise_SuperviseCheckRectify.Entity = value; + if ((value != null)) + { + value.Supervise_SuperviseCheckRectifyItem.Add(this); + this._SuperviseCheckRectifyId = value.SuperviseCheckRectifyId; + } + else + { + this._SuperviseCheckRectifyId = default(string); + } + this.SendPropertyChanged("Supervise_SuperviseCheckRectify"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectifyItem_Technique_RectifyItem", Storage="_Technique_RectifyItem", ThisKey="RectifyItemId", OtherKey="RectifyItemId", IsForeignKey=true)] + public Technique_RectifyItem Technique_RectifyItem + { + get + { + return this._Technique_RectifyItem.Entity; + } + set + { + Technique_RectifyItem previousValue = this._Technique_RectifyItem.Entity; + if (((previousValue != value) + || (this._Technique_RectifyItem.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Technique_RectifyItem.Entity = null; + previousValue.Supervise_SuperviseCheckRectifyItem.Remove(this); + } + this._Technique_RectifyItem.Entity = value; + if ((value != null)) + { + value.Supervise_SuperviseCheckRectifyItem.Add(this); + this._RectifyItemId = value.RectifyItemId; + } + else + { + this._RectifyItemId = default(string); + } + this.SendPropertyChanged("Technique_RectifyItem"); + } + } + } + + 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.Supervise_SuperviseCheckReport")] public partial class Supervise_SuperviseCheckReport : INotifyPropertyChanging, INotifyPropertyChanged { @@ -222616,6 +224399,8 @@ namespace Model private string _CheckType; + private EntitySet _Supervise_SubUnitCheckRectify; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -222650,6 +224435,7 @@ namespace Model public Supervise_SuperviseCheckReport() { + this._Supervise_SubUnitCheckRectify = new EntitySet(new Action(this.attach_Supervise_SubUnitCheckRectify), new Action(this.detach_Supervise_SubUnitCheckRectify)); this._Base_Project = default(EntityRef); this._Base_Unit = default(EntityRef); this._Supervise_SuperviseCheckReportItem = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckReportItem), new Action(this.detach_Supervise_SuperviseCheckReportItem)); @@ -222864,6 +224650,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SubUnitCheckRectify_Supervise_SuperviseCheckReport", Storage="_Supervise_SubUnitCheckRectify", ThisKey="SuperviseCheckReportId", OtherKey="SuperviseCheckReportId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SubUnitCheckRectify + { + get + { + return this._Supervise_SubUnitCheckRectify; + } + set + { + this._Supervise_SubUnitCheckRectify.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckReport_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -222965,6 +224764,18 @@ namespace Model } } + private void attach_Supervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify entity) + { + this.SendPropertyChanging(); + entity.Supervise_SuperviseCheckReport = this; + } + + private void detach_Supervise_SubUnitCheckRectify(Supervise_SubUnitCheckRectify entity) + { + this.SendPropertyChanging(); + entity.Supervise_SuperviseCheckReport = null; + } + private void attach_Supervise_SuperviseCheckReportItem(Supervise_SuperviseCheckReportItem entity) { this.SendPropertyChanging(); @@ -233249,6 +235060,8 @@ namespace Model private string _UpState; + private EntitySet _Supervise_SuperviseCheckRectifyItem; + private EntityRef _Person_Persons; private EntityRef _Technique_Rectify; @@ -233287,6 +235100,7 @@ namespace Model public Technique_RectifyItem() { + this._Supervise_SuperviseCheckRectifyItem = new EntitySet(new Action(this.attach_Supervise_SuperviseCheckRectifyItem), new Action(this.detach_Supervise_SuperviseCheckRectifyItem)); this._Person_Persons = default(EntityRef); this._Technique_Rectify = default(EntityRef); OnCreated(); @@ -233560,6 +235374,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Supervise_SuperviseCheckRectifyItem_Technique_RectifyItem", Storage="_Supervise_SuperviseCheckRectifyItem", ThisKey="RectifyItemId", OtherKey="RectifyItemId", DeleteRule="NO ACTION")] + public EntitySet Supervise_SuperviseCheckRectifyItem + { + get + { + return this._Supervise_SuperviseCheckRectifyItem; + } + set + { + this._Supervise_SuperviseCheckRectifyItem.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Technique_RectifyItem_Person_Persons_AuditMan", Storage="_Person_Persons", ThisKey="AuditMan", OtherKey="PersonId", IsForeignKey=true)] public Person_Persons Person_Persons { @@ -233647,6 +235474,18 @@ namespace Model this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } + + private void attach_Supervise_SuperviseCheckRectifyItem(Supervise_SuperviseCheckRectifyItem entity) + { + this.SendPropertyChanging(); + entity.Technique_RectifyItem = this; + } + + private void detach_Supervise_SuperviseCheckRectifyItem(Supervise_SuperviseCheckRectifyItem entity) + { + this.SendPropertyChanging(); + entity.Technique_RectifyItem = null; + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Technique_SpecialScheme")] @@ -277904,6 +279743,879 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Supervise_SuperviseCheckRectify")] + public partial class View_Supervise_SuperviseCheckRectify + { + + private string _SuperviseCheckRectifyId; + + private string _SuperviseCheckRectifyCode; + + private string _ProjectId; + + private string _ProjectName; + + private string _UnitId; + + private string _ProjectUnitId; + + private string _UnitName; + + private System.Nullable _CheckDate; + + private System.Nullable _IsFromMainUnit; + + private string _HandleState; + + private string _HandleStateName; + + private string _IssueMan; + + private System.Nullable _IssueDate; + + private int _TotalCount; + + private int _CompleteCount; + + private System.Nullable _UnCompleteCount; + + public View_Supervise_SuperviseCheckRectify() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckRectifyId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SuperviseCheckRectifyId + { + get + { + return this._SuperviseCheckRectifyId; + } + set + { + if ((this._SuperviseCheckRectifyId != value)) + { + this._SuperviseCheckRectifyId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckRectifyCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SuperviseCheckRectifyCode + { + get + { + return this._SuperviseCheckRectifyCode; + } + set + { + if ((this._SuperviseCheckRectifyCode != value)) + { + this._SuperviseCheckRectifyCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(200)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this._ProjectName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectUnitId", DbType="NVarChar(50)")] + public string ProjectUnitId + { + get + { + return this._ProjectUnitId; + } + set + { + if ((this._ProjectUnitId != value)) + { + this._ProjectUnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this._CheckDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsFromMainUnit", DbType="Bit")] + public System.Nullable IsFromMainUnit + { + get + { + return this._IsFromMainUnit; + } + set + { + if ((this._IsFromMainUnit != value)) + { + this._IsFromMainUnit = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleStateName", DbType="VarChar(6) NOT NULL", CanBeNull=false)] + public string HandleStateName + { + get + { + return this._HandleStateName; + } + set + { + if ((this._HandleStateName != value)) + { + this._HandleStateName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueMan", DbType="NVarChar(50)")] + public string IssueMan + { + get + { + return this._IssueMan; + } + set + { + if ((this._IssueMan != value)) + { + this._IssueMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueDate", DbType="DateTime")] + public System.Nullable IssueDate + { + get + { + return this._IssueDate; + } + set + { + if ((this._IssueDate != value)) + { + this._IssueDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalCount", DbType="Int NOT NULL")] + public int TotalCount + { + get + { + return this._TotalCount; + } + set + { + if ((this._TotalCount != value)) + { + this._TotalCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompleteCount", DbType="Int NOT NULL")] + public int CompleteCount + { + get + { + return this._CompleteCount; + } + set + { + if ((this._CompleteCount != value)) + { + this._CompleteCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnCompleteCount", DbType="Int")] + public System.Nullable UnCompleteCount + { + get + { + return this._UnCompleteCount; + } + set + { + if ((this._UnCompleteCount != value)) + { + this._UnCompleteCount = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Supervise_SuperviseCheckRectifyItem")] + public partial class View_Supervise_SuperviseCheckRectifyItem + { + + private string _SuperviseCheckRectifyItemId; + + private string _SuperviseCheckRectifyId; + + private string _RectifyItemId; + + private string _ConfirmMan; + + private System.Nullable _ConfirmDate; + + private System.Nullable _OrderEndDate; + + private string _OrderEndPerson; + + private System.Nullable _RealEndDate; + + private string _HazardSourcePoint; + + private string _RiskAnalysis; + + private string _RiskPrevention; + + private string _RectifyName; + + private string _RectifyCode; + + private string _AttachUrl; + + private string _AttachUrlName; + + private string _UnitId; + + private System.Nullable _CheckDate; + + private string _VerifierName; + + private System.Nullable _VerifierDate; + + public View_Supervise_SuperviseCheckRectifyItem() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckRectifyItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SuperviseCheckRectifyItemId + { + get + { + return this._SuperviseCheckRectifyItemId; + } + set + { + if ((this._SuperviseCheckRectifyItemId != value)) + { + this._SuperviseCheckRectifyItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckRectifyId", DbType="NVarChar(50)")] + public string SuperviseCheckRectifyId + { + get + { + return this._SuperviseCheckRectifyId; + } + set + { + if ((this._SuperviseCheckRectifyId != value)) + { + this._SuperviseCheckRectifyId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyItemId", DbType="NVarChar(50)")] + public string RectifyItemId + { + get + { + return this._RectifyItemId; + } + set + { + if ((this._RectifyItemId != value)) + { + this._RectifyItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmMan", DbType="NVarChar(50)")] + public string ConfirmMan + { + get + { + return this._ConfirmMan; + } + set + { + if ((this._ConfirmMan != value)) + { + this._ConfirmMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmDate", DbType="DateTime")] + public System.Nullable ConfirmDate + { + get + { + return this._ConfirmDate; + } + set + { + if ((this._ConfirmDate != value)) + { + this._ConfirmDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderEndDate", DbType="DateTime")] + public System.Nullable OrderEndDate + { + get + { + return this._OrderEndDate; + } + set + { + if ((this._OrderEndDate != value)) + { + this._OrderEndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderEndPerson", DbType="NVarChar(50)")] + public string OrderEndPerson + { + get + { + return this._OrderEndPerson; + } + set + { + if ((this._OrderEndPerson != value)) + { + this._OrderEndPerson = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealEndDate", DbType="DateTime")] + public System.Nullable RealEndDate + { + get + { + return this._RealEndDate; + } + set + { + if ((this._RealEndDate != value)) + { + this._RealEndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HazardSourcePoint", DbType="NVarChar(150)")] + public string HazardSourcePoint + { + get + { + return this._HazardSourcePoint; + } + set + { + if ((this._HazardSourcePoint != value)) + { + this._HazardSourcePoint = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskAnalysis", DbType="NVarChar(500)")] + public string RiskAnalysis + { + get + { + return this._RiskAnalysis; + } + set + { + if ((this._RiskAnalysis != value)) + { + this._RiskAnalysis = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskPrevention", DbType="NVarChar(500)")] + public string RiskPrevention + { + get + { + return this._RiskPrevention; + } + set + { + if ((this._RiskPrevention != value)) + { + this._RiskPrevention = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyName", DbType="NVarChar(50)")] + public string RectifyName + { + get + { + return this._RectifyName; + } + set + { + if ((this._RectifyName != value)) + { + this._RectifyName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyCode", DbType="NVarChar(50)")] + public string RectifyCode + { + get + { + return this._RectifyCode; + } + set + { + if ((this._RectifyCode != value)) + { + this._RectifyCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this._AttachUrl = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrlName", DbType="NVarChar(2000)")] + public string AttachUrlName + { + get + { + return this._AttachUrlName; + } + set + { + if ((this._AttachUrlName != value)) + { + this._AttachUrlName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this._CheckDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VerifierName", DbType="NVarChar(50)")] + public string VerifierName + { + get + { + return this._VerifierName; + } + set + { + if ((this._VerifierName != value)) + { + this._VerifierName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VerifierDate", DbType="DateTime")] + public System.Nullable VerifierDate + { + get + { + return this._VerifierDate; + } + set + { + if ((this._VerifierDate != value)) + { + this._VerifierDate = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Supervise_SuperviseCheckReportItem")] + public partial class View_Supervise_SuperviseCheckReportItem + { + + private string _SuperviseCheckReportItemId; + + private string _SuperviseCheckReportId; + + private string _RectifyItemId; + + private System.Nullable _IsSelected; + + private string _AttachUrl; + + private string _HazardSourcePoint; + + private string _RiskAnalysis; + + private string _RiskPrevention; + + private string _SimilarRisk; + + private string _RectifyName; + + private string _RectifyCode; + + private string _AttachUrlName; + + public View_Supervise_SuperviseCheckReportItem() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SuperviseCheckReportItemId + { + get + { + return this._SuperviseCheckReportItemId; + } + set + { + if ((this._SuperviseCheckReportItemId != value)) + { + this._SuperviseCheckReportItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperviseCheckReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SuperviseCheckReportId + { + get + { + return this._SuperviseCheckReportId; + } + set + { + if ((this._SuperviseCheckReportId != value)) + { + this._SuperviseCheckReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyItemId", DbType="NVarChar(50)")] + public string RectifyItemId + { + get + { + return this._RectifyItemId; + } + set + { + if ((this._RectifyItemId != value)) + { + this._RectifyItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSelected", DbType="Bit")] + public System.Nullable IsSelected + { + get + { + return this._IsSelected; + } + set + { + if ((this._IsSelected != value)) + { + this._IsSelected = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(2000)")] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this._AttachUrl = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HazardSourcePoint", DbType="NVarChar(150)")] + public string HazardSourcePoint + { + get + { + return this._HazardSourcePoint; + } + set + { + if ((this._HazardSourcePoint != value)) + { + this._HazardSourcePoint = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskAnalysis", DbType="NVarChar(500)")] + public string RiskAnalysis + { + get + { + return this._RiskAnalysis; + } + set + { + if ((this._RiskAnalysis != value)) + { + this._RiskAnalysis = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskPrevention", DbType="NVarChar(500)")] + public string RiskPrevention + { + get + { + return this._RiskPrevention; + } + set + { + if ((this._RiskPrevention != value)) + { + this._RiskPrevention = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SimilarRisk", DbType="NVarChar(500)")] + public string SimilarRisk + { + get + { + return this._SimilarRisk; + } + set + { + if ((this._SimilarRisk != value)) + { + this._SimilarRisk = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyName", DbType="NVarChar(50)")] + public string RectifyName + { + get + { + return this._RectifyName; + } + set + { + if ((this._RectifyName != value)) + { + this._RectifyName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyCode", DbType="NVarChar(50)")] + public string RectifyCode + { + get + { + return this._RectifyCode; + } + set + { + if ((this._RectifyCode != value)) + { + this._RectifyCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrlName", DbType="NVarChar(2000)")] + public string AttachUrlName + { + get + { + return this._AttachUrlName; + } + set + { + if ((this._AttachUrlName != value)) + { + this._AttachUrlName = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Sys_RoleItem")] public partial class View_Sys_RoleItem { @@ -278408,6 +281120,285 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Technique_RectifyItem")] + public partial class View_Technique_RectifyItem + { + + private string _RectifyItemId; + + private string _RectifyId; + + private string _HazardSourcePoint; + + private string _RiskAnalysis; + + private string _RiskPrevention; + + private string _SimilarRisk; + + private string _RectifyName; + + private string _RectifyCode; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _AuditMan; + + private System.Nullable _AuditDate; + + private System.Nullable _IsPass; + + private string _CompileManName; + + private string _AuditManName; + + public View_Technique_RectifyItem() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string RectifyItemId + { + get + { + return this._RectifyItemId; + } + set + { + if ((this._RectifyItemId != value)) + { + this._RectifyItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string RectifyId + { + get + { + return this._RectifyId; + } + set + { + if ((this._RectifyId != value)) + { + this._RectifyId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HazardSourcePoint", DbType="NVarChar(150)")] + public string HazardSourcePoint + { + get + { + return this._HazardSourcePoint; + } + set + { + if ((this._HazardSourcePoint != value)) + { + this._HazardSourcePoint = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskAnalysis", DbType="NVarChar(500)")] + public string RiskAnalysis + { + get + { + return this._RiskAnalysis; + } + set + { + if ((this._RiskAnalysis != value)) + { + this._RiskAnalysis = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskPrevention", DbType="NVarChar(500)")] + public string RiskPrevention + { + get + { + return this._RiskPrevention; + } + set + { + if ((this._RiskPrevention != value)) + { + this._RiskPrevention = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SimilarRisk", DbType="NVarChar(500)")] + public string SimilarRisk + { + get + { + return this._SimilarRisk; + } + set + { + if ((this._SimilarRisk != value)) + { + this._SimilarRisk = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyName", DbType="NVarChar(50)")] + public string RectifyName + { + get + { + return this._RectifyName; + } + set + { + if ((this._RectifyName != value)) + { + this._RectifyName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyCode", DbType="NVarChar(50)")] + public string RectifyCode + { + get + { + return this._RectifyCode; + } + set + { + if ((this._RectifyCode != value)) + { + this._RectifyCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this._AuditMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditDate", DbType="DateTime")] + public System.Nullable AuditDate + { + get + { + return this._AuditDate; + } + set + { + if ((this._AuditDate != value)) + { + this._AuditDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPass", DbType="Bit")] + public System.Nullable IsPass + { + get + { + return this._IsPass; + } + set + { + if ((this._IsPass != value)) + { + this._IsPass = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileManName", DbType="NVarChar(200)")] + public string CompileManName + { + get + { + return this._CompileManName; + } + set + { + if ((this._CompileManName != value)) + { + this._CompileManName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditManName", DbType="NVarChar(200)")] + public string AuditManName + { + get + { + return this._AuditManName; + } + set + { + if ((this._AuditManName != value)) + { + this._AuditManName = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Technique_SpecialScheme")] public partial class View_Technique_SpecialScheme {