From 72f0109f93595f9a4fe33c4e3940c238b9329e5f Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Fri, 9 Jun 2023 10:20:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=A9=BF=E9=80=8F=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_CD_V2023-06-08-001.sql | 40 ++ .../版本日志/SGGLDB_CD_V2023-06-09-001.sql | 11 + SGGL/BLL/BLL.csproj | 7 + SGGL/BLL/Common/Const.cs | 59 +++ .../Check/Check_ProjectLeaderCheckService.cs | 215 ++++++++ .../SafetyLeaderGroupMeetingService.cs | 152 ++++++ SGGL/BLL/ProjectData/ProjectService.cs | 21 + SGGL/BLL/SysManage/UnitService.cs | 23 + SGGL/BLL/SysManage/UserService.cs | 10 +- .../Emergency/UnitDrillRecordListService.cs | 155 ++++++ .../Emergency/UnitEmergencyListService.cs | 150 ++++++ .../Meeting/CompanySafetyMeetingService.cs | 142 ++++++ .../Meeting/CompanySpecialMeetingService.cs | 142 ++++++ .../ZHGL/Person/CompanyBranchPersonService.cs | 117 +++++ .../Supervise/SuperviseCheckReportService.cs | 2 + .../CQMS/ManageReport/ManagerMonthC.aspx | 2 +- .../CQMS/ManageReport/ManagerMonthC.aspx.cs | 24 +- .../Controls/UnitProjectTControl.ascx | 23 + .../Controls/UnitProjectTControl.ascx.cs | 190 +++++++ .../UnitProjectTControl.ascx.designer.cs | 53 ++ SGGL/FineUIPro.Web/ErrLog.txt | 39 ++ .../Excel/DataIn/企业总部人员信息模版.xls | Bin 0 -> 31232 bytes .../Excel/DataIn/分支机构人员信息模版.xls | Bin 0 -> 26624 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 224 ++++++++ .../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 | 204 ++++++++ .../ProjectLeaderCheckEdit.aspx.designer.cs | 159 ++++++ .../HSSE/Check/ProjectLeaderCheckView.aspx | 83 +++ .../HSSE/Check/ProjectLeaderCheckView.aspx.cs | 110 ++++ .../ProjectLeaderCheckView.aspx.designer.cs | 152 ++++++ .../InApproveManager/GeneralEquipmentIn.aspx | 50 +- .../GeneralEquipmentIn.aspx.cs | 102 +++- .../GeneralEquipmentIn.aspx.designer.cs | 27 + .../GeneralEquipmentInEdit.aspx | 24 +- .../GeneralEquipmentInEdit.aspx.cs | 41 +- .../GeneralEquipmentInEdit.aspx.designer.cs | 27 - .../GeneralEquipmentInItemEdit.aspx | 11 +- .../GeneralEquipmentInItemEdit.aspx.cs | 7 + ...eneralEquipmentInItemEdit.aspx.designer.cs | 9 + .../GeneralEquipmentInView.aspx | 7 +- .../Meeting/SafetyLeaderGroupMeeting.aspx | 163 ++++++ .../Meeting/SafetyLeaderGroupMeeting.aspx.cs | 338 +++++++++++++ .../SafetyLeaderGroupMeeting.aspx.designer.cs | 251 +++++++++ .../Meeting/SafetyLeaderGroupMeetingEdit.aspx | 90 ++++ .../SafetyLeaderGroupMeetingEdit.aspx.cs | 235 +++++++++ ...etyLeaderGroupMeetingEdit.aspx.designer.cs | 204 ++++++++ .../Meeting/SafetyLeaderGroupMeetingView.aspx | 84 +++ .../SafetyLeaderGroupMeetingView.aspx.cs | 101 ++++ ...etyLeaderGroupMeetingView.aspx.designer.cs | 195 +++++++ .../ZHGL/Emergency/DrillRecordList.aspx | 131 +++++ .../ZHGL/Emergency/DrillRecordList.aspx.cs | 314 ++++++++++++ .../DrillRecordList.aspx.designer.cs | 179 +++++++ .../ZHGL/Emergency/DrillRecordListEdit.aspx | 92 ++++ .../Emergency/DrillRecordListEdit.aspx.cs | 202 ++++++++ .../DrillRecordListEdit.aspx.designer.cs | 170 +++++++ .../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 | 285 +++++++++++ .../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/Emergency/ServerEmergencySupply.aspx | 141 ++++++ .../Emergency/ServerEmergencySupply.aspx.cs | 305 +++++++++++ .../ServerEmergencySupply.aspx.designer.cs | 233 +++++++++ .../ManagementReport/HSSEMonthReport.aspx.cs | 2 +- .../ZHGL/Meeting/CompanySafetyMeeting.aspx | 124 +++++ .../ZHGL/Meeting/CompanySafetyMeeting.aspx.cs | 280 ++++++++++ .../CompanySafetyMeeting.aspx.designer.cs | 204 ++++++++ .../Meeting/CompanySafetyMeetingEdit.aspx | 90 ++++ .../Meeting/CompanySafetyMeetingEdit.aspx.cs | 201 ++++++++ .../CompanySafetyMeetingEdit.aspx.designer.cs | 204 ++++++++ .../Meeting/CompanySafetyMeetingView.aspx | 84 +++ .../Meeting/CompanySafetyMeetingView.aspx.cs | 101 ++++ .../CompanySafetyMeetingView.aspx.designer.cs | 195 +++++++ .../ZHGL/Meeting/CompanySpecialMeeting.aspx | 124 +++++ .../Meeting/CompanySpecialMeeting.aspx.cs | 280 ++++++++++ .../CompanySpecialMeeting.aspx.designer.cs | 204 ++++++++ .../Meeting/CompanySpecialMeetingEdit.aspx | 89 ++++ .../Meeting/CompanySpecialMeetingEdit.aspx.cs | 201 ++++++++ ...CompanySpecialMeetingEdit.aspx.designer.cs | 204 ++++++++ .../Meeting/CompanySpecialMeetingView.aspx | 84 +++ .../Meeting/CompanySpecialMeetingView.aspx.cs | 102 ++++ ...CompanySpecialMeetingView.aspx.designer.cs | 195 +++++++ .../ZHGL/Person/BranchPerson.aspx | 133 +++++ .../ZHGL/Person/BranchPerson.aspx.cs | 352 +++++++++++++ .../ZHGL/Person/BranchPerson.aspx.designer.cs | 222 ++++++++ .../ZHGL/Person/BranchPersonEdit.aspx | 83 +++ .../ZHGL/Person/BranchPersonEdit.aspx.cs | 207 ++++++++ .../Person/BranchPersonEdit.aspx.designer.cs | 177 +++++++ .../ZHGL/Person/BranchPersonIn.aspx | 65 +++ .../ZHGL/Person/BranchPersonIn.aspx.cs | 478 ++++++++++++++++++ .../Person/BranchPersonIn.aspx.designer.cs | 123 +++++ .../ZHGL/Person/BranchPersonView.aspx | 80 +++ .../ZHGL/Person/BranchPersonView.aspx.cs | 106 ++++ .../Person/BranchPersonView.aspx.designer.cs | 168 ++++++ .../ZHGL/Person/CompanyPerson.aspx | 128 +++++ .../ZHGL/Person/CompanyPerson.aspx.cs | 326 ++++++++++++ .../Person/CompanyPerson.aspx.designer.cs | 213 ++++++++ .../ZHGL/Person/CompanyPersonEdit.aspx | 78 +++ .../ZHGL/Person/CompanyPersonEdit.aspx.cs | 192 +++++++ .../Person/CompanyPersonEdit.aspx.designer.cs | 168 ++++++ .../ZHGL/Person/CompanyPersonIn.aspx | 65 +++ .../ZHGL/Person/CompanyPersonIn.aspx.cs | 461 +++++++++++++++++ .../Person/CompanyPersonIn.aspx.designer.cs | 123 +++++ .../ZHGL/Person/CompanyPersonView.aspx | 75 +++ .../ZHGL/Person/CompanyPersonView.aspx.cs | 101 ++++ .../Person/CompanyPersonView.aspx.designer.cs | 159 ++++++ .../ZHGL/Supervise/ShowFileUpload.aspx | 4 +- .../ZHGL/Supervise/ShowRectifyItem.aspx | 5 +- .../ZHGL/Supervise/ShowRectifyItem.aspx.cs | 3 +- .../Supervise/SubUnitCheckRectifyEdit.aspx | 8 +- .../ZHGL/Supervise/SuperviseCheckRectify.aspx | 6 +- .../Supervise/SuperviseCheckRectify.aspx.cs | 6 + .../Supervise/SuperviseCheckRectifyEdit.aspx | 4 +- .../ZHGL/Supervise/SuperviseCheckReport.aspx | 12 +- .../Supervise/SuperviseCheckReport.aspx.cs | 8 +- .../Supervise/SuperviseCheckReportEdit.aspx | 21 +- .../SuperviseCheckReportEdit.aspx.cs | 28 +- .../SuperviseCheckReportEdit.aspx.designer.cs | 75 +-- SGGL/FineUIPro.Web/common/Menu_CQMS.xml | 2 +- SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 2 + SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 6 + SGGL/WebAPI/Controllers/BaseInfoController.cs | 1 + 132 files changed, 15962 insertions(+), 205 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_CD_V2023-06-08-001.sql create mode 100644 DataBase/版本日志/SGGLDB_CD_V2023-06-09-001.sql 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/Person/CompanyBranchPersonService.cs create mode 100644 SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx create mode 100644 SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.cs create mode 100644 SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.designer.cs create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/企业总部人员信息模版.xls create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/分支机构人员信息模版.xls 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/Emergency/ServerEmergencySupply.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.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/Person/BranchPerson.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_CD_V2023-06-08-001.sql b/DataBase/版本日志/SGGLDB_CD_V2023-06-08-001.sql new file mode 100644 index 00000000..78195552 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_CD_V2023-06-08-001.sql @@ -0,0 +1,40 @@ +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'175FAEE8-F6B3-483D-839B-001AF4B45D0A', N'Ա', NULL, N'', '15', N'0', N'Menu_ZHGL', '1', '0', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'8E229597-B2D8-407B-8192-787E65E5052E', N'ҵܲԱ', NULL, N'ZHGL/Person/CompanyPerson.aspx', '10', N'175FAEE8-F6B3-483D-839B-001AF4B45D0A', N'Menu_ZHGL', '1', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'FE342650-9E64-4B9C-8023-34399E198B6F', N'֧Ա', NULL, N'ZHGL/Person/BranchPerson.aspx', '20', N'175FAEE8-F6B3-483D-839B-001AF4B45D0A', N'Menu_ZHGL', '1', '1', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'62AC6438-952A-49BE-81BA-580F7C060E33', N'8E229597-B2D8-407B-8192-787E65E5052E', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'9B133AF0-CA02-4383-9AB8-9B13BC6A84CE', N'8E229597-B2D8-407B-8192-787E65E5052E', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'A8EA6A33-090C-4D92-9CFB-225ED38FAE93', N'8E229597-B2D8-407B-8192-787E65E5052E', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'BC370144-AA46-4AD3-B26C-DF3E995388C4', N'8E229597-B2D8-407B-8192-787E65E5052E', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'232A054B-E244-4412-852B-670AA5F6CC24', N'FE342650-9E64-4B9C-8023-34399E198B6F', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'C29706B8-8092-4733-83C6-811F5F195EC9', N'FE342650-9E64-4B9C-8023-34399E198B6F', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'CB3CDFC7-1B77-4948-A431-683D197E5684', N'FE342650-9E64-4B9C-8023-34399E198B6F', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'D4A95692-847A-41C6-97EF-B36E04AFB335', N'FE342650-9E64-4B9C-8023-34399E198B6F', N'', '4'); + +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF', N'ȫ쵼С', NULL, N'HSSE/Meeting/SafetyLeaderGroupMeeting.aspx', '10', N'5309E7E0-395E-4F11-8F5E-D52E11526A2A', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'0A65A42F-2701-4DD3-9C72-7B39F1ECD560', N'DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'739A0815-D4B3-4B9F-B001-5D04EB94B9EF', N'DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'DCAB0B09-EA07-443C-9B04-2E86D9E8C2DC', N'DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'FE3476FB-1D5B-4E8E-801E-E4B9B4D287F0', N'DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF', N'ɾ', '3'); + + +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'BFFBE172-7473-486E-9833-49F13B359C6C', N'ȫ', NULL, N'', '60', N'0', N'Menu_ZHGL', '1', '0', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'B911B4F8-DDFD-4F37-9EAC-EB104F753432', N'ҵί', NULL, N'ZHGL/Meeting/CompanySafetyMeeting.aspx', '10', N'BFFBE172-7473-486E-9833-49F13B359C6C', N'Menu_ZHGL', '1', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'2497EF13-C052-4228-B388-EBC5C18963BC', N'ҵר', NULL, N'ZHGL/Meeting/CompanySpecialMeeting.aspx', '20', N'BFFBE172-7473-486E-9833-49F13B359C6C', N'Menu_ZHGL', '1', '1', '1'); + +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'05901FC0-D482-442D-9764-7DE5EA4ED991', N'B911B4F8-DDFD-4F37-9EAC-EB104F753432', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'1F841CFB-1AFC-4C9C-A56F-681E407B52F9', N'B911B4F8-DDFD-4F37-9EAC-EB104F753432', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'27DD0084-A559-4723-90B9-5F68DF3B61C4', N'B911B4F8-DDFD-4F37-9EAC-EB104F753432', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'60142F0A-3362-4264-876C-F27FFB533891', N'B911B4F8-DDFD-4F37-9EAC-EB104F753432', N'ɾ', '3'); + +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'1DF4AADF-2207-4A9E-83D0-8899E21E91BA', N'2497EF13-C052-4228-B388-EBC5C18963BC', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'395E1B2B-AF35-4867-A8F0-E471FB10C25D', N'2497EF13-C052-4228-B388-EBC5C18963BC', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'58BC6E5C-E45F-47A2-A7FC-D02F91DEF058', N'2497EF13-C052-4228-B388-EBC5C18963BC', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'92627BA3-A14A-4886-805E-038324E9747A', N'2497EF13-C052-4228-B388-EBC5C18963BC', N'޸', '2'); + + +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'355265DE-901A-4110-B934-B4DA067C4334', N'쵼', NULL, N'HSSE/Check/ProjectLeaderCheck.aspx', '35', N'467A0CB9-737D-4451-965E-869EBC3A4BD6', N'Menu_HSSE', '0', '1', '1'); + +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'87B6E85C-48DA-4BD3-8518-35968E564557', N'355265DE-901A-4110-B934-B4DA067C4334', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'AAB617C6-A800-4D59-8761-AC134C7885D3', N'355265DE-901A-4110-B934-B4DA067C4334', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'B07D2E39-60CE-4F59-895B-7D0763A65341', N'355265DE-901A-4110-B934-B4DA067C4334', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'E0860211-E41A-4D51-B5B4-99A5D0676C73', N'355265DE-901A-4110-B934-B4DA067C4334', N'', '1'); diff --git a/DataBase/版本日志/SGGLDB_CD_V2023-06-09-001.sql b/DataBase/版本日志/SGGLDB_CD_V2023-06-09-001.sql new file mode 100644 index 00000000..27d693bb --- /dev/null +++ b/DataBase/版本日志/SGGLDB_CD_V2023-06-09-001.sql @@ -0,0 +1,11 @@ +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8', N'ӦϢ', NULL, N'', '120', N'0', N'Menu_ZHGL', '0', '0', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'172F25E0-F5E2-42E3-AD67-AC824D4E0FBB', N'Ӧչ', NULL, N'ZHGL/Emergency/DrillRecordList.aspx', '20', N'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8', N'Menu_ZHGL', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'D12C2412-E12A-4F78-9AEF-1EE8AC84A561', N'ӦԤ嵥', NULL, N'ZHGL/Emergency/EmergencyList.aspx', '10', N'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8', N'Menu_ZHGL', '0', '1', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'9F63FB64-5F34-4CD4-B266-59F6E8FF4FA5', N'172F25E0-F5E2-42E3-AD67-AC824D4E0FBB', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'2193449B-4C40-49DA-9C23-82A94126AE05', N'172F25E0-F5E2-42E3-AD67-AC824D4E0FBB', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'7C866795-2E56-47CD-B937-C468C46DB007', N'172F25E0-F5E2-42E3-AD67-AC824D4E0FBB', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'27E0EE6E-D96F-4300-9574-423F378D79C4', N'172F25E0-F5E2-42E3-AD67-AC824D4E0FBB', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'4A638D22-1515-4967-B149-8362F81E3A95', N'D12C2412-E12A-4F78-9AEF-1EE8AC84A561', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'11F44E2B-F3EB-4189-B324-69DB226CF39B', N'D12C2412-E12A-4F78-9AEF-1EE8AC84A561', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'826C9DEB-7A48-4B70-9312-FC5D0D5D2555', N'D12C2412-E12A-4F78-9AEF-1EE8AC84A561', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'C4A17D4C-25A7-4F37-B6CF-F07526AECBC2', N'D12C2412-E12A-4F78-9AEF-1EE8AC84A561', N'', '4'); diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 3c7939d1..82c6ba45 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -430,6 +430,7 @@ + @@ -582,6 +583,7 @@ + @@ -793,6 +795,8 @@ + + @@ -824,6 +828,9 @@ + + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index cf09f359..f838bf92 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -454,6 +454,20 @@ namespace BLL public const string ControlEngineer = "96924E37-4809-4664-AC0B-62A6D059EFDC"; + #region 公司安全会议 + /// + /// 企业安委会 + /// + public const string CompanySafetyMeetingMenuId = "B911B4F8-DDFD-4F37-9EAC-EB104F753432"; + + /// + /// 企业专题会 + /// + public const string CompanySpecialMeetingMenuId = "2497EF13-C052-4228-B388-EBC5C18963BC"; + #endregion + + + #region 工程签证申请/评审表流程定义 /// @@ -2492,6 +2506,10 @@ namespace BLL /// public const string ProjectCheckColligationMenuId = "C198EBA8-9E23-4654-92E1-09C61105C522"; /// + /// 领导带班检查 + /// + public const string ProjectLeaderCheckMenuId = "355265DE-901A-4110-B934-B4DA067C4334"; + /// /// HSSE综合检查(公司) /// public const string ProjectCheckColligationWHMenuId = "E8363923-06CD-47C2-BFE1-F18212094710"; @@ -2625,6 +2643,12 @@ namespace BLL /// 班前会 /// public const string ProjectClassMeetingMenuId = "F8ADCDBC-AAAD-4884-9935-2B63562E4779"; + + /// + /// 安全领导小组会议 + /// + public const string ProjectSafetyLeaderGroupMeetingMenuId = "DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF"; + #endregion #region 出入场管理 @@ -5959,5 +5983,40 @@ namespace BLL /// public static string SpecialSafeTrainId = "0e7fdf78-eaa0-4d00-a60b-490040bbea18"; #endregion + + #region 人员管理 + /// + /// 企业总部人员 + /// + public const string CompanyPersonMenuId = "8E229597-B2D8-407B-8192-787E65E5052E"; + + /// + /// 分支机构人员 + /// + public const string BranchPersonMenuId = "FE342650-9E64-4B9C-8023-34399E198B6F"; + #endregion + + /// + /// 企业总部人员模版文件原始的虚拟路径 + /// + public const string CompanyPersonTemplateUrl = "File\\Excel\\DataIn\\企业总部人员信息模版.xls"; + /// + /// 分支机构人员模版文件原始的虚拟路径 + /// + public const string BranchPersonTemplateUrl = "File\\Excel\\DataIn\\分支机构人员信息模版.xls"; + + /// + /// HSSE应急预案管理清单 + /// + public const string UnitEmergencyListMenuId = "D12C2412-E12A-4F78-9AEF-1EE8AC84A561"; + + /// + /// 应急演练 + /// + public const string UnitDrillRecordListMenuId = "172F25E0-F5E2-42E3-AD67-AC824D4E0FBB"; + /// + /// 项目应急物资管理 + /// + public const string ServerEmergencySupplyMenuId = "3EA741CE-66A6-4CF8-8620-0C5906AC7D94"; } } \ No newline at end of file diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs new file mode 100644 index 00000000..fc9ad3cd --- /dev/null +++ b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs @@ -0,0 +1,215 @@ +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() + where (y.IsDelete == null || y.IsDelete == false) + 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 = UserService.getUserNamesUserIds(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/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index d792d077..63fb4838 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -202,7 +202,28 @@ select x).ToList(); return list; } + /// + /// 获取施工中项目集合 + /// + /// + public static List GetProjectWorkList(string unitId) + { + var getDatas = from x in Funs.DB.Base_Project + where (x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1) && (x.IsDelete == null || x.IsDelete == false) + select x; + if (unitId == CommonService.GetThisUnitId()) + { + getDatas = getDatas.Where(x => x.UnitId == unitId || x.UnitId == null); + } + else + { + getDatas = getDatas.Where(x => x.UnitId == unitId); + } + var list = getDatas.OrderBy(x => x.ProjectName).ToList(); + + return list; + } /// /// 获取项目下拉选项 /// diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index 1a1920b9..7f8d3fb1 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -848,5 +848,28 @@ namespace BLL Funs.FineUIPleaseSelect(dropName); } } + public static void InitNoThisAllUnitDownList(FineUIPro.DropDownList dropName, bool isShowPlease) + { + dropName.DataValueField = "UnitId"; + dropName.DataTextField = "UnitName"; + dropName.DataSource = GetNoThisAllUnitList(); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + /// + /// 获取除本单位外的所有单位名称下拉选择项 + /// + /// + public static List GetNoThisAllUnitList() + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var q = (from x in db.Base_Unit where x.UnitId != Const.UnitId_CD orderby x.UnitCode select x).ToList(); + return q; + } + } } } diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs index dc7d8c03..6453e295 100644 --- a/SGGL/BLL/SysManage/UserService.cs +++ b/SGGL/BLL/SysManage/UserService.cs @@ -18,7 +18,15 @@ namespace BLL { return Funs.DB.Sys_User.FirstOrDefault(e => e.UserId == userId); } - + /// + /// ȡûϢ + /// + /// ûId + /// ûϢ + public static Model.Sys_User GetUserByIdentityCard(string identityCard) + { + return Funs.DB.Sys_User.FirstOrDefault(e => e.IdentityCard == identityCard); + } /// ///ûȡûϢ /// 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/Person/CompanyBranchPersonService.cs b/SGGL/BLL/ZHGL/Person/CompanyBranchPersonService.cs new file mode 100644 index 00000000..06b326b2 --- /dev/null +++ b/SGGL/BLL/ZHGL/Person/CompanyBranchPersonService.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 公司分支机构人员 + /// + public static class CompanyBranchPersonService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取公司分支机构人员 + /// + /// + /// + public static Model.Person_CompanyBranchPerson GetCompanyBranchPersonById(string CompanyBranchPersonId) + { + return Funs.DB.Person_CompanyBranchPerson.FirstOrDefault(e => e.CompanyBranchPersonId == CompanyBranchPersonId); + } + + /// + /// 根据身份证号Id获取人员的数量 + /// + /// 身份证号 + /// 人员的数量 + public static Model.Person_CompanyBranchPerson GetPersonCountByIdentityCard(string identityCard) + { + var q = Funs.DB.Person_CompanyBranchPerson.FirstOrDefault(x => x.IdentityCard == identityCard); + return q; + } + + /// + /// 添加公司分支机构人员 + /// + /// + public static void AddCompanyBranchPerson(Model.Person_CompanyBranchPerson CompanyBranchPerson) + { + Model.SGGLDB db = Funs.DB; + Model.Person_CompanyBranchPerson newCompanyBranchPerson = new Model.Person_CompanyBranchPerson + { + CompanyBranchPersonId = CompanyBranchPerson.CompanyBranchPersonId, + UnitId = CompanyBranchPerson.UnitId, + PersonName = CompanyBranchPerson.PersonName, + Sex = CompanyBranchPerson.Sex, + IdentityCard = CompanyBranchPerson.IdentityCard, + WorkPostId = CompanyBranchPerson.WorkPostId, + Telephone = CompanyBranchPerson.Telephone, + Address = CompanyBranchPerson.Address, + IsOnJob = CompanyBranchPerson.IsOnJob, + Remark = CompanyBranchPerson.Remark, + }; + db.Person_CompanyBranchPerson.InsertOnSubmit(newCompanyBranchPerson); + db.SubmitChanges(); + } + + /// + /// 修改公司分支机构人员 + /// + /// + public static void UpdateCompanyBranchPerson(Model.Person_CompanyBranchPerson CompanyBranchPerson) + { + Model.SGGLDB db = Funs.DB; + Model.Person_CompanyBranchPerson newCompanyBranchPerson = db.Person_CompanyBranchPerson.FirstOrDefault(e => e.CompanyBranchPersonId == CompanyBranchPerson.CompanyBranchPersonId); + if (newCompanyBranchPerson != null) + { + newCompanyBranchPerson.UnitId = CompanyBranchPerson.UnitId; + newCompanyBranchPerson.PersonName = CompanyBranchPerson.PersonName; + newCompanyBranchPerson.Sex = CompanyBranchPerson.Sex; + newCompanyBranchPerson.IdentityCard = CompanyBranchPerson.IdentityCard; + newCompanyBranchPerson.WorkPostId = CompanyBranchPerson.WorkPostId; + newCompanyBranchPerson.Telephone = CompanyBranchPerson.Telephone; + newCompanyBranchPerson.Address = CompanyBranchPerson.Address; + newCompanyBranchPerson.IsOnJob = CompanyBranchPerson.IsOnJob; + newCompanyBranchPerson.Remark = CompanyBranchPerson.Remark; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除公司分支机构人员 + /// + /// + public static void DeleteCompanyBranchPersonById(string CompanyBranchPersonId) + { + Model.SGGLDB db = Funs.DB; + Model.Person_CompanyBranchPerson CompanyBranchPerson = db.Person_CompanyBranchPerson.FirstOrDefault(e => e.CompanyBranchPersonId == CompanyBranchPersonId); + if (CompanyBranchPerson != null) + { + BLL.CommonService.DeleteAttachFileById(CompanyBranchPersonId); + db.Person_CompanyBranchPerson.DeleteOnSubmit(CompanyBranchPerson); + db.SubmitChanges(); + } + } + + /// + /// 获取公司分支机构人员是否存在 + /// + /// 用户id + /// 身份证号码 + /// 是否存在 + public static bool IsExistPersonIdentityCard(string companyBranchPersonId, string identityCard) + { + bool isExist = false; + var role = Funs.DB.Person_CompanyBranchPerson.FirstOrDefault(x => x.IdentityCard == identityCard && (x.CompanyBranchPersonId != companyBranchPersonId || (companyBranchPersonId == null && x.CompanyBranchPersonId != null))); + if (role != null) + { + isExist = true; + } + return isExist; + } + } +} diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs index 9ed3f207..449b7fa1 100644 --- a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs @@ -36,6 +36,7 @@ namespace BLL UnitId = superviseCheckReport.UnitId, CheckTeam = superviseCheckReport.CheckTeam, EvaluationResult = superviseCheckReport.EvaluationResult, + CheckType = superviseCheckReport.CheckType, AttachUrl = superviseCheckReport.AttachUrl, IsIssued = superviseCheckReport.IsIssued }; @@ -58,6 +59,7 @@ namespace BLL 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(); diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/ManagerMonthC.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReport/ManagerMonthC.aspx index 4a004760..eef88626 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/ManagerMonthC.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/ManagerMonthC.aspx @@ -29,7 +29,7 @@ + > diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/ManagerMonthC.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/ManagerMonthC.aspx.cs index a3ef2d95..f4490a5c 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/ManagerMonthC.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/ManagerMonthC.aspx.cs @@ -72,7 +72,9 @@ namespace FineUIPro.Web.CQMS.ManageReport /// private void BindGrid() { - string strSql = @"SELECT item.* ,ISNULL(t.SumProjectTotal,0) AS SumProjectTotal + if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) + { + string strSql = @"SELECT item.* ,ISNULL(t.SumProjectTotal,0) AS SumProjectTotal FROM dbo.CQMS_MonthReportItem item LEFT JOIN dbo.CQMS_MonthReport r ON r.MonthReportId = item.MonthReportId LEFT JOIN (SELECT a.ReportItem,ISNULL(SUM(ISNULL(a.ProjectTotal,0)),0) AS SumProjectTotal @@ -82,19 +84,19 @@ namespace FineUIPro.Web.CQMS.ManageReport GROUP BY a.ReportItem )t ON t.ReportItem = item.ReportItem WHERE r.ProjectId=@ProjectId AND r.MonthReportId=@MonthReportId ORDER BY item.Sort"; - List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId)); - listStr.Add(new SqlParameter("@MonthReportId", tvControlItem.SelectedNodeID)); + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@MonthReportId", tvControlItem.SelectedNodeID)); - SqlParameter[] parameter = listStr.ToArray(); - DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter); - // 2.获取当前分页数据 - //var table = this.GetPagedDataTable(Grid1, tb1); - - Grid1.DataSource = dt; - Grid1.DataBind(); + SqlParameter[] parameter = listStr.ToArray(); + DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter); + // 2.获取当前分页数据 + //var table = this.GetPagedDataTable(Grid1, tb1); + Grid1.DataSource = dt; + Grid1.DataBind(); + } } diff --git a/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx b/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx new file mode 100644 index 00000000..6ddd9d52 --- /dev/null +++ b/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx @@ -0,0 +1,23 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UnitProjectTControl.ascx.cs" Inherits="FineUIPro.Web.Controls.UnitProjectTControl" %> + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.cs new file mode 100644 index 00000000..1eea4bce --- /dev/null +++ b/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.cs @@ -0,0 +1,190 @@ +using BLL; +using Org.BouncyCastle.Asn1.Cms; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Controls +{ + public partial class UnitProjectTControl : System.Web.UI.UserControl + { + + #region 定义页面项 + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + + /// + /// 菜单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.UnitId = this.UnitId ?? CommonService.GetThisUnitId(); + this.ProjectId=this.ProjectId; + ////加载树 + SetSubUnitProjectTree(this.tvProject); + } + } + #endregion + + /// + /// + /// + /// + /// + protected void tvProject_NodeCommand(object sender, TreeCommandEventArgs e) + { + this.UnitId = string.Empty; + this.ProjectId = string.Empty; + if (this.tvProject != null && !string.IsNullOrEmpty(this.tvProject.SelectedNodeID)) + { + if (this.tvProject.SelectedNode.ParentNode == null) + { + this.UnitId = this.tvProject.SelectedNodeID; + } + else + { + this.UnitId=this.tvProject.SelectedNode.ParentNode.NodeID; + this.ProjectId = this.tvProject.SelectedNodeID; + } + if (this.change != null) + { + this.change(this, e); + } + + } + } + + public delegate void userEvent(object sender, EventArgs arg); + + public event userEvent change; + + + #region 绑定分公司 单位-项目树 + /// + /// 绑定分公司 单位-项目树 + /// + /// + /// + public void SetSubUnitProjectTree(FineUIPro.Tree tvProject) + { + tvProject.Nodes.Clear(); + if (CommonService.GetThisUnitId() == this.UnitId) + { + var getSubUnit = from x in Funs.DB.Base_Unit + where x.UnitId == this.UnitId || x.IsBranch == true + orderby x.IsBranch, x.UnitCode + select x; + foreach (var item in getSubUnit) + { + bool isHideUPTCode = false; + var sysSet17 = (from x in Funs.DB.Sys_Set where x.SetName == "是否隐藏公司项目树单位编码" select x).ToList().FirstOrDefault(); + if (sysSet17 != null && sysSet17.IsAuto == true) + { + isHideUPTCode = true; + } + FineUIPro.TreeNode crootNode = new FineUIPro.TreeNode + { + + // Text =item.UnitCode+":"+ item.UnitName, + NodeID = item.UnitId, + EnableClickEvent = true + }; + if (isHideUPTCode) + { + crootNode.Text = item.UnitName; + } + else + { + crootNode.Text = item.UnitCode + ":" + item.UnitName; + } + tvProject.Nodes.Add(crootNode); + + var getSProjects = ProjectService.GetProjectWorkList(item.UnitId); + foreach (var sitem in getSProjects) + { + FineUIPro.TreeNode scrootNode = new FineUIPro.TreeNode + { + Text = sitem.ProjectName, + NodeID = sitem.ProjectId, + EnableClickEvent = true + }; + if (sitem.ProjectId == this.ProjectId) + { + scrootNode.Checked = true; + } + crootNode.Nodes.Add(scrootNode); + } + } + } + else + { + var getSubUnit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == this.UnitId); + if (getSubUnit != null) + { + FineUIPro.TreeNode crootNode = new FineUIPro.TreeNode + { + Text = getSubUnit.UnitName, + NodeID = getSubUnit.UnitId, + EnableClickEvent = true + }; + tvProject.Nodes.Add(crootNode); + + var getSProjects = ProjectService.GetProjectWorkList(getSubUnit.UnitId); + foreach (var sitem in getSProjects) + { + FineUIPro.TreeNode scrootNode = new FineUIPro.TreeNode + { + Text = sitem.ProjectName, + NodeID = sitem.ProjectId, + EnableClickEvent = true + }; + if (sitem.ProjectId == this.ProjectId) + { + scrootNode.Checked = true; + } + crootNode.Nodes.Add(scrootNode); + } + } + } + } + #endregion + + protected void ckState_SelectedIndexChanged(object sender, EventArgs e) + { + ////加载树 + SetSubUnitProjectTree(this.tvProject); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.designer.cs b/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.designer.cs new file mode 100644 index 00000000..c277f36f --- /dev/null +++ b/SGGL/FineUIPro.Web/Controls/UnitProjectTControl.ascx.designer.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Controls +{ + + + public partial class UnitProjectTControl + { + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ckState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList ckState; + + /// + /// tvProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvProject; + } +} diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 6f717082..ef2ca78b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1571,3 +1571,42 @@ IP地址:::1 出错时间:06/06/2023 10:02:54 + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 FineUIPro.Web.CQMS.ManageReport.ManagerMonthC.GetButtonPower() 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\CQMS\ManageReport\ManagerMonthC.aspx.cs:行号 765 + 在 FineUIPro.Web.CQMS.ManageReport.ManagerMonthC.Page_Load(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\CQMS\ManageReport\ManagerMonthC.aspx.cs:行号 29 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:06/08/2023 09:36:46 +出错文件:http://localhost:1295/CQMS/ManageReport/ManagerMonthC.aspx +IP地址:::1 + +出错时间:06/08/2023 09:36:46 + + +错误信息开始=====> +错误类型:FileNotFoundException +错误信息:未能找到文件“D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\File\Excel\DataIn\分支机构人员信息模版.xls”。 +错误堆栈: + 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) + 在 System.IO.FileInfo.get_Length() + 在 FineUIPro.Web.ZHGL.Person.BranchPersonIn.PageManager1_CustomEvent(Object sender, CustomEventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\ZHGL\Person\BranchPersonIn.aspx.cs:行号 466 + 在 FineUIPro.PageManager.OnCustomEvent(CustomEventArgs e) + 在 (PageManager , CustomEventArgs ) + 在 FineUIPro.PageManager.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:06/08/2023 11:13:04 +出错文件:http://localhost:1295/ZHGL/Person/BranchPersonIn.aspx +IP地址:::1 +操作人员:JT + +出错时间:06/08/2023 11:13:04 + diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/企业总部人员信息模版.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/企业总部人员信息模版.xls new file mode 100644 index 0000000000000000000000000000000000000000..c134cfd0613f25ded8611abde738ae3b5752c110 GIT binary patch literal 31232 zcmeG_2S5}@*K@}Khl+p{Q4o$IO?nZH1r&`MK@=+y#lj&diXswJh**e5QBmw6#)`ei zibkwRM1zVFJJ@@RiW=qq_jYgZ_V)Jf!(z9~DqSMrNV`SNWI zD+njFCOV`_W<00Ga{>0yG0?4uJN_ zz(1&I{t{6mNFw|tLtC^bBjB7w#)8JGA1sKj;+{u;AQ9t{kOJyRKF8DGhV6*O%U=Z< zRlSzrSqE?#x^#x#z&(i!BZDY8hSA86IMyRV0g_^rRh^=ke|H?6vpwknHBW__w<81L zIIubdSb5BVzX0M`CzOGer1f$rttQZ3cQS?yhrfZ8?mIy%#8NszOfrdw>k(Qgxd4CU zi}!AI`Q!auET@UGqbMjp(m>sC?|-~^*!Mri`R;$jRB>hfCmJg`!Y$py6VWpUdGA@ywZvhh)`q zbey7xY2|brFX?>z=PFwo&zzZZYH_)ojJ(X5$}m`NNC1;c>oX=N%WZzt08G2f*}T z0Q6ZM0dTC+0|3V&F#tGLNdv&~$}|8RpUeY5PHVy0;TQzVV!&%GA1WP@n371xacmP7 zKR79IbYg6>qW^{?&!0M<>uF`2vk>a< z{&sUa!0B>umY|4Iz~eX#b$zK!NQZft_pdJdKVy(bQ2>_=979fP0G@zt| z-XGFUspA$Z?|$mo3hdy`gf|lg^)7bAQ6TE3k1&|ZHu zUjg|>g^mcc!G{;Xn0r4q2`4|!A>?{v(TRhR6Mudo*sgkhcMbVP8t_*@?jT-y1Ta_N zlT!fq5g#7s7V7dKeX)l8CcOCxY01Ich%8~u1$U(VYI_HF2M6yKa1rG}UD}8m!F^}R zO6waTjp@hEU<1w&rdUj2Pj7a4h}no7KtynG>>L~_RJK5vWx+fuS^^o}BozB-Neg*Y zE{_sn?_p0xf}2u{g{U|TRsjdG+b>DnU7MSdOSY9q1*eZzcJnMx^3C5r?!4%1nA z7UaXC0Z}B=7>GzXc~mLMGu9znu|M;sgN>***@nKBj+RqXYC>MgfR-W@NDz-5)+-q} z@0U!%pNmJTeDwd#cmcMVB5?GH-Wh|)R#pEByoUz7n+Ck62E3I9yq5;Ny9RtC4fxs` z@S5b&MBk61gM$moP852u(SWDrQO{4yqmFmfK*vV|-k-wjf(xhamp4>v!GUf^xKnuT z83&A%{H4^`3C8zyejFsR@E{(I$Hgx>UILde*5cqf_ahE{RrN#L2@X&xJSRUcn5pKc z?FYI6hVMW^S}Ww#1z*ZnUtMtMe0ZFoQ}pMVm@KTlur?7{Pk|j$RDOk?>H8NaBz$_qg%=8+Yhq$i+XC99Aw?gTI4Qrx z%vR+3)Q9{6obIHWm;_6LB}9*IFEzX(|28^*8aKZj-%^fOrMN2LfINri>W_vvB}lCFXmKn@{H*377dD2!44BXsX|VR$4|FMxy0 zk1Bu*Tpv{c^{ur)8%`b2!{}(P1CE(>h%^@I!oUiKP7+DFm`en2w`veUYtc*ueOfh$ z;5wgXBIp3CK?LnhGZDNyszC&8K{F9_S=AtdcbsM-=->V$k>XJ8t%J_38bq|W4tnxx z5YgT`*iBS}i1yY&pH>Yb+FJ*o>{Nq@_SUghAp#NA`=7pdeEqby4nA8_N}`d7_SV70 zplT4&-a61bSBHr9){#_?i1yY2hg=;=R9lDZogILP(iNg7WqW6Vx)*a);mR!_6wCd* z_U3F{9U`(I?L?faLxgKs-1<8M5zY07-ihnQT@+lgpUNeAGPc5mXwH}*D?BYzdMqwi zR|QvUMFke)Rfwo_#pk57=~4v-64e3>*W*vwTzhhQu_i!7q`4Q<=V>~2b3&&^g>>;8 z4q<$1t4|R|>E5MlknY8c7YdyqGt4|;!UP#Z7@2W#1}q$8r$Q|roVrk6ke3z;jTD25 zjv1A$UcFjPsGy)AHKEuzMkvJ5q;VCD7M_h$AKQ3CcG}#SimC{uUcg7C0B}=ncy&vG zl^&L*sI>*7V_AkkQEhc1xK%)DZn;tpS4MZThq){wT&rjaM3h#6dQqt>Lxj&N*ve)k zX5*^g09>J3afC|Y7fM#VSW&Y--&DEopfw1kw2BOpp(>Pm`vfT3N26_Hf_DFjdnx{7 zcSt`rR(dk7JH*Wx)gYq1PiN-~(4uCA^AQ0Ke>cUF1<`QTs z0(kDAFOtSyzWrRLi`N3Gw5%~s29d9ccD}wmeC@UJr9C3WS63SQ;_4NCzV)>8_2c2| zq?NB9R7_r9J!$NN=U4gpnri3k&%@VED_?&lUwvup?ea(be9g4;4dCJHsg*D7lqfxm zp?#nH#?RMWJKv@}e0{a@rTrMi*FYNk;r>N_z81*WUyF6B+p{h3)mB2$zM|sLJ;k^9 z`PSFYm(QLZwDM)!b8+aMy?gliT59LZXV1=B`LgY~IJE56ety0UwDaY&=O$YDvhBGz zw7B3BKi`Jh`SRJbmsY-PdoB*$b@d)UUn}i=`Rv(GD_^!f7l*z-|06$NYvkMXqwHA% ze6^KO+Ox0U{2gU9U+^Zl-$~)08)@guXU~pW`LgZV*YD!O`TTrswDaY&XBVw}+4k(~ zclg2*e!jNa`SRJbyH>tzd-nC)zPym1uS7dvK701o%9m}=zJ58UL9lJ7bjo%GIYL9&hAg7X(&Lv_obtx7*AmNPD&7lR8bW>0 zjXsR3!zUhqN+89?N{VRtT#6&Siv^JC;b@Dp^GzASo%Pz z@EX@gxzJ+^Grd1tO!=!BSRl@NmLo@>Vv45t1tL^P&Ad- z0CviQq|0Y496wi_s9Hd10c0@+r{6d%LQUZ;o2fA_3Q$@@sWA~}9kkTSm{=vvKqZzV zG=g3Fxnr9r5QqHAGf!D+r8r9qU1jxn;( zF-8_ThO&60EH}UXd5-gdsZ#eLbHzA0p)^Gu1i}E|r%Y#C5LR7oL56VGgL{ab@kI}s z3g<=<)`lB}NoCUjIT;#8F#iEr&`ue>1aV}s1X+~njGMvAD%u6@2NAePL)(vEh7MSU zjVdW!9S|s_dsw($#JmMqQ?w!f3_Zx{$jPZE(^uqV+mSiERUsw<^{HKmDgjX=nOJQC z$lOs%j|kH_5JSZ5nN6Dpcr$(PWEPyADUBlFE2I&W?(?_?-rQcYMKD+xT z7x_n(sxy(&+g{I^~J2 z-+KnIdk*O2%zoER-Jh8Q9ZX^S5Vk)Ual2TuEjL{bzWAsJGW{LZdS*)hch6Xo* zzaG$+4ubv2Qh4(v8QwO+t1y5Vc-IBrglP`@aN?rh%p($!uTx_TaqO#x#%7mT{R&qVK?+jRvMPe0)O8N z{tgMm0E7&=BOvd|KDcA(UE|Oj?Ca8}$GJ$u9-v$20Zk&{v@j|x97X`RC1As>4_yw; zsO*k9)uY}^L#kBQfXM-4uFl{l$xH6)yQ#l-@8I6tWPO^jOYcw^1$o7K5vLvo&@{Z{ z^&{^kaFb;4970Um!mD(+32Cs{0stkVg9URz7KlCSEMTQzLf6hZA~UE5qV33}>HAIJ z!Id>A&lJvmLlQ?MOGhL}_ZT};I=Y`{>hOe(b50ID;%(f%GP7!O$*y0M_PMP7_4JBP zU!}XBHL|?5&12~7DgFjU*S~tSr|UkkN3w(Qpwo-T_uM@D=CZn$IluL|-?M*QW=#6c zwHsdk{=_xE%+05(&Sd9}FAZ|~mzDLt{lv`Mb#Y#g`%9a*w9HAE?Xc>KzT?>VbnA(? z8@4bl_&Rv%on0U{-}POm2i<)9wOM@Y$@PCdCGtBMHQ-gy1FyS!eSbCDxU0kc z8&MOE+I{f295Ku@XLMC*ezvEj=fd4T4!m=4QxF)53`U}=s#<+v&D{b}QBz38y-m?c z(uC1oo_L%x`xj7AovBYV4@^Fj-tFuW%f=~QtFuGAR;H5*mkDw9R+p_FUJftRtCcUF zvg&E&x>i-2XS}VLcUNMuWWC;z8zDg_<0?{G9h@+!D09`C#^S!IBfnWW{_@V~{aw$j zY3<8h>lh^0i(!yC2A2D_vh|Q?hf<+Y29fD>`iK z0*lE|!RY|_SU)*VI$Y|-I))7#F>r`935}ypaagS*664^C^yOb=Ukn_a@6vwI_LH0Q zUz3pBhHVO$o&Di*+3lN?15aN!JO5p0!$|jBeZ%R}Q=ZdyKTC68W3~2DN9$wm2^EFr zckZWJ7X3KW^m?Zgqr0U$oX^hOwDYRu!p3XC6!zNC( zgw6PcpFZM|-gfgRTx1TKAk;D#U|iD5(eL#yPi5o3ejSxxgI7K=3IkaKg zfHJ-pA<9eSs}dt(2-$F1Jl=XHtf8(9{3 zFsj0G7-~}X@YTKp<2wC9Mp{lf-D`o{sm~`IxaJzy zEBN)OIVrm@Yz&A>%dC1Zsd!VDHRlp;Z|}20FUHoY_M2Ciz8pO4*deRzV}bRb%{<*} zcmADn!xJ~kES`PXuxaNvGXj?_I`eXXU{j+@Pw$p?J~3rSBd@eZZeymf_Z#Ez`ckz%{=y-ISQ=^dKipoQ7b znRchlin^AB?wnldSLeRZn#y;_c5jJp83NGi>zD7}oG~h#ZEG9!?%LTTizns&>pjz6 zy>dP{;jP`f#}|8VS(-6>i!Ptv7}Vq&pS;txtaXMP-CsJrQTgKrv8|(~?m3?C zylncLjKDl2>qz}=i`*Vmr1^ERF892<@knMF2@KdWJ#*?g{}+Ds&$*4Ty%}Qr)U!*Y zve$VH%px8*T%7r>!yTI=>kgZA`nK)3S+>SE&OB+odRD)$;$8OKGR=I_z4TD&u(@`P znosnP{xQV#*~wyO$(~EwPCaQ=T2Z{_Rnz9lbFz&Wjh$j!@6MvhOBK zgPA=anI?Ig4m2;zsnxQP$?44)-ix#=*?7X_J)F4c@G2!yNs$B_pfB)6u(YT*(U2NWMWB8E| zwL8CTx-@URX#1d1Gsg8@e!bVd@}TJD;U{mO+;Z}_h&nyL44k~{ep8Rs8!6?lvr=zd z30$6KSeiAb@7d&vdb?JPvegUF9c|J0_C@y@72WRoZ%rCGry$m_UQ~K;&z93h=`~8b z>i>35aiEliJ={L&XgvE90|Q` zR}gWk=;woHMLYU05H1~>+}gEQnVn^ok88oK&BKaf+P3XECPmur^68)MtezKcZZbJF zZOZ2fZm)gzL{D|Q=a*OSN$b$|C0-*3uh}#_@5+r_=YFr27MDM278{xMThfN^Kc0xG z9k~3i0gj>V4yN5r#Kqi`~WrO*}d6{I=J@;)TbB4&S>z&ZuoZ zdTrat&?7%(SR5{`JI!LxtIT+@+n#+*WxCBvWy4QLHgwul5xVYm{1j23zvk}s`r3N?af7bK229`B zY-WS3-n*vtT5WB1w3U6-$PGKqhqbvmKi1AVbyT;(mhM(7>TI5uU8VE8t-0Nf=#ZD+ ze0J;iu6<3?&XydNBuLgTOt?8QdE$?g9pZ8yEi-fq`}x8AuXbM=dMq~Gb$IC&-Nx5V zJxk_(UwFN~f6B$&y^nIE_JYmt&Lys%3^K4!^JH9KorxX38(yjQ=pm&E#j zVSTUed8-VZ-i&MP{jx;Ibba>w1uG->y`^W^+%bsZnd~2SL9b>79k(;5ccaH6RDZ|n zpylI}uv&+`&8AdN`bwObcy6EZ9H*<(N;Z}1Ot}?c*fhwo+oQ*Zo885pQwRREI6i;j z_eG|IeXse%t#2s)?Ed^wOAZa+^JrFZghiKcFSdx;I$+YQ#K6bqL*{gL33GCcaPjn6 zlvLOGi=5n&={??NY;Lx4cCTCZEA!f%$S>(wIVOGC^X~*{#~cp~G9G`PG+5AeiEPJ* zW(~g`;$>^muc}*{(HApyT~-_~E_e8DeW>W?zWeqay$%(lhhGAr2RvTaG**RdtiUsJ z?b=zD0CxnZEZqe3$r{gb3vx$9%7SJvZdMy&u+-0`#2ua}DV^b?L=9HBG`L2fq_G8d zEU=}~ViH|D>*8(=m@4X$eo*`M)EmCv!Sv}n)`S5PNEYC-SU4<&ndui#ja6Pett~Xe zWGdivY%#3k{uYBT@xqh}CM!aiBpOlICe(Dz7^Wfb*F8TQHmGY*G=+Dg@VG!r$RrAr zK}}U?nvG%U3qB(vmZYzu4FQmdkS@QQsllDORKn3gI*hH1CN>i{D9O^Tbe@m_95*wrF}Xcxhn%5Q^hG$Yp(u(Y5?s4_fpk_ z8V&Gi09Voe8v&jR{{uoQ^+~KY(CfrQ|AU`-_>@5V-i(Y4AVR-sQu`yU5y_|SkVXcLI3Dax&FP^66pUmCu0ghM%BwLiYxnsFk{Nq>u! zPaUE%`u|&0=ASGCzMV}4K@8l40=y9w|GcJ6X^j+P+bAkY2qpfj2u-@821C;Gff0jt6h7BOwGAQ z12r0`(Ljv`YBW%zff^0eXrM*|)z!csALv$>LruQFxdw3Ip(fO5;1e`}UW8u2{RARd zROyaBeRUc3&Sqt0eWE}$#s5VbP+Hf&s8YODX-RJ23RF#~(Ljv`{%0Ea@B5q8!g6yq z{25i{lUm^NXHc%8QKNwx4g7f;SWfKWSra~M!#^QB?!^bb7|Mf~vw-A^odD=K-%%bGN0z+jwY%U~2jg)cR zvsqxJjOzhqH&%XqctEzkt}-3O6%>f&PZWjt{cGk4B348!r1#&5VP7ScBru|I7-4W3 zf)3;Zwd<3RHdH1$CV&{`qhmsd;j=e7rb9xg8qqNkX$Q4n(sW5%r~?zzgL0@FI;TFQ z;c)9Gcz*|Jw}-#asUu#shqN+~YdfTv!Oxns7S z?w_S?Tm;n@zzgUYlr|2ZbNFL6u4ZF2Wjs=?L`8$)h^>S{y_JM?E78f=_!#~Rt>h3_ z(@I3{31}tb@vm$pCD)p(Ptt%cIMzfmn0oVCO6}eHxZfje22KE-922S|40a)D^4n7Y zZaxv-`W{Kb;jQqY)hVu$2Y&&I;f-gNL=6$#_@AgD?T?^8mj55&p{>lP@Sg&N@h1sz zZ4TcC-wA*N3+`{E(VJoGP_HgSvc|Iw^kf;2O;Z$5B|MgFKGc_||#n?%`dN5@W^;PHsCUJ|U);G)bij*xbI} z0lpqSKAt|F-kv_*K7RP!5Gn}ZCk1ujeH7Fo_qR(OAcyid;KE~L;|ELWpMsP4dVBjx m2F@Y%}=O0E{2-r{X-Rs(UsgFPm>4Me+H&9{vxv>6RG) literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/分支机构人员信息模版.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/分支机构人员信息模版.xls new file mode 100644 index 0000000000000000000000000000000000000000..f48a7a303fd6f7af0e72a5c7ab134346565792d2 GIT binary patch literal 26624 zcmeG_2UrwIv%Sl*EGhyDh=Q;L5s(}N&j1Q$5ClXyQAAk;MNz~IihBygz*Rzen@+%ye~iRdscBb(r3v^jG7GHM^Ts z5>9AGbV#*Sp9ooS9z0{Df)OEnc))bER4S!`gur8M_%G7HSCG|H)`kMOdqKoD*Mlg6 zs1LCY#JUjcK{S9^AEF^dFacr=u>r(}5KSPOLNtTe2%Gvz5ZxfUL-c@%w#UT(BDMc*M2#S+@Rts4 z(UA;?dm0%JTCI67Bf9cFkN!X`!Yd(#)RlC?+vGpign7REjYn3te2jM;fMw~@2)%)O z8W~CkQgRHXf!}a#K=?c)#VE8UMG=2VG>zGjL_y8RLCu3nJY3^zLV$&10{nT9#yX)4 ztSqgMLufUD_9Dq>G7SFWDcyI4R!F3Df{=8Q49~;0P;vzR$QS!=P5EPgE|Jkh*-;df zA8DX&xcwjd7rXysT3!D~IQDlwR%-VM#_?=Zi>-=6kQ>c%KJR4q9Ed2BmpAM zRWcyrd}Ss?oS!U$h@3Wov%@(Emc@Y2SUyBDJatSeoyNIMX!4-6)KRI4>Ee##21!yV zeq_0&*Wu>{ygipQBMBV3s>{pEQ}T|h5EaE+7S#eT@K6~6j26n zoTs5q!Xct>?gJ6$V5kf9-6;^UPU#R)7pNPYr(ypmLS3@i`hs3DXh#T2sf7D3!3j!N z_W&oBj36*3(CQKYXF>-`hIk(8p%5z87Mv6hU^-v{e5grdN;(+*A-^GY-AUmdp{{Mg z4n9u)IC)_25_^BZK;87=2U2)*sH-h?tq)foIY5=UK|wrW7W*3TrIT|}o#Y1?UuXA? z3`6)WNQ=ln57$KhXAOMMX@D!q!&jD5pOKRVPlB0>KRJRbBR{adtG>v$jt01o26!8_a2^Rz z%a@RLYVid!{V3}}seNT~S_#ZyE(Sf-c7v^*i=CZEYj}utr5>#WO`$)+>Pnv1H$sxo zkBwjjP7;=041${nyF8?<1a_ceaC~eG4iyT`4_05WCX5pUqO+J{A17`tOUmR?0Bl`t zsYGC$*h=6Ai#J%l#fjPFoW<-y&SIq!0kFjTPMH}9p&&0SsssZ90Ral8En%ey>sdKd z23O8k0pOHu0=5FP*I0YHl1{B-9c9n4PF4bI&^N4O6}gnMlu*Q=aaiWcP>>Ic1|*S8 zGaw@7;3!j)A=V?iaGdj?gO#8z*^NG!PF8>!VR$bETJlgRMmP>+@1@|>-!U2gS~yZw zNB{paoQG{D4;+1>*Tx{QR@T29?y3RqtO4$(0dAoI?ydpuq55%c87EB?yo{Pt z!MvZw$B88i4rnwSCz>+27#?8`#({JCBW|Km_;UTwc7l^P3eLfY9?ik0?FTpDWPIac z*pbVr3%*oceRaX1tApdjnWD4E*m!B(rFDtGjM5uU7HN25;&JQa)$@?#u*z2iUY+&NVk^?T#mn+#?Rp5%iwKfa5+BG2dnev!ciW8bMQeNfZNck4@}7D z;D#`d*s92h7!yA6G7Kh10v{QG!sET_P-J-3DMp<=rn3T zM0@L?hp7P(?X83Es0Ku|w+{NQ8W7RmI_MB;Kty}%SSk^LgmV9<`;M2l_SV67R0>Hn z64Bl|xT#bFBHCLAM)R5w(cU`Zni0|7I^e)-B8hVAaJ{n~5K*{7^rUR>%v1GZ_DWp2 z1^6PFpV!`;&1ynK8latsLrsWq4U1d<=0HSq{b6+CdT~cNR~)DEh)~K_7$40UGo(cq zr3#P5j(Hzy2g zRLB&~=McuXzj_p5lp6;%>SwScEm0pOQE3ZC$I>jGyxOWneC0$m>JBrs_s^C!Bck1B`_+tycAxEEGa}l3cB`5Z z(eAUqs~HhxpUrhat>r|}i1H*Hn_w(k`aF--#N0mH28t^BELyFSB{D?R^;vdTVC;zv zt9kd}3e}b))EMS|TsN z2)k#`9x0L4g3%xalet4igKQY%VB|31k|}cJ@NN%K9>rUS@G2l7_j;PG5Ib|CufGFci+5aX;a0pEM6cAgNWkLfhVw%)`wke%_Y!_ z@!%bWo7}LMvak zJ(q-(6y8wJw~2PX>g?HFD_^!fmxS!U{X{)q3+;T>*|WD+zHECg3HfsMXZ3t7k#Eay zvS%^y)mB1b&tBe(_mU7xTgW$nqt61mEIof|%PDUJ=R2`H=3-yq z(%|cXZuDS<6gK53R01hBQ&2?9=TbD5Q>3k214U`TrouZiiVg~jXwzJZ4dfJQ`_({^ z?!bIX#^wr&Xszy?S~rwaM9Wmw9L&n};E*_+F?-o>fe7smn}QBJo&_9TeA$oj9J;ug zg>4d)3ZHQ=Mdmp`ZCM0bxCw^k5Em^Etf!SP`tcYnC2hiIo}a>Vc?;)fap{ zD4N36htv5W>6+O~CoT}BDi`3J0a?t!#UM_LP*b?(V`_{W2$a@PYRtqH3N5uFB~r@M zS4u798^SLGbP2C8>EYmBkwHD%BrOn)=19>9_$l()vf%a%r9r5Qd}v{0!9}N#(jdx0 zrx;o26eA0rLRmaemis^cGQatN84{Pl3q-g$p)^HZczj>rr^shp5LR7gK?cz4!966- z?iNK;;dB&!UFaxGE}I6($;+J3yV zbigvKlu7C8fIvZ!p<%*^MN6=zXhS|(Lcp}=U<##ra!j@znG#<(%ED7!+65^S5HyvF zR2G0tk5YI3UD^x4w_c$*m>s%kSx-%pi3x=k+qW-9dA z!#^P_3u4sM_gAHlPLxaENrgUpm4I5aDAIgJW zE?M8xCvA|0?xfzbx3dk}EI( zEAS-cm-!1s{goSnUk56HIk<(z3bZV}s51Gqq>Rf1W zWB7}Lv2-AuftJ9pZPMWvPWTiGF#&#GgTKCM1!sJc$r$*pO*#uB1Ymt57~!5M5t7Ixi6q?ATb5HEzhj$%Q)SBT8X3YJ{-2#v0qkachZdmSqe%jJN- zkA}Y!JP|}f20!AFFXSq9${V+9VKg}0qfgY87=tL#ZSw&wBH*?(HZ%-o0C;?0>)fwB zPR#xgi8>X6Ct?E3p)lKb^zGT)ELq9@eYf}b=pERbo2^HebnG1hvmp0Gcj6GG4^5+% zyk5+c6b)IuU{K&@N#V4Li0p@7_Tky8BzV7b4DN$OW)K;{>BH)DYKh3T-V#<0Lc_c3 z2uz@=2(}?pXB}zy8J;XbzYXEuHz;*@x@35IT-5jxl2QHK#tlo^HvjyPQyxYgKV(-= zE8YKF+F{2Hzg=A0b!?`~Wkd4^yIqIOo9?4ue0S`NgW-oouIYA011~P0*lWkU`>X4l zFZ?6wX|MiC*$J8VH*J0Q=S!!8a%azQooUUtz0+UVzr4Kn!cCCK> z=cju1SNj znfqg5-`@@ZRvrZ;~yR09sqVEg~_V2sy1BP z__z>M)Dm*>$Xi^RBxRJl8(yc+`xR7FZ^ooQ5DlBEluYdJnbKB}2vp-cXdMq|uu|;_5UQodKq{=aEk58UjoV|WyGg04h zBYs#n@#em`BjK0UwYlJFv7yU;kHrlPXI>9G60xI0!lh!P%iTKO^ciSBdE@+%apl&_ zRyD3@8FJ;lSwy+tfF1KT6-)P?@+esqc4G2Qmxmn%!~GV8BtICqW|RB<$fLQNBwNa? zO7|W7bnUC!iVhvW#B3T=a27;7C6JyZ876UOT|?uC#}AgIp>fnJ39WNVY!q0Txn^wc zb-zIcjvWW?IlrTziUj2~X+t=c%%`2DN{SVm>X*;`f z?=bGj+myqS!BD!cr}LO^(~WX}ayu#_OSD zuB4QOF24PuWoiDLJvY}{9o>7UvEQmU=c*iTTMU`krOV8z2gM`rXJvKUetJX3ia=wN z&2du(PfQ$>H@Zs)JEPLJ_TE*$zLHLyR25rL?GgVZSJZXG+pDXg2bK}JA z_{qs_10yQaa~g+rZN1F6aqQiU4?hhZ7j(wnMs#gsn$Ce~eKw~I8Xxn6N6tgjRr5_A zImFucIk9!-k|Mq}@Ah=pon=FYp4ZP$&Wgw**IO^tH|V-6Cii#G)jv6J*6ZLPT;Vu! zmnbQ=-}jrZ4o$rJarKVfX$}P;tAk2z@Lo6hW1Y?TP5jflqC76uAM&V?OKShVXDvS2 z=J$x{8&mFgJfq*S0U5gnj+>Pf<+c5T#rCZ?n`P<@7-C%h{Qcph6T1FNMwm~%7`?># zLZ`_`?>Hqz2Ud-oKjy%-ZN9M?+11acmTd2_@k+|WJ$=>+6Ra)jetdu9`$0p`oUq6} z zcw%wm)+WDX+gvay4lfPaH|>LWy{DcVKYTuOU}s#LAc$=zz5DXg!KiPc#{d(`6t1=!Hop-K&{HopOr$u331G{WE6zm=_`SbZdHo71G z_^~{7)wqhj{CQhm+l0;xK2U6Y@bk(e;6~8x5 zY!^G@;Ms!at7m=8^2;~0jM3Y@%=uYmhIbFk3b)7GPGy%9Ki{3RvS(cJdF$Qiit}*m z`$5*P+1DeObNh`=c0Bl?VfM?& zvJ+)P7uYmyHN_|H=b(nK&zCe8AH1>q!ppX0l_eYBw``R@Ki6p4`03US9xZz#T;-hi zu}l4tC$|WXXZL#1FwLW3ylMHuI&GR7pY53%vi{xnLw138XI)9{ko~40bLoW!jhsx{ zzP@xMyVXwH1E1Rao$dPQRQ;qTy?4JV))Dp0sXF-f#MnbCZ9X^sl658WcILbWMYjhx znp)tK7Q8}l=Bnj&=DDXDy*&MDz*&c7%ba!g-QHZLA1d9Ja`SWb{*=dm{$}=K!m$U} zTlL%)cIs>0?(bTz%AY9MGjQbW34Pbxjeb%Q5Vt1m{KNA*&;Joouh;i})Am1Y={oM- zn2M^LarbWdt;sPc%bDNza(ZQh{cA^B3w?D*nKgTO-DP%V&&NKy(nicLOf+Z^n;F=v z&CHR)rWv<=KFu%b+PQ%w_N4LUdJ~g}=8vcoUPW${b#B-<$UeFtBV|VK_ajE~or=vj z+m5PmHQzpj|5&nrf^YLWhrgO8j&?0Obm;1wr2IDD-Rib@-;Wp8G!5y$ML2DP@0z0a zrH!X7F0ZiP8FQ*w&)e(Tm;>#cZ>`<_eVe#hvlDWP>_5!EHt|yD(f8NeMw^*jn(*6z z(xPJTZPAt2E+^d0x;Z{CN>c8h-LLYf-CWC9FbmD|N9Gz6SF$x z?VF}=xuVjuxbS(zfyK)@jxaEFjz3jhlF%}y-G{`j;U%F{zl)vOr@-CuMcI^)F8k(4 zQi4u}JhUl{xKRAd@ymj}{g?1p4M}h36kTp(UhU~rICsa;;)D(zdW{|<3BGyp*rN@L z!c2{)jmwzcDaE3R7ygMcIe(;W zjr{psLS4T#-~Te;j`O`K!~0*Klh&yBne|_qZH_RwFJ10DAz;e+nOApL1&WrQ<=g$_ z^m|ra(@~o`#DttWmSuLbto}^1gYUDGMa~Bgx0LF(Dw7Vo7}LaIdu7Pxs^sZ{?5|zU zOwDcU*xljtMRD}6AKbbxcsM;IxYy~$%S|T+*Vngr*5qLRhbnT$=vn@X2a>{y9%ujY z=c>V_j+aAw_}6l+j+ zr{^OSgf&3R<|mju5xLEX zKejx%VChfA4F`GM@l4v%MD*R$#Uodo7@b)VZmCznc!8-`z3P z!9K##&2w2={pQ^k=9SKh`joZ9f8D(32e#|-+n*~a?ebxC=IS>qc^PNyj}A1Nc$G9> z623yZ_p5)C9|yZzoAs;i*?!dZY+c8-XG<#VR&EIq{L=UE;nR1aV)XQj$9ILd^_u3Y zfW``HX0GAgl?iZXaEj6`K%cDn9Je5MMx-cc0`q2eBXHHvrNo_{C@5W0M~RxOaA|Oj zKtW?Cta#YcXfcWK?z(t52Ue51q#x9N3-!a}m9WBE$yzW#2FU?f4hx2*5SjixtdY|1 zVe9fuFq;avV(SA7?#mJQ+hSOC!J>r^>qtZD*_c|<8No8-%jP$iLkETj#8Gf(3XXfY zgiNI%S=3U6rr8X3$KdNGyeW`#0+uoKS5&4^*wd-2gB<%wKy%i!qx|`GfD`LEl(?C~ z@0VfyItachkxE8EOoVl;7}mLI0L3qTh#{s@kYM^V9kej4D^H*!yhXxIblmZ0-1=li zT^~^bJQ>1oX|d*g_;`w-J-mtj*9B}F40uOv;T^Z_I(Lm!ViVl8M=x7)j@awC7zgy5 zI0?`+20Zjd?=WaYsm=I5t^vlbYEsQ}fD{=T)eUit$U!m@_VN9}$~(c`6Rz#y)KN#+ z5%LC@E5u;fVex|}e}Hs^KUcu>1Gqn6`;j0>dBbitrZRzIM90YBkPy;qcygL#6h4K= zkC3EACQp!%_C6#mEg3c{;?t8;hm-KIh^UD6U86{ZWK?R(XbJ|8VI%O#lLV!vq^5tASb# z)M}t68dw9LBGHFE3f$?$?+o_g_rdK)2o(X$ok#LS4iM?Ix-0JE(xDg75W#*A9%+Hy z5;5)%!%yfSjr6nh4dDdz39==05247=C+FhyrwocR)ciuXJH02OaLY@hkMB4Eikp0vffk1%ZuTVQdoDF;b zvz1!01ALd_hzw>GgDr5}nbrx`_U3@rCNQN! zY}DWRtpWA{d=EkQ0RdE>2WNdTDEa`Lod0WmK*i>0%6O$(iAn~-6%U(E=zEoS@4xMP^#0%_&9y>A@_e**a3#(8{lDyiOGW`^ryhZULGFaVwuP|zvz&h dnCK73z6qf|74Ak=-OZo8Yqe)2#pmyO`5y&p2!H?p literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index fffde1f4..8366eac4 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -318,6 +318,7 @@ + @@ -822,6 +823,9 @@ + + + @@ -1138,6 +1142,9 @@ + + + @@ -1883,6 +1890,13 @@ + + + + + + + @@ -1958,6 +1972,12 @@ + + + + + + @@ -1967,6 +1987,14 @@ + + + + + + + + @@ -6658,6 +6686,13 @@ ShowQRImage.aspx + + UnitProjectTControl.ascx + ASPXCodeBehind + + + UnitProjectTControl.ascx + ProjectSysSet.aspx ASPXCodeBehind @@ -10186,6 +10221,27 @@ PauseNoticeView.aspx + + ProjectLeaderCheck.aspx + ASPXCodeBehind + + + ProjectLeaderCheck.aspx + + + ProjectLeaderCheckEdit.aspx + ASPXCodeBehind + + + ProjectLeaderCheckEdit.aspx + + + ProjectLeaderCheckView.aspx + ASPXCodeBehind + + + ProjectLeaderCheckView.aspx + PunishNotice.aspx ASPXCodeBehind @@ -12398,6 +12454,27 @@ MonthMeetingView.aspx + + SafetyLeaderGroupMeeting.aspx + ASPXCodeBehind + + + SafetyLeaderGroupMeeting.aspx + + + SafetyLeaderGroupMeetingEdit.aspx + ASPXCodeBehind + + + SafetyLeaderGroupMeetingEdit.aspx + + + SafetyLeaderGroupMeetingView.aspx + ASPXCodeBehind + + + SafetyLeaderGroupMeetingView.aspx + SpecialMeeting.aspx ASPXCodeBehind @@ -15998,6 +16075,55 @@ SYHSEData_SYHSEEdit.aspx + + DrillRecordList.aspx + ASPXCodeBehind + + + DrillRecordList.aspx + + + DrillRecordListEdit.aspx + ASPXCodeBehind + + + DrillRecordListEdit.aspx + + + DrillRecordListView.aspx + ASPXCodeBehind + + + DrillRecordListView.aspx + + + EmergencyList.aspx + ASPXCodeBehind + + + EmergencyList.aspx + + + EmergencyListEdit.aspx + ASPXCodeBehind + + + EmergencyListEdit.aspx + + + EmergencyListView.aspx + ASPXCodeBehind + + + EmergencyListView.aspx + + + ServerEmergencySupply.aspx + ASPXCodeBehind + + + ServerEmergencySupply.aspx + ArchitectureReport.aspx ASPXCodeBehind @@ -16523,6 +16649,48 @@ TestRecord.aspx + + CompanySafetyMeeting.aspx + ASPXCodeBehind + + + CompanySafetyMeeting.aspx + + + CompanySafetyMeetingEdit.aspx + ASPXCodeBehind + + + CompanySafetyMeetingEdit.aspx + + + CompanySafetyMeetingView.aspx + ASPXCodeBehind + + + CompanySafetyMeetingView.aspx + + + CompanySpecialMeeting.aspx + ASPXCodeBehind + + + CompanySpecialMeeting.aspx + + + CompanySpecialMeetingEdit.aspx + ASPXCodeBehind + + + CompanySpecialMeetingEdit.aspx + + + CompanySpecialMeetingView.aspx + ASPXCodeBehind + + + CompanySpecialMeetingView.aspx + HazardDetection.aspx ASPXCodeBehind @@ -16586,6 +16754,62 @@ PhysicalExaminationView.aspx + + BranchPerson.aspx + ASPXCodeBehind + + + BranchPerson.aspx + + + BranchPersonEdit.aspx + ASPXCodeBehind + + + BranchPersonEdit.aspx + + + BranchPersonIn.aspx + ASPXCodeBehind + + + BranchPersonIn.aspx + + + BranchPersonView.aspx + ASPXCodeBehind + + + BranchPersonView.aspx + + + CompanyPerson.aspx + ASPXCodeBehind + + + CompanyPerson.aspx + + + CompanyPersonEdit.aspx + ASPXCodeBehind + + + CompanyPersonEdit.aspx + + + CompanyPersonIn.aspx + ASPXCodeBehind + + + CompanyPersonIn.aspx + + + CompanyPersonView.aspx + ASPXCodeBehind + + + CompanyPersonView.aspx + AccidentAnalysis.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx new file mode 100644 index 00000000..31aaebb9 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheck.aspx @@ -0,0 +1,141 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectLeaderCheck.aspx.cs" Inherits="FineUIPro.Web.HSSE.Check.ProjectLeaderCheck" %> + + + + + + 领导带班检查 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..53d2d5cb --- /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.UserId, 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..a1a7310c --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs @@ -0,0 +1,204 @@ +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(); + List list = new List(); + List newList = new List(); + list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(this.CurrUser.LoginProjectId, null)); + list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(null, null)); + foreach (var item in list) + { + var user = newList.FirstOrDefault(x => x.UserId == item.UserId); + if (user == null) + { + newList.Add(item); + } + } + drpLeaderIds.DataValueField = "UserId"; + drpLeaderIds.DataTextField = "UserName"; + drpLeaderIds.DataSource = newList; + drpLeaderIds.DataBind(); + Funs.FineUIPleaseSelect(drpLeaderIds); + //UserService.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..cf9ac93a --- /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 = UserService.getUserNamesUserIds(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/InApproveManager/GeneralEquipmentIn.aspx b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentIn.aspx index 9ef61ef2..5e48ff28 100644 --- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentIn.aspx +++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentIn.aspx @@ -14,8 +14,8 @@ ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> @@ -27,10 +27,10 @@ - - @@ -43,24 +43,24 @@ - - - - - - - - - - + + + + + + + + + + + + + <%-- --%> @@ -92,6 +92,12 @@ + +
- + + + + + + - - + diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx.cs index 3f35232b..68bb9b3e 100644 --- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx.cs @@ -50,6 +50,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); ///机具设备下拉框 BLL.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpSpecialEquipmentId, false, true); + this.cbIsUsed.Checked = true; this.GeneralEquipmentInId = Request.Params["GeneralEquipmentInId"]; this.GeneralEquipmentInItemId = Request.Params["GeneralEquipmentInItemId"]; if (!string.IsNullOrEmpty(this.GeneralEquipmentInItemId)) @@ -65,6 +66,10 @@ namespace FineUIPro.Web.HSSE.InApproveManager this.txtSizeModel.Text = generalEquipmentInItem.SizeModel; this.txtOwnerCheck.Text = generalEquipmentInItem.OwnerCheck; this.txtCertificateNum.Text = generalEquipmentInItem.CertificateNum; + if (generalEquipmentInItem.IsUsed != true) + { + this.cbIsUsed.Checked = false; + } } } } @@ -90,6 +95,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager generalEquipmentInItem.SizeModel = this.txtSizeModel.Text.Trim(); generalEquipmentInItem.OwnerCheck = this.txtOwnerCheck.Text.Trim(); generalEquipmentInItem.CertificateNum = this.txtCertificateNum.Text.Trim(); + generalEquipmentInItem.IsUsed = Convert.ToBoolean(this.cbIsUsed.Checked); if (!string.IsNullOrEmpty(this.GeneralEquipmentInItemId)) { generalEquipmentInItem.GeneralEquipmentInItemId = this.GeneralEquipmentInItemId; @@ -101,6 +107,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager generalEquipmentInItem.GeneralEquipmentInItemId = this.GeneralEquipmentInItemId; BLL.GeneralEquipmentInItemService.AddGeneralEquipmentInItem(generalEquipmentInItem); } + Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ConstructionEquipment); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } #endregion diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx.designer.cs index 0f87f375..9582934b 100644 --- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.HSSE.InApproveManager { /// protected global::FineUIPro.TextBox txtCertificateNum; + /// + /// cbIsUsed 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox cbIsUsed; + /// /// Toolbar1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInView.aspx b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInView.aspx index f138d7ea..6b1e494d 100644 --- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInView.aspx @@ -51,7 +51,7 @@ + DataIDField="GeneralEquipmentInItemId" EnableTextSelection="True" ForceFit="true"> @@ -59,7 +59,7 @@ - @@ -87,6 +87,9 @@ SortField="CertificateNum" FieldType="String" HeaderText="施工设备合格证号" HeaderTextAlign="Center" TextAlign="Left"> + + diff --git a/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx new file mode 100644 index 00000000..e3635018 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx @@ -0,0 +1,163 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyLeaderGroupMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Meeting.SafetyLeaderGroupMeeting" %> + +<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> + + + + + 安全领导小组会议 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + <%-- + --%> + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..a2bd9f17 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.cs @@ -0,0 +1,338 @@ +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"]; + } + this.ucTree.UnitId = this.CurrUser.UnitId; + this.ucTree.ProjectId = this.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;"; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.panelLeftRegion.Hidden = true; + // this.Grid1.Columns[0].Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); + } + } + } + + protected void changeTree(object sender, EventArgs e) + { + this.ProjectId = this.ucTree.ProjectId; + this.BindGrid(); + } + + /// + /// 绑定数据 + /// + 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.UserName+']提交' WHEN SafetyLeaderGroupMeeting.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' 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 Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId" + + @" LEFT JOIN Sys_User AS Users ON SafetyLeaderGroupMeeting.CompileMan=Users.UserId" + + @" 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 格式化字符串 + /// + /// 获取整理人姓名 + /// + /// + /// + protected string ConvertCompileMan(object userId) + { + string userName = string.Empty; + if (userId != null) + { + var user = BLL.UserService.GetUserByUserId(userId.ToString()); + if (user != null) + { + userName = user.UserName; + } + } + return userName; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, 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..3e146bd1 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeeting.aspx.designer.cs @@ -0,0 +1,251 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +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; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ucTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree; + + /// + /// 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; + + /// + /// lblMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblMeetingHostMan; + + /// + /// 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..0bf72b55 --- /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.UserId; + 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.UserName; + } + } + } + #endregion + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + UserService.InitUserDropDownList(this.drpCompileMan, this.ProjectId, 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..81a1f9e6 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/Meeting/SafetyLeaderGroupMeetingView.aspx.cs @@ -0,0 +1,101 @@ +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); + } + if (!string.IsNullOrEmpty(SafetyLeaderGroupMeeting.CompileMan)) + { + var user = BLL.UserService.GetUserByUserId(SafetyLeaderGroupMeeting.CompileMan); + if (user != null) + { + this.txtCompileMan.Text = user.UserName; + } + } + 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/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..529f39dd --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs @@ -0,0 +1,314 @@ +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(); + var thisUnit = CommonService.GetIsThisUnit(); + if (thisUnit != null) + { + this.UnitId = thisUnit.UnitId; + } + + this.btnNew.OnClientClick = Window1.GetShowReference("DrillRecordListEdit.aspx") + "return false;"; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + 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.UserName 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.UserName+']提交' WHEN DrillRecordList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' 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 Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId" + + @" LEFT JOIN Sys_User AS Users ON DrillRecordList.CompileMan=Users.UserId 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.UserId, 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..cd133161 --- /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..59416fab --- /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 = CommonService.GetIsThisUnit(); + 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.UserId; + 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..f88b04c3 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs @@ -0,0 +1,170 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +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; + + /// + /// 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/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..921e259b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs @@ -0,0 +1,285 @@ +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(); + var thisUnit = CommonService.GetIsThisUnit(); + if (thisUnit != null) + { + this.UnitId = thisUnit.UnitId; + } + + //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;"; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + 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.UserName AS CompileManName,EmergencyType.EmergencyTypeName,EmergencyList.VersionCode,Unit.UnitName,EmergencyList.States,AuditMan.UserName AS AuditMan,ApproveMan.UserName AS ApproveMan " + + @" ,(CASE WHEN EmergencyList.States = " + BLL.Const.State_0 + " OR EmergencyList.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN EmergencyList.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' 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 Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId" + + @" LEFT JOIN Base_Unit AS Unit ON EmergencyList.UnitId=Unit.UnitId " + + @" LEFT JOIN Base_EmergencyType AS EmergencyType ON EmergencyList.EmergencyTypeId=EmergencyType.EmergencyTypeId" + + @" LEFT JOIN Sys_User AS AuditMan ON AuditMan.UserId=EmergencyList.AuditMan" + + @" LEFT JOIN Sys_User AS ApproveMan ON ApproveMan.UserId=EmergencyList.ApproveMan" + + @" LEFT JOIN Sys_User AS Users ON EmergencyList.CompileMan=Users.UserId 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.UserId, 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..d431a8b0 --- /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.UserId; + 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 = CommonService.GetIsThisUnit(); + if (thisUnit != null) + { + this.txtUnit.Text = thisUnit.UnitName; + this.UnitId = thisUnit.UnitId; + } + // BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); + BLL.UserService.InitUserUnitIdDropDownList(this.drpCompileMan, this.UnitId, 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..95706b6b --- /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.UserService.GetUserNameByUserId(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/Emergency/ServerEmergencySupply.aspx b/SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.aspx new file mode 100644 index 00000000..491b35c8 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.aspx @@ -0,0 +1,141 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ServerEmergencySupply.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Emergency.ServerEmergencySupply" %> + +<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> + + + + 项目应急物资管理 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.aspx.cs new file mode 100644 index 00000000..abc22483 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.aspx.cs @@ -0,0 +1,305 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Emergency +{ + public partial class ServerEmergencySupply : 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"]; + } + + this.ucTree.UnitId = this.CurrUser.UnitId; + this.ucTree.ProjectId = this.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("../../HSSE/Emergency/EmergencySupplyEdit.aspx") + "return false;"; + + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.panelLeftRegion.Hidden = true; + // this.Grid1.Columns[0].Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); + } + } + } + protected void changeTree(object sender, EventArgs e) + { + this.ProjectId = this.ucTree.ProjectId; + this.BindGrid(); + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + if (!string.IsNullOrEmpty(this.ProjectId)) + { + string strSql = @"SELECT EmergencySupply.FileId,EmergencySupply.ProjectId,CodeRecords.Code AS FileCode,EmergencySupply.UnitId,EmergencySupply.FileName,CompileManUser.UserName AS CompileManName,EmergencySupply.CompileDate,EmergencySupply.States,Unit.UnitName " + + @" ,(CASE WHEN EmergencySupply.States = " + BLL.Const.State_0 + " OR EmergencySupply.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN EmergencySupply.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName" + + @" FROM Emergency_EmergencySupply AS EmergencySupply" + + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON EmergencySupply.FileId=CodeRecords.DataId " + + @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON EmergencySupply.FileId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1" + + @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId" + + @" LEFT JOIN Base_Unit AS Unit ON EmergencySupply.UnitId=Unit.UnitId" + + @" LEFT JOIN Sys_User AS CompileManUser ON EmergencySupply.CompileMan =CompileManUser.UserId WHERE 1=1 "; + List listStr = new List(); + strSql += " AND EmergencySupply.ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + + if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim())) + { + strSql += " AND FileCode LIKE @FileCode"; + listStr.Add(new SqlParameter("@FileCode", "%" + this.txtFileCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.txtFileName.Text.Trim())) + { + strSql += " AND EmergencySupply.FileName LIKE @FileName"; + listStr.Add(new SqlParameter("@FileName", "%" + this.txtFileName.Text.Trim() + "%")); + } + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + strSql += " AND EmergencySupply.UnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.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.EmergencySupplyService.GetEmergencySupplyById(id); + if (Emergency != null) + { + if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../HSSE/Emergency/EmergencySupplyView.aspx?FileId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../HSSE/Emergency/EmergencySupplyEdit.aspx?FileId={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 EmergencySupply = BLL.EmergencySupplyService.GetEmergencySupplyById(rowID); + if (EmergencySupply != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, EmergencySupply.FileCode, EmergencySupply.FileId, BLL.Const.ServerEmergencySupplyMenuId, BLL.Const.BtnDelete); + BLL.EmergencySupplyService.DeleteEmergencySupplyById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId) && !string.IsNullOrEmpty(this.ProjectId)) + { + this.btnNew.Hidden = true; + this.btnMenuDelete.Hidden = true; + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ServerEmergencySupplyMenuId); + 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/ServerEmergencySupply.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.aspx.designer.cs new file mode 100644 index 00000000..b4cc7784 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/ServerEmergencySupply.aspx.designer.cs @@ -0,0 +1,233 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Emergency +{ + + + public partial class ServerEmergencySupply + { + + /// + /// 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; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ucTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtFileCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileCode; + + /// + /// txtFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFileName; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// 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; + + /// + /// 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/ManagementReport/HSSEMonthReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReport.aspx.cs index ffa5550b..5a790dc4 100644 --- a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReport.aspx.cs @@ -91,7 +91,7 @@ namespace FineUIPro.Web.ZHGL.ManagementReport private string SubStr(string str) { - string reStr = string.Empty; + string reStr = str; if (!string.IsNullOrEmpty(str) && str.Length > 16) { reStr = str.Substring(0, 16) + ".."; diff --git a/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx new file mode 100644 index 00000000..34d58a32 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx @@ -0,0 +1,124 @@ +<%@ 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..0e14eb86 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.cs @@ -0,0 +1,280 @@ +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;"; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + 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 Sys_User AS Users ON CompanySafetyMeeting.CompileMan=Users.UserId 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 格式化字符串 + /// + /// 获取整理人姓名 + /// + /// + /// + protected string ConvertCompileMan(object userId) + { + string userName = string.Empty; + if (userId != null) + { + var user = BLL.UserService.GetUserByUserId(userId.ToString()); + if (user != null) + { + userName = user.UserName; + } + } + return userName; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, 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..c3df22a6 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeeting.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +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; + + /// + /// lblMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblMeetingHostMan; + + /// + /// 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..803d3fb5 --- /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.UserId; + 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.UserName; + } + } + } + #endregion + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + UserService.InitUserDropDownList(this.drpCompileMan, 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..b6e4614b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySafetyMeetingView.aspx.cs @@ -0,0 +1,101 @@ +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); + } + if (!string.IsNullOrEmpty(CompanySafetyMeeting.CompileMan)) + { + var user = BLL.UserService.GetUserByUserId(CompanySafetyMeeting.CompileMan); + if (user != null) + { + this.txtCompileMan.Text = user.UserName; + } + } + 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..e8248130 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx @@ -0,0 +1,124 @@ +<%@ 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..61b15ab6 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.cs @@ -0,0 +1,280 @@ +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;"; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + 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 Sys_User AS Users ON CompanySpecialMeeting.CompileMan=Users.UserId 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 格式化字符串 + /// + /// 获取整理人姓名 + /// + /// + /// + protected string ConvertCompileMan(object userId) + { + string userName = string.Empty; + if (userId != null) + { + var user = BLL.UserService.GetUserByUserId(userId.ToString()); + if (user != null) + { + userName = user.UserName; + } + } + return userName; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, 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..57a4c987 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeeting.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +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; + + /// + /// lblMeetingHostMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblMeetingHostMan; + + /// + /// 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..a8b197d7 --- /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.UserId; + 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.UserName; + } + } + } + #endregion + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + UserService.InitUserDropDownList(this.drpCompileMan, 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..45b52d94 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs @@ -0,0 +1,102 @@ +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); + } + if (!string.IsNullOrEmpty(CompanySpecialMeeting.CompileMan)) + { + var user = BLL.UserService.GetUserByUserId(CompanySpecialMeeting.CompileMan); + if (user != null) + { + this.txtCompileMan.Text = user.UserName; + } + } + 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/Person/BranchPerson.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx new file mode 100644 index 00000000..2d06ae7a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx @@ -0,0 +1,133 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BranchPerson.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.BranchPerson" %> + + + + + + 分支机构人员 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx.cs new file mode 100644 index 00000000..ba9edb2a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx.cs @@ -0,0 +1,352 @@ +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.Person +{ + public partial class BranchPerson : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + BLL.UnitService.InitNoThisAllUnitDownList(this.drpUnit, false); + Funs.FineUIPleaseSelect(drpUnit, "按单位查询"); + var thisUnit = CommonService.GetIsThisUnit(); + if (this.CurrUser.UnitId != null && thisUnit != null && this.CurrUser.UnitId != thisUnit.UnitId) + { + this.drpUnit.Enabled = false; + this.drpUnit.SelectedValue = this.CurrUser.UnitId; + } + ////权限按钮方法 + this.GetButtonPower(); + this.btnNew.OnClientClick = Window1.GetShowReference("BranchPersonEdit.aspx") + "return false;"; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT CompanyBranchPerson.CompanyBranchPersonId,CompanyBranchPerson.UnitId,Unit.UnitName,CompanyBranchPerson.PersonName,case CompanyBranchPerson.Sex when '1' then '男' else '女' end as SexStr,CompanyBranchPerson.IdentityCard,WorkPost.WorkPostName,CompanyBranchPerson.Telephone,CompanyBranchPerson.IsOnJob,CompanyBranchPerson.Remark " + + @" FROM Person_CompanyBranchPerson AS CompanyBranchPerson " + + @" LEFT JOIN Base_Unit AS Unit ON CompanyBranchPerson.UnitId=Unit.UnitId" + + @" LEFT JOIN Base_WorkPost AS WorkPost ON CompanyBranchPerson.WorkPostId=WorkPost.WorkPostId WHERE 1=1 "; + List listStr = new List(); + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + strSql += " AND CompanyBranchPerson.UnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", this.drpUnit.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim())) + { + strSql += " AND PersonName LIKE @PersonName"; + listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%")); + } + var thisUnit = CommonService.GetIsThisUnit(); + if (thisUnit != null) + { + strSql += " AND CompanyBranchPerson.UnitId != @UnitId2"; + listStr.Add(new SqlParameter("@UnitId2", thisUnit.UnitId)); + } + 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 person = BLL.CompanyBranchPersonService.GetCompanyBranchPersonById(id); + if (person != null) + { + if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BranchPersonView.aspx?CompanyBranchPersonId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BranchPersonEdit.aspx?CompanyBranchPersonId={0}", id, "编辑 - "))); + } + } + } + #endregion + + #region 授权 + /// + /// 右键授权事件 + /// + /// + /// + protected void btnMenuUpdate_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + var person = BLL.CompanyBranchPersonService.GetCompanyBranchPersonById(id); + if (person != null) + { + var user = BLL.UserService.GetUserByIdentityCard(person.IdentityCard); + if (user == null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../SysManage/UserListEdit.aspx?CompanyBranchPersonId={0}", id, "授权 - "))); + } + else + { + Alert.ShowInTop("该人员已授权!", MessageBoxIcon.Warning); + return; + } + } + } + #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.CompanyBranchPersonService.GetCompanyBranchPersonById(rowID); + if (meet != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, meet.PersonName, meet.CompanyBranchPersonId, BLL.Const.BranchPersonMenuId, BLL.Const.BtnDelete); + + BLL.CompanyBranchPersonService.DeleteCompanyBranchPersonById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 格式化字符串 + /// + /// 获取整理人姓名 + /// + /// + /// + protected string ConvertCompileMan(object userId) + { + string userName = string.Empty; + if (userId != null) + { + var user = BLL.UserService.GetUserByUserId(userId.ToString()); + if (user != null) + { + userName = user.UserName; + } + } + return userName; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BranchPersonMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + this.btnImport.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnMenuUpdate.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("BranchPersonIn.aspx", "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #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/Person/BranchPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx.designer.cs new file mode 100644 index 00000000..ac943e60 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx.designer.cs @@ -0,0 +1,222 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Person { + + + public partial class BranchPerson { + + /// + /// 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; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// 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; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuUpdate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuUpdate; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx new file mode 100644 index 00000000..735b82a2 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx @@ -0,0 +1,83 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BranchPersonEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.BranchPersonEdit" ValidateRequest="false" %> + + + + + +编辑用户 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.cs new file mode 100644 index 00000000..7967e7e9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.cs @@ -0,0 +1,207 @@ +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.Person +{ + public partial class BranchPersonEdit : PageBase + { + #region 定义项 + /// + /// 用户主键 + /// + public string CompanyBranchPersonId + { + get + { + return (string)ViewState["CompanyBranchPersonId"]; + } + set + { + ViewState["CompanyBranchPersonId"] = value; + } + } + /// + /// 单位主键 + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + #endregion + + /// + /// 用户编辑页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + string type = Request.Params["type"]; + BLL.UnitService.InitNoThisAllUnitDownList(this.drpUnit, true); + var thisUnit = CommonService.GetIsThisUnit(); + if (this.CurrUser.UnitId != null && thisUnit != null && this.CurrUser.UnitId != thisUnit.UnitId) + { + this.drpUnit.Enabled = false; + this.drpUnit.SelectedValue = this.CurrUser.UnitId; + } + ///权限 + this.GetButtonPower(); + this.CompanyBranchPersonId = Request.Params["CompanyBranchPersonId"]; + WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true); + if (!string.IsNullOrEmpty(this.CompanyBranchPersonId)) + { + var CompanyBranchPerson = BLL.CompanyBranchPersonService.GetCompanyBranchPersonById(this.CompanyBranchPersonId); + if (CompanyBranchPerson != null) + { + this.hdCompanyBranchPersonId.Text = this.CompanyBranchPersonId; + if (!string.IsNullOrEmpty(CompanyBranchPerson.UnitId)) + { + this.drpUnit.SelectedValue = CompanyBranchPerson.UnitId; + } + this.txtPersonName.Text = CompanyBranchPerson.PersonName; + if (!string.IsNullOrEmpty(CompanyBranchPerson.Sex)) + { + this.rblSex.SelectedValue = CompanyBranchPerson.Sex; + } + this.txtIdentityCard.Text = CompanyBranchPerson.IdentityCard; + if (!string.IsNullOrEmpty(CompanyBranchPerson.WorkPostId)) + { + this.drpWorkPost.SelectedValue = CompanyBranchPerson.WorkPostId; + } + this.txtTelephone.Text = CompanyBranchPerson.Telephone; + this.txtAddress.Text = CompanyBranchPerson.Address; + if (CompanyBranchPerson.IsOnJob == true) + { + this.rblIsOnJob.SelectedValue = "True"; + } + else + { + this.rblIsOnJob.SelectedValue = "False"; + } + this.txtRemark.Text = CompanyBranchPerson.Remark; + } + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.drpUnit.SelectedValue == Const._Null) + { + Alert.ShowInParent("请选择单位!", MessageBoxIcon.Warning); + return; + } + if (this.drpWorkPost.SelectedValue == Const._Null) + { + Alert.ShowInParent("请选择岗位!", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(this.txtIdentityCard.Text) && BLL.CompanyBranchPersonService.IsExistPersonIdentityCard(this.CompanyBranchPersonId, this.txtIdentityCard.Text.Trim()) == true) + { + Alert.ShowInParent("输入的身份证号码已存在!", MessageBoxIcon.Warning); + return; + } + + Model.Person_CompanyBranchPerson newCompanyBranchPerson = new Model.Person_CompanyBranchPerson + { + PersonName = this.txtPersonName.Text.Trim(), + Sex = this.rblSex.SelectedValue, + IdentityCard = this.txtIdentityCard.Text.Trim(), + Telephone = this.txtTelephone.Text.Trim(), + Address = this.txtAddress.Text.Trim(), + IsOnJob = Convert.ToBoolean(this.rblIsOnJob.SelectedValue), + Remark = this.txtRemark.Text.Trim() + }; + if (this.drpUnit.SelectedValue != Const._Null) + { + newCompanyBranchPerson.UnitId = this.drpUnit.SelectedValue; + } + if (this.drpWorkPost.SelectedValue != Const._Null) + { + newCompanyBranchPerson.WorkPostId = this.drpWorkPost.SelectedValue; + } + if (string.IsNullOrEmpty(this.CompanyBranchPersonId)) + { + if (string.IsNullOrEmpty(this.hdCompanyBranchPersonId.Text)) + { + newCompanyBranchPerson.CompanyBranchPersonId = SQLHelper.GetNewID(typeof(Model.Person_CompanyBranchPerson)); + } + else + { + newCompanyBranchPerson.CompanyBranchPersonId = this.hdCompanyBranchPersonId.Text; + } + CompanyBranchPersonService.AddCompanyBranchPerson(newCompanyBranchPerson); + LogService.AddSys_Log(this.CurrUser, newCompanyBranchPerson.PersonName, newCompanyBranchPerson.CompanyBranchPersonId, BLL.Const.BranchPersonMenuId, BLL.Const.BtnAdd); + } + else + { + newCompanyBranchPerson.CompanyBranchPersonId = this.CompanyBranchPersonId; + CompanyBranchPersonService.UpdateCompanyBranchPerson(newCompanyBranchPerson); + LogService.AddSys_Log(this.CurrUser, newCompanyBranchPerson.PersonName, newCompanyBranchPerson.CompanyBranchPersonId, BLL.Const.BranchPersonMenuId, BLL.Const.BtnModify); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.btnSave.Hidden = false; + } + else + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BranchPersonMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.hdCompanyBranchPersonId.Text)) + { + this.hdCompanyBranchPersonId.Text = SQLHelper.GetNewID(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/BranchPersonAttachUrl&menuId={1}", this.hdCompanyBranchPersonId.Text, BLL.Const.BranchPersonMenuId))); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.designer.cs new file mode 100644 index 00000000..31467dd3 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.designer.cs @@ -0,0 +1,177 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Person { + + + public partial class BranchPersonEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// rblSex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblSex; + + /// + /// txtIdentityCard 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIdentityCard; + + /// + /// drpWorkPost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWorkPost; + + /// + /// txtTelephone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTelephone; + + /// + /// txtAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAddress; + + /// + /// rblIsOnJob 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsOnJob; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// hdCompanyBranchPersonId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCompanyBranchPersonId; + + /// + /// 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/Person/BranchPersonIn.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx new file mode 100644 index 00000000..333a4815 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx @@ -0,0 +1,65 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BranchPersonIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.BranchPersonIn" %> + + + + + + 导入人员信息 + + + +
+ + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx.cs new file mode 100644 index 00000000..444258b1 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx.cs @@ -0,0 +1,478 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.ZHGL.Person +{ + public partial class BranchPersonIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.FileExcel.HasFile == false) + { + Alert.ShowInTop("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(FileExcel.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + Alert.ShowInTop("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdfileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdfileName.Text; + FileExcel.PostedFile.SaveAs(filePath); + ImportXlsToData(filePath); + + } + catch (Exception ex) + { + Alert.ShowInTop(ex.Message); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.SelectCommand.CommandTimeout = 1200; + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0]); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + #endregion + + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL(DataTable pds) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var units = from x in Funs.DB.Base_Unit select x; + var workPosts = from x in Funs.DB.Base_WorkPost select x; + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + var unit = units.FirstOrDefault(e => e.UnitName == col0); + if (unit == null) + { + result += (i + 2).ToString() + "," + "单位" + "," + "[" + col0 + "]错误!" + "|"; + } + } + else + { + result += (i + 2).ToString() + "," + "单位" + "," + "此项为必填项!" + "|"; + } + + if (string.IsNullOrEmpty(pds.Rows[i][1].ToString())) + { + result += (i + 2).ToString() + "," + "姓名" + "," + "此项为必填项!" + "|"; + } + + if (string.IsNullOrEmpty(pds.Rows[i][2].ToString())) + { + result += (i + 2).ToString() + "," + "性别" + "," + "此项为必填项!" + "|"; + } + else + { + if (pds.Rows[i][2].ToString() != "男" && pds.Rows[i][2].ToString() != "女") + { + result += (i + 2).ToString() + "," + "性别" + "," + "性别只能为男或女!" + "|"; + } + } + + string col3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(col3)) + { + if (col3.Length > 50) + { + result += (i + 2).ToString() + "," + "身份证号码" + "," + "[" + col3 + "]错误!" + "|"; + } + + if (CompanyBranchPersonService.GetPersonCountByIdentityCard(col3) != null) + { + result += (i + 2).ToString() + "," + "身份证号码" + "," + "[" + col3 + "]已存在!" + "|"; + } + if (!IDCardValid.CheckIDCard(col3)) + { + result += (i + 2).ToString() + "," + "身份证号码" + "," + "[" + col3 + "]非法!" + "|"; + } + } + else + { + result += (i + 2).ToString() + "," + "身份证号码" + "," + "此项为必填项!" + "|"; + } + + string col4 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(col4)) + { + var workPost = workPosts.FirstOrDefault(e => e.WorkPostName == col4); + if (workPost == null) + { + result += (i + 2).ToString() + "," + "岗位" + "," + "[" + col4 + "]错误!" + "|"; + } + } + else + { + result += (i + 2).ToString() + "," + "岗位" + "," + "此项为必填项!" + "|"; + } + + string col5 = pds.Rows[i][5].ToString().Trim(); + if (!string.IsNullOrEmpty(col5)) + { + if (col5.Length > 50) + { + result += (i + 2).ToString() + "," + "电话" + "," + "[" + col5 + "]错误!" + "|"; + } + } + + string col7 = pds.Rows[i][7].ToString().Trim(); + if (!string.IsNullOrEmpty(col7)) + { + if (col7 != "是" && col7 != "否") + { + result += (i + 2).ToString() + "," + "在职" + "," + "[" + col7 + "]错误!" + "|"; + } + } + else + { + result += (i + 2).ToString() + "," + "在职" + "," + "此项为必填项!" + "|"; + } + } + + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + Grid1.DataSource = errorInfos; + Grid1.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击保存!", MessageBoxIcon.Success); + } + } + else + { + throw new Exception("导入数据为空!"); + } + return true; + } + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + string filePath = initFullPath + this.hdfileName.Text; + ImportXlsToData2(filePath); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.SelectCommand.CommandTimeout = 1200; + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0]); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds) + { + string result = string.Empty; + var units = from x in Funs.DB.Base_Unit select x; + var workPosts = from x in Funs.DB.Base_WorkPost select x; + foreach (DataRow row in pds.Rows) + { + Model.Person_CompanyBranchPerson companyBranchPerson = new Model.Person_CompanyBranchPerson(); + companyBranchPerson.CompanyBranchPersonId = Guid.NewGuid().ToString(); + string col0 = row[0].ToString().Trim(); + var unit = units.FirstOrDefault(e => e.UnitName == col0); + if (unit != null) + { + companyBranchPerson.UnitId = unit.UnitId; + } + companyBranchPerson.PersonName = row[1].ToString().Trim(); + companyBranchPerson.Sex = row[2].ToString().Trim() == "男" ? "1" : "2"; + companyBranchPerson.IdentityCard = row[3].ToString(); + var workPost = workPosts.FirstOrDefault(e => e.WorkPostName == row[4].ToString().Trim()); + if (workPost != null) + { + companyBranchPerson.WorkPostId = workPost.WorkPostId; + } + companyBranchPerson.Telephone = row[5].ToString().Trim(); + companyBranchPerson.Address = row[6].ToString().Trim(); + string isOnJob = row[7].ToString().Trim(); + if (isOnJob == "是") + { + companyBranchPerson.IsOnJob = true; + } + else + { + companyBranchPerson.IsOnJob = false; + } + companyBranchPerson.Remark = row[8].ToString(); + Funs.DB.Person_CompanyBranchPerson.InsertOnSubmit(companyBranchPerson); + } + Funs.DB.SubmitChanges(); + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + + + return true; + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.BranchPersonTemplateUrl; + string filePath = Const.BranchPersonTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx.designer.cs new file mode 100644 index 00000000..dc13b4e9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Person { + + + public partial class BranchPersonIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdfileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdfileName; + + /// + /// FileExcel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload FileExcel; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lblBottom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBottom; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx new file mode 100644 index 00000000..2f68a979 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx @@ -0,0 +1,80 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BranchPersonView.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.BranchPersonView" ValidateRequest="false" %> + + + + + + 编辑用户 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx.cs new file mode 100644 index 00000000..d906ed87 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx.cs @@ -0,0 +1,106 @@ +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.Person +{ + public partial class BranchPersonView : PageBase + { + #region 定义项 + /// + /// 用户主键 + /// + public string CompanyBranchPersonId + { + get + { + return (string)ViewState["CompanyBranchPersonId"]; + } + set + { + ViewState["CompanyBranchPersonId"] = value; + } + } + /// + /// 单位主键 + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + #endregion + + /// + /// 用户编辑页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + string type = Request.Params["type"]; + BLL.UnitService.InitNoThisAllUnitDownList(this.drpUnit, true); + this.CompanyBranchPersonId = Request.Params["CompanyBranchPersonId"]; + WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true); + if (!string.IsNullOrEmpty(this.CompanyBranchPersonId)) + { + var CompanyBranchPerson = BLL.CompanyBranchPersonService.GetCompanyBranchPersonById(this.CompanyBranchPersonId); + if (CompanyBranchPerson != null) + { + this.hdCompanyBranchPersonId.Text = this.CompanyBranchPersonId; + if (!string.IsNullOrEmpty(CompanyBranchPerson.UnitId)) + { + this.drpUnit.SelectedValue = CompanyBranchPerson.UnitId; + } + this.txtPersonName.Text = CompanyBranchPerson.PersonName; + if (!string.IsNullOrEmpty(CompanyBranchPerson.Sex)) + { + this.rblSex.SelectedValue = CompanyBranchPerson.Sex; + } + this.txtIdentityCard.Text = CompanyBranchPerson.IdentityCard; + if (!string.IsNullOrEmpty(CompanyBranchPerson.WorkPostId)) + { + this.drpWorkPost.SelectedValue = CompanyBranchPerson.WorkPostId; + } + this.txtTelephone.Text = CompanyBranchPerson.Telephone; + this.txtAddress.Text = CompanyBranchPerson.Address; + if (CompanyBranchPerson.IsOnJob == true) + { + this.rblIsOnJob.SelectedValue = "True"; + } + else + { + this.rblIsOnJob.SelectedValue = "False"; + } + this.txtRemark.Text = CompanyBranchPerson.Remark; + } + } + } + } + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/BranchPersonAttachUrl&menuId={1}&type=-1", this.hdCompanyBranchPersonId.Text, BLL.Const.BranchPersonMenuId))); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx.designer.cs new file mode 100644 index 00000000..4baf1c33 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonView.aspx.designer.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Person { + + + public partial class BranchPersonView { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// rblSex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblSex; + + /// + /// txtIdentityCard 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIdentityCard; + + /// + /// drpWorkPost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWorkPost; + + /// + /// txtTelephone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTelephone; + + /// + /// txtAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAddress; + + /// + /// rblIsOnJob 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsOnJob; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// hdCompanyBranchPersonId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCompanyBranchPersonId; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx new file mode 100644 index 00000000..e8022d21 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx @@ -0,0 +1,128 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyPerson.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.CompanyPerson" %> + + + + + + 企业总部人员 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx.cs new file mode 100644 index 00000000..ba9bf8e9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx.cs @@ -0,0 +1,326 @@ +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.Person +{ + public partial class CompanyPerson : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + this.btnNew.OnClientClick = Window1.GetShowReference("CompanyPersonEdit.aspx") + "return false;"; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT CompanyBranchPerson.CompanyBranchPersonId,CompanyBranchPerson.PersonName,case CompanyBranchPerson.Sex when '1' then '男' else '女' end as SexStr,CompanyBranchPerson.IdentityCard,WorkPost.WorkPostName,CompanyBranchPerson.Telephone,CompanyBranchPerson.IsOnJob,CompanyBranchPerson.Remark " + + @" FROM Person_CompanyBranchPerson AS CompanyBranchPerson " + + @" LEFT JOIN Base_WorkPost AS WorkPost ON CompanyBranchPerson.WorkPostId=WorkPost.WorkPostId WHERE 1=1 "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim())) + { + strSql += " AND PersonName LIKE @PersonName"; + listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%")); + } + var thisUnit = CommonService.GetIsThisUnit(); + if (thisUnit != null) + { + strSql += " AND CompanyBranchPerson.UnitId = @UnitId"; + listStr.Add(new SqlParameter("@UnitId", thisUnit.UnitId)); + } + 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 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 person = BLL.CompanyBranchPersonService.GetCompanyBranchPersonById(id); + if (person != null) + { + if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CompanyPersonView.aspx?CompanyBranchPersonId={0}", id, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CompanyPersonEdit.aspx?CompanyBranchPersonId={0}", id, "编辑 - "))); + } + } + } + #endregion + + #region 授权 + /// + /// 右键授权事件 + /// + /// + /// + protected void btnMenuUpdate_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + var person = BLL.CompanyBranchPersonService.GetCompanyBranchPersonById(id); + if (person != null) + { + var user = BLL.UserService.GetUserByIdentityCard(person.IdentityCard); + if (user == null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../SysManage/UserListEdit.aspx?CompanyBranchPersonId={0}", id, "授权 - "))); + } + else + { + Alert.ShowInTop("该人员已授权!", MessageBoxIcon.Warning); + return; + } + } + } + #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.CompanyBranchPersonService.GetCompanyBranchPersonById(rowID); + if (meet != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, meet.PersonName, meet.CompanyBranchPersonId, BLL.Const.CompanyPersonMenuId, BLL.Const.BtnDelete); + + BLL.CompanyBranchPersonService.DeleteCompanyBranchPersonById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 格式化字符串 + /// + /// 获取整理人姓名 + /// + /// + /// + protected string ConvertCompileMan(object userId) + { + string userName = string.Empty; + if (userId != null) + { + var user = BLL.UserService.GetUserByUserId(userId.ToString()); + if (user != null) + { + userName = user.UserName; + } + } + return userName; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CompanyPersonMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + this.btnImport.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnMenuUpdate.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("CompanyPersonIn.aspx", "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #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/Person/CompanyPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx.designer.cs new file mode 100644 index 00000000..4a75dd1b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx.designer.cs @@ -0,0 +1,213 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Person { + + + public partial class CompanyPerson { + + /// + /// 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; + + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// 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; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuUpdate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuUpdate; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx new file mode 100644 index 00000000..618f70c2 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx @@ -0,0 +1,78 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyPersonEdit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.CompanyPersonEdit" ValidateRequest="false" %> + + + + + + 编辑用户 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.cs new file mode 100644 index 00000000..7ef4d8be --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.cs @@ -0,0 +1,192 @@ +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.Person +{ + public partial class CompanyPersonEdit : PageBase + { + #region 定义项 + /// + /// 用户主键 + /// + public string CompanyBranchPersonId + { + get + { + return (string)ViewState["CompanyBranchPersonId"]; + } + set + { + ViewState["CompanyBranchPersonId"] = value; + } + } + /// + /// 单位主键 + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + #endregion + + /// + /// 用户编辑页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + string type = Request.Params["type"]; + ///权限 + this.GetButtonPower(); + this.CompanyBranchPersonId = Request.Params["CompanyBranchPersonId"]; + WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true); + if (!string.IsNullOrEmpty(this.CompanyBranchPersonId)) + { + var CompanyBranchPerson = BLL.CompanyBranchPersonService.GetCompanyBranchPersonById(this.CompanyBranchPersonId); + if (CompanyBranchPerson != null) + { + this.hdCompanyBranchPersonId.Text = this.CompanyBranchPersonId; + this.txtPersonName.Text = CompanyBranchPerson.PersonName; + if (!string.IsNullOrEmpty(CompanyBranchPerson.Sex)) + { + this.rblSex.SelectedValue = CompanyBranchPerson.Sex; + } + this.txtIdentityCard.Text = CompanyBranchPerson.IdentityCard; + if (!string.IsNullOrEmpty(CompanyBranchPerson.WorkPostId)) + { + this.drpWorkPost.SelectedValue = CompanyBranchPerson.WorkPostId; + } + this.txtTelephone.Text = CompanyBranchPerson.Telephone; + this.txtAddress.Text = CompanyBranchPerson.Address; + if (CompanyBranchPerson.IsOnJob == true) + { + this.rblIsOnJob.SelectedValue = "True"; + } + else + { + this.rblIsOnJob.SelectedValue = "False"; + } + this.txtRemark.Text = CompanyBranchPerson.Remark; + } + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.drpWorkPost.SelectedValue == Const._Null) + { + Alert.ShowInParent("请选择岗位!", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(this.txtIdentityCard.Text) && BLL.CompanyBranchPersonService.IsExistPersonIdentityCard(this.CompanyBranchPersonId, this.txtIdentityCard.Text.Trim()) == true) + { + Alert.ShowInParent("输入的身份证号码已存在!", MessageBoxIcon.Warning); + return; + } + + Model.Person_CompanyBranchPerson newCompanyBranchPerson = new Model.Person_CompanyBranchPerson + { + PersonName = this.txtPersonName.Text.Trim(), + Sex = this.rblSex.SelectedValue, + IdentityCard = this.txtIdentityCard.Text.Trim(), + Telephone = this.txtTelephone.Text.Trim(), + Address = this.txtAddress.Text.Trim(), + IsOnJob = Convert.ToBoolean(this.rblIsOnJob.SelectedValue), + Remark = this.txtRemark.Text.Trim() + }; + if (this.drpWorkPost.SelectedValue != Const._Null) + { + newCompanyBranchPerson.WorkPostId = this.drpWorkPost.SelectedValue; + } + var thisUnit = CommonService.GetIsThisUnit(); + if (thisUnit != null) + { + newCompanyBranchPerson.UnitId = thisUnit.UnitId; + } + if (string.IsNullOrEmpty(this.CompanyBranchPersonId)) + { + if (string.IsNullOrEmpty(this.hdCompanyBranchPersonId.Text)) + { + newCompanyBranchPerson.CompanyBranchPersonId = SQLHelper.GetNewID(typeof(Model.Person_CompanyBranchPerson)); + } + else + { + newCompanyBranchPerson.CompanyBranchPersonId = this.hdCompanyBranchPersonId.Text; + } + CompanyBranchPersonService.AddCompanyBranchPerson(newCompanyBranchPerson); + LogService.AddSys_Log(this.CurrUser, newCompanyBranchPerson.PersonName, newCompanyBranchPerson.CompanyBranchPersonId, BLL.Const.CompanyPersonMenuId, BLL.Const.BtnAdd); + } + else + { + newCompanyBranchPerson.CompanyBranchPersonId = this.CompanyBranchPersonId; + CompanyBranchPersonService.UpdateCompanyBranchPerson(newCompanyBranchPerson); + LogService.AddSys_Log(this.CurrUser, newCompanyBranchPerson.PersonName, newCompanyBranchPerson.CompanyBranchPersonId, BLL.Const.CompanyPersonMenuId, BLL.Const.BtnModify); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.btnSave.Hidden = false; + } + else + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CompanyPersonMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + } + #endregion + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.hdCompanyBranchPersonId.Text)) + { + this.hdCompanyBranchPersonId.Text = SQLHelper.GetNewID(); + } + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanyPersonAttachUrl&menuId={1}", this.hdCompanyBranchPersonId.Text, BLL.Const.CompanyPersonMenuId))); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.designer.cs new file mode 100644 index 00000000..4665f94f --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.designer.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Person { + + + public partial class CompanyPersonEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// rblSex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblSex; + + /// + /// txtIdentityCard 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIdentityCard; + + /// + /// drpWorkPost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWorkPost; + + /// + /// txtTelephone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTelephone; + + /// + /// txtAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAddress; + + /// + /// rblIsOnJob 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsOnJob; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// hdCompanyBranchPersonId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCompanyBranchPersonId; + + /// + /// 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/Person/CompanyPersonIn.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx new file mode 100644 index 00000000..fff52ad8 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx @@ -0,0 +1,65 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyPersonIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.CompanyPersonIn" %> + + + + + + 导入人员信息 + + + +
+ + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.cs new file mode 100644 index 00000000..17a5f685 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.cs @@ -0,0 +1,461 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.ZHGL.Person +{ + public partial class CompanyPersonIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.FileExcel.HasFile == false) + { + Alert.ShowInTop("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(FileExcel.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + Alert.ShowInTop("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdfileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdfileName.Text; + FileExcel.PostedFile.SaveAs(filePath); + ImportXlsToData(filePath); + + } + catch (Exception ex) + { + Alert.ShowInTop(ex.Message); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.SelectCommand.CommandTimeout = 1200; + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0]); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + #endregion + + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL(DataTable pds) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var workPosts = from x in Funs.DB.Base_WorkPost select x; + for (int i = 0; i < ir; i++) + { + if (string.IsNullOrEmpty(pds.Rows[i][0].ToString())) + { + result += (i + 2).ToString() + "," + "姓名" + "," + "此项为必填项!" + "|"; + } + + if (string.IsNullOrEmpty(pds.Rows[i][1].ToString())) + { + result += (i + 2).ToString() + "," + "性别" + "," + "此项为必填项!" + "|"; + } + else + { + if (pds.Rows[i][1].ToString() != "男" && pds.Rows[i][1].ToString() != "女") + { + result += (i + 2).ToString() + "," + "性别" + "," + "性别只能为男或女!" + "|"; + } + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(col2)) + { + if (col2.Length > 50) + { + result += (i + 2).ToString() + "," + "身份证号码" + "," + "[" + col2 + "]错误!" + "|"; + } + + if (CompanyBranchPersonService.GetPersonCountByIdentityCard(col2) != null) + { + result += (i + 2).ToString() + "," + "身份证号码" + "," + "[" + col2 + "]已存在!" + "|"; + } + if (!IDCardValid.CheckIDCard(col2)) + { + result += (i + 2).ToString() + "," + "身份证号码" + "," + "[" + col2 + "]非法!" + "|"; + } + } + else + { + result += (i + 2).ToString() + "," + "身份证号码" + "," + "此项为必填项!" + "|"; + } + + string col3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(col3)) + { + var workPost = workPosts.FirstOrDefault(e => e.WorkPostName == col3); + if (workPost == null) + { + result += (i + 2).ToString() + "," + "岗位" + "," + "[" + col3 + "]错误!" + "|"; + } + } + else + { + result += (i + 2).ToString() + "," + "岗位" + "," + "此项为必填项!" + "|"; + } + + string col4 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(col4)) + { + if (col4.Length > 50) + { + result += (i + 2).ToString() + "," + "电话" + "," + "[" + col4 + "]错误!" + "|"; + } + } + + string col6 = pds.Rows[i][6].ToString().Trim(); + if (!string.IsNullOrEmpty(col6)) + { + if (col6 != "是" && col6 != "否") + { + result += (i + 2).ToString() + "," + "在职" + "," + "[" + col6 + "]错误!" + "|"; + } + } + else + { + result += (i + 2).ToString() + "," + "在职" + "," + "此项为必填项!" + "|"; + } + } + + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + Grid1.DataSource = errorInfos; + Grid1.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击保存!", MessageBoxIcon.Success); + } + } + else + { + throw new Exception("导入数据为空!"); + } + return true; + } + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + string filePath = initFullPath + this.hdfileName.Text; + ImportXlsToData2(filePath); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.SelectCommand.CommandTimeout = 1200; + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0]); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds) + { + string result = string.Empty; + var workPosts = from x in Funs.DB.Base_WorkPost select x; + foreach (DataRow row in pds.Rows) + { + Model.Person_CompanyBranchPerson companyBranchPerson = new Model.Person_CompanyBranchPerson(); + companyBranchPerson.CompanyBranchPersonId = Guid.NewGuid().ToString(); + var thisUnit = CommonService.GetIsThisUnit(); + if (thisUnit != null) + { + companyBranchPerson.UnitId = thisUnit.UnitId; + } + companyBranchPerson.PersonName = row[0].ToString().Trim(); + companyBranchPerson.Sex = row[1].ToString().Trim() == "男" ? "1" : "2"; + companyBranchPerson.IdentityCard= row[2].ToString(); + var workPost = workPosts.FirstOrDefault(e => e.WorkPostName == row[3].ToString().Trim()); + if (workPost != null) + { + companyBranchPerson.WorkPostId = workPost.WorkPostId; + } + companyBranchPerson.Telephone= row[4].ToString().Trim(); + companyBranchPerson.Address= row[5].ToString().Trim(); + string isOnJob= row[6].ToString().Trim(); + if (isOnJob == "是") + { + companyBranchPerson.IsOnJob = true; + } + else + { + companyBranchPerson.IsOnJob = false; + } + companyBranchPerson.Remark = row[7].ToString(); + Funs.DB.Person_CompanyBranchPerson.InsertOnSubmit(companyBranchPerson); + } + Funs.DB.SubmitChanges(); + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + + + return true; + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.CompanyPersonTemplateUrl; + string filePath = Const.CompanyPersonTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.designer.cs new file mode 100644 index 00000000..2c345082 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Person { + + + public partial class CompanyPersonIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdfileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdfileName; + + /// + /// FileExcel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload FileExcel; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lblBottom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBottom; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx new file mode 100644 index 00000000..1df87b99 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx @@ -0,0 +1,75 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyPersonView.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.CompanyPersonView" ValidateRequest="false" %> + + + + + + 编辑用户 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx.cs new file mode 100644 index 00000000..ceca2353 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx.cs @@ -0,0 +1,101 @@ +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.Person +{ + public partial class CompanyPersonView : PageBase + { + #region 定义项 + /// + /// 用户主键 + /// + public string CompanyBranchPersonId + { + get + { + return (string)ViewState["CompanyBranchPersonId"]; + } + set + { + ViewState["CompanyBranchPersonId"] = value; + } + } + /// + /// 单位主键 + /// + public string UnitId + { + get + { + return (string)ViewState["UnitId"]; + } + set + { + ViewState["UnitId"] = value; + } + } + #endregion + + /// + /// 用户编辑页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + string type = Request.Params["type"]; + this.CompanyBranchPersonId = Request.Params["CompanyBranchPersonId"]; + WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true); + if (!string.IsNullOrEmpty(this.CompanyBranchPersonId)) + { + var CompanyBranchPerson = BLL.CompanyBranchPersonService.GetCompanyBranchPersonById(this.CompanyBranchPersonId); + if (CompanyBranchPerson != null) + { + this.hdCompanyBranchPersonId.Text = this.CompanyBranchPersonId; + this.txtPersonName.Text = CompanyBranchPerson.PersonName; + if (!string.IsNullOrEmpty(CompanyBranchPerson.Sex)) + { + this.rblSex.SelectedValue = CompanyBranchPerson.Sex; + } + this.txtIdentityCard.Text = CompanyBranchPerson.IdentityCard; + if (!string.IsNullOrEmpty(CompanyBranchPerson.WorkPostId)) + { + this.drpWorkPost.SelectedValue = CompanyBranchPerson.WorkPostId; + } + this.txtTelephone.Text = CompanyBranchPerson.Telephone; + this.txtAddress.Text = CompanyBranchPerson.Address; + if (CompanyBranchPerson.IsOnJob == true) + { + this.rblIsOnJob.SelectedValue = "True"; + } + else + { + this.rblIsOnJob.SelectedValue = "False"; + } + this.txtRemark.Text = CompanyBranchPerson.Remark; + } + } + } + } + + #region 附件上传 + /// + /// 上传附件 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanyPersonAttachUrl&menuId={1}&type=-1", this.hdCompanyBranchPersonId.Text, BLL.Const.CompanyPersonMenuId))); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx.designer.cs new file mode 100644 index 00000000..75ecbb27 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonView.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Person { + + + public partial class CompanyPersonView { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// rblSex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblSex; + + /// + /// txtIdentityCard 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIdentityCard; + + /// + /// drpWorkPost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWorkPost; + + /// + /// txtTelephone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTelephone; + + /// + /// txtAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAddress; + + /// + /// rblIsOnJob 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsOnJob; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// hdCompanyBranchPersonId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCompanyBranchPersonId; + + /// + /// 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 index 6c4fa2e1..1bbbaa54 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowFileUpload.aspx @@ -48,10 +48,10 @@ - - + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx index 77d140da..ec408d5c 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx @@ -42,7 +42,7 @@ - + @@ -50,9 +50,6 @@ - <%-- - --%> diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs index 4b846d45..0e7ea68e 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs @@ -119,10 +119,11 @@ namespace FineUIPro.Web.ZHGL.Supervise { for (int i = 0; i < Grid1.Rows.Count; i++) { + CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); string id = Grid1.DataKeys[i][0].ToString(); if (list.Contains(id)) { - Grid1.Rows[i].Values[0] = true; + checkField.SetCheckedState(i, true); } } } diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx index 889bba62..6d9a26a1 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SubUnitCheckRectifyEdit.aspx @@ -192,10 +192,10 @@ - - @@ -204,10 +204,10 @@ - - + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx index 56cab024..ac244cc3 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx @@ -48,13 +48,13 @@ AutoPostBack="true" OnTextChanged="txtName_TextChanged"> - - - diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs index c5bb481e..8714cc35 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx.cs @@ -47,6 +47,12 @@ namespace FineUIPro.Web.ZHGL.Supervise 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() + "%")); } + var thisUnit = BLL.CommonService.GetIsThisUnit(); + if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && thisUnit.UnitId != 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); diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx index f26f7997..7f73123b 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx @@ -159,13 +159,13 @@ - <%-- --%> - + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx index fec11761..2c6e53b5 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx @@ -38,16 +38,16 @@ AutoPostBack="true" OnTextChanged="txtName_TextChanged"> - - - - @@ -81,6 +81,10 @@ FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="检查日期" HeaderTextAlign="Center" TextAlign="Center"> + + 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" + 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" @@ -51,6 +51,12 @@ namespace FineUIPro.Web.ZHGL.Supervise 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() + "%")); } + var thisUnit = BLL.CommonService.GetIsThisUnit(); + if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && thisUnit.UnitId != 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); diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx index 70cbc242..6f0c46dc 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx @@ -29,6 +29,11 @@ + + + + + @@ -57,8 +62,8 @@ - - + @@ -121,15 +126,15 @@ - - + - - - - + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs index 7d523104..5335928e 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.cs @@ -46,12 +46,15 @@ namespace FineUIPro.Web.ZHGL.Supervise btnClose.OnClientClick = ActiveWindow.GetHideReference(); superviseCheckReportItems.Clear(); - ////权限按钮方法 - this.GetButtonPower(); + 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) @@ -61,6 +64,10 @@ namespace FineUIPro.Web.ZHGL.Supervise { 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; @@ -69,7 +76,7 @@ namespace FineUIPro.Web.ZHGL.Supervise BLL.UnitService.InitUnitDropDownList(this.ddlUnitId, this.ddlProjectId.SelectedValue, true); if (!string.IsNullOrEmpty(superviseCheckReport.UnitId)) { - this.ddlProjectId.SelectedValue = superviseCheckReport.UnitId; + this.ddlUnitId.SelectedValue = superviseCheckReport.UnitId; } } this.txtCheckTeam.Text = superviseCheckReport.CheckTeam; @@ -102,9 +109,11 @@ namespace FineUIPro.Web.ZHGL.Supervise var item = superviseCheckReportItems.FirstOrDefault(x => x.SuperviseCheckReportItemId == Grid1.Rows[i].Values[7].ToString()); if (item != null) { + CheckBoxField checkField = (CheckBoxField)Grid1.FindColumn("ckbIsSelected"); if (item.IsSelected == true) { - Grid1.Rows[i].Values[6] = "True"; + //Grid1.Rows[i].Values[6] = "True"; + checkField.SetCheckedState(i, true); } } } @@ -258,6 +267,11 @@ namespace FineUIPro.Web.ZHGL.Supervise /// 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() @@ -266,6 +280,10 @@ namespace FineUIPro.Web.ZHGL.Supervise { 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; diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.designer.cs index 9ad76cfe..baa5c2e4 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReportEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.ZHGL.Supervise { - - - public partial class SuperviseCheckReportEdit { - +namespace FineUIPro.Web.ZHGL.Supervise +{ + + + public partial class SuperviseCheckReportEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtSuperviseCheckReportCode 控件。 /// @@ -47,7 +49,16 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSuperviseCheckReportCode; - + + /// + /// drpCheckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckType; + /// /// dpkCheckDate 控件。 /// @@ -56,7 +67,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker dpkCheckDate; - + /// /// ddlProjectId 控件。 /// @@ -65,7 +76,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlProjectId; - + /// /// ddlUnitId 控件。 /// @@ -74,7 +85,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlUnitId; - + /// /// txtCheckTeam 控件。 /// @@ -83,7 +94,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCheckTeam; - + /// /// Grid1 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// hdItemId 控件。 /// @@ -109,8 +120,8 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HiddenField hdItemId; - + protected global::FineUIPro.TextBox hdItemId; + /// /// btnSelect 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSelect; - + /// /// Label5 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label5; - + /// /// Label4 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label4; - + /// /// Label2 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label2; - + /// /// Label3 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label3; - + /// /// txtSuperviseCheckReportItemId 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSuperviseCheckReportItemId; - + /// /// txtAttachUrl 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtAttachUrl; - + /// /// Toolbar1 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnSave 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// hdId 控件。 /// @@ -208,8 +219,8 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HiddenField hdId; - + protected global::FineUIPro.TextBox hdId; + /// /// hdAttachUrl 控件。 /// @@ -217,8 +228,8 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HiddenField hdAttachUrl; - + protected global::FineUIPro.TextBox hdAttachUrl; + /// /// Window1 控件。 /// @@ -227,7 +238,7 @@ namespace FineUIPro.Web.ZHGL.Supervise { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// diff --git a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml index cd8dc16b..4e8e6973 100644 --- a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml +++ b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml @@ -1,7 +1,7 @@  - + diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 4db01f41..9c8de6b9 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -46,6 +46,7 @@ + @@ -89,6 +90,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 39a2d167..263040b0 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -6,6 +6,9 @@ + + + @@ -42,6 +45,9 @@ + + + diff --git a/SGGL/WebAPI/Controllers/BaseInfoController.cs b/SGGL/WebAPI/Controllers/BaseInfoController.cs index 4f01c2d4..ce8bf83c 100644 --- a/SGGL/WebAPI/Controllers/BaseInfoController.cs +++ b/SGGL/WebAPI/Controllers/BaseInfoController.cs @@ -1252,6 +1252,7 @@ namespace WebAPI.Controllers return responeData; } #endregion + #region 获取常见问题 /// /// 获取常见问题