diff --git a/.gitignore b/.gitignore
index 1ffcaf69..79fa850a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/SGGL/FineUIPro.Web/FileUpload/QRCodeFile
/SGGL/FineUIPro.Web/FileUpload/DataBase/ConstructionStandardProject/2023-05
/SGGL/FineUIPro.Web/FileUpload/CQMS/InspectionEquipment/2023-05
+/SGGL/FineUIPro.Web/FileUpload/CQMS
diff --git a/DataBase/版本日志/SGGLDB_WH_2023-06-07.sql b/DataBase/版本日志/SGGLDB_WH_2023-06-07.sql
new file mode 100644
index 00000000..8745c2d1
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2023-06-07.sql
@@ -0,0 +1,586 @@
+--Ա
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('175FAEE8-F6B3-483D-839B-001AF4B45D0A','Ա','',15,'0','Menu_ZHGL',1,0,1)
+GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('8E229597-B2D8-407B-8192-787E65E5052E','ҵܲԱ','ZHGL/Person/CompanyPerson.aspx',10,'175FAEE8-F6B3-483D-839B-001AF4B45D0A','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('BC370144-AA46-4AD3-B26C-DF3E995388C4','8E229597-B2D8-407B-8192-787E65E5052E','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('62AC6438-952A-49BE-81BA-580F7C060E33','8E229597-B2D8-407B-8192-787E65E5052E','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9B133AF0-CA02-4383-9AB8-9B13BC6A84CE','8E229597-B2D8-407B-8192-787E65E5052E','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('A8EA6A33-090C-4D92-9CFB-225ED38FAE93','8E229597-B2D8-407B-8192-787E65E5052E','',4)
+ GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('FE342650-9E64-4B9C-8023-34399E198B6F','֧Ա','ZHGL/Person/BranchPerson.aspx',20,'175FAEE8-F6B3-483D-839B-001AF4B45D0A','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('CB3CDFC7-1B77-4948-A431-683D197E5684','FE342650-9E64-4B9C-8023-34399E198B6F','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('232A054B-E244-4412-852B-670AA5F6CC24','FE342650-9E64-4B9C-8023-34399E198B6F','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('C29706B8-8092-4733-83C6-811F5F195EC9','FE342650-9E64-4B9C-8023-34399E198B6F','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('D4A95692-847A-41C6-97EF-B36E04AFB335','FE342650-9E64-4B9C-8023-34399E198B6F','',4)
+ GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('D2C91885-974A-448A-9BA5-0EEAE8FA98CA','ĿֳԱ','ZHGL/Person/ProjectPerson.aspx',30,'175FAEE8-F6B3-483D-839B-001AF4B45D0A','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('13369C09-3301-4BA8-B0DC-7BC2B41981C9','D2C91885-974A-448A-9BA5-0EEAE8FA98CA','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('16DD0C20-AAB5-46C3-A927-B0A159B39706','D2C91885-974A-448A-9BA5-0EEAE8FA98CA','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('F19E234F-D938-45BD-8C32-8F7F8C35BD07','D2C91885-974A-448A-9BA5-0EEAE8FA98CA','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('4E93A42D-BEAB-4991-8396-0A6E51BF1AF1','D2C91885-974A-448A-9BA5-0EEAE8FA98CA','',4)
+ GO
+
+--ȫ
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('BFFBE172-7473-486E-9833-49F13B359C6C','ȫ','',60,'0','Menu_ZHGL',1,0,1)
+GO
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('B911B4F8-DDFD-4F37-9EAC-EB104F753432','ҵί','ZHGL/Meeting/CompanySafetyMeeting.aspx',10,'BFFBE172-7473-486E-9833-49F13B359C6C','Menu_ZHGL',1,1,1)
+GO
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('27DD0084-A559-4723-90B9-5F68DF3B61C4','B911B4F8-DDFD-4F37-9EAC-EB104F753432','',1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('1F841CFB-1AFC-4C9C-A56F-681E407B52F9','B911B4F8-DDFD-4F37-9EAC-EB104F753432','',2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('60142F0A-3362-4264-876C-F27FFB533891','B911B4F8-DDFD-4F37-9EAC-EB104F753432','ɾ',3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('05901FC0-D482-442D-9764-7DE5EA4ED991','B911B4F8-DDFD-4F37-9EAC-EB104F753432','',4)
+GO
+
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('2497EF13-C052-4228-B388-EBC5C18963BC','ҵר','ZHGL/Meeting/CompanySpecialMeeting.aspx',20,'BFFBE172-7473-486E-9833-49F13B359C6C','Menu_ZHGL',1,1,1)
+GO
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('58BC6E5C-E45F-47A2-A7FC-D02F91DEF058','2497EF13-C052-4228-B388-EBC5C18963BC','',1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('92627BA3-A14A-4886-805E-038324E9747A','2497EF13-C052-4228-B388-EBC5C18963BC','',2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('395E1B2B-AF35-4867-A8F0-E471FB10C25D','2497EF13-C052-4228-B388-EBC5C18963BC','ɾ',3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('1DF4AADF-2207-4A9E-83D0-8899E21E91BA','2497EF13-C052-4228-B388-EBC5C18963BC','',4)
+GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','ȫ쵼С','HSSE/Meeting/SafetyLeaderGroupMeeting.aspx',5,'5309E7E0-395E-4F11-8F5E-D52E11526A2A','Menu_HSSE',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('0A65A42F-2701-4DD3-9C72-7B39F1ECD560','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('DCAB0B09-EA07-443C-9B04-2E86D9E8C2DC','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('FE3476FB-1D5B-4E8E-801E-E4B9B4D287F0','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('739A0815-D4B3-4B9F-B001-5D04EB94B9EF','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',4)
+ GO
+
+update InApproveManager_EquipmentInItem set IsUsed=1
+update InApproveManager_GeneralEquipmentInItem set IsUsed=1
+GO
+
+
+ALTER VIEW [dbo].[View_License_LicenseManager]
+AS
+/*ֳȫ֤*/
+SELECT LicenseManager.LicenseManagerId,
+ LicenseManager.ProjectId,
+ LicenseManager.LicenseTypeId,
+ LicenseManager.LicenseManagerCode,
+ LicenseManager.LicenseManageName,
+ LicenseManager.UnitId,
+ LicenseManager.LicenseManageContents,
+ LicenseManager.CompileMan,
+ LicenseManager.CompileDate,
+ LicenseManager.States,
+ Project.ProjectCode,
+ Project.ProjectName,
+ LicenseType.LicenseTypeName,
+ Unit.UnitName,
+ UnitType.UnitTypeId,
+ UnitType.UnitTypeName,
+ Users.UserName,
+ LicenseManager.WorkAreaId,
+ --WorkArea.WorkAreaName,
+ LicenseManager.StartDate,
+ LicenseManager.EndDate,
+ LicenseManager.ApplicantMan,
+ LicenseManager.IsHighRisk,
+ LicenseManager.WorkStates,
+ case LicenseManager.WorkStates when '1' then ''
+ when '2' then 'ҵ'
+ when '3' then 'ѹر'
+ when '-1' then 'ȡ'
+ else '' end as WorkStatesStr,
+ WorkAreaName = STUFF(( SELECT ',' + UnitWorkName FROM WBS_UnitWork
+ where PATINDEX('%,' + RTRIM(WBS_UnitWork.UnitWorkId) + ',%',',' + LicenseManager.WorkAreaId + ',')>0
+ ORDER BY PATINDEX('%,' + RTRIM(LicenseManager.WorkAreaId) + ',%',',' + LicenseManager.WorkAreaId + ',')
+ FOR XML PATH('')), 1, 1,'')
+FROM dbo.License_LicenseManager AS LicenseManager
+LEFT JOIN dbo.Base_Project AS Project ON Project.ProjectId = LicenseManager.ProjectId
+LEFT JOIN dbo.Base_LicenseType AS LicenseType ON LicenseType.LicenseTypeId = LicenseManager.LicenseTypeId
+LEFT JOIN dbo.Base_Unit AS Unit ON Unit.UnitId = LicenseManager.UnitId
+LEFT JOIN dbo.Sys_User AS Users ON Users.UserId = LicenseManager.CompileMan
+LEFT JOIN dbo.WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = LicenseManager.WorkAreaId
+LEFT JOIN dbo.Base_UnitType as UnitType ON UnitType.UnitTypeId=Unit.UnitTypeId
+
+
+
+GO
+
+
+update License_LicenseManager set WorkStates='3'
+GO
+
+update HSSE_Hazard_HazardRegister set Risk_Level='һ'
+GO
+
+
+/**********Ѳ죨ֻˣͼ*************/
+ALTER VIEW [dbo].[View_Hazard_HazardRegister]
+AS
+SELECT Registration.HazardRegisterId,
+ Registration.HazardCode,
+ Registration.RegisterDate,
+ Registration.RegisterDef,
+ Registration.Rectification,
+ Registration.Place,
+ Registration.ResponsibleUnit,
+ Registration.Observer,
+ Registration.Risk_Level,
+ Registration.RectifiedDate,
+ Registration.ProjectId,
+ Project.UnitId AS PUnitId,
+ ProjectUnit.UnitName AS PUnitName,
+ Registration.states,
+ Registration.IsEffective,
+ Registration.ResponsibleMan,
+ Registration.CheckManId,
+ Registration.CheckTime,
+ Registration.RectificationPeriod,
+ Registration.ImageUrl,
+ Registration.RectificationImageUrl,
+ Registration.RectificationTime,
+ Registration.ConfirmMan,
+ Registration.ConfirmDate,
+ Registration.HandleIdea,
+ Registration.CutPayment,
+ Registration.ProblemTypes,
+ Registration.CheckSpecialId,
+ Registration.CheckItemDetailId,
+ Registration.SupCheckItemSetId,
+ Registration.CheckItemSetId,
+ Registration.SafeSupervisionId,
+ Registration.SafeSupervisionIsOK,
+ Project.ProjectName,
+ Registration.CheckCycle,
+ ISNULL(WorkArea.UnitWorkName,'') AS WorkAreaName,
+ Unit.UnitName as ResponsibilityUnitName,
+ User1.UserName AS ResponsibilityManName,
+ ISNULL(User1.Telephone,'') AS ResponsibilityManTel,
+ User2.UserName AS CheckManName,
+ ISNULL(User2.Telephone,'') AS CheckManTel,
+ User2.UnitId AS SendUnitId,
+ User3.UserName AS ConfirmManName,
+ ISNULL(User3.Telephone,'') AS ConfirmManTel,
+ User4.UserName AS ResponsibilityManName2,
+ ISNULL(User4.Telephone,'') AS ResponsibilityMan2Tel,
+ (CASE WHEN Registration.states='1' and (Registration.SafeSupervisionIsOK is null OR Registration.SafeSupervisionIsOK=0) THEN ''
+ WHEN Registration.states='1' and Registration.SafeSupervisionIsOK=1 THEN 'ϸ'
+ WHEN Registration.states='2' THEN '-'
+ WHEN Registration.states='3' THEN 'ѱջ'
+ ELSE '' END ) AS StatesStr,
+ RegisterTypes.RegisterTypesId,
+ RegisterTypes.RegisterTypesName,
+ Registration.DIC_ID,
+ Registration.CCManIds,
+ CCManNames = STUFF(( SELECT ',' + UserName FROM Sys_User
+ where PATINDEX('%,' + RTRIM(Sys_User.UserId) + ',%',',' + Registration.CCManIds + ',')>0
+ ORDER BY PATINDEX('%,' + RTRIM(Registration.CCManIds) + ',%',',' + Registration.CCManIds + ',')
+ FOR XML PATH('')), 1, 1,''),
+ Registration.Requirements
+FROM dbo.HSSE_Hazard_HazardRegister AS Registration
+LEFT JOIN dbo.Base_Project AS Project ON Project.ProjectId = Registration.ProjectId
+LEFT JOIN dbo.Base_Unit AS ProjectUnit ON Project.UnitId = ProjectUnit.UnitId
+LEFT JOIN dbo.WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Registration.Place
+LEFT JOIN dbo.HSSE_Hazard_HazardRegisterTypes AS RegisterTypes ON RegisterTypes.RegisterTypesId = Registration.RegisterTypesId
+LEFT JOIN dbo.Base_Unit AS Unit ON Unit.UnitId = Registration.ResponsibleUnit
+LEFT JOIN dbo.Sys_User AS User1 ON User1.UserId = Registration.ResponsibleMan
+LEFT JOIN dbo.Sys_User AS User2 ON User2.UserId = Registration.CheckManId
+LEFT JOIN dbo.Sys_User AS User3 ON User3.UserId = Registration.ConfirmMan
+LEFT JOIN dbo.Sys_User AS User4 ON User4.UserId = Registration.ResponsibleMan2
+
+GO
+
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('355265DE-901A-4110-B934-B4DA067C4334','쵼','HSSE/Check/ProjectLeaderCheck.aspx',35,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1)
+ GO
+ --쵼鰴ť
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('E0860211-E41A-4D51-B5B4-99A5D0676C73','355265DE-901A-4110-B934-B4DA067C4334','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('87B6E85C-48DA-4BD3-8518-35968E564557','355265DE-901A-4110-B934-B4DA067C4334','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('B07D2E39-60CE-4F59-895B-7D0763A65341','355265DE-901A-4110-B934-B4DA067C4334','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('AAB617C6-A800-4D59-8761-AC134C7885D3','355265DE-901A-4110-B934-B4DA067C4334','',4)
+ GO
+
+
+CREATE TABLE [dbo].[Check_ProjectLeaderCheck](
+ [ProjectLeaderCheckId] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [UnitIds] [nvarchar](500) NULL,
+ [CheckCode] [nvarchar](50) NULL,
+ [LeaderIds] [nvarchar](500) NULL,
+ [CheckDate] [datetime] NULL,
+ [QuestionDef] [nvarchar](2000) NULL,
+ [IsHoldMeet] [bit] NULL,
+ [Requirement] [nvarchar](2000) NULL,
+ [LeaderNames] [nvarchar](500) NULL,
+ [CompileMan] [nvarchar](50) NULL,
+ [CompileDate] [datetime] NULL,
+ CONSTRAINT [PK_Check_ProjectLeaderCheck] PRIMARY KEY CLUSTERED
+(
+ [ProjectLeaderCheckId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+ALTER TABLE [dbo].[Check_ProjectLeaderCheck] WITH CHECK ADD CONSTRAINT [FK_Check_ProjectLeaderCheck_Base_Project] FOREIGN KEY([ProjectId])
+REFERENCES [dbo].[Base_Project] ([ProjectId])
+GO
+
+ALTER TABLE [dbo].[Check_ProjectLeaderCheck] CHECK CONSTRAINT [FK_Check_ProjectLeaderCheck_Base_Project]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'ProjectLeaderCheckId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'ProjectId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ελId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'UnitIds'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'CheckCode'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'쵼id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'LeaderIds'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'CheckDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'QuestionDef'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿٿר⽲' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'IsHoldMeet'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ҫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'Requirement'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'쵼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck', @level2type=N'COLUMN',@level2name=N'LeaderNames'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ˴' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Check_ProjectLeaderCheck'
+GO
+
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','ӦϢ','',120,'0','Menu_ZHGL',0,0,1)
+GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('D12C2412-E12A-4F78-9AEF-1EE8AC84A561','ӦԤ嵥','ZHGL/Emergency/EmergencyList.aspx',10,'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','Menu_ZHGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('4A638D22-1515-4967-B149-8362F81E3A95','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('11F44E2B-F3EB-4189-B324-69DB226CF39B','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('826C9DEB-7A48-4B70-9312-FC5D0D5D2555','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('C4A17D4C-25A7-4F37-B6CF-F07526AECBC2','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','',4)
+ GO
+
+ INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','Ӧչ','ZHGL/Emergency/DrillRecordList.aspx',20,'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','Menu_ZHGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9F63FB64-5F34-4CD4-B266-59F6E8FF4FA5','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('2193449B-4C40-49DA-9C23-82A94126AE05','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('7C866795-2E56-47CD-B937-C468C46DB007','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('27E0EE6E-D96F-4300-9574-423F378D79C4','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','',4)
+ GO
+
+
+delete from Sys_Menu where MenuId='9A3212F8-2392-4F21-A8C7-FF5EE3B191F1'
+delete from Sys_ButtonToMenu where MenuId='762F0BF9-471B-4115-B35E-03A26C573877'
+delete from Sys_Menu where MenuId='762F0BF9-471B-4115-B35E-03A26C573877'
+delete from Sys_ButtonToMenu where MenuId='EDC50857-7762-4498-83C6-5BDE85036BAB'
+delete from Sys_Menu where MenuId='EDC50857-7762-4498-83C6-5BDE85036BAB'
+delete from Sys_ButtonToMenu where MenuId='74A6B343-5837-416B-AE9C-D2BBCA08E41F'
+delete from Sys_Menu where MenuId='74A6B343-5837-416B-AE9C-D2BBCA08E41F'
+delete from Sys_ButtonToMenu where MenuId='F6A6D53A-150E-43DB-A3C4-6FA18E9401E9'
+delete from Sys_Menu where MenuId='F6A6D53A-150E-43DB-A3C4-6FA18E9401E9'
+delete from Sys_ButtonToMenu where MenuId='D256E5C8-DC76-4F4D-BABE-A253418823F4'
+delete from Sys_Menu where MenuId='D256E5C8-DC76-4F4D-BABE-A253418823F4'
+delete from Sys_ButtonToMenu where MenuId='94C36333-C22A-499F-B9DB-53EEF77922AE'
+delete from Sys_Menu where MenuId='94C36333-C22A-499F-B9DB-53EEF77922AE'
+delete from Sys_ButtonToMenu where MenuId='E22F555A-D41C-4F5F-9734-39B578957732'
+delete from Sys_Menu where MenuId='E22F555A-D41C-4F5F-9734-39B578957732'
+GO
+INSERT INTO dbo.Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('9A3212F8-2392-4F21-A8C7-FF5EE3B191F1' ,'շּ̬ܿ',null,'',50,'467A0CB9-737D-4451-965E-869EBC3A4BD6', 'Menu_HSSE',0,0,1)
+INSERT INTO dbo.Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('762F0BF9-471B-4115-B35E-03A26C573877' ,'ʶ',null,'HSSE/Hazard/EnvironmentalRiskList.aspx',10,'9A3212F8-2392-4F21-A8C7-FF5EE3B191F1', 'Menu_HSSE',0,1,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('25E47331-0E20-47B0-AAC3-926C0444D9C9', '762F0BF9-471B-4115-B35E-03A26C573877' ,'' ,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('25705A8C-A734-4D56-8C30-4D08578B37F3', '762F0BF9-471B-4115-B35E-03A26C573877' ,'' ,2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('8485EACC-BEE1-4BED-95CE-A10AA53372D1', '762F0BF9-471B-4115-B35E-03A26C573877' ,'ɾ' ,3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('4DEF4A6D-77BD-4192-896D-6AB88BFA8F91', '762F0BF9-471B-4115-B35E-03A26C573877' ,'' ,4)
+INSERT INTO dbo.Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('EDC50857-7762-4498-83C6-5BDE85036BAB' ,'',null,'HSSE/Hazard/HazardList.aspx',20,'9A3212F8-2392-4F21-A8C7-FF5EE3B191F1', 'Menu_HSSE',0,1,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C90FA764-F303-43F6-AC24-2F9E9351C637', 'EDC50857-7762-4498-83C6-5BDE85036BAB' ,'' ,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('16D438F4-72C7-4765-84DE-4C34867F7760', 'EDC50857-7762-4498-83C6-5BDE85036BAB' ,'' ,2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('51ED8EA2-133F-4277-90C5-6C1F6EB50F8B', 'EDC50857-7762-4498-83C6-5BDE85036BAB' ,'ɾ' ,3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('0BF51430-3A6D-483B-9516-89711266E2F5', 'EDC50857-7762-4498-83C6-5BDE85036BAB' ,'' ,4)
+INSERT INTO dbo.Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('74A6B343-5837-416B-AE9C-D2BBCA08E41F' ,'Ϣ',null,'HSSE/Hazard/HazardInfo.aspx',25,'9A3212F8-2392-4F21-A8C7-FF5EE3B191F1', 'Menu_HSSE',0,1,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('D4A583C2-5505-4FBD-BE1C-1A168FA0F352', '74A6B343-5837-416B-AE9C-D2BBCA08E41F' ,'' ,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('693767D0-37E7-4FA1-8C21-C02C543AF811', '74A6B343-5837-416B-AE9C-D2BBCA08E41F' ,'' ,2)
+INSERT INTO dbo.Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('F6A6D53A-150E-43DB-A3C4-6FA18E9401E9' ,'շּܿ',null,'HSSE/Hazard/RiskControl.aspx',30,'9A3212F8-2392-4F21-A8C7-FF5EE3B191F1', 'Menu_HSSE',0,1,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('7608EEE7-4102-449C-8F61-272E3952C8A8', 'F6A6D53A-150E-43DB-A3C4-6FA18E9401E9' ,'' ,1)
+INSERT INTO dbo.Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('D256E5C8-DC76-4F4D-BABE-A253418823F4' ,'Ѳ¼',null,'HSSE/Hazard/RoutingInspection.aspx',32,'9A3212F8-2392-4F21-A8C7-FF5EE3B191F1', 'Menu_HSSE',0,1,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('1D00171C-17EB-46EB-8892-86FCC495CF9B', 'D256E5C8-DC76-4F4D-BABE-A253418823F4' ,'ɾ' ,1)
+INSERT INTO dbo.Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('94C36333-C22A-499F-B9DB-53EEF77922AE' ,'ĿֳشHSEؿƴʩһ',null,'HSSE/Hazard/MajorHazardList.aspx',40,'9A3212F8-2392-4F21-A8C7-FF5EE3B191F1', 'Menu_HSSE',0,1,1)
+INSERT INTO dbo.Sys_Menu (MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('E22F555A-D41C-4F5F-9734-39B578957732' ,'ΣԴʶļ',null,'HSSE/Hazard/OtherHazard.aspx',50,'9A3212F8-2392-4F21-A8C7-FF5EE3B191F1', 'Menu_HSSE',0,1,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('EACFD7D1-93F9-4BD3-AB9B-E4BD4FA0147C', 'E22F555A-D41C-4F5F-9734-39B578957732' ,'' ,1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('296031BC-B143-48F3-B903-B7697ED6B704', 'E22F555A-D41C-4F5F-9734-39B578957732' ,'' ,2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('B21B1B8A-E2F5-4A68-AC0A-9666B051BBE2', 'E22F555A-D41C-4F5F-9734-39B578957732' ,'ɾ' ,3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('AB49F853-52D5-4CFC-9CE0-BC3504C7D90A', 'E22F555A-D41C-4F5F-9734-39B578957732' ,'' ,4)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('A83A0227-09D1-4D93-940C-E9BC6066EE6C', 'E22F555A-D41C-4F5F-9734-39B578957732' ,'ύ' ,5)
+GO
+
+
+
+drop table [dbo].[Hazard_HazardSelectedItem]
+GO
+
+
+CREATE TABLE [dbo].[Hazard_HazardSelectedItem](
+ [HazardSelectedItemId] [nvarchar](50) NOT NULL,
+ [HazardId] [nvarchar](50) NOT NULL,
+ [HazardListTypeId] [nvarchar](50) NULL,
+ [HazardListId] [nvarchar](50) NOT NULL,
+ [HazardItems] [nvarchar](100) NULL,
+ [DefectsType] [nvarchar](50) NULL,
+ [MayLeadAccidents] [nvarchar](100) NULL,
+ [HelperMethod] [nvarchar](50) NULL,
+ [HazardJudge_L] [numeric](6, 1) NULL,
+ [HazardJudge_E] [numeric](6, 1) NULL,
+ [HazardJudge_C] [numeric](6, 1) NULL,
+ [HazardJudge_D] [numeric](6, 1) NULL,
+ [HazardLevel] [nvarchar](50) NULL,
+ [ControlMeasures] [nvarchar](200) NULL,
+ [IsResponse] [bit] NULL,
+ [ResponseRecode] [nvarchar](100) NULL,
+ [PromptTime] [int] NULL,
+ [Remark] [nvarchar](100) NULL,
+ [WorkStage] [nvarchar](2000) NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [DutyPerson] [nvarchar](50) NULL,
+ [CheckStartDate] [datetime] NULL,
+ [IsStart] [bit] NULL,
+ [State] [char](1) NULL,
+ [PlanExistDate] [datetime] NULL,
+ [QRCodeAttachUrl] [nvarchar](200) NULL,
+ CONSTRAINT [PK_Hazard_HazardSelectedItem_1] PRIMARY KEY CLUSTERED
+(
+ [HazardSelectedItemId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+SET ANSI_PADDING OFF
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ΣԴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ΣԴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardListTypeId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'嵥' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardListId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Σϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardItems'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'DefectsType'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܵµ¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'MayLeadAccidents'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(Ϊ:I,,,,)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HelperMethod'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵΣ(L)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardJudge_L'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵΣ(E)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardJudge_E'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵΣ(C)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardJudge_C'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵΣ(D)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardJudge_D'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Σռ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'HazardLevel'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƴʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'ControlMeasures'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǷӦ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'IsResponse'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӧ¼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'ResponseRecode'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʾʱ䣨1-1ܣ2-2ܣԴƣ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'PromptTime'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem', @level2type=N'COLUMN',@level2name=N'Remark'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ΣʶΣ۽' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_HazardSelectedItem'
+GO
+
+
+
+CREATE TABLE [dbo].[Hazard_PatrolPlan](
+ [PatrolPlanId] [nvarchar](50) NOT NULL,
+ [HazardSelectedItemId] [nvarchar](50) NULL,
+ [HazardLevel] [nvarchar](50) NULL,
+ [DutyPerson] [nvarchar](50) NULL,
+ [Days] [int] NULL,
+ [CheckStartDate] [datetime] NULL,
+ [LimitCheckDate] [datetime] NULL,
+ [CheckDate] [datetime] NULL,
+ [State] [char](1) NULL,
+ CONSTRAINT [PK_Hazard_PatrolPlan] PRIMARY KEY CLUSTERED
+(
+ [PatrolPlanId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+SET ANSI_PADDING OFF
+GO
+
+ALTER TABLE [dbo].[Hazard_PatrolPlan] WITH CHECK ADD CONSTRAINT [FK_Hazard_PatrolPlan_Hazard_HazardSelectedItem] FOREIGN KEY([HazardSelectedItemId])
+REFERENCES [dbo].[Hazard_HazardSelectedItem] ([HazardSelectedItemId])
+GO
+
+ALTER TABLE [dbo].[Hazard_PatrolPlan] CHECK CONSTRAINT [FK_Hazard_PatrolPlan_Hazard_HazardSelectedItem]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ѳƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_PatrolPlan'
+GO
+
+
+
+CREATE TABLE [dbo].[Hazard_RiskEvaluationRecord](
+ [LECItemRecordId] [nvarchar](50) NOT NULL,
+ [DataId] [nvarchar](50) NULL,
+ [DataType] [nvarchar](50) NULL,
+ [Evaluatorld] [nvarchar](50) NULL,
+ [EvaluatorDate] [date] NULL,
+ [L] [numeric](6, 1) NULL,
+ [E] [numeric](6, 1) NULL,
+ [C] [numeric](6, 1) NULL,
+ [D] [numeric](6, 1) NULL,
+ [RiskLevel] [nvarchar](50) NULL,
+ [ControlMeasures] [nvarchar](800) NULL,
+ [Remark] [nvarchar](500) NULL,
+ CONSTRAINT [PK_Hazard_RiskEvaluationRecord] PRIMARY KEY CLUSTERED
+(
+ [LECItemRecordId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+
+CREATE TABLE [dbo].[Hazard_RoutingInspection](
+ [RoutingInspectionId] [nvarchar](50) NOT NULL,
+ [HazardSelectedItemId] [nvarchar](50) NULL,
+ [PatrolManId] [nvarchar](50) NULL,
+ [PatrolTime] [datetime] NULL,
+ [PatrolResult] [int] NULL,
+ [OldRiskLevel] [nvarchar](50) NULL,
+ [PohotoUrl] [nvarchar](200) NULL,
+ [ControlMeasures] [nvarchar](200) NULL,
+ [DealReason] [nvarchar](200) NULL,
+ [RiskManId] [nvarchar](50) NULL,
+ [PatrolPlanId] [nvarchar](50) NULL,
+ CONSTRAINT [PK_Hazard_RoutingInspection] PRIMARY KEY CLUSTERED
+(
+ [RoutingInspectionId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ѳ¼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Hazard_RoutingInspection'
+GO
+
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('E4B526CC-805E-4131-8E18-2FFA6871507E','յȼ','BaseInfo/RiskLevel.aspx',140,'8A2CEE72-2793-49C6-9E2E-E83B2676E2DD','Menu_SysSet',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('97A0EF27-78C7-4D6D-AE41-BCB28C3A0CA5','E4B526CC-805E-4131-8E18-2FFA6871507E','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('2ACA14F6-93FD-458E-830F-BEBDC364829D','E4B526CC-805E-4131-8E18-2FFA6871507E','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('2C201030-1DC1-4D0D-B97A-C85BBFAF7C22','E4B526CC-805E-4131-8E18-2FFA6871507E','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('B36F59BD-1471-45EE-BF56-525673103B4B','E4B526CC-805E-4131-8E18-2FFA6871507E','',4)
+ GO
+
+ INSERT INTO dbo.Base_RiskLevel
+ VALUES('01537cc5-e8d2-497c-ba53-1faca1faf495',2,'/һ',121,170,'Σգص',7,'')
+ GO
+ INSERT INTO dbo.Base_RiskLevel
+ VALUES('6baaf2bb-ee7c-410c-9a32-13208626c467',3,'/ϴ',170,320,'߶Σգ',3,'')
+ GO
+ INSERT INTO dbo.Base_RiskLevel
+ VALUES('84e1d680-5bfe-48d2-a255-59f43aa3615a',1,'һ/ͷ',NULL,120,'һΣգҪ',21,'')
+ GO
+ INSERT INTO dbo.Base_RiskLevel
+ VALUES('c9e6285c-2da3-4997-8dc9-fb6ab404346e',4,'ļ/ش',321,NULL,'Σգҵ',1,'')
+ GO
\ No newline at end of file
diff --git a/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql b/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql
index 1bbb39e3..06715a8c 100644
--- a/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql
+++ b/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql
@@ -44,6 +44,49 @@ GO
VALUES('3E341FD3-7E5C-42BC-8C42-6BD138E4FBE7','B0FDF8C2-A902-456A-8B5B-43E4B1C8BBE2','保存',4)
GO
+--人员管理
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('175FAEE8-F6B3-483D-839B-001AF4B45D0A','人员管理','',15,'0','Menu_ZHGL',1,0,1)
+GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('8E229597-B2D8-407B-8192-787E65E5052E','企业总部人员','ZHGL/Person/CompanyPerson.aspx',10,'175FAEE8-F6B3-483D-839B-001AF4B45D0A','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('BC370144-AA46-4AD3-B26C-DF3E995388C4','8E229597-B2D8-407B-8192-787E65E5052E','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('62AC6438-952A-49BE-81BA-580F7C060E33','8E229597-B2D8-407B-8192-787E65E5052E','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9B133AF0-CA02-4383-9AB8-9B13BC6A84CE','8E229597-B2D8-407B-8192-787E65E5052E','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('A8EA6A33-090C-4D92-9CFB-225ED38FAE93','8E229597-B2D8-407B-8192-787E65E5052E','保存',4)
+ GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('FE342650-9E64-4B9C-8023-34399E198B6F','分支机构人员','ZHGL/Person/BranchPerson.aspx',20,'175FAEE8-F6B3-483D-839B-001AF4B45D0A','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('CB3CDFC7-1B77-4948-A431-683D197E5684','FE342650-9E64-4B9C-8023-34399E198B6F','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('232A054B-E244-4412-852B-670AA5F6CC24','FE342650-9E64-4B9C-8023-34399E198B6F','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('C29706B8-8092-4733-83C6-811F5F195EC9','FE342650-9E64-4B9C-8023-34399E198B6F','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('D4A95692-847A-41C6-97EF-B36E04AFB335','FE342650-9E64-4B9C-8023-34399E198B6F','保存',4)
+ GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('D2C91885-974A-448A-9BA5-0EEAE8FA98CA','项目现场人员','ZHGL/Person/ProjectPerson.aspx',30,'175FAEE8-F6B3-483D-839B-001AF4B45D0A','Menu_ZHGL',1,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('13369C09-3301-4BA8-B0DC-7BC2B41981C9','D2C91885-974A-448A-9BA5-0EEAE8FA98CA','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('16DD0C20-AAB5-46C3-A927-B0A159B39706','D2C91885-974A-448A-9BA5-0EEAE8FA98CA','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('F19E234F-D938-45BD-8C32-8F7F8C35BD07','D2C91885-974A-448A-9BA5-0EEAE8FA98CA','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('4E93A42D-BEAB-4991-8396-0A6E51BF1AF1','D2C91885-974A-448A-9BA5-0EEAE8FA98CA','保存',4)
+ GO
+
--安全报表(集团)
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('4RGASWE2-09B1-4607-DCS2-WDFCVG693G6D','安全报表(集团)','',20,'0','Menu_ZHGL',1,0,1)
@@ -270,6 +313,36 @@ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffi
VALUES('091D7D24-E706-465A-95FD-8EF359CB8667','集团下发监督检查报告','ZHGL/ServerCheck/CheckInfoReport.aspx',40,'DEAA1931-C0D7-4277-9B34-23963D1C538A','Menu_ZHGL',1,1,1)
GO
+--安全会议
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('BFFBE172-7473-486E-9833-49F13B359C6C','安全会议','',60,'0','Menu_ZHGL',1,0,1)
+GO
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('B911B4F8-DDFD-4F37-9EAC-EB104F753432','企业安委会','ZHGL/Meeting/CompanySafetyMeeting.aspx',10,'BFFBE172-7473-486E-9833-49F13B359C6C','Menu_ZHGL',1,1,1)
+GO
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('27DD0084-A559-4723-90B9-5F68DF3B61C4','B911B4F8-DDFD-4F37-9EAC-EB104F753432','增加',1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('1F841CFB-1AFC-4C9C-A56F-681E407B52F9','B911B4F8-DDFD-4F37-9EAC-EB104F753432','修改',2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('60142F0A-3362-4264-876C-F27FFB533891','B911B4F8-DDFD-4F37-9EAC-EB104F753432','删除',3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('05901FC0-D482-442D-9764-7DE5EA4ED991','B911B4F8-DDFD-4F37-9EAC-EB104F753432','保存',4)
+GO
+
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('2497EF13-C052-4228-B388-EBC5C18963BC','企业专题会','ZHGL/Meeting/CompanySpecialMeeting.aspx',20,'BFFBE172-7473-486E-9833-49F13B359C6C','Menu_ZHGL',1,1,1)
+GO
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('58BC6E5C-E45F-47A2-A7FC-D02F91DEF058','2497EF13-C052-4228-B388-EBC5C18963BC','增加',1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('92627BA3-A14A-4886-805E-038324E9747A','2497EF13-C052-4228-B388-EBC5C18963BC','修改',2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('395E1B2B-AF35-4867-A8F0-E471FB10C25D','2497EF13-C052-4228-B388-EBC5C18963BC','删除',3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('1DF4AADF-2207-4A9E-83D0-8899E21E91BA','2497EF13-C052-4228-B388-EBC5C18963BC','保存',4)
+GO
+
--职业健康
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E0A00DAC-2276-4AC5-B67B-60887C91DD62','职业健康','',70,'0','Menu_ZHGL',1,0,1)
@@ -409,3 +482,32 @@ GO
--INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('69EEFFAB-166E-4419-A334-E53EDFE7D9D7','安全会议统计','ZHGL/DataStatistics/MeetStatistics.aspx',30,'A57CBE1D-B9F4-4FB6-A428-10197734AAB6','Menu_ZHGL',1,1,1)
--GO
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','应急信息','',120,'0','Menu_ZHGL',0,0,1)
+GO
+
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('D12C2412-E12A-4F78-9AEF-1EE8AC84A561','应急预案管理清单','ZHGL/Emergency/EmergencyList.aspx',10,'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','Menu_ZHGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('4A638D22-1515-4967-B149-8362F81E3A95','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('11F44E2B-F3EB-4189-B324-69DB226CF39B','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('826C9DEB-7A48-4B70-9312-FC5D0D5D2555','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('C4A17D4C-25A7-4F37-B6CF-F07526AECBC2','D12C2412-E12A-4F78-9AEF-1EE8AC84A561','保存',4)
+ GO
+
+ INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','应急演练开展情况','ZHGL/Emergency/DrillRecordList.aspx',20,'3BBFCD70-D7A3-435C-9571-DD499D5ED7B8','Menu_ZHGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('9F63FB64-5F34-4CD4-B266-59F6E8FF4FA5','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('2193449B-4C40-49DA-9C23-82A94126AE05','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('7C866795-2E56-47CD-B937-C468C46DB007','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('27E0EE6E-D96F-4300-9574-423F378D79C4','172F25E0-F5E2-42E3-AD67-AC824D4E0FBB','保存',4)
+ GO
\ No newline at end of file
diff --git a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql
index 5c09d145..44450c74 100644
--- a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql
+++ b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql
@@ -616,6 +616,19 @@ GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('6886FA5A-7217-4FB2-805A-BD56EB1DD3E5','C198EBA8-9E23-4654-92E1-09C61105C522','',4)
GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('355265DE-901A-4110-B934-B4DA067C4334','쵼','HSSE/Check/ProjectLeaderCheck.aspx',35,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1)
+ GO
+ --쵼鰴ť
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('E0860211-E41A-4D51-B5B4-99A5D0676C73','355265DE-901A-4110-B934-B4DA067C4334','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('87B6E85C-48DA-4BD3-8518-35968E564557','355265DE-901A-4110-B934-B4DA067C4334','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('B07D2E39-60CE-4F59-895B-7D0763A65341','355265DE-901A-4110-B934-B4DA067C4334','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('AAB617C6-A800-4D59-8761-AC134C7885D3','355265DE-901A-4110-B934-B4DA067C4334','',4)
+ GO
INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('9212291A-FBC5-4F6D-A5F6-60BFF4E30F6F','ǰ','HSSE/Check/CheckWork.aspx',40,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1)
GO
@@ -716,6 +729,19 @@ GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('5309E7E0-395E-4F11-8F5E-D52E11526A2A','HSE','',110,'0','Menu_HSSE',0,0,1)
GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','ȫ쵼С','HSSE/Meeting/SafetyLeaderGroupMeeting.aspx',5,'5309E7E0-395E-4F11-8F5E-D52E11526A2A','Menu_HSSE',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('0A65A42F-2701-4DD3-9C72-7B39F1ECD560','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('DCAB0B09-EA07-443C-9B04-2E86D9E8C2DC','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('FE3476FB-1D5B-4E8E-801E-E4B9B4D287F0','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('739A0815-D4B3-4B9F-B001-5D04EB94B9EF','DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF','',4)
+ GO
+
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('5236B1D9-8B57-495E-8644-231DF5D066CE','HSE','HSSE/Meeting/WeekMeeting.aspx',10,'5309E7E0-395E-4F11-8F5E-D52E11526A2A','Menu_HSSE',0,1,1)
GO
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index fdc1ee73..802d28a2 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -175,6 +175,7 @@
+
@@ -379,6 +380,7 @@
+
@@ -427,6 +429,9 @@
+
+
+
@@ -518,6 +523,7 @@
+
@@ -778,6 +784,8 @@
+
+
@@ -809,6 +817,9 @@
+
+
+
diff --git a/SGGL/BLL/BaseInfo/CertificateService.cs b/SGGL/BLL/BaseInfo/CertificateService.cs
index f93fe050..b0b0c6c9 100644
--- a/SGGL/BLL/BaseInfo/CertificateService.cs
+++ b/SGGL/BLL/BaseInfo/CertificateService.cs
@@ -34,6 +34,8 @@ namespace BLL
CertificateId = certificate.CertificateId,
CertificateCode = certificate.CertificateCode,
CertificateName = certificate.CertificateName,
+ CertificateType = certificate.CertificateType,
+ IsRegisterHSSE = certificate.IsRegisterHSSE,
Remark = certificate.Remark
};
db.Base_Certificate.InsertOnSubmit(newCertificate);
@@ -52,6 +54,8 @@ namespace BLL
{
newCertificate.CertificateCode = certificate.CertificateCode;
newCertificate.CertificateName = certificate.CertificateName;
+ newCertificate.CertificateType = certificate.CertificateType;
+ newCertificate.IsRegisterHSSE = certificate.IsRegisterHSSE;
newCertificate.Remark = certificate.Remark;
db.SubmitChanges();
}
diff --git a/SGGL/BLL/BaseInfo/RiskLevelService.cs b/SGGL/BLL/BaseInfo/RiskLevelService.cs
new file mode 100644
index 00000000..3e92769e
--- /dev/null
+++ b/SGGL/BLL/BaseInfo/RiskLevelService.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BLL
+{
+ ///
+ /// 许可证类型
+ ///
+ public static class RiskLevelService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取许可证类型
+ ///
+ ///
+ ///
+ public static Model.Base_RiskLevel GetRiskLevel(string riskLevelId)
+ {
+ return Funs.DB.Base_RiskLevel.FirstOrDefault(e => e.RiskLevelId == riskLevelId);
+ }
+
+ ///
+ /// 添加许可证类型
+ ///
+ ///
+ public static void AddRiskLevel(Model.Base_RiskLevel reskLevel)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Base_RiskLevel newreskLevel = new Model.Base_RiskLevel
+ {
+ RiskLevelId = reskLevel.RiskLevelId,
+ RiskLevel = reskLevel.RiskLevel,
+ RiskLevelName = reskLevel.RiskLevelName,
+ ControlMeasures = reskLevel.ControlMeasures,
+ Days = reskLevel.Days,
+ Remark = reskLevel.Remark,
+ MaxValue = reskLevel.MaxValue,
+ MinValue = reskLevel.MinValue
+ };
+ db.Base_RiskLevel.InsertOnSubmit(newreskLevel);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 修改许可证类型
+ ///
+ ///
+ public static void UpdateLicenseType(Model.Base_RiskLevel riskLevel)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Base_RiskLevel newRiskLevel = db.Base_RiskLevel.FirstOrDefault(e => e.RiskLevelId == riskLevel.RiskLevelId);
+ if (newRiskLevel != null)
+ {
+ newRiskLevel.RiskLevel = riskLevel.RiskLevel;
+ newRiskLevel.RiskLevelName = riskLevel.RiskLevelName;
+ newRiskLevel.MinValue = riskLevel.MinValue;
+ newRiskLevel.MaxValue = riskLevel.MaxValue;
+ newRiskLevel.ControlMeasures = riskLevel.ControlMeasures;
+ newRiskLevel.Days = riskLevel.Days;
+ newRiskLevel.Remark = riskLevel.Remark;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除许可证类型
+ ///
+ ///
+ public static void DeleteRiskLevelById(string riskLevelId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Base_RiskLevel riskLevel = db.Base_RiskLevel.FirstOrDefault(e => e.RiskLevelId== riskLevelId);
+ if (riskLevel != null)
+ {
+ db.Base_RiskLevel.DeleteOnSubmit(riskLevel);
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 获取许可证类型下拉选择项
+ ///
+ ///
+ public static List GetLicenseTypeList()
+ {
+ return (from x in Funs.DB.Base_RiskLevel orderby x.RiskLevel select x).ToList();
+ }
+
+ #region 许可证类型下拉框
+ ///
+ /// 许可证类型下拉框
+ ///
+ /// 下拉框名字
+ /// 是否显示请选择
+ public static void InitRiskLevelDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
+ {
+ dropName.DataValueField = "RiskLevelId";
+ dropName.DataTextField = "RiskLevelName";
+ dropName.DataSource = GetLicenseTypeList();
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+ public static void InitRiskLevelDropDownListByRiskLevelName(FineUIPro.DropDownList dropName, bool isShowPlease)
+ {
+ dropName.DataValueField = "RiskLevelName";
+ dropName.DataTextField = "RiskLevelName";
+ dropName.DataSource = GetLicenseTypeList();
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+ #endregion
+ }
+}
diff --git a/SGGL/BLL/BaseInfo/WorkPostService.cs b/SGGL/BLL/BaseInfo/WorkPostService.cs
index 2ea5b267..3992f1ca 100644
--- a/SGGL/BLL/BaseInfo/WorkPostService.cs
+++ b/SGGL/BLL/BaseInfo/WorkPostService.cs
@@ -37,6 +37,7 @@ namespace BLL
WorkPostName = workPost.WorkPostName,
PostType = workPost.PostType,
IsHsse = workPost.IsHsse,
+ IsCQMS = workPost.IsCQMS,
CNCodes = workPost.CNCodes,
Remark = workPost.Remark
};
@@ -59,6 +60,7 @@ namespace BLL
newWorkPost.WorkPostName = workPost.WorkPostName;
newWorkPost.PostType = workPost.PostType;
newWorkPost.IsHsse = workPost.IsHsse;
+ newWorkPost.IsCQMS = workPost.IsCQMS;
newWorkPost.CNCodes = workPost.CNCodes;
newWorkPost.Remark = workPost.Remark;
db.SubmitChanges();
diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
index 21f89224..0e5ef697 100644
--- a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs
@@ -140,7 +140,7 @@ namespace BLL
newDesignDetails.CompileDate = designDetails.CompileDate;
newDesignDetails.Status = designDetails.Status;
newDesignDetails.AuditMan = designDetails.AuditMan;
-
+ newDesignDetails.JoinPersonNum = designDetails.JoinPersonNum;
db.Comprehensive_DesignDetails.InsertOnSubmit(newDesignDetails);
db.SubmitChanges();
@@ -166,6 +166,7 @@ namespace BLL
newDesignDetails.AttachUrl = designDetails.AttachUrl;
newDesignDetails.Status = designDetails.Status;
newDesignDetails.AuditMan = designDetails.AuditMan;
+ newDesignDetails.JoinPersonNum = designDetails.JoinPersonNum;
db.SubmitChanges();
}
diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs
index 2c42cf4b..ca1d601b 100644
--- a/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs
@@ -113,7 +113,7 @@ namespace BLL
newInspectionMachine.InspectionMachineCode = inspectionMachine.InspectionMachineCode;
newInspectionMachine.InspectionMachineName = inspectionMachine.InspectionMachineName;
newInspectionMachine.SpecificationModel = inspectionMachine.SpecificationModel;
-
+ newInspectionMachine.IsCheckOK = inspectionMachine.IsCheckOK;
newInspectionMachine.InspectionType = inspectionMachine.InspectionType;
newInspectionMachine.NextTestDate = inspectionMachine.NextTestDate;
newInspectionMachine.TestCycle = inspectionMachine.TestCycle;
@@ -147,7 +147,7 @@ namespace BLL
newInspectionMachine.InspectionMachineCode = inspectionMachine.InspectionMachineCode;
newInspectionMachine.InspectionMachineName = inspectionMachine.InspectionMachineName;
newInspectionMachine.SpecificationModel = inspectionMachine.SpecificationModel;
-
+ newInspectionMachine.IsCheckOK = inspectionMachine.IsCheckOK;
newInspectionMachine.InspectionType = inspectionMachine.InspectionType;
newInspectionMachine.NextTestDate = inspectionMachine.NextTestDate;
newInspectionMachine.TestCycle = inspectionMachine.TestCycle;
diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs
index d629bfa4..179687e2 100644
--- a/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs
+++ b/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs
@@ -60,6 +60,7 @@ namespace BLL
newInspectionPerson.IsOnSite = inspectionPerson.IsOnSite;
newInspectionPerson.UnitWorkId = inspectionPerson.UnitWorkId;
newInspectionPerson.Status = inspectionPerson.Status;
+ newInspectionPerson.IsTrain = inspectionPerson.IsTrain;
db.Comprehensive_InspectionPerson.InsertOnSubmit(newInspectionPerson);
db.SubmitChanges();
}
@@ -90,6 +91,7 @@ namespace BLL
newInspectionPerson.IsOnSite = inspectionPerson.IsOnSite;
newInspectionPerson.UnitWorkId = inspectionPerson.UnitWorkId;
newInspectionPerson.Status = inspectionPerson.Status;
+ newInspectionPerson.IsTrain = inspectionPerson.IsTrain;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 1085e599..370c8e30 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -1002,6 +1002,10 @@ namespace BLL
/// 执业资格证书证书
///
public const string PracticeCertificateMenuId = "1390195D8-874B-4E7B-8DBF-D81A5984E973";
+ ///
+ /// 风险等级
+ ///
+ public const string RiskLevelMenuId = "E4B526CC-805E-4131-8E18-2FFA6871507E";
#endregion
#region 质量基础信息
@@ -1702,6 +1706,22 @@ namespace BLL
/// 危险源辨识与评价清单
///
public const string ProjectHazardListMenuId = "EDC50857-7762-4498-83C6-5BDE85036BAB";
+ ///
+ /// 风险信息库
+ ///
+ public const string ProjectHazardInfoMenuId = "74A6B343-5837-416B-AE9C-D2BBCA08E41F";
+ ///
+ /// 风险分级管控
+ ///
+ public const string ProjectRiskControlMenuId = "F6A6D53A-150E-43DB-A3C4-6FA18E9401E9";
+ ///
+ /// 风险巡检记录
+ ///
+ public const string ProjectRoutingInspectionMenuId = "D256E5C8-DC76-4F4D-BABE-A253418823F4";
+ ///
+ ///
+ ///
+ public const string EpidemicPersonMenuId = "E485D454-0443-461E-A521-2B9E27813B0B";
///
/// 风险提示
@@ -1946,6 +1966,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";
@@ -2060,6 +2084,10 @@ namespace BLL
#region HSSE会议管理
///
+ /// 安全领导小组会议
+ ///
+ public const string ProjectSafetyLeaderGroupMeetingMenuId = "DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF";
+ ///
/// HSSE周例会
///
public const string ProjectWeekMeetingMenuId = "5236B1D9-8B57-495E-8644-231DF5D066CE";
@@ -3093,6 +3121,14 @@ namespace BLL
/// 施工进度报表模板
///
public const string JDReportTemplateUrl = "File\\Word\\JDGL\\施工进度报表.docx";
+ ///
+ /// 企业总部人员模版文件原始的虚拟路径
+ ///
+ public const string CompanyPersonTemplateUrl = "File\\Excel\\DataIn\\企业总部人员信息模版.xls";
+ ///
+ /// 分支机构人员模版文件原始的虚拟路径
+ ///
+ public const string BranchPersonTemplateUrl = "File\\Excel\\DataIn\\分支机构人员信息模版.xls";
#endregion
#region 绩效考核模板文件路径
@@ -4619,6 +4655,45 @@ namespace BLL
/// 项目级施工日志
///
public const string WorkHandoverMenuId = "CD88CE2A-A8E2-4F07-9A90-9161BD1C345C";
+
+ #region 人员管理
+ ///
+ /// 企业总部人员
+ ///
+ public const string CompanyPersonMenuId = "8E229597-B2D8-407B-8192-787E65E5052E";
+
+ ///
+ /// 分支机构人员
+ ///
+ public const string BranchPersonMenuId = "FE342650-9E64-4B9C-8023-34399E198B6F";
+ #endregion
+
+ #region 公司安全会议
+ ///
+ /// 企业安委会
+ ///
+ public const string CompanySafetyMeetingMenuId = "B911B4F8-DDFD-4F37-9EAC-EB104F753432";
+
+ ///
+ /// 企业专题会
+ ///
+ public const string CompanySpecialMeetingMenuId = "2497EF13-C052-4228-B388-EBC5C18963BC";
+ #endregion
+
+ ///
+ /// 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";
#endregion
#region 施工综合流程定义
diff --git a/SGGL/BLL/Common/IDCardValid.cs b/SGGL/BLL/Common/IDCardValid.cs
index 65b4f42b..b6999f34 100644
--- a/SGGL/BLL/Common/IDCardValid.cs
+++ b/SGGL/BLL/Common/IDCardValid.cs
@@ -103,5 +103,50 @@ namespace BLL
return true;//符合15位身份证标准
}
#endregion
+
+ ///
+ /// 根据身份证号码获取生日
+ ///
+ ///
+ ///
+ public static DateTime? getBirthByIDCard(string IDCard)
+ {
+ DateTime? birth = null;
+ if (!string.IsNullOrEmpty(IDCard))
+ {
+ string birthStr = string.Empty;
+ if (IDCard.Length == 18)
+ {
+ birthStr = IDCard.Substring(6, 8).Insert(6, "-").Insert(4, "-");
+
+ }
+ else if (IDCard.Length == 15)
+ {
+ birthStr = IDCard.Substring(6, 6).Insert(4, "-").Insert(2, "-");
+ }
+
+ DateTime time = new DateTime();
+ if (DateTime.TryParse(birthStr, out time))
+ {
+ birth = time;
+ }
+ }
+
+ return birth;
+ }
+
+ ///
+ /// 获取年龄
+ ///
+ ///
+ ///
+ ///
+ public static int CalculateAgeCorrect(DateTime birthDate)
+ {
+ DateTime now = DateTime.Now;
+ int age = now.Year - birthDate.Year;
+ if (now.Month < birthDate.Month || (now.Month == birthDate.Month && now.Day < birthDate.Day)) age--;
+ return age;
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
index 2c886ce1..df9c7386 100644
--- a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
+++ b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
@@ -46,7 +46,8 @@ namespace BLL
FileContent = accidentPersonRecord.FileContent,
CompileMan = accidentPersonRecord.CompileMan,
CompileDate = accidentPersonRecord.CompileDate,
- States = accidentPersonRecord.States
+ States = accidentPersonRecord.States,
+ IsAttempt= accidentPersonRecord.IsAttempt,
};
db.Accident_AccidentPersonRecord.InsertOnSubmit(newAccidentPersonRecord);
db.SubmitChanges();
@@ -77,6 +78,7 @@ namespace BLL
newAccidentPersonRecord.CompileMan = accidentPersonRecord.CompileMan;
newAccidentPersonRecord.CompileDate = accidentPersonRecord.CompileDate;
newAccidentPersonRecord.States = accidentPersonRecord.States;
+ newAccidentPersonRecord.IsAttempt= accidentPersonRecord.IsAttempt;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/HSSE/Accident/AccidentReportService.cs b/SGGL/BLL/HSSE/Accident/AccidentReportService.cs
index 1a51ae68..bdabca29 100644
--- a/SGGL/BLL/HSSE/Accident/AccidentReportService.cs
+++ b/SGGL/BLL/HSSE/Accident/AccidentReportService.cs
@@ -387,6 +387,7 @@ namespace BLL
NotConfirmWorkingHoursLoss = accidentReport.NotConfirmWorkingHoursLoss,
NotConfirmEconomicLoss = accidentReport.NotConfirmEconomicLoss,
NotConfirmEconomicOtherLoss = accidentReport.NotConfirmEconomicOtherLoss,
+ AccidentDegree = accidentReport.AccidentDegree,
NotConfirmed = accidentReport.NotConfirmed
};
db.Accident_AccidentReport.InsertOnSubmit(newAccidentReport);
@@ -430,6 +431,7 @@ namespace BLL
newAccidentReport.IsNotConfirm = accidentReport.IsNotConfirm;
newAccidentReport.NotConfirmWorkingHoursLoss = accidentReport.NotConfirmWorkingHoursLoss;
newAccidentReport.NotConfirmEconomicLoss = accidentReport.NotConfirmEconomicLoss;
+ newAccidentReport.AccidentDegree = accidentReport.AccidentDegree;
newAccidentReport.NotConfirmEconomicOtherLoss = accidentReport.NotConfirmEconomicOtherLoss;
db.SubmitChanges();
}
diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs
new file mode 100644
index 00000000..50df3951
--- /dev/null
+++ b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs
@@ -0,0 +1,214 @@
+using FineUIPro;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.UI.WebControls;
+
+namespace BLL
+{
+ ///
+ /// 领导带班检查
+ ///
+ public static class Check_ProjectLeaderCheckService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取领导带班检查
+ ///
+ ///
+ ///
+ public static Model.Check_ProjectLeaderCheck GetProjectLeaderCheckById(string ProjectLeaderCheckId)
+ {
+ return Funs.DB.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheckId);
+ }
+
+ #region 公司两级领导带班检查列表
+ ///
+ /// 记录数
+ ///
+ public static int count
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getDataLists = from x in db.Check_ProjectLeaderCheck
+ select x;
+
+ ///
+ /// 数据列表
+ ///
+ ///
+ ///
+ ///
+ public static IEnumerable getListData(string projectId, string startTime, string endTime, Grid Grid1)
+ {
+ IQueryable getDataList = getDataLists;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ getDataList = getDataList.Where(x => x.ProjectId == projectId);
+ }
+ if (!string.IsNullOrEmpty(startTime))
+ {
+ DateTime? startTimeD = Funs.GetNewDateTime(startTime);
+ if (startTimeD.HasValue)
+ {
+ getDataList = getDataList.Where(x => x.CheckDate >= startTimeD);
+ }
+ }
+ if (!string.IsNullOrEmpty(endTime))
+ {
+ DateTime? endTimeD = Funs.GetNewDateTime(endTime);
+ if (endTimeD.HasValue)
+ {
+ getDataList = getDataList.Where(x => x.CheckDate <= endTimeD);
+ }
+ }
+ count = getDataList.Count();
+ if (count == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ join y in db.Base_Project on x.ProjectId equals y.ProjectId
+ into ps
+ from y in ps.DefaultIfEmpty()
+ select new
+ {
+ x.ProjectLeaderCheckId,
+ x.ProjectId,
+ db.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName,
+ x.CheckCode,
+ x.UnitIds,
+ x.LeaderIds,
+ x.LeaderNames,
+ x.QuestionDef,
+ x.CheckDate,
+ x.IsHoldMeet,
+ IsHoldMeetName = x.IsHoldMeet == true ? "是" : "否",
+ x.Requirement,
+ };
+ }
+ #endregion
+
+ ///
+ /// 根据日期获取领导带班检查集合
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目号
+ /// 领导带班检查集合
+ public static List GetProjectLeaderCheckListsByDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Check_ProjectLeaderCheck where x.CheckDate >= startTime && x.CheckDate <= endTime && x.ProjectId == projectId orderby x.CheckDate select x).ToList();
+ }
+
+ ///
+ /// 根据时间段获取HSE领导带班检查集合
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目Id
+ /// 时间段内的HSE领导带班检查集合
+ public static int GetCountByDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Check_ProjectLeaderCheck where x.CheckDate >= startTime && x.CheckDate <= endTime && x.ProjectId == projectId select x).Count();
+ }
+
+ ///
+ /// 添加领导带班检查
+ ///
+ ///
+ public static void AddProjectLeaderCheck(Model.Check_ProjectLeaderCheck ProjectLeaderCheck)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Check_ProjectLeaderCheck newProjectLeaderCheck = new Model.Check_ProjectLeaderCheck
+ {
+ ProjectLeaderCheckId = ProjectLeaderCheck.ProjectLeaderCheckId,
+ ProjectId = ProjectLeaderCheck.ProjectId,
+ UnitIds = ProjectLeaderCheck.UnitIds,
+ CheckCode = ProjectLeaderCheck.CheckCode,
+ LeaderIds = ProjectLeaderCheck.LeaderIds,
+ CheckDate = ProjectLeaderCheck.CheckDate,
+ QuestionDef = ProjectLeaderCheck.QuestionDef,
+ IsHoldMeet = ProjectLeaderCheck.IsHoldMeet,
+ Requirement = ProjectLeaderCheck.Requirement,
+ LeaderNames = ProjectLeaderCheck.LeaderNames,
+ CompileMan = ProjectLeaderCheck.CompileMan,
+ CompileDate = ProjectLeaderCheck.CompileDate,
+ };
+ db.Check_ProjectLeaderCheck.InsertOnSubmit(newProjectLeaderCheck);
+ db.SubmitChanges();
+ CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectLeaderCheckMenuId, ProjectLeaderCheck.ProjectId, null, ProjectLeaderCheck.ProjectLeaderCheckId, ProjectLeaderCheck.CheckDate);
+ }
+
+ ///
+ /// 修改领导带班检查
+ ///
+ ///
+ public static void UpdateProjectLeaderCheck(Model.Check_ProjectLeaderCheck ProjectLeaderCheck)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Check_ProjectLeaderCheck newProjectLeaderCheck = db.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheck.ProjectLeaderCheckId);
+ if (newProjectLeaderCheck != null)
+ {
+ newProjectLeaderCheck.UnitIds = ProjectLeaderCheck.UnitIds;
+ newProjectLeaderCheck.CheckCode = ProjectLeaderCheck.CheckCode;
+ newProjectLeaderCheck.LeaderIds = ProjectLeaderCheck.LeaderIds;
+ newProjectLeaderCheck.CheckDate = ProjectLeaderCheck.CheckDate;
+ newProjectLeaderCheck.QuestionDef = ProjectLeaderCheck.QuestionDef;
+ newProjectLeaderCheck.IsHoldMeet = ProjectLeaderCheck.IsHoldMeet;
+ newProjectLeaderCheck.Requirement = ProjectLeaderCheck.Requirement;
+ newProjectLeaderCheck.LeaderNames = ProjectLeaderCheck.LeaderNames;
+ newProjectLeaderCheck.CompileMan = ProjectLeaderCheck.CompileMan;
+ newProjectLeaderCheck.CompileDate = ProjectLeaderCheck.CompileDate;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除领导带班检查
+ ///
+ ///
+ public static void DeleteProjectLeaderCheckById(string ProjectLeaderCheckId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Check_ProjectLeaderCheck ProjectLeaderCheck = db.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheckId);
+ if (ProjectLeaderCheck != null)
+ {
+ CodeRecordsService.DeleteCodeRecordsByDataId(ProjectLeaderCheckId);
+ ////删除附件表
+ BLL.CommonService.DeleteAttachFileById(ProjectLeaderCheckId);
+ db.Check_ProjectLeaderCheck.DeleteOnSubmit(ProjectLeaderCheck);
+ db.SubmitChanges();
+ }
+ }
+
+ public static string getLeaderName(object ProjectLeaderCheckId)
+ {
+ string name = string.Empty;
+ if (ProjectLeaderCheckId != null)
+ {
+ var getData = Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(ProjectLeaderCheckId.ToString());
+ if (getData != null)
+ {
+ if (!string.IsNullOrEmpty(getData.LeaderIds))
+ {
+ name = UserService.getUserNamesUserIds(getData.LeaderIds);
+ }
+ if (!string.IsNullOrEmpty(getData.LeaderNames))
+ {
+ name += "," + getData.LeaderNames;
+ }
+ }
+ }
+ return name;
+ }
+ }
+}
diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs
index 081d2616..93498529 100644
--- a/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs
+++ b/SGGL/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs
@@ -104,6 +104,16 @@ namespace BLL
return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardId == hazardId && x.HazardListId == hazardListId && x.WorkStage == workStage);
}
+ ///
+ /// 根据危险源辨识与评价清单Id获取一个危险源辨识与评价清单审批信息
+ ///
+ /// 危险源辨识与评价清单Id
+ /// 一个危险源辨识与评价清单审批实体
+ public static Model.Hazard_HazardSelectedItem GetHazardSelectedItemByHazardSelectedItemId(string hazardSelectedItemId)
+ {
+ return db.Hazard_HazardSelectedItem.FirstOrDefault(x => x.HazardSelectedItemId == hazardSelectedItemId);
+ }
+
///
/// 根据危险源辨识与评价清单Id获取一个危险源辨识与评价清单审批信息
///
@@ -156,11 +166,13 @@ namespace BLL
Model.SGGLDB db = Funs.DB;
Model.Hazard_HazardSelectedItem newHazardSelectedItem = new Model.Hazard_HazardSelectedItem
{
+ HazardSelectedItemId = hazardSelectedItem.HazardSelectedItemId,
HazardId = hazardSelectedItem.HazardId,
HazardListTypeId = hazardSelectedItem.HazardListTypeId,
HazardListId = hazardSelectedItem.HazardListId,
HazardItems = hazardSelectedItem.HazardItems,
DefectsType = hazardSelectedItem.DefectsType,
+ ProjectId = hazardSelectedItem.ProjectId,
MayLeadAccidents = hazardSelectedItem.MayLeadAccidents,
HelperMethod = hazardSelectedItem.HelperMethod,
HazardJudge_L = hazardSelectedItem.HazardJudge_L,
@@ -171,8 +183,10 @@ namespace BLL
ControlMeasures = hazardSelectedItem.ControlMeasures,
IsResponse = hazardSelectedItem.IsResponse,
ResponseRecode = hazardSelectedItem.ResponseRecode,
+ DutyPerson = hazardSelectedItem.DutyPerson,
PromptTime = hazardSelectedItem.PromptTime,
Remark = hazardSelectedItem.Remark,
+ State = hazardSelectedItem.State,
WorkStage = hazardSelectedItem.WorkStage
};
@@ -187,7 +201,7 @@ namespace BLL
public static void UpdateHazardSelectedItem(Model.Hazard_HazardSelectedItem hazardSelectedItem)
{
Model.SGGLDB db = Funs.DB;
- Model.Hazard_HazardSelectedItem newHazardSelectedItem = db.Hazard_HazardSelectedItem.FirstOrDefault(e => e.HazardId == hazardSelectedItem.HazardId && e.HazardListId == hazardSelectedItem.HazardListId && e.WorkStage == hazardSelectedItem.WorkStage);
+ Model.Hazard_HazardSelectedItem newHazardSelectedItem = db.Hazard_HazardSelectedItem.FirstOrDefault(e => e.HazardSelectedItemId == hazardSelectedItem.HazardSelectedItemId);
if (newHazardSelectedItem != null)
{
newHazardSelectedItem.HazardListTypeId = hazardSelectedItem.HazardListTypeId;
@@ -204,9 +218,15 @@ namespace BLL
newHazardSelectedItem.ControlMeasures = hazardSelectedItem.ControlMeasures;
newHazardSelectedItem.IsResponse = hazardSelectedItem.IsResponse;
newHazardSelectedItem.ResponseRecode = hazardSelectedItem.ResponseRecode;
+ newHazardSelectedItem.DutyPerson = hazardSelectedItem.DutyPerson;
newHazardSelectedItem.PromptTime = hazardSelectedItem.PromptTime;
newHazardSelectedItem.Remark = hazardSelectedItem.Remark;
newHazardSelectedItem.WorkStage = hazardSelectedItem.WorkStage;
+ newHazardSelectedItem.CheckStartDate = hazardSelectedItem.CheckStartDate;
+ newHazardSelectedItem.IsStart = hazardSelectedItem.IsStart;
+ newHazardSelectedItem.State = hazardSelectedItem.State;
+ newHazardSelectedItem.PlanExistDate = hazardSelectedItem.PlanExistDate;
+ newHazardSelectedItem.QRCodeAttachUrl = hazardSelectedItem.QRCodeAttachUrl;
db.SubmitChanges();
}
@@ -222,8 +242,30 @@ namespace BLL
var q = (from x in db.Hazard_HazardSelectedItem where x.HazardListId == hazardListId select x).ToList();
if (q.Count() > 0)
{
+ foreach (var item in q)
+ {
+ var h = db.Hazard_RiskEvaluationRecord.Where(x => x.DataId == item.HazardSelectedItemId);
+ if (h.Count() > 0)
+ {
+ db.Hazard_RiskEvaluationRecord.DeleteAllOnSubmit(h);
+ db.SubmitChanges();
+ }
+ var p = db.Hazard_PatrolPlan.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
+ if (p.Count() > 0)
+ {
+ db.Hazard_PatrolPlan.DeleteAllOnSubmit(p);
+ db.SubmitChanges();
+ }
+ var r = db.Hazard_RoutingInspection.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
+ if (r.Count() > 0)
+ {
+ db.Hazard_RoutingInspection.DeleteAllOnSubmit(r);
+ db.SubmitChanges();
+ }
+ }
db.Hazard_HazardSelectedItem.DeleteAllOnSubmit(q);
db.SubmitChanges();
+
}
}
}
diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_PatrolPlanService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_PatrolPlanService.cs
new file mode 100644
index 00000000..559f3318
--- /dev/null
+++ b/SGGL/BLL/HSSE/Hazard/Hazard_PatrolPlanService.cs
@@ -0,0 +1,96 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 巡检计划表
+ ///
+ public static class Hazard_PatrolPlanService
+ {
+ ///
+ /// 根据巡检计划ID获取巡检计划信息
+ ///
+ ///
+ ///
+ public static Model.Hazard_PatrolPlan GetPatrolPlanByPatrolPlanId(string PatrolPlanId)
+ {
+ return Funs.DB.Hazard_PatrolPlan.FirstOrDefault(e => e.PatrolPlanId == PatrolPlanId);
+ }
+
+ ///
+ /// 根据风险ID和巡检时限获取巡检计划信息
+ ///
+ ///
+ ///
+ public static Model.Hazard_PatrolPlan GetPatrolPlanByHazardSelectedItemIdAndLimitCheckDate(string hazardSelectedItemId, DateTime? limitCheckDate)
+ {
+ return Funs.DB.Hazard_PatrolPlan.FirstOrDefault(e => e.HazardSelectedItemId == hazardSelectedItemId && e.LimitCheckDate == limitCheckDate);
+ }
+
+ ///
+ /// 根据巡检日期获取之前未巡检计划信息集合
+ ///
+ ///
+ ///
+ public static List GetBeforePatrolPlansByCheckDate(string hazardSelectedItemId, DateTime checkDate)
+ {
+ return (from x in Funs.DB.Hazard_PatrolPlan where x.HazardSelectedItemId == hazardSelectedItemId && x.LimitCheckDate < checkDate select x).ToList();
+ }
+
+ ///
+ /// 添加安全巡检计划
+ ///
+ ///
+ public static void AddPatrolPlan(Model.Hazard_PatrolPlan patrolPlan)
+ {
+ Model.Hazard_PatrolPlan newPatrolPlan = new Model.Hazard_PatrolPlan
+ {
+ PatrolPlanId = patrolPlan.PatrolPlanId,
+ HazardSelectedItemId = patrolPlan.HazardSelectedItemId,
+ HazardLevel = patrolPlan.HazardLevel,
+ DutyPerson = patrolPlan.DutyPerson,
+ Days = patrolPlan.Days,
+ CheckStartDate = patrolPlan.CheckStartDate,
+ LimitCheckDate = patrolPlan.LimitCheckDate,
+ CheckDate = patrolPlan.CheckDate,
+ State = patrolPlan.State
+ };
+
+ Funs.DB.Hazard_PatrolPlan.InsertOnSubmit(newPatrolPlan);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改安全巡检计划
+ ///
+ ///
+ public static void UpdatePatrolPlan(Model.Hazard_PatrolPlan patrolPlan)
+ {
+ Model.Hazard_PatrolPlan newPatrolPlan = Funs.DB.Hazard_PatrolPlan.FirstOrDefault(e => e.PatrolPlanId == patrolPlan.PatrolPlanId);
+ if (newPatrolPlan != null)
+ {
+ newPatrolPlan.CheckDate = patrolPlan.CheckDate;
+ newPatrolPlan.State = patrolPlan.State;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据巡检计划ID删除对应巡检计划记录信息
+ ///
+ ///
+ public static void DeletePatrolPlan(string PatrolPlanId)
+ {
+ var q = (from x in Funs.DB.Hazard_PatrolPlan where x.PatrolPlanId == PatrolPlanId select x).FirstOrDefault();
+ if (q != null)
+ {
+ Funs.DB.Hazard_PatrolPlan.DeleteOnSubmit(q);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/HSSE/Hazard/Hazard_RoutingInspectionService.cs b/SGGL/BLL/HSSE/Hazard/Hazard_RoutingInspectionService.cs
new file mode 100644
index 00000000..0c48497c
--- /dev/null
+++ b/SGGL/BLL/HSSE/Hazard/Hazard_RoutingInspectionService.cs
@@ -0,0 +1,95 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 巡检记录表
+ ///
+ public static class Hazard_RoutingInspectionService
+ {
+ ///
+ /// 根据巡检记录ID获取巡检记录信息
+ ///
+ ///
+ ///
+ public static Model.Hazard_RoutingInspection GetRoutingInspectionByRoutingInspectionId(string RoutingInspectionId)
+ {
+ return Funs.DB.Hazard_RoutingInspection.FirstOrDefault(e => e.RoutingInspectionId == RoutingInspectionId);
+ }
+
+ ///
+ /// 根据巡检计划ID获取巡检记录信息
+ ///
+ ///
+ ///
+ public static Model.Hazard_RoutingInspection GetRoutingInspectionByPatrolPlanId(string PatrolPlanId)
+ {
+ return Funs.DB.Hazard_RoutingInspection.FirstOrDefault(e => e.PatrolPlanId == PatrolPlanId);
+ }
+
+ ///
+ /// 添加安全巡检记录
+ ///
+ ///
+ public static void AddRoutingInspection(Model.Hazard_RoutingInspection RoutingInspection)
+ {
+ Model.Hazard_RoutingInspection newRoutingInspection = new Model.Hazard_RoutingInspection
+ {
+ RoutingInspectionId = RoutingInspection.RoutingInspectionId,
+ HazardSelectedItemId = RoutingInspection.HazardSelectedItemId,
+ PatrolManId = RoutingInspection.PatrolManId,
+ PatrolTime = RoutingInspection.PatrolTime,
+ PatrolResult = RoutingInspection.PatrolResult,
+ OldRiskLevel = RoutingInspection.OldRiskLevel,
+ PohotoUrl = RoutingInspection.PohotoUrl,
+ ControlMeasures = RoutingInspection.ControlMeasures,
+ DealReason = RoutingInspection.DealReason,
+ RiskManId = RoutingInspection.RiskManId,
+ PatrolPlanId = RoutingInspection.PatrolPlanId
+ };
+
+ Funs.DB.Hazard_RoutingInspection.InsertOnSubmit(newRoutingInspection);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改安全巡检记录
+ ///
+ ///
+ public static void UpdateRoutingInspection(Model.Hazard_RoutingInspection RoutingInspection)
+ {
+ Model.Hazard_RoutingInspection newRoutingInspection = Funs.DB.Hazard_RoutingInspection.FirstOrDefault(e => e.RoutingInspectionId == RoutingInspection.RoutingInspectionId);
+ if (newRoutingInspection != null)
+ {
+ newRoutingInspection.PatrolManId = RoutingInspection.PatrolManId;
+ newRoutingInspection.PatrolTime = RoutingInspection.PatrolTime;
+ newRoutingInspection.PatrolResult = RoutingInspection.PatrolResult;
+ newRoutingInspection.OldRiskLevel = RoutingInspection.OldRiskLevel;
+ newRoutingInspection.PohotoUrl = RoutingInspection.PohotoUrl;
+ newRoutingInspection.ControlMeasures = RoutingInspection.ControlMeasures;
+ newRoutingInspection.DealReason = RoutingInspection.DealReason;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据巡检记录ID删除对应巡检记录记录信息
+ ///
+ ///
+ public static void DeleteRoutingInspection(string RoutingInspectionId)
+ {
+ var q = (from x in Funs.DB.Hazard_RoutingInspection where x.RoutingInspectionId == RoutingInspectionId select x).FirstOrDefault();
+ if (q != null)
+ {
+ ///删除附件
+ BLL.CommonService.DeleteAttachFileById(RoutingInspectionId);
+ Funs.DB.Hazard_RoutingInspection.DeleteOnSubmit(q);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/HSSE/Hazard/RiskEvaluationRecordService.cs b/SGGL/BLL/HSSE/Hazard/RiskEvaluationRecordService.cs
new file mode 100644
index 00000000..afd3ec62
--- /dev/null
+++ b/SGGL/BLL/HSSE/Hazard/RiskEvaluationRecordService.cs
@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ public static class RiskEvaluationRecordService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取风险评价记录
+ ///
+ ///
+ ///
+ public static Model.Hazard_RiskEvaluationRecord GetRiskEvaluationRecordByLECItemRecordId(string LECItemRecordId)
+ {
+ return Funs.DB.Hazard_RiskEvaluationRecord.FirstOrDefault(e => e.LECItemRecordId == LECItemRecordId);
+ }
+
+ ///
+ /// 根据风险主键获取风险评价记录
+ ///
+ ///
+ ///
+ public static Model.Hazard_RiskEvaluationRecord GetRiskEvaluationRecordByDataIdAndEvaluatorDate(string dataId)
+ {
+ return Funs.DB.Hazard_RiskEvaluationRecord.FirstOrDefault(e => e.DataId == dataId && e.EvaluatorDate == null);
+ }
+
+ ///
+ /// 根据整理人获取风险评价记录
+ ///
+ ///
+ ///
+ public static List GetRiskEvaluationRecordByDataId(string dataId)
+ {
+ return (from x in Funs.DB.Hazard_RiskEvaluationRecord where x.DataId == dataId select x).ToList();
+ }
+
+ ///
+ /// 添加风险评价记录
+ ///
+ ///
+ public static void AddRiskEvaluationRecord(Model.Hazard_RiskEvaluationRecord RiskEvaluationRecord)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Hazard_RiskEvaluationRecord newRiskEvaluationRecord = new Model.Hazard_RiskEvaluationRecord
+ {
+ LECItemRecordId = RiskEvaluationRecord.LECItemRecordId,
+ DataId = RiskEvaluationRecord.DataId,
+ DataType = RiskEvaluationRecord.DataType,
+ Evaluatorld = RiskEvaluationRecord.Evaluatorld,
+ EvaluatorDate = RiskEvaluationRecord.EvaluatorDate,
+ L = RiskEvaluationRecord.L,
+ E = RiskEvaluationRecord.E,
+ C = RiskEvaluationRecord.C,
+ D = RiskEvaluationRecord.D,
+ RiskLevel = RiskEvaluationRecord.RiskLevel,
+ ControlMeasures = RiskEvaluationRecord.ControlMeasures,
+ Remark = RiskEvaluationRecord.Remark,
+ };
+ db.Hazard_RiskEvaluationRecord.InsertOnSubmit(newRiskEvaluationRecord);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 修改风险评价记录
+ ///
+ ///
+ public static void UpdateRiskEvaluationRecord(Model.Hazard_RiskEvaluationRecord RiskEvaluationRecord)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Hazard_RiskEvaluationRecord newRiskEvaluationRecord = db.Hazard_RiskEvaluationRecord.FirstOrDefault(e => e.LECItemRecordId == RiskEvaluationRecord.LECItemRecordId);
+ if (newRiskEvaluationRecord != null)
+ {
+ newRiskEvaluationRecord.DataId = RiskEvaluationRecord.DataId;
+ newRiskEvaluationRecord.DataType = RiskEvaluationRecord.DataType;
+ newRiskEvaluationRecord.Evaluatorld = RiskEvaluationRecord.Evaluatorld;
+ newRiskEvaluationRecord.EvaluatorDate = RiskEvaluationRecord.EvaluatorDate;
+ newRiskEvaluationRecord.L = RiskEvaluationRecord.L;
+ newRiskEvaluationRecord.E = RiskEvaluationRecord.E;
+ newRiskEvaluationRecord.C = RiskEvaluationRecord.C;
+ newRiskEvaluationRecord.D = RiskEvaluationRecord.D;
+ newRiskEvaluationRecord.RiskLevel = RiskEvaluationRecord.RiskLevel;
+ newRiskEvaluationRecord.ControlMeasures = RiskEvaluationRecord.ControlMeasures;
+ newRiskEvaluationRecord.Remark = RiskEvaluationRecord.Remark;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除风险评价记录
+ ///
+ ///
+ public static void DeleteRiskEvaluationRecordByLECItemRecordId(string LECItemRecordId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Hazard_RiskEvaluationRecord RiskEvaluationRecord = db.Hazard_RiskEvaluationRecord.FirstOrDefault(e => e.LECItemRecordId == LECItemRecordId);
+ if (RiskEvaluationRecord != null)
+ {
+ db.Hazard_RiskEvaluationRecord.DeleteOnSubmit(RiskEvaluationRecord);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs
index dada0e82..f0b80b7e 100644
--- a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs
+++ b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs
@@ -68,6 +68,7 @@ namespace BLL
newHazardRegister.CutPayment = hazardRegister.CutPayment;
newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes;
newHazardRegister.DIC_ID = hazardRegister.DIC_ID;
+ newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister);
db.SubmitChanges();
}
diff --git a/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs
index 6bf4ee8d..b1e164b9 100644
--- a/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs
+++ b/SGGL/BLL/HSSE/InApproveManager/EquipmentInItemService.cs
@@ -52,7 +52,8 @@ namespace BLL
RegistrationNum = equipmentInItem.RegistrationNum,
OperationQualificationNum = equipmentInItem.OperationQualificationNum,
InsuranceNum = equipmentInItem.InsuranceNum,
- CommercialInsuranceNum = equipmentInItem.CommercialInsuranceNum
+ CommercialInsuranceNum = equipmentInItem.CommercialInsuranceNum,
+ IsUsed = equipmentInItem.IsUsed,
};
db.InApproveManager_EquipmentInItem.InsertOnSubmit(newEquipmentItem);
db.SubmitChanges();
@@ -79,6 +80,7 @@ namespace BLL
newEquipmentItem.OperationQualificationNum = equipmentInItem.OperationQualificationNum;
newEquipmentItem.InsuranceNum = equipmentInItem.InsuranceNum;
newEquipmentItem.CommercialInsuranceNum = equipmentInItem.CommercialInsuranceNum;
+ newEquipmentItem.IsUsed = equipmentInItem.IsUsed;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs
index 49209006..6a8f7aca 100644
--- a/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs
+++ b/SGGL/BLL/HSSE/InApproveManager/GeneralEquipmentInItemService.cs
@@ -44,7 +44,8 @@ namespace BLL
SpecialEquipmentId = generalEquipmentInItem.SpecialEquipmentId,
SizeModel = generalEquipmentInItem.SizeModel,
OwnerCheck = generalEquipmentInItem.OwnerCheck,
- CertificateNum = generalEquipmentInItem.CertificateNum
+ CertificateNum = generalEquipmentInItem.CertificateNum,
+ IsUsed = generalEquipmentInItem.IsUsed,
};
db.InApproveManager_GeneralEquipmentInItem.InsertOnSubmit(newEquipmentItem);
db.SubmitChanges();
@@ -65,6 +66,7 @@ namespace BLL
newGeneralEquipmentInItem.SizeModel = generalEquipmentInItem.SizeModel;
newGeneralEquipmentInItem.OwnerCheck = generalEquipmentInItem.OwnerCheck;
newGeneralEquipmentInItem.CertificateNum = generalEquipmentInItem.CertificateNum;
+ newGeneralEquipmentInItem.IsUsed = generalEquipmentInItem.IsUsed;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs
new file mode 100644
index 00000000..3f6e11c7
--- /dev/null
+++ b/SGGL/BLL/HSSE/Meeting/SafetyLeaderGroupMeetingService.cs
@@ -0,0 +1,152 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 安全领导小组会议
+ ///
+ public static class SafetyLeaderGroupMeetingService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 根据主键获取安全领导小组会议
+ ///
+ ///
+ ///
+ public static Model.Meeting_SafetyLeaderGroupMeeting GetSafetyLeaderGroupMeetingById(string SafetyLeaderGroupMeetingId)
+ {
+ return Funs.DB.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeetingId);
+ }
+
+ ///
+ /// 根据时间段获取安全领导小组会议集合
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static int GetCountByTime(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x).Count();
+ }
+
+ ///
+ /// 根据时间段获取安全领导小组会议参会人数
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static int? GetSumAttentPersonNumByMeetingDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ int? sumAttentPersonNum = (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2 select x.AttentPersonNum).Sum();
+ if (sumAttentPersonNum == null)
+ {
+ return 0;
+ }
+ return sumAttentPersonNum;
+ }
+
+ ///
+ /// 根据日期和类型获取会议记录集合
+ ///
+ /// 开始时间
+ /// 结束时间
+ /// 项目号
+ /// 会议记录集合
+ public static List GetMeetingListsByDate(DateTime startTime, DateTime endTime, string projectId)
+ {
+ return (from x in Funs.DB.Meeting_SafetyLeaderGroupMeeting where x.SafetyLeaderGroupMeetingDate >= startTime && x.SafetyLeaderGroupMeetingDate <= endTime && x.ProjectId == projectId orderby x.SafetyLeaderGroupMeetingDate select x).ToList();
+ }
+
+ ///
+ /// 添加安全领导小组会议
+ ///
+ ///
+ public static void AddSafetyLeaderGroupMeeting(Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_SafetyLeaderGroupMeeting newSafetyLeaderGroupMeeting = new Model.Meeting_SafetyLeaderGroupMeeting
+ {
+ SafetyLeaderGroupMeetingId = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId,
+ ProjectId = SafetyLeaderGroupMeeting.ProjectId,
+ UnitId = SafetyLeaderGroupMeeting.UnitId,
+ SafetyLeaderGroupMeetingCode = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode,
+ SafetyLeaderGroupMeetingName = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName,
+ SafetyLeaderGroupMeetingDate = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate,
+ CompileMan = SafetyLeaderGroupMeeting.CompileMan,
+ SafetyLeaderGroupMeetingContents = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents,
+ CompileDate = SafetyLeaderGroupMeeting.CompileDate,
+ States = SafetyLeaderGroupMeeting.States,
+ AttentPersonNum = SafetyLeaderGroupMeeting.AttentPersonNum,
+ MeetingHours = SafetyLeaderGroupMeeting.MeetingHours,
+ MeetingHostMan = SafetyLeaderGroupMeeting.MeetingHostMan,
+ AttentPerson = SafetyLeaderGroupMeeting.AttentPerson,
+ MeetingPlace = SafetyLeaderGroupMeeting.MeetingPlace,
+ MeetingHostManId = SafetyLeaderGroupMeeting.MeetingHostManId,
+ AttentPersonIds = SafetyLeaderGroupMeeting.AttentPersonIds,
+ MeetingHostManOther = SafetyLeaderGroupMeeting.MeetingHostManOther
+ };
+ db.Meeting_SafetyLeaderGroupMeeting.InsertOnSubmit(newSafetyLeaderGroupMeeting);
+ db.SubmitChanges();
+ ////增加一条编码记录
+ BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectSafetyLeaderGroupMeetingMenuId, SafetyLeaderGroupMeeting.ProjectId, null, SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId, SafetyLeaderGroupMeeting.CompileDate);
+ }
+
+ ///
+ /// 修改安全领导小组会议
+ ///
+ ///
+ public static void UpdateSafetyLeaderGroupMeeting(Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_SafetyLeaderGroupMeeting newSafetyLeaderGroupMeeting = db.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId);
+ if (newSafetyLeaderGroupMeeting != null)
+ {
+ //newSafetyLeaderGroupMeeting.ProjectId = SafetyLeaderGroupMeeting.ProjectId;
+ newSafetyLeaderGroupMeeting.UnitId = SafetyLeaderGroupMeeting.UnitId;
+ newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingCode;
+ newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingName;
+ newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingDate;
+ newSafetyLeaderGroupMeeting.CompileMan = SafetyLeaderGroupMeeting.CompileMan;
+ newSafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents = SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingContents;
+ newSafetyLeaderGroupMeeting.CompileDate = SafetyLeaderGroupMeeting.CompileDate;
+ newSafetyLeaderGroupMeeting.States = SafetyLeaderGroupMeeting.States;
+ newSafetyLeaderGroupMeeting.AttentPersonNum = SafetyLeaderGroupMeeting.AttentPersonNum;
+ newSafetyLeaderGroupMeeting.MeetingHours = SafetyLeaderGroupMeeting.MeetingHours;
+ newSafetyLeaderGroupMeeting.MeetingHostMan = SafetyLeaderGroupMeeting.MeetingHostMan;
+ newSafetyLeaderGroupMeeting.AttentPerson = SafetyLeaderGroupMeeting.AttentPerson;
+ newSafetyLeaderGroupMeeting.MeetingPlace = SafetyLeaderGroupMeeting.MeetingPlace;
+ newSafetyLeaderGroupMeeting.MeetingHostManId = SafetyLeaderGroupMeeting.MeetingHostManId;
+ newSafetyLeaderGroupMeeting.AttentPersonIds = SafetyLeaderGroupMeeting.AttentPersonIds;
+ newSafetyLeaderGroupMeeting.MeetingHostManOther = SafetyLeaderGroupMeeting.MeetingHostManOther;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除安全领导小组会议
+ ///
+ ///
+ public static void DeleteSafetyLeaderGroupMeetingById(string SafetyLeaderGroupMeetingId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Meeting_SafetyLeaderGroupMeeting SafetyLeaderGroupMeeting = db.Meeting_SafetyLeaderGroupMeeting.FirstOrDefault(e => e.SafetyLeaderGroupMeetingId == SafetyLeaderGroupMeetingId);
+ if (SafetyLeaderGroupMeeting != null)
+ {
+ ///删除编码表记录
+ BLL.CodeRecordsService.DeleteCodeRecordsByDataId(SafetyLeaderGroupMeetingId);
+ BLL.CommonService.DeleteAttachFileById(SafetyLeaderGroupMeetingId);
+ ////删除流程表
+ BLL.CommonService.DeleteFlowOperateByID(SafetyLeaderGroupMeeting.SafetyLeaderGroupMeetingId);
+ db.Meeting_SafetyLeaderGroupMeeting.DeleteOnSubmit(SafetyLeaderGroupMeeting);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs
index 10f531a9..157e8e6e 100644
--- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs
@@ -13,6 +13,93 @@ namespace BLL
{
public static Model.SGGLDB db = Funs.DB;
+ #region 劳务人员列表
+ ///
+ /// 记录数
+ ///
+ public static int count2
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getDataLists = from x in db.View_SitePerson_Person
+ select x;
+
+ ///
+ /// 数据列表
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static IEnumerable getListData(string projetcId, string unitId, string workPostId, string name, string idCard, string states, Grid Grid1)
+ {
+ IQueryable getDataList = getDataLists.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId);
+ if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null)
+ {
+ getDataList = getDataList.Where(e => e.ProjectId == projetcId);
+ }
+ if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null)
+ {
+ getDataList = getDataList.Where(e => e.UnitId == unitId);
+ }
+ if (!string.IsNullOrEmpty(workPostId) && workPostId != Const._Null)
+ {
+ getDataList = getDataList.Where(e => e.WorkPostId == workPostId);
+ }
+ if (!string.IsNullOrEmpty(states) && states != "-2")
+ {
+ getDataList = getDataList.Where(e => e.IsUsed == Convert.ToBoolean(states));
+ }
+ if (!string.IsNullOrEmpty(name))
+ {
+ getDataList = getDataList.Where(e => e.PersonName.Contains(name));
+ }
+ if (!string.IsNullOrEmpty(idCard))
+ {
+ getDataList = getDataList.Where(e => e.IdentityCard.Contains(idCard));
+ }
+ count2 = getDataList.Count();
+ if (count2 == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ select new
+ {
+ x.PersonId,
+ x.PersonName,
+ x.CardNo,
+ x.IdentityCard,
+ x.Sex,
+ x.SexName,
+ x.UnitId,
+ x.UnitName,
+ x.WorkPostId,
+ x.WorkPostName,
+ x.ProjectId,
+ ProjectName = db.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName,
+ ShortName = db.Base_Project.First(u => u.ProjectId == x.ProjectId).ShortName,
+ NativePlace = x.CountryName ?? "" + x.ProvinceName ?? "",
+ x.TeamGroupId,
+ x.TeamGroupName,
+ x.InTime,
+ x.OutTime,
+ x.IsUsed,
+ OutName = (x.IsUsed == false ? "是" : "否"),
+ };
+ }
+ #endregion
+
#region 获取列表
///
/// 记录数
@@ -437,6 +524,7 @@ namespace BLL
CountryCode = person.CountryCode,
ProvinceCode = person.ProvinceCode,
IsCardNoOK=IDCardValid.CheckIDCard(person.IdentityCard),
+ IsSafetyMonitoring = person.IsSafetyMonitoring,
};
newPerson.RawPassword = Funs.getInitialPassword(person.UnitId, person.IdentityCard);
newPerson.Password = Funs.EncryptionPassword(newPerson.RawPassword);
@@ -502,6 +590,7 @@ namespace BLL
newPerson.MaritalStatus = person.MaritalStatus;
newPerson.DepartId = person.DepartId;
newPerson.QRCodeAttachUrl = person.QRCodeAttachUrl;
+ newPerson.IsSafetyMonitoring = person.IsSafetyMonitoring;
newPerson.Password = GetPersonPassWord(person.IdentityCard);
if (!newPerson.OutTime.HasValue)
{
diff --git a/SGGL/BLL/HSSE/Solution/LargerHazardService.cs b/SGGL/BLL/HSSE/Solution/LargerHazardService.cs
index c52a2501..e4dee6e3 100644
--- a/SGGL/BLL/HSSE/Solution/LargerHazardService.cs
+++ b/SGGL/BLL/HSSE/Solution/LargerHazardService.cs
@@ -41,6 +41,8 @@ namespace BLL
RecardMan = largerHazard.RecardMan,
Remark = largerHazard.Remark,
States = largerHazard.States,
+ TrainPersonNum = largerHazard.TrainPersonNum,
+ IsSuperLargerHazard = largerHazard.IsSuperLargerHazard,
Descriptions = largerHazard.Descriptions
};
@@ -68,6 +70,8 @@ namespace BLL
newLargerHazard.IsArgument = largerHazard.IsArgument;
newLargerHazard.Remark = largerHazard.Remark;
newLargerHazard.States = largerHazard.States;
+ newLargerHazard.TrainPersonNum = largerHazard.TrainPersonNum;
+ newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard;
newLargerHazard.Descriptions = largerHazard.Descriptions;
db.SubmitChanges();
}
diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs
index e0a95ad5..fa59e49a 100644
--- a/SGGL/BLL/ProjectData/ProjectService.cs
+++ b/SGGL/BLL/ProjectData/ProjectService.cs
@@ -551,5 +551,28 @@
}
return code;
}
+
+ ///
+ /// 获取施工中项目集合
+ ///
+ ///
+ 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)
+ select x;
+
+ if (unitId == BLL.Const.UnitId_CWCEC)
+ {
+ 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;
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs
index a0a7db6e..625d2987 100644
--- a/SGGL/BLL/SysManage/UnitService.cs
+++ b/SGGL/BLL/SysManage/UnitService.cs
@@ -77,7 +77,7 @@ namespace BLL
IdcardNumber = unit.IdcardNumber,
LinkMobile = unit.LinkMobile,
CollCropStatus = unit.CollCropStatus,
- RealNamePushTime=null,
+ RealNamePushTime = null,
};
db.Base_Unit.InsertOnSubmit(newUnit);
db.SubmitChanges();
@@ -266,7 +266,7 @@ namespace BLL
var q = (from x in db.Base_Unit
join y in db.Project_ProjectUnit
on x.UnitId equals y.UnitId
- where y.ProjectId == projectId && y.UnitType == unitType
+ where y.ProjectId == projectId && (y.UnitType == unitType || string.IsNullOrEmpty(unitType))
orderby x.UnitCode
select x).ToList();
return q;
@@ -662,9 +662,9 @@ namespace BLL
{
return Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitName == unitName);
}
- public static Model.Base_Unit getUnitByCollCropCodeUnitName(string CollCropCode,string unitName)
- {
- var getUnit= Funs.DB.Base_Unit.FirstOrDefault(e => e.CollCropCode == CollCropCode);
+ public static Model.Base_Unit getUnitByCollCropCodeUnitName(string CollCropCode, string unitName)
+ {
+ var getUnit = Funs.DB.Base_Unit.FirstOrDefault(e => e.CollCropCode == CollCropCode);
if (getUnit != null)
{
return getUnit;
@@ -708,5 +708,30 @@ namespace BLL
return name;
}
+
+ 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 != BLL.Const.UnitId_CWCEC orderby x.UnitCode select x).ToList();
+ return q;
+ }
+ }
}
}
diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs
index e2154ec2..f48acc1f 100644
--- a/SGGL/BLL/SysManage/UserService.cs
+++ b/SGGL/BLL/SysManage/UserService.cs
@@ -19,6 +19,16 @@ 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..e73a8183 100644
--- a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs
+++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs
@@ -35,6 +35,7 @@ namespace BLL
ProjectId = superviseCheckReport.ProjectId,
UnitId = superviseCheckReport.UnitId,
CheckTeam = superviseCheckReport.CheckTeam,
+ CheckType = superviseCheckReport.CheckType,
EvaluationResult = superviseCheckReport.EvaluationResult,
AttachUrl = superviseCheckReport.AttachUrl,
IsIssued = superviseCheckReport.IsIssued
@@ -57,6 +58,7 @@ namespace BLL
newSuperviseCheckReport.ProjectId = superviseCheckReport.ProjectId;
newSuperviseCheckReport.UnitId = superviseCheckReport.UnitId;
newSuperviseCheckReport.CheckTeam = superviseCheckReport.CheckTeam;
+ newSuperviseCheckReport.CheckType = superviseCheckReport.CheckType;
newSuperviseCheckReport.EvaluationResult = superviseCheckReport.EvaluationResult;
newSuperviseCheckReport.AttachUrl = superviseCheckReport.AttachUrl;
newSuperviseCheckReport.IsIssued = superviseCheckReport.IsIssued;
diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx
index 88596515..067bd91f 100644
--- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx
+++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx
@@ -8,83 +8,98 @@
diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs
index f7b52336..d5751878 100644
--- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs
+++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs
@@ -23,6 +23,7 @@ namespace FineUIPro.Web.BaseInfo
////权限按钮方法
this.GetButtonPower();
Funs.DropDownPageSize(this.ddlPageSize);
+ Funs.FineUIPleaseSelect(this.drpCertificateType);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
@@ -181,6 +182,14 @@ namespace FineUIPro.Web.BaseInfo
{
this.txtCertificateCode.Text = certificate.CertificateCode;
this.txtCertificateName.Text = certificate.CertificateName;
+ if (!string.IsNullOrEmpty(certificate.CertificateType))
+ {
+ this.drpCertificateType.SelectedValue = certificate.CertificateType;
+ }
+ if (certificate.IsRegisterHSSE == true)
+ {
+ this.ckbIsRegisterHSSE.Checked = true;
+ }
this.txtRemark.Text = certificate.Remark;
hfFormID.Text = Id;
this.btnDelete.Enabled = true;
@@ -201,8 +210,13 @@ namespace FineUIPro.Web.BaseInfo
{
CertificateCode = this.txtCertificateCode.Text.Trim(),
CertificateName = this.txtCertificateName.Text.Trim(),
+ IsRegisterHSSE = Convert.ToBoolean(this.ckbIsRegisterHSSE.Checked),
Remark = txtRemark.Text.Trim()
};
+ if (this.drpCertificateType.SelectedValue != BLL.Const._Null)
+ {
+ certificate.CertificateType = this.drpCertificateType.SelectedValue;
+ }
if (string.IsNullOrEmpty(strRowID))
{
certificate.CertificateId = SQLHelper.GetNewID(typeof(Model.Base_Certificate));
diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.designer.cs
index b5278e7f..24e3ba02 100644
--- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.designer.cs
@@ -111,6 +111,24 @@ namespace FineUIPro.Web.BaseInfo {
///
protected global::FineUIPro.TextBox txtCertificateName;
+ ///
+ /// drpCertificateType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpCertificateType;
+
+ ///
+ /// ckbIsRegisterHSSE 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox ckbIsRegisterHSSE;
+
///
/// txtRemark 控件。
///
diff --git a/SGGL/FineUIPro.Web/BaseInfo/RiskLevel.aspx b/SGGL/FineUIPro.Web/BaseInfo/RiskLevel.aspx
new file mode 100644
index 00000000..dd0baf5f
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/RiskLevel.aspx
@@ -0,0 +1,100 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RiskLevel.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.RiskLevel" %>
+
+
+
+
+
+ 风险等级
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/BaseInfo/RiskLevel.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/RiskLevel.aspx.cs
new file mode 100644
index 00000000..46e67987
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/RiskLevel.aspx.cs
@@ -0,0 +1,240 @@
+using BLL;
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+
+namespace FineUIPro.Web.BaseInfo
+{
+ public partial class RiskLevel : PageBase
+ {
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ ////权限按钮方法
+ this.GetButtonPower();
+ btnNew.OnClientClick = Window1.GetShowReference("RiskLevelEdit.aspx") + "return false;";
+ ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ // 绑定表格
+ BindGrid();
+ }
+ }
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string strSql = @"SELECT RiskLevelId
+ , RiskLevel
+ , RiskLevelName
+ , MinValue
+ , MaxValue
+ , ControlMeasures
+ , Days
+ , Remark
+ FROM dbo.Base_RiskLevel ";
+ SqlParameter[] parameter = null;
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ #endregion
+
+ #region 页索引改变事件
+ ///
+ /// 页索引改变事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ Grid1.PageIndex = e.NewPageIndex;
+ BindGrid();
+ }
+ #endregion
+
+ #region 排序
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 分页选择下拉改变事件
+ ///
+ /// 分页选择下拉改变事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+ #endregion
+
+ #region 弹出编辑窗口关闭事件
+ ///
+ /// 弹出编辑窗体关闭事件
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 编辑
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ 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 RegisterTypesId = Grid1.SelectedRowID;
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RiskLevelEdit.aspx?RiskLevelId={0}", RegisterTypesId, "编辑 - ")));
+ }
+ #endregion
+
+ #region 删除
+ ///
+ /// 右键删除事件
+ ///
+ ///
+ ///
+ protected void btnMenuDelete_Click(object sender, EventArgs e)
+ {
+ this.DeleteData();
+ }
+
+ ///
+ /// 删除方法
+ ///
+ private void DeleteData()
+ {
+ if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HazardRegisterTypesMenuId, Const.BtnDelete))
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ bool isShow = false;
+ if (Grid1.SelectedRowIndexArray.Length == 1)
+ {
+ isShow = true;
+ }
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ if (this.judgementDelete(rowID, isShow))
+ {
+ var riskLevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x=>x.RiskLevelId==rowID);
+ if (riskLevel != null)
+ {
+ BLL.LogService.AddSys_Log(this.CurrUser, riskLevel.RiskLevelName, riskLevel.RiskLevelId, BLL.Const.RiskLevelMenuId, BLL.Const.BtnDelete);
+ Funs.DB.Base_RiskLevel.DeleteOnSubmit(riskLevel);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ BindGrid();
+ ShowNotify("删除数据成功!(表格数据已重新绑定)", MessageBoxIcon.Success);
+ }
+ }
+ else
+ {
+ ShowNotify("您没有这个权限,请与管理员联系!");
+ }
+ }
+
+ ///
+ /// 判断是否可删除
+ ///
+ ///
+ ///
+ ///
+ private bool judgementDelete(string rowID, bool isShow)
+ {
+ string content = string.Empty;
+ if (string.IsNullOrEmpty(content))
+ {
+ return true;
+ }
+ else
+ {
+ if (isShow)
+ {
+ Alert.ShowInTop(content);
+ }
+ return false;
+ }
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.RiskLevelMenuId);
+ 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/BaseInfo/RiskLevel.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/RiskLevel.aspx.designer.cs
new file mode 100644
index 00000000..0c539389
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/RiskLevel.aspx.designer.cs
@@ -0,0 +1,143 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BaseInfo
+{
+
+
+ public partial class RiskLevel
+ {
+
+ ///
+ /// 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;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// 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/BaseInfo/RiskLevelEdit.aspx b/SGGL/FineUIPro.Web/BaseInfo/RiskLevelEdit.aspx
new file mode 100644
index 00000000..692a1616
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/RiskLevelEdit.aspx
@@ -0,0 +1,73 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RiskLevelEdit.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.RiskLevelEdit" %>
+
+
+
+
+
+ 风险等级
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/BaseInfo/RiskLevelEdit.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/RiskLevelEdit.aspx.cs
new file mode 100644
index 00000000..05024139
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/RiskLevelEdit.aspx.cs
@@ -0,0 +1,118 @@
+using BLL;
+using System;
+using System.Linq;
+namespace FineUIPro.Web.BaseInfo
+{
+ public partial class RiskLevelEdit : PageBase
+ {
+ #region 定义项
+ ///
+ /// 问题巡检类型主键
+ ///
+ public string RiskLevelId
+ {
+ get
+ {
+ return (string)ViewState["RiskLevelId"];
+ }
+ set
+ {
+ ViewState["RiskLevelId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ btnClose.OnClientClick = ActiveWindow.GetHideReference();
+
+ this.RiskLevelId = Request.QueryString["RiskLevelId"];
+ if (!string.IsNullOrEmpty(this.RiskLevelId))
+ {
+ var riskLevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x=>x.RiskLevelId==this.RiskLevelId);
+ if (riskLevel != null)
+ {
+ if (riskLevel.RiskLevel.HasValue)
+ {
+ this.txtRiskLevel.Text = riskLevel.RiskLevel.Value.ToString();
+ }
+ this.txtRiskLevelName.Text = riskLevel.RiskLevelName;
+ if (riskLevel.MinValue.HasValue)
+ {
+ this.txtMin.Text = riskLevel.MinValue.Value.ToString();
+ }
+ if (riskLevel.MaxValue.HasValue)
+ {
+ this.txtMax.Text = riskLevel.MaxValue.Value.ToString();
+ }
+ if (riskLevel.Days.HasValue)
+ {
+ this.txtDays.Text = riskLevel.Days.Value.ToString();
+ }
+ this.txtControlMeasures.Text = riskLevel.ControlMeasures;
+ this.txtRemark.Text = riskLevel.Remark;
+
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 保存数据
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.RiskLevelMenuId, Const.BtnSave))
+ {
+ Model.Base_RiskLevel riskLevel = null;
+ if (string.IsNullOrEmpty(this.RiskLevelId))
+ {
+ riskLevel= new Model.Base_RiskLevel();
+ }
+ else
+ {
+ riskLevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x=>x.RiskLevelId==this.RiskLevelId);
+ }
+
+ riskLevel.RiskLevelName = this.txtRiskLevelName.Text;
+ riskLevel.RiskLevel = int.Parse(this.txtRiskLevel.Text);
+ riskLevel.MinValue = int.Parse(this.txtMin.Text);
+ riskLevel.MaxValue = int.Parse(this.txtMax.Text);
+ riskLevel.Days = int.Parse(this.txtDays.Text);
+ riskLevel.ControlMeasures=this.txtControlMeasures.Text ;
+ riskLevel.Remark=this.txtRemark.Text ;
+
+ if (string.IsNullOrEmpty(this.RiskLevelId))
+ {
+ this.RiskLevelId = SQLHelper.GetNewID(typeof(Model.Base_RiskLevel));
+ riskLevel.RiskLevelId = this.RiskLevelId;
+ Funs.DB.Base_RiskLevel.InsertOnSubmit(riskLevel);
+ BLL.LogService.AddSys_Log(this.CurrUser, riskLevel.RiskLevelName, riskLevel.RiskLevelId, BLL.Const.HazardRegisterTypesMenuId,BLL.Const.BtnAdd);
+ }
+ else
+ {
+ BLL.LogService.AddSys_Log(this.CurrUser, riskLevel.RiskLevelName, riskLevel.RiskLevelId, BLL.Const.HazardRegisterTypesMenuId, BLL.Const.BtnModify);
+ }
+ Funs.DB.SubmitChanges();
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ else
+ {
+ ShowNotify("您没有这个权限,请与管理员联系!");
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/BaseInfo/RiskLevelEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/RiskLevelEdit.aspx.designer.cs
new file mode 100644
index 00000000..02fca92a
--- /dev/null
+++ b/SGGL/FineUIPro.Web/BaseInfo/RiskLevelEdit.aspx.designer.cs
@@ -0,0 +1,143 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BaseInfo
+{
+
+
+ public partial class RiskLevelEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtRiskLevelName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtRiskLevelName;
+
+ ///
+ /// txtRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRiskLevel;
+
+ ///
+ /// txtMin 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtMin;
+
+ ///
+ /// txtMax 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtMax;
+
+ ///
+ /// txtDays 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtDays;
+
+ ///
+ /// NumberBox4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox NumberBox4;
+
+ ///
+ /// txtControlMeasures 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtControlMeasures;
+
+ ///
+ /// txtRemark 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtRemark;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx b/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx
index 47aa17f6..6f165560 100644
--- a/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx
+++ b/SGGL/FineUIPro.Web/BaseInfo/WorkPost.aspx
@@ -11,77 +11,83 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
private void BindGrid()
{
- string strSql = @"select NEWID() as ID, v.ProjectId,v.ProjectCode,v.ProjectName,v.allcount,v.ccount,isnull(v.allCount,0)-ISNULL(v.cCount,0) as ucCount,
- (case when isnull(v.allCount,0) > 0 then cast((isnull(v.allCount,0)-ISNULL(v.cCount,0)) *1.0 /isnull(v.allCount,0)*100 as decimal(18, 2))
- else 0 end) as rateV
- from (select h.ProjectId,p.ProjectCode,p.ProjectName,COUNT(*) as allCount,
- isnull((select COUNT(*) from Check_CheckControl as c
- where c.ProjectId=h.ProjectId and State =7
- and '1' = @cpara
- group by c.ProjectId),0) as cCount
- from Check_CheckControl as h
- left join Base_Project as p on h.ProjectId=p.ProjectId
- where p.projectId is not null ";
+ string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 ";
List listStr = new List();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
{
- strSql += " AND h.projectId = @projectId"; ///状态为已完成
+ strSql += " AND projectId = @projectId"; ///状态为已完成
listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue));
-
- cpara += " AND c.projectId ="+ this.drpProject.SelectedValue;
}
- if (!string.IsNullOrEmpty(this.txtStartTime.Text))
- {
- strSql += " AND h.CheckDate >=@StartTime";
- listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text));
+ //if (!string.IsNullOrEmpty(this.txtStartTime.Text))
+ //{
+ // strSql += " AND h.RegisterDate >=@StartTime";
+ // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text));
- cpara += " AND c.CheckDate >=" + this.txtStartTime.Text;
- }
- if (!string.IsNullOrEmpty(this.txtEndTime.Text))
- {
- strSql += " AND h.CheckDate <=@EndTime";
- listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text));
+ // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text;
+ //}
+ //if (!string.IsNullOrEmpty(this.txtEndTime.Text))
+ //{
+ // strSql += " AND h.RegisterDate <=@EndTime";
+ // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text));
+
+ // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text;
+ //}
- cpara += " AND c.CheckDate <=" + this.txtEndTime.Text;
- }
- if (!string.IsNullOrEmpty(cpara))
- {
- listStr.Add(new SqlParameter("@cpara"," '1' And "+ cpara));
- }
- else
- {
- listStr.Add(new SqlParameter("@cpara", "'1'"));
- }
- strSql += " group by h.ProjectId,p.ProjectCode,p.ProjectName) as v";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -172,5 +154,103 @@ namespace FineUIPro.Web.DataShow
{
EditData();
}
+
+ ///
+ /// 数量
+ ///
+ ///
+ ///
+ protected int Count1(object projectId)
+ {
+ int cout1 = 0;
+ if (projectId != null)
+ {
+ var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
+ var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
+ var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString());
+ if (datetime1.HasValue)
+ {
+ getT = getT.Where(x => x.CheckDate >= datetime1);
+ }
+ if (datetime2.HasValue)
+ {
+ getT = getT.Where(x => x.CheckDate <= datetime2);
+ }
+
+ cout1 = getT.Count();
+ }
+ return cout1;
+ }
+
+ protected int Count2(object projectId)
+ {
+ int cout1 = 0;
+ if (projectId != null)
+ {
+ var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
+ var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
+ var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString() && x.State == "7");
+ if (datetime1.HasValue)
+ {
+ getT = getT.Where(x => x.CheckDate >= datetime1);
+ }
+ if (datetime2.HasValue)
+ {
+ getT = getT.Where(x => x.CheckDate <= datetime2);
+ }
+
+ cout1 = getT.Count();
+ }
+ return cout1;
+ }
+
+ protected int Count3(object projectId)
+ {
+ int cout1 = 0;
+ if (projectId != null)
+ {
+ var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
+ var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
+ var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString() && x.State != "7");
+ if (datetime1.HasValue)
+ {
+ getT = getT.Where(x => x.CheckDate >= datetime1);
+ }
+ if (datetime2.HasValue)
+ {
+ getT = getT.Where(x => x.CheckDate <= datetime2);
+ }
+ cout1 = getT.Count();
+ }
+ return cout1;
+ }
+
+ protected string Count4(object projectId)
+ {
+ string rate = string.Empty;
+ if (projectId != null)
+ {
+ var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
+ var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
+ var getALL = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString());
+
+ if (datetime1.HasValue)
+ {
+ getALL = getALL.Where(x => x.CheckDate >= datetime1);
+ }
+ if (datetime2.HasValue)
+ {
+ getALL = getALL.Where(x => x.CheckDate >= datetime1);
+ }
+ var getT = getALL.Where(x => x.ProjectId == projectId.ToString() && x.State == "7");
+ int coutall = getALL.Count();
+ int cout0 = getT.Count();
+ if (coutall > 0)
+ {
+ rate = Math.Round(cout0 * 1.0 / coutall * 100, 2).ToString();
+ }
+ }
+ return rate;
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.designer.cs
index 5c220053..ab3a76bc 100644
--- a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.designer.cs
@@ -113,6 +113,42 @@ namespace FineUIPro.Web.DataShow
///
protected global::System.Web.UI.WebControls.Label labNumber;
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label4;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
///
/// ToolbarSeparator1 控件。
///
diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx
index 194ea691..614e6d6c 100644
--- a/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx
+++ b/SGGL/FineUIPro.Web/DataShow/QualityProblemItem.aspx
@@ -13,7 +13,7 @@
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RiskControl.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/RiskControl.aspx.cs
new file mode 100644
index 00000000..dcc0c138
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RiskControl.aspx.cs
@@ -0,0 +1,466 @@
+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.HSSE.Hazard
+{
+ public partial class RiskControl : PageBase
+ {
+ #region 定义项
+ ///
+ /// 清单主键
+ ///
+ public string PatrolPlanId
+ {
+ get
+ {
+ return (string)ViewState["PatrolPlanId"];
+ }
+ set
+ {
+ ViewState["PatrolPlanId"] = value;
+ }
+ }
+ ///
+ /// 项目id
+ ///
+ 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.ProjectId)
+ {
+ this.ProjectId = Request.Params["projectId"];
+ }
+ ////权限按钮方法
+ this.GetButtonPower();
+ ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ BLL.RiskLevelService.InitRiskLevelDropDownList(this.drpHazardLevel, true);
+ Funs.FineUIPleaseSelect(this.drpState);
+ this.drpState.SelectedValue = "0";
+ // 绑定表格
+ BindGrid();
+ }
+ }
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string strSql = "select p.*,HazardListItem.WorkStage,HazardListItem.HazardListTypeId,HazardListItem.HazardId,HazardListItem.HazardItems,ControllingPersonUsers.UserName AS ControllingPersonName,Users.UserName,HazardList.WorkAreaName,HazardList.CompileDate,case p.State when '0' then '未巡检' when '1' then '已巡检' when '2' then '超期巡检' else '超期未巡检' end as StateStr,"
+ + @" (select Days from Base_RiskLevel where RiskLevelId=(select top 1 RiskLevel from Hazard_RiskEvaluationRecord where DataId=p.HazardSelectedItemId order by EvaluatorDate desc)) as Days, "
+ + @" (select RiskLevelName from Base_RiskLevel where RiskLevelId=(select top 1 RiskLevel from Hazard_RiskEvaluationRecord where DataId=p.HazardSelectedItemId order by EvaluatorDate desc)) as RiskLevelName,"
+ + @" (select top 1 CheckDate from Hazard_PatrolPlan where HazardSelectedItemId=p.HazardSelectedItemId and LimitCheckDate
+ /// 获取危险源编号
+ ///
+ ///
+ ///
+ protected string ConvertHazardCode(object HazardId)
+ {
+ string hazardCode = string.Empty;
+ if (HazardId != null)
+ {
+ Model.Technique_HazardList hazardList = BLL.HazardListService.GetHazardListById(HazardId.ToString());
+ if (hazardList != null)
+ {
+ hazardCode = hazardList.HazardCode;
+ }
+ }
+ return hazardCode;
+ }
+
+ ///
+ /// 获取危险源类别
+ ///
+ ///
+ ///
+ protected string ConvertSupHazardListTypeId(object hazardListTypeId)
+ {
+ if (hazardListTypeId != null)
+ {
+ Model.Technique_HazardListType hazardListType = BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString());
+ if (hazardListType != null)
+ {
+ var hazard = BLL.HazardListTypeService.GetHazardListTypeById(hazardListType.SupHazardListTypeId);
+ if (hazard != null)
+ {
+ return hazard.HazardListTypeName;
+ }
+ }
+ }
+ return null;
+ }
+
+ ///
+ /// 获取危险源项
+ ///
+ ///
+ ///
+ protected string ConvertHazardListTypeId(object hazardListTypeId)
+ {
+ if (hazardListTypeId != null)
+ {
+ Model.Technique_HazardListType hazardListType = BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString());
+ if (hazardListType != null)
+ {
+ return hazardListType.HazardListTypeName;
+ }
+ }
+ return null;
+ }
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 页索引改变事件
+ ///
+ /// 页索引改变事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ Grid1.PageIndex = e.NewPageIndex;
+ BindGrid();
+ }
+ #endregion
+
+ #region 排序
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ Grid1.SortDirection = e.SortDirection;
+ Grid1.SortField = e.SortField;
+ BindGrid();
+ }
+ #endregion
+
+ #region 分页选择下拉改变事件
+ ///
+ /// 分页选择下拉改变事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+ #endregion
+
+ #region 弹出编辑窗口关闭事件
+ ///
+ /// 弹出编辑窗体关闭事件
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ string str = this.hdID.Text;
+ if (!string.IsNullOrEmpty(str))
+ {
+ string[] strs = str.Split('|');
+ if (strs.Length >= 2)
+ {
+ if (strs[0] == "1") //二次评估
+ {
+ PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("HazardReEvaluator.aspx?HazardSelectedItemId={0}&LECItemRecordId={1}", strs[1], strs[2], "查看 - ")));
+ }
+ else if (strs[0] == "2") //下整改单
+ {
+ PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../Check/RectifyNoticesAdd.aspx?HazardSelectedItemId={0}", strs[1], "查看 - ")));
+ }
+ }
+ }
+ }
+
+ ///
+ /// 弹出编辑窗体关闭事件
+ ///
+ ///
+ ///
+ protected void Window2_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 弹出编辑窗体关闭事件
+ ///
+ ///
+ ///
+ protected void Window3_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 编制
+ ///
+ /// 编制
+ ///
+ ///
+ ///
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+ int count = BLL.Hazard_HazardListService.GetHazardListCountByVersionNoIsNull(this.ProjectId);
+ if (count > 0)
+ {
+ Alert.ShowInTop("风险评估版本号还未生成,不能进行操作!", MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HazardListEdit.aspx", "编辑 - ")));
+ }
+ }
+ #endregion
+
+ #region Grid双击事件
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ btnMenuModify_Click(null, null);
+ }
+ #endregion
+
+ #region 编辑
+ ///
+ /// 编辑按钮
+ ///
+ ///
+ ///
+ protected void btnMenuModify_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string PatrolPlanId = Grid1.SelectedRowID;
+ if (this.btnMenuModify.Hidden == false)
+ {
+ Model.Hazard_PatrolPlan plan = BLL.Hazard_PatrolPlanService.GetPatrolPlanByPatrolPlanId(PatrolPlanId);
+ if (plan != null && (plan.DutyPerson == this.CurrUser.UserId || this.CurrUser.UserId == BLL.Const.sysglyId || this.CurrUser.UserId == BLL.Const.hfnbdId))
+ {
+ string window = String.Format("RoutingInspectionEdit.aspx?PatrolPlanId={0}", PatrolPlanId, "编辑 - ");
+ PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.hdID.ClientID)
+ + Window1.GetShowReference(window));
+ }
+ else
+ {
+ Alert.ShowInTop("您不是风险责任人,无法进行巡检!", MessageBoxIcon.Warning);
+ }
+ }
+ }
+ #endregion
+
+ #region 转换字符串
+ ///
+ /// 转换工作阶段
+ ///
+ ///
+ ///
+ protected string ConvertWorkStage(object workStage)
+ {
+ if (workStage != null)
+ {
+ string workStages = string.Empty;
+ string[] strList = workStage.ToString().Split(',');
+ foreach (string str in strList)
+ {
+ Model.Base_WorkStage c = BLL.WorkStageService.GetWorkStageById(str);
+ if (c != null)
+ {
+ workStages += c.WorkStageName + ",";
+ }
+ }
+ if (!string.IsNullOrEmpty(workStages))
+ {
+ workStages = workStages.Substring(0, workStages.LastIndexOf(","));
+ }
+ return workStages;
+ }
+ return "";
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectRiskControlMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnSave))
+ {
+ this.btnMenuModify.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 = Grid1.RecordCount;
+ this.BindGrid();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+#pragma warning disable CS0108 // “HazardList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
+ ///
+ /// 导出方法
+ ///
+ ///
+ ///
+ private string GetGridTableHtml(Grid grid)
+#pragma warning restore CS0108 // “HazardList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ sb.Append("");
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ sb.AppendFormat("| {0} | ", 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;
+ }
+ if (column.ColumnID == "tfVersionNo")
+ {
+ html = (row.FindControl("lblVersionNo") as AspNet.Label).Text;
+ }
+ if (column.ColumnID == "tfWorkStage")
+ {
+ html = (row.FindControl("lblWorkStage") as AspNet.Label).Text;
+ }
+ sb.AppendFormat("| {0} | ", html);
+ }
+
+ sb.Append("
");
+ }
+
+ sb.Append("
");
+
+ return sb.ToString();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RiskControl.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/RiskControl.aspx.designer.cs
new file mode 100644
index 00000000..6b01f005
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RiskControl.aspx.designer.cs
@@ -0,0 +1,231 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.Hazard {
+
+
+ public partial class RiskControl {
+
+ ///
+ /// 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;
+
+ ///
+ /// txtWorkAreaName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtWorkAreaName;
+
+ ///
+ /// drpHazardLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpHazardLevel;
+
+ ///
+ /// drpState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpState;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// hdID 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdID;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label4;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// lblHazardId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblHazardId;
+
+ ///
+ /// 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;
+
+ ///
+ /// Window3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window3;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuModify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuModify;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx
new file mode 100644
index 00000000..4777001a
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx
@@ -0,0 +1,174 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoutingInspection.aspx.cs" Inherits="FineUIPro.Web.HSSE.Hazard.RoutingInspection" %>
+
+
+
+
+
+ 风险巡检记录
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx.cs
new file mode 100644
index 00000000..a70d1f9e
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx.cs
@@ -0,0 +1,423 @@
+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.HSSE.Hazard
+{
+ public partial class RoutingInspection : PageBase
+ {
+ #region 定义项
+ ///
+ /// 清单主键
+ ///
+ public string RoutingInspectionId
+ {
+ get
+ {
+ return (string)ViewState["RoutingInspectionId"];
+ }
+ set
+ {
+ ViewState["RoutingInspectionId"] = value;
+ }
+ }
+ ///
+ /// 项目id
+ ///
+ 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.ProjectId)
+ {
+ this.ProjectId = Request.Params["projectId"];
+ }
+ ////权限按钮方法
+ this.GetButtonPower();
+ ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ BLL.RiskLevelService.InitRiskLevelDropDownList(this.drpHazardLevel, true);
+ Funs.FineUIPleaseSelect(this.drpState);
+ // 绑定表格
+ BindGrid();
+ }
+ }
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string strSql = "select r.*,HazardListItem.WorkStage,HazardListItem.HazardListTypeId,HazardListItem.HazardId,HazardListItem.HazardItems,ControllingPersonUsers.UserName AS ControllingPersonName,Users.UserName as PatrolManName,HazardList.WorkAreaName,HazardList.CompileDate,case r.PatrolResult when 0 then '原状态' when 1 then '二次评估' when 2 then '下整改单' else '消除' end as PatrolResultStr,"
+ + @" (select RiskLevelName from Base_RiskLevel where RiskLevelId=r.OldRiskLevel) as OldRiskLevelName,"
+ + @" (select RiskLevelName from Base_RiskLevel where RiskLevelId=(select HazardLevel from Hazard_HazardSelectedItem where HazardSelectedItemId=r.HazardSelectedItemId)) as RiskLevelName"
+ + @" from Hazard_RoutingInspection AS r "
+ + @" LEFT JOIN Hazard_HazardSelectedItem AS HazardListItem on HazardListItem.HazardSelectedItemId=r.HazardSelectedItemId"
+ + @" LEFT JOIN Hazard_HazardList AS HazardList on HazardList.HazardListId=HazardListItem.HazardListId "
+ + @" LEFT JOIN Sys_User AS Users ON r.PatrolManId=Users.UserId "
+ + @" LEFT JOIN Sys_User AS ControllingPersonUsers ON HazardList.ControllingPerson=ControllingPersonUsers.UserId WHERE HazardList.States = " + BLL.Const.State_2;
+ List listStr = new List();
+ strSql += " AND HazardList.ProjectId = @ProjectId";
+ if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
+ {
+ listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
+ strSql += " AND HazardList.States = @States"; ///状态为已完成
+ listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
+ }
+ else
+ {
+ listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
+ }
+ if (!string.IsNullOrEmpty(this.txtWorkAreaName.Text.Trim()))
+ {
+ strSql += " AND HazardList.WorkAreaName LIKE @WorkAreaName";
+ listStr.Add(new SqlParameter("@WorkAreaName", "%" + this.txtWorkAreaName.Text.Trim() + "%"));
+ }
+ if (this.drpHazardLevel.SelectedValue != BLL.Const._Null)
+ {
+ strSql += " AND HazardListItem.HazardLevel = @HazardLevel";
+ listStr.Add(new SqlParameter("@HazardLevel", this.drpHazardLevel.SelectedValue));
+ }
+ if (this.drpState.SelectedValue != BLL.Const._Null)
+ {
+ strSql += " AND r.PatrolResult = @PatrolResult";
+ listStr.Add(new SqlParameter("@PatrolResult", this.drpState.SelectedValue));
+ }
+ 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();
+ }
+ #endregion
+
+ ///
+ /// 获取危险源编号
+ ///
+ ///
+ ///
+ protected string ConvertHazardCode(object HazardId)
+ {
+ string hazardCode = string.Empty;
+ if (HazardId != null)
+ {
+ Model.Technique_HazardList hazardList = BLL.HazardListService.GetHazardListById(HazardId.ToString());
+ if (hazardList != null)
+ {
+ hazardCode = hazardList.HazardCode;
+ }
+ }
+ return hazardCode;
+ }
+
+ ///
+ /// 获取危险源类别
+ ///
+ ///
+ ///
+ protected string ConvertSupHazardListTypeId(object hazardListTypeId)
+ {
+ if (hazardListTypeId != null)
+ {
+ Model.Technique_HazardListType hazardListType = BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString());
+ if (hazardListType != null)
+ {
+ var hazard = BLL.HazardListTypeService.GetHazardListTypeById(hazardListType.SupHazardListTypeId);
+ if (hazard != null)
+ {
+ return hazard.HazardListTypeName;
+ }
+ }
+ }
+ return null;
+ }
+
+ ///
+ /// 获取危险源项
+ ///
+ ///
+ ///
+ protected string ConvertHazardListTypeId(object hazardListTypeId)
+ {
+ if (hazardListTypeId != null)
+ {
+ Model.Technique_HazardListType hazardListType = BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString());
+ if (hazardListType != null)
+ {
+ return hazardListType.HazardListTypeName;
+ }
+ }
+ return null;
+ }
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 页索引改变事件
+ ///
+ /// 页索引改变事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ Grid1.PageIndex = e.NewPageIndex;
+ BindGrid();
+ }
+ #endregion
+
+ #region 排序
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ Grid1.SortDirection = e.SortDirection;
+ Grid1.SortField = e.SortField;
+ BindGrid();
+ }
+ #endregion
+
+ #region 分页选择下拉改变事件
+ ///
+ /// 分页选择下拉改变事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+ #endregion
+
+ #region 弹出编辑窗口关闭事件
+ ///
+ /// 弹出编辑窗体关闭事件
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region Grid双击事件
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ btnMenuView_Click(null, null);
+ }
+ #endregion
+
+ #region 编辑
+ ///
+ /// 编辑按钮
+ ///
+ ///
+ ///
+ protected void btnMenuView_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string RoutingInspectionId = Grid1.SelectedRowID;
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RoutingInspectionView.aspx?RoutingInspectionId={0}", RoutingInspectionId, "查看 - ")));
+ }
+ #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();
+ Model.Hazard_RoutingInspection routingInspection = BLL.Hazard_RoutingInspectionService.GetRoutingInspectionByRoutingInspectionId(rowID);
+ BLL.LogService.AddSys_Log(this.CurrUser, routingInspection.PatrolResult.ToString(), routingInspection.RoutingInspectionId, BLL.Const.ProjectRoutingInspectionMenuId, BLL.Const.BtnDelete);
+ BLL.Hazard_RoutingInspectionService.DeleteRoutingInspection(rowID);
+ Model.Hazard_PatrolPlan plan = BLL.Hazard_PatrolPlanService.GetPatrolPlanByPatrolPlanId(routingInspection.PatrolPlanId);
+ if (plan != null)
+ {
+ plan.CheckDate = null;
+ plan.State = "0";
+ BLL.Hazard_PatrolPlanService.UpdatePatrolPlan(plan);
+ }
+ }
+ BindGrid();
+ ShowNotify("删除成功!", MessageBoxIcon.Success);
+ }
+ }
+ #endregion
+
+ #region 转换字符串
+ ///
+ /// 转换工作阶段
+ ///
+ ///
+ ///
+ protected string ConvertWorkStage(object workStage)
+ {
+ if (workStage != null)
+ {
+ string workStages = string.Empty;
+ string[] strList = workStage.ToString().Split(',');
+ foreach (string str in strList)
+ {
+ Model.Base_WorkStage c = BLL.WorkStageService.GetWorkStageById(str);
+ if (c != null)
+ {
+ workStages += c.WorkStageName + ",";
+ }
+ }
+ if (!string.IsNullOrEmpty(workStages))
+ {
+ workStages = workStages.Substring(0, workStages.LastIndexOf(","));
+ }
+ return workStages;
+ }
+ return "";
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectRoutingInspectionMenuId);
+ if (buttonList.Count() > 0)
+ {
+ 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 = Grid1.RecordCount;
+ this.BindGrid();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+#pragma warning disable CS0108 // “HazardList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
+ ///
+ /// 导出方法
+ ///
+ ///
+ ///
+ private string GetGridTableHtml(Grid grid)
+#pragma warning restore CS0108 // “HazardList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ sb.Append("");
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ sb.AppendFormat("| {0} | ", 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;
+ }
+ if (column.ColumnID == "tfVersionNo")
+ {
+ html = (row.FindControl("lblVersionNo") as AspNet.Label).Text;
+ }
+ if (column.ColumnID == "tfWorkStage")
+ {
+ html = (row.FindControl("lblWorkStage") as AspNet.Label).Text;
+ }
+ sb.AppendFormat("| {0} | ", html);
+ }
+
+ sb.Append("
");
+ }
+
+ sb.Append("
");
+
+ return sb.ToString();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx.designer.cs
new file mode 100644
index 00000000..602ca949
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspection.aspx.designer.cs
@@ -0,0 +1,195 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.Hazard {
+
+
+ public partial class RoutingInspection {
+
+ ///
+ /// 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;
+
+ ///
+ /// txtWorkAreaName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtWorkAreaName;
+
+ ///
+ /// drpHazardLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpHazardLevel;
+
+ ///
+ /// drpState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpState;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuView 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuView;
+
+ ///
+ /// btnMenuDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDelete;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx
new file mode 100644
index 00000000..9de89dc5
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx
@@ -0,0 +1,97 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoutingInspectionEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Hazard.RoutingInspectionEdit" %>
+
+
+
+
+
+ 风险巡检记录
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx.cs
new file mode 100644
index 00000000..fe5e7bc5
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx.cs
@@ -0,0 +1,328 @@
+using BLL;
+using System;
+using System.Linq;
+
+namespace FineUIPro.Web.HSSE.Hazard
+{
+ public partial class RoutingInspectionEdit : PageBase
+ {
+ #region 定义项
+ ///
+ /// 主键
+ ///
+ private string PatrolPlanId
+ {
+ get
+ {
+ return (string)ViewState["PatrolPlanId"];
+ }
+ set
+ {
+ ViewState["PatrolPlanId"] = value;
+ }
+ }
+
+ private string HazardSelectedItemId
+ {
+ get
+ {
+ return (string)ViewState["HazardSelectedItemId"];
+ }
+ set
+ {
+ ViewState["HazardSelectedItemId"] = value;
+ }
+ }
+
+ private string RoutingInspectionId
+ {
+ get
+ {
+ return (string)ViewState["RoutingInspectionId"];
+ }
+ set
+ {
+ ViewState["RoutingInspectionId"] = value;
+ }
+ }
+
+ ///
+ /// 图片路径
+ ///
+ public string ImageUrl
+ {
+ get
+ {
+ return (string)ViewState["ImageUrl"];
+ }
+ set
+ {
+ ViewState["ImageUrl"] = value;
+ }
+ }
+
+ ///
+ /// 整改后附件路径
+ ///
+ public string RectificationImageUrl
+ {
+ get
+ {
+ return (string)ViewState["RectificationImageUrl"];
+ }
+ set
+ {
+ ViewState["RectificationImageUrl"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ UserService.InitUsersDropDownList(this.drpPatrolMan, this.CurrUser.LoginProjectId, true, string.Empty);
+ UserService.InitUsersDropDownList(this.drpRiskMan, this.CurrUser.LoginProjectId, true, string.Empty);
+ this.PatrolPlanId = Request.Params["PatrolPlanId"];
+ this.hdCheckManId.Text = this.CurrUser.UserId;
+ if (!string.IsNullOrEmpty(this.PatrolPlanId))
+ {
+ Model.Hazard_RoutingInspection routingInspection = BLL.Hazard_RoutingInspectionService.GetRoutingInspectionByPatrolPlanId(this.PatrolPlanId);
+ Model.Hazard_PatrolPlan plan = BLL.Hazard_PatrolPlanService.GetPatrolPlanByPatrolPlanId(this.PatrolPlanId);
+ HazardSelectedItemId = plan.HazardSelectedItemId;
+ Model.Hazard_HazardSelectedItem item = BLL.Hazard_HazardSelectedItemService.GetHazardSelectedItemByHazardSelectedItemId(plan.HazardSelectedItemId);
+ if (item != null)
+ {
+ var q = BLL.HazardListService.GetHazardListById(item.HazardId);
+ if (q != null)
+ {
+ this.txtHazardCode.Text = q.HazardCode;
+ this.txtHazardItems.Text = item.HazardItems;
+ this.txtDefectsType.Text = item.DefectsType;
+ this.txtMayLeadAccidents.Text = item.MayLeadAccidents;
+ }
+ }
+ if (routingInspection != null)
+ {
+ RoutingInspectionId = routingInspection.RoutingInspectionId;
+ if (!string.IsNullOrEmpty(routingInspection.PatrolManId))
+ {
+ this.drpPatrolMan.SelectedValue = routingInspection.PatrolManId;
+ }
+ if (routingInspection.PatrolTime != null)
+ {
+ this.txtPatrolTime.Text = string.Format("{0:yyyy-MM-dd}", routingInspection.PatrolTime);
+ }
+ if (routingInspection.PatrolResult != null)
+ {
+ this.rblPatrolResult.SelectedValue = routingInspection.PatrolResult.ToString();
+ }
+ this.txtControlMeasures.Text = routingInspection.ControlMeasures;
+ this.txtDealReason.Text = routingInspection.DealReason;
+ if (!string.IsNullOrEmpty(routingInspection.RiskManId))
+ {
+ this.drpRiskMan.SelectedValue = routingInspection.RiskManId;
+ }
+ }
+ else
+ {
+ this.drpPatrolMan.SelectedValue = this.CurrUser.UserId;
+ this.txtPatrolTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.drpRiskMan.SelectedValue = this.CurrUser.UserId;
+ }
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectRiskControlMenuId, BLL.Const.BtnSave))
+ {
+ if (this.drpPatrolMan.SelectedValue == BLL.Const._Null)
+ {
+ ShowNotify("请选择巡检人!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (this.rblPatrolResult.SelectedValue != "-1" && this.drpRiskMan.SelectedValue == BLL.Const._Null)
+ {
+ ShowNotify("请选择风险责任人!", MessageBoxIcon.Warning);
+ return;
+ }
+ SaveData(true);
+ }
+ else
+ {
+ Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+
+ ///
+ /// 保存数据
+ ///
+ ///
+ private void SaveData(bool isClosed)
+ {
+ Model.Hazard_PatrolPlan p = BLL.Hazard_PatrolPlanService.GetPatrolPlanByPatrolPlanId(this.PatrolPlanId);
+ Model.Hazard_HazardSelectedItem selectedItem = BLL.Hazard_HazardSelectedItemService.GetHazardSelectedItemByHazardSelectedItemId(p.HazardSelectedItemId);
+ Model.Hazard_RoutingInspection routingInspection = new Model.Hazard_RoutingInspection();
+ routingInspection.HazardSelectedItemId = this.HazardSelectedItemId;
+ routingInspection.PatrolManId = this.drpPatrolMan.SelectedValue;
+ routingInspection.PatrolTime = Funs.GetNewDateTimeOrNow(this.txtPatrolTime.Text.Trim());
+ routingInspection.PatrolResult = Convert.ToInt32(this.rblPatrolResult.SelectedValue);
+ routingInspection.OldRiskLevel = p.HazardLevel;
+ routingInspection.ControlMeasures = this.txtControlMeasures.Text.Trim();
+ routingInspection.DealReason = this.txtDealReason.Text.Trim();
+ routingInspection.RiskManId = this.drpRiskMan.SelectedValue;
+ routingInspection.PatrolPlanId = this.PatrolPlanId;
+ if (!string.IsNullOrEmpty(RoutingInspectionId))
+ {
+ routingInspection.RoutingInspectionId = RoutingInspectionId;
+ BLL.Hazard_RoutingInspectionService.UpdateRoutingInspection(routingInspection);
+ BLL.LogService.AddSys_Log(this.CurrUser, routingInspection.PatrolResult.ToString(), routingInspection.RoutingInspectionId, BLL.Const.ProjectRiskControlMenuId, BLL.Const.BtnModify);
+ }
+ else
+ {
+ routingInspection.RoutingInspectionId = SQLHelper.GetNewID();
+ this.RoutingInspectionId = routingInspection.RoutingInspectionId;
+ BLL.Hazard_RoutingInspectionService.AddRoutingInspection(routingInspection);
+ BLL.LogService.AddSys_Log(this.CurrUser, routingInspection.PatrolResult.ToString(), routingInspection.RoutingInspectionId, BLL.Const.ProjectRiskControlMenuId, BLL.Const.BtnAdd);
+ }
+ p.CheckDate = routingInspection.PatrolTime;
+ p.State = "1"; //已巡检
+ if (routingInspection.PatrolTime > p.LimitCheckDate)
+ {
+ p.State = "2"; //超期巡检
+ }
+ BLL.Hazard_PatrolPlanService.UpdatePatrolPlan(p);
+ var ps = BLL.Hazard_PatrolPlanService.GetBeforePatrolPlansByCheckDate(this.HazardSelectedItemId, p.CheckDate.Value);
+ foreach (var item in ps)
+ {
+ item.CheckDate = p.CheckDate;
+ item.State = "3"; //超期未巡检
+ BLL.Hazard_PatrolPlanService.UpdatePatrolPlan(item);
+ }
+ if (isClosed)
+ {
+ string str = string.Empty;
+ if (this.rblPatrolResult.SelectedValue == "0") //原状态
+ {
+ //巡检计划
+ Model.Hazard_PatrolPlan plan = new Model.Hazard_PatrolPlan();
+ plan.PatrolPlanId = SQLHelper.GetNewID();
+ plan.HazardSelectedItemId = this.HazardSelectedItemId;
+ plan.HazardLevel = p.HazardLevel;
+ plan.DutyPerson = this.drpRiskMan.SelectedValue;
+ plan.Days = p.Days;
+ plan.CheckStartDate = p.CheckStartDate;
+ plan.LimitCheckDate = p.LimitCheckDate.Value.AddDays(p.Days.Value);
+ plan.State = "0";
+ Model.Hazard_PatrolPlan oldPlan = BLL.Hazard_PatrolPlanService.GetPatrolPlanByHazardSelectedItemIdAndLimitCheckDate(this.HazardSelectedItemId, plan.LimitCheckDate);
+ if (oldPlan == null)
+ {
+ BLL.Hazard_PatrolPlanService.AddPatrolPlan(plan);
+ }
+ }
+ else if (this.rblPatrolResult.SelectedValue == "1") //二次评估
+ {
+ //二次评价记录
+ Model.Hazard_RiskEvaluationRecord record = new Model.Hazard_RiskEvaluationRecord();
+ record.LECItemRecordId = SQLHelper.GetNewID();
+ record.DataId = this.HazardSelectedItemId;
+ record.DataType = "Project";
+ record.Evaluatorld = this.drpRiskMan.SelectedValue;
+ //record.EvaluatorDate = DateTime.Now; 生成待办记录
+ //record.L = selectedItem.HazardJudge_L;
+ //record.E = selectedItem.HazardJudge_E;
+ //record.C = selectedItem.HazardJudge_C;
+ //record.D = selectedItem.HazardJudge_D;
+ //record.RiskLevel = p.HazardLevel;
+ //record.ControlMeasures = selectedItem.ControlMeasures;
+ //record.Remark = selectedItem.Remark;
+ BLL.RiskEvaluationRecordService.AddRiskEvaluationRecord(record);
+ if (this.drpRiskMan.SelectedValue == this.CurrUser.UserId)
+ {
+ str = "1|" + this.HazardSelectedItemId + "|" + record.LECItemRecordId;
+ }
+ }
+ else if (this.rblPatrolResult.SelectedValue == "2") //下整改单
+ {
+ //巡检计划
+ Model.Hazard_PatrolPlan plan = new Model.Hazard_PatrolPlan();
+ plan.PatrolPlanId = SQLHelper.GetNewID();
+ plan.HazardSelectedItemId = this.HazardSelectedItemId;
+ plan.HazardLevel = p.HazardLevel;
+ plan.DutyPerson = this.drpRiskMan.SelectedValue;
+ plan.Days = p.Days;
+ plan.CheckStartDate = p.CheckStartDate;
+ plan.LimitCheckDate = p.LimitCheckDate.Value.AddDays(p.Days.Value);
+ plan.State = "0";
+ Model.Hazard_PatrolPlan oldPlan = BLL.Hazard_PatrolPlanService.GetPatrolPlanByHazardSelectedItemIdAndLimitCheckDate(this.HazardSelectedItemId, plan.LimitCheckDate);
+ if (oldPlan == null)
+ {
+ BLL.Hazard_PatrolPlanService.AddPatrolPlan(plan);
+ }
+ str = "2|" + this.HazardSelectedItemId;
+ }
+ else if (this.rblPatrolResult.SelectedValue == "-1") //消除
+ {
+ selectedItem.IsStart = false;
+ selectedItem.State = "0";
+ BLL.Hazard_HazardSelectedItemService.UpdateHazardSelectedItem(selectedItem);
+ }
+ if (string.IsNullOrEmpty(Request.Params["Main"]))
+ {
+ PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(str)
+ + ActiveWindow.GetHidePostBackReference());
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(String.Format("window.close();"));
+ }
+ }
+ Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SecurityRisk);
+ }
+ #endregion
+
+ #region 附件上传
+ ///
+ /// 上传附件资源
+ ///
+ ///
+ ///
+ protected void btnAttachUrl_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(this.RoutingInspectionId))
+ {
+ SaveData(false);
+ }
+ string edit = "0";
+ if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectRiskControlMenuId, BLL.Const.BtnSave))
+ {
+ edit = "1";
+ DateTime date = Funs.GetNewDateTimeOrNow(this.txtPatrolTime.Text.Trim());
+ string dateStr = date.Year.ToString() + date.Month.ToString();
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/RoutingInspection/" + dateStr + "&menuId={1}&edit={2}", this.RoutingInspectionId, Const.ProjectRiskControlMenuId, edit)));
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx.designer.cs
new file mode 100644
index 00000000..0c06ec83
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionEdit.aspx.designer.cs
@@ -0,0 +1,195 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.Hazard {
+
+
+ public partial class RoutingInspectionEdit {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtHazardCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtHazardCode;
+
+ ///
+ /// txtHazardItems 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtHazardItems;
+
+ ///
+ /// txtDefectsType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDefectsType;
+
+ ///
+ /// txtMayLeadAccidents 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtMayLeadAccidents;
+
+ ///
+ /// drpPatrolMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpPatrolMan;
+
+ ///
+ /// txtPatrolTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtPatrolTime;
+
+ ///
+ /// rblPatrolResult 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblPatrolResult;
+
+ ///
+ /// txtControlMeasures 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtControlMeasures;
+
+ ///
+ /// txtDealReason 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtDealReason;
+
+ ///
+ /// drpRiskMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpRiskMan;
+
+ ///
+ /// UploadAttach 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.LinkButton UploadAttach;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// hdCheckManId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdCheckManId;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx
new file mode 100644
index 00000000..0b991411
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx
@@ -0,0 +1,94 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoutingInspectionView.aspx.cs" Inherits="FineUIPro.Web.HSSE.Hazard.RoutingInspectionView" %>
+
+
+
+
+
+ 风险巡检记录
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx.cs
new file mode 100644
index 00000000..8793987d
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx.cs
@@ -0,0 +1,163 @@
+using BLL;
+using System;
+using System.Linq;
+
+namespace FineUIPro.Web.HSSE.Hazard
+{
+ public partial class RoutingInspectionView : PageBase
+ {
+ #region 定义项
+ ///
+ /// 主键
+ ///
+ private string PatrolPlanId
+ {
+ get
+ {
+ return (string)ViewState["PatrolPlanId"];
+ }
+ set
+ {
+ ViewState["PatrolPlanId"] = value;
+ }
+ }
+
+ private string HazardSelectedItemId
+ {
+ get
+ {
+ return (string)ViewState["HazardSelectedItemId"];
+ }
+ set
+ {
+ ViewState["HazardSelectedItemId"] = value;
+ }
+ }
+
+ private string RoutingInspectionId
+ {
+ get
+ {
+ return (string)ViewState["RoutingInspectionId"];
+ }
+ set
+ {
+ ViewState["RoutingInspectionId"] = value;
+ }
+ }
+
+ ///
+ /// 图片路径
+ ///
+ public string ImageUrl
+ {
+ get
+ {
+ return (string)ViewState["ImageUrl"];
+ }
+ set
+ {
+ ViewState["ImageUrl"] = value;
+ }
+ }
+
+ ///
+ /// 整改后附件路径
+ ///
+ public string RectificationImageUrl
+ {
+ get
+ {
+ return (string)ViewState["RectificationImageUrl"];
+ }
+ set
+ {
+ ViewState["RectificationImageUrl"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ UserService.InitUsersDropDownList(this.drpPatrolMan, this.CurrUser.LoginProjectId, true, string.Empty);
+ UserService.InitUsersDropDownList(this.drpRiskMan, this.CurrUser.LoginProjectId, true, string.Empty);
+ this.RoutingInspectionId = Request.Params["RoutingInspectionId"];
+ this.hdCheckManId.Text = this.CurrUser.UserId;
+ if (!string.IsNullOrEmpty(this.RoutingInspectionId))
+ {
+ Model.Hazard_RoutingInspection routingInspection = BLL.Hazard_RoutingInspectionService.GetRoutingInspectionByRoutingInspectionId(this.RoutingInspectionId);
+ Model.Hazard_PatrolPlan plan = BLL.Hazard_PatrolPlanService.GetPatrolPlanByPatrolPlanId(routingInspection.PatrolPlanId);
+ HazardSelectedItemId = plan.HazardSelectedItemId;
+ Model.Hazard_HazardSelectedItem item = BLL.Hazard_HazardSelectedItemService.GetHazardSelectedItemByHazardSelectedItemId(plan.HazardSelectedItemId);
+ if (item != null)
+ {
+ var q = BLL.HazardListService.GetHazardListById(item.HazardId);
+ if (q != null)
+ {
+ this.txtHazardCode.Text = q.HazardCode;
+ this.txtHazardItems.Text = item.HazardItems;
+ this.txtDefectsType.Text = item.DefectsType;
+ this.txtMayLeadAccidents.Text = item.MayLeadAccidents;
+ }
+ }
+ if (routingInspection != null)
+ {
+ if (!string.IsNullOrEmpty(routingInspection.PatrolManId))
+ {
+ this.drpPatrolMan.SelectedValue = routingInspection.PatrolManId;
+ }
+ if (routingInspection.PatrolTime != null)
+ {
+ this.txtPatrolTime.Text = string.Format("{0:yyyy-MM-dd}", routingInspection.PatrolTime);
+ }
+ if (routingInspection.PatrolResult != null)
+ {
+ this.rblPatrolResult.SelectedValue = routingInspection.PatrolResult.ToString();
+ }
+ this.txtControlMeasures.Text = routingInspection.ControlMeasures;
+ this.txtDealReason.Text = routingInspection.DealReason;
+ if (!string.IsNullOrEmpty(routingInspection.RiskManId))
+ {
+ this.drpRiskMan.SelectedValue = routingInspection.RiskManId;
+ }
+ }
+ else
+ {
+ this.drpPatrolMan.SelectedValue = this.CurrUser.UserId;
+ this.txtPatrolTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.drpRiskMan.SelectedValue = this.CurrUser.UserId;
+ }
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 附件上传
+ ///
+ /// 上传附件资源
+ ///
+ ///
+ ///
+ protected void btnAttachUrl_Click(object sender, EventArgs e)
+ {
+ string edit = "-1";
+ DateTime date = Funs.GetNewDateTimeOrNow(this.txtPatrolTime.Text.Trim());
+ string dateStr = date.Year.ToString() + date.Month.ToString();
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/RoutingInspection/" + dateStr + "&menuId={1}&type={2}", this.RoutingInspectionId, Const.ProjectRiskControlMenuId, edit)));
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx.designer.cs
new file mode 100644
index 00000000..a2a84364
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/RoutingInspectionView.aspx.designer.cs
@@ -0,0 +1,186 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.Hazard {
+
+
+ public partial class RoutingInspectionView {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtHazardCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtHazardCode;
+
+ ///
+ /// txtHazardItems 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtHazardItems;
+
+ ///
+ /// txtDefectsType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDefectsType;
+
+ ///
+ /// txtMayLeadAccidents 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtMayLeadAccidents;
+
+ ///
+ /// drpPatrolMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpPatrolMan;
+
+ ///
+ /// txtPatrolTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtPatrolTime;
+
+ ///
+ /// rblPatrolResult 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblPatrolResult;
+
+ ///
+ /// txtControlMeasures 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtControlMeasures;
+
+ ///
+ /// txtDealReason 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtDealReason;
+
+ ///
+ /// drpRiskMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpRiskMan;
+
+ ///
+ /// UploadAttach 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.LinkButton UploadAttach;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// hdCheckManId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdCheckManId;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/SetToolTipTime.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/SetToolTipTime.aspx.cs
index cb26977f..576c688c 100644
--- a/SGGL/FineUIPro.Web/HSSE/Hazard/SetToolTipTime.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/SetToolTipTime.aspx.cs
@@ -344,6 +344,7 @@ namespace FineUIPro.Web.HSSE.Hazard
BLL.Hazard_HazardSelectedItemService.UpdateHazardSelectedItem(hazardSelectedItem);
}
}
+
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ShowEnvironmentalItem.aspx b/SGGL/FineUIPro.Web/HSSE/Hazard/ShowEnvironmentalItem.aspx
index a2875b25..60d067b6 100644
--- a/SGGL/FineUIPro.Web/HSSE/Hazard/ShowEnvironmentalItem.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ShowEnvironmentalItem.aspx
@@ -46,7 +46,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx
index e3412471..f0c09354 100644
--- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx
@@ -17,12 +17,10 @@
-
-
-
-
-
+
+
+
+
@@ -81,6 +79,12 @@
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs
index ca9ca9d9..26e50219 100644
--- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs
@@ -112,6 +112,10 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{
this.ckType.SelectedValue = registration.CheckCycle;
}
+ if (!string.IsNullOrEmpty(registration.Risk_Level))
+ {
+ this.dpRiskLevel.SelectedValue = registration.Risk_Level;
+ }
if (!string.IsNullOrEmpty(registration.ResponsibleMan))
{
this.drpResponsibleMan.SelectedValue = registration.ResponsibleMan;
@@ -214,6 +218,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
register.ProblemTypes = "1"; //安全隐患问题
register.RegisterTypesId = this.drpRegisterTypes.SelectedValue;
register.CheckCycle = this.ckType.SelectedValue;
+ register.Risk_Level = this.dpRiskLevel.SelectedText;
register.IsEffective = "1";
if (this.drpUnit.SelectedValue != BLL.Const._Null)
{
diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs
index 12428760..cd318cc1 100644
--- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs
@@ -49,13 +49,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection {
protected global::FineUIPro.DropDownList drpRegisterTypes;
///
- /// ckType 控件。
+ /// dpRiskLevel 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.RadioButtonList ckType;
+ protected global::FineUIPro.DropDownList dpRiskLevel;
///
/// drpUnit 控件。
@@ -174,6 +174,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection {
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
+ ///
+ /// ckType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList ckType;
+
///
/// hdCheckManId 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx
index 9791b4f8..17ad7de4 100644
--- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx
@@ -60,6 +60,11 @@
+
+
+
+
+
private void BindGrid()
{
- string strSql = "SELECT EquipmentIn.EquipmentInId,"
+ string strSql = "SELECT EquipmentIn.EquipmentInId,EquipmentInItem.EquipmentInItemId,"
+ @"EquipmentIn.ProjectId,"
+ + @"EquipmentInItem.SpecialEquipmentId,EquipmentInItem.SizeModel,EquipmentInItem.OwnerCheck,EquipmentInItem.CertificateNum,EquipmentInItem.SafetyInspectionNum,EquipmentInItem.DrivingLicenseNum,EquipmentInItem.RegistrationNum,EquipmentInItem.OperationQualificationNum,EquipmentInItem.InsuranceNum,EquipmentInItem.CommercialInsuranceNum,EquipmentInItem.IsUsed,"
+ @"CodeRecords.Code AS EquipmentInCode,"
+ @"EquipmentIn.UnitId,"
+ @"EquipmentIn.CarNumber,"
@@ -73,33 +74,26 @@ namespace FineUIPro.Web.HSSE.InApproveManager
+ @"EquipmentIn.CompileMan,"
+ @"EquipmentIn.CompileDate,"
+ @"Unit.UnitName,"
- + @"Users.UserName,"
- + @"(CASE WHEN EquipmentIn.State = " + BLL.Const.State_0 + " OR EquipmentIn.State IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN EquipmentIn.State = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
- + @" FROM InApproveManager_EquipmentIn AS EquipmentIn "
+ + @"Users.UserName"
+ + @" FROM InApproveManager_EquipmentInItem AS EquipmentInItem "
+ + @" LEFT JOIN InApproveManager_EquipmentIn AS EquipmentIn ON EquipmentIn.EquipmentInId = EquipmentInItem.EquipmentInId "
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EquipmentIn.UnitId "
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON EquipmentIn.EquipmentInId = CodeRecords.DataId "
- + @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON EquipmentIn.EquipmentInId = FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
- + @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId"
+ @" LEFT JOIN Sys_User AS Users ON EquipmentIn.CompileMan = Users.UserId WHERE 1=1 ";
List listStr = new List();
strSql += " AND EquipmentIn.ProjectId = '" + this.ProjectId + "'";
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
{
-
+
strSql += " AND EquipmentIn.State = @States"; ///状态为已完成
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
}
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
- strSql += " AND EquipmentIn.UnitId = @UnitId"; ///状态为已完成
+ strSql += " AND EquipmentIn.UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
}
- if (!string.IsNullOrEmpty(this.txtEquipmentInCode.Text.Trim()))
- {
- strSql += " AND EquipmentIn.EquipmentInCode LIKE @EquipmentInCode";
- listStr.Add(new SqlParameter("@EquipmentInCode", "%" + this.txtEquipmentInCode.Text.Trim() + "%"));
- }
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -198,18 +192,62 @@ namespace FineUIPro.Web.HSSE.InApproveManager
}
string id = Grid1.SelectedRowID;
- var equipmentIn = BLL.EquipmentInService.GetEquipmentInById(id);
- if (equipmentIn != null)
+ var equipmentInItem = BLL.EquipmentInItemService.GetEquipmentInItemById(id);
+ if (equipmentInItem != null)
{
- if (this.btnMenuEdit.Hidden || equipmentIn.State == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
+ if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
{
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentInView.aspx?EquipmentInId={0}", id, "查看 - ")));
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentInView.aspx?EquipmentInId={0}", equipmentInItem.EquipmentInId, "查看 - ")));
}
else
{
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentInEdit.aspx?EquipmentInId={0}", id, "编辑 - ")));
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentInEdit.aspx?EquipmentInId={0}", equipmentInItem.EquipmentInId, "编辑 - ")));
}
- }
+ }
+ }
+ #endregion
+
+ #region 修改在用状态
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void btnMenuIsUsed_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string id = Grid1.SelectedRowID;
+
+ var equipmentInItem = BLL.EquipmentInItemService.GetEquipmentInItemById(id);
+ equipmentInItem.IsUsed = true;
+ BLL.EquipmentInItemService.UpdateEquipmentInItem(equipmentInItem);
+ BindGrid();
+ ShowNotify("设备状态修改成功!", MessageBoxIcon.Success);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void btnMenuIsNotUsed_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string id = Grid1.SelectedRowID;
+
+ var equipmentInItem = BLL.EquipmentInItemService.GetEquipmentInItemById(id);
+ equipmentInItem.IsUsed = false;
+ BLL.EquipmentInItemService.UpdateEquipmentInItem(equipmentInItem);
+ BindGrid();
+ ShowNotify("设备状态修改成功!", MessageBoxIcon.Success);
}
#endregion
@@ -226,15 +264,21 @@ namespace FineUIPro.Web.HSSE.InApproveManager
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
- var equipmentIn = BLL.EquipmentInService.GetEquipmentInById(rowID);
- if (equipmentIn != null)
+ var equipmentInItem = BLL.EquipmentInItemService.GetEquipmentInItemById(rowID);
+ if (equipmentInItem != null)
{
+ var equipmentIn = BLL.EquipmentInService.GetEquipmentInById(equipmentInItem.EquipmentInId);
+ string equipmentInId = equipmentInItem.EquipmentInId;
BLL.LogService.AddSys_Log(this.CurrUser, equipmentIn.EquipmentInCode, equipmentIn.EquipmentInId, BLL.Const.EquipmentInMenuId, BLL.Const.BtnDelete);
- BLL.EquipmentInItemService.DeleteEquipmentInItemByEquipmentInId(rowID);
- BLL.EquipmentInService.DeleteEquipmentInById(rowID);
+ BLL.EquipmentInItemService.DeleteEquipmentInItemById(rowID);
+ var exitItems = BLL.EquipmentInItemService.GetEquipmentInItemByEquipmentInId(equipmentInId);
+ if (exitItems.Count == 0)
+ {
+ BLL.EquipmentInService.DeleteEquipmentInById(equipmentInId);
+ }
}
}
-
+ Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ConstructionEquipment);
this.BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
@@ -263,6 +307,8 @@ namespace FineUIPro.Web.HSSE.InApproveManager
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
+ this.btnMenuIsUsed.Hidden = false;
+ this.btnMenuIsNotUsed.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
@@ -281,7 +327,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
- Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("特种设备机具入场报批" + filename, System.Text.Encoding.UTF8) + ".xls");
+ 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;
@@ -290,5 +336,26 @@ namespace FineUIPro.Web.HSSE.InApproveManager
Response.End();
}
#endregion
+
+ #region 格式化字符串
+ ///
+ /// 获取设备名称
+ ///
+ ///
+ ///
+ protected string ConvertEqiupment(object equipmentId)
+ {
+ string equipmentName = string.Empty;
+ if (equipmentId != null)
+ {
+ var specialEquipment = BLL.SpecialEquipmentService.GetSpecialEquipmentById(equipmentId.ToString());
+ if (specialEquipment != null)
+ {
+ equipmentName = specialEquipment.SpecialEquipmentName;
+ }
+ }
+ return equipmentName;
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentIn.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentIn.aspx.designer.cs
index e443425d..0e47490e 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentIn.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentIn.aspx.designer.cs
@@ -57,15 +57,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.Toolbar Toolbar2;
- ///
- /// txtEquipmentInCode 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtEquipmentInCode;
-
///
/// ToolbarFill1 控件。
///
@@ -94,13 +85,22 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
protected global::FineUIPro.Button btnOut;
///
- /// lblNumber 控件。
+ /// labNumber 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::System.Web.UI.WebControls.Label lblNumber;
+ protected global::System.Web.UI.WebControls.Label labNumber;
+
+ ///
+ /// lblSpecialEquipmentId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSpecialEquipmentId;
///
/// ToolbarSeparator1 控件。
@@ -165,6 +165,24 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.MenuButton btnMenuEdit;
+ ///
+ /// btnMenuIsUsed 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuIsUsed;
+
+ ///
+ /// btnMenuIsNotUsed 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuIsNotUsed;
+
///
/// btnMenuDelete 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInEdit.aspx b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInEdit.aspx
index c07d9fcc..ee3079c2 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInEdit.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInEdit.aspx
@@ -1,8 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentInEdit.aspx.cs"
Inherits="FineUIPro.Web.HSSE.InApproveManager.EquipmentInEdit" ValidateRequest="false" %>
-<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl"
- TagPrefix="uc1" %>
@@ -63,10 +61,10 @@
-
-
@@ -117,6 +115,9 @@
SortField="CommercialInsuranceNum" FieldType="String" HeaderText="商业险保单号" HeaderTextAlign="Center"
TextAlign="Left">
+
+
@@ -133,32 +134,22 @@
-
-
-
-
-
-
-
+
-
-
-
-
+
@@ -166,7 +157,7 @@
+ Width="700px" Height="540px">
private void InitDropDownList()
{
- UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.ProjectId, Const.ProjectUnitType_2, true);
+ UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
+
+ // UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.ProjectId, Const.ProjectUnitType_2, true);
+ // this.drpUnitId.Enabled = false;
}
///
@@ -250,27 +248,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
- ///
- /// 提交按钮
- ///
- ///
- ///
- protected void btnSubmit_Click(object sender, EventArgs e)
- {
- if (this.drpUnitId.SelectedValue == BLL.Const._Null)
- {
- Alert.ShowInTop("请选择单位名称!", MessageBoxIcon.Warning);
- return;
- }
- 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());
- }
-
///
/// 保存数据
///
@@ -290,11 +267,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
equipmentIn.SubProjectName = this.txtSubProjectName.Text.Trim();
equipmentIn.ContentDef = this.txtContentDef.Text.Trim();
equipmentIn.OtherDef = this.txtOtherDef.Text.Trim();
- equipmentIn.State = BLL.Const.State_0;
- if (type == BLL.Const.BtnSubmit)
- {
- equipmentIn.State = this.ctlAuditFlow.NextStep;
- }
+ equipmentIn.State = BLL.Const.State_2;
equipmentIn.CompileMan = this.CurrUser.UserId;
equipmentIn.CompileDate = DateTime.Now;
if (!string.IsNullOrEmpty(this.EquipmentInId))
@@ -310,8 +283,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
BLL.EquipmentInService.AddEquipmentIn(equipmentIn);
BLL.LogService.AddSys_Log(this.CurrUser, equipmentIn.EquipmentInCode, equipmentIn.EquipmentInId, BLL.Const.EquipmentInMenuId, BLL.Const.BtnAdd);
}
- ////保存流程审核数据
- this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.EquipmentInMenuId, this.EquipmentInId, (type == BLL.Const.BtnSubmit ? true : false), (equipmentIn.CarNumber + equipmentIn.SubProjectName), "../InApproveManager/EquipmentInView.aspx?EquipmentInId={0}");
+ Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ConstructionEquipment);
}
#endregion
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInEdit.aspx.designer.cs
index 30b045ab..fe5d4862 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInEdit.aspx.designer.cs
@@ -192,24 +192,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.DropDownList ddlPageSize;
- ///
- /// ContentPanel1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.ContentPanel ContentPanel1;
-
- ///
- /// ctlAuditFlow 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
-
///
/// Toolbar1 控件。
///
@@ -228,6 +210,15 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.Label lbTemp;
+ ///
+ /// hdEquipmentInId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdEquipmentInId;
+
///
/// btnAttachUrl 控件。
///
@@ -255,15 +246,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.Button btnSave;
- ///
- /// btnSubmit 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Button btnSubmit;
-
///
/// btnClose 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx
index 84a9a909..8802f4da 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx
@@ -82,16 +82,21 @@
+
+
+
+
+
-
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx.cs
index 48352b50..c595ffea 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx.cs
@@ -50,7 +50,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
btnClose.OnClientClick = ActiveWindow.GetHideReference();
///机具设备下拉框
BLL.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpSpecialEquipmentId, true, true);
-
+ this.cbIsUsed.Checked = true;
this.EquipmentInId = Request.Params["EquipmentInId"];
this.EquipmentInItemId = Request.Params["EquipmentInItemId"];
if (!string.IsNullOrEmpty(this.EquipmentInItemId))
@@ -72,6 +72,10 @@ namespace FineUIPro.Web.HSSE.InApproveManager
this.txtOperationQualificationNum.Text = equipmentInItem.OperationQualificationNum;
this.txtInsuranceNum.Text = equipmentInItem.InsuranceNum;
this.txtCommercialInsuranceNum.Text = equipmentInItem.CommercialInsuranceNum;
+ if (equipmentInItem.IsUsed != true)
+ {
+ this.cbIsUsed.Checked = false;
+ }
}
}
}
@@ -108,6 +112,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
equipmentInItem.OperationQualificationNum = this.txtOperationQualificationNum.Text.Trim();
equipmentInItem.InsuranceNum = this.txtInsuranceNum.Text.Trim();
equipmentInItem.CommercialInsuranceNum = this.txtCommercialInsuranceNum.Text.Trim();
+ equipmentInItem.IsUsed = Convert.ToBoolean(this.cbIsUsed.Checked);
if (!string.IsNullOrEmpty(this.EquipmentInItemId))
{
equipmentInItem.EquipmentInItemId = this.EquipmentInItemId;
@@ -119,6 +124,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
equipmentInItem.EquipmentInItemId = this.EquipmentInItemId;
BLL.EquipmentInItemService.AddEquipmentInItem(equipmentInItem);
}
+ 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/EquipmentInItemEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx.designer.cs
index 3b6456da..feacdfd3 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInItemEdit.aspx.designer.cs
@@ -129,6 +129,15 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.TextBox txtCommercialInsuranceNum;
+ ///
+ /// cbIsUsed 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox cbIsUsed;
+
///
/// Toolbar1 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx
index cb037a5a..dfd70f3b 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx
@@ -1,8 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentInView.aspx.cs"
Inherits="FineUIPro.Web.HSSE.InApproveManager.EquipmentInView" %>
-<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl"
- TagPrefix="uc1" %>
@@ -31,7 +29,7 @@
-
@@ -52,7 +50,7 @@
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="EquipmentInItemId"
AllowCellEditing="true" ClicksToEdit="2" DataIDField="EquipmentInItemId" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
- EnableTextSelection="True" Height="220px">
+ EnableTextSelection="True" ForceFit="true" >
@@ -60,7 +58,7 @@
-
@@ -111,6 +109,9 @@
SortField="CommercialInsuranceNum" FieldType="String" HeaderText="商业险保单号" HeaderTextAlign="Center"
TextAlign="Left">
+
+
@@ -124,14 +125,6 @@
-
-
-
-
-
-
-
@@ -143,7 +136,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx.cs
index 45a81098..0fef8905 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx.cs
@@ -63,9 +63,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager
}
BindGrid();
}
- ///初始化审核菜单
- this.ctlAuditFlow.MenuId = BLL.Const.EquipmentInMenuId;
- this.ctlAuditFlow.DataId = this.EquipmentInId;
}
}
@@ -148,7 +145,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
- Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("特种设备机具入场明细报批" + filename, System.Text.Encoding.UTF8) + ".xls");
+ 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;
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx.designer.cs
index 6f1bb378..22231a42 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/EquipmentInView.aspx.designer.cs
@@ -183,24 +183,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.DropDownList ddlPageSize;
- ///
- /// ContentPanel1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.ContentPanel ContentPanel1;
-
- ///
- /// ctlAuditFlow 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
-
///
/// Toolbar1 控件。
///
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/GeneralEquipmentInEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInEdit.aspx.cs
index 85fff3f9..cb132cf8 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInEdit.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using AspNet = System.Web.UI.WebControls;
+using System.Linq;
namespace FineUIPro.Web.HSSE.InApproveManager
{
@@ -85,11 +86,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager
////自动生成编码
this.txtGeneralEquipmentInCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.GeneralEquipmentInMenuId, this.ProjectId, this.CurrUser.UnitId);
}
- ///初始化审核菜单
- this.ctlAuditFlow.MenuId = BLL.Const.GeneralEquipmentInMenuId;
- this.ctlAuditFlow.DataId = this.GeneralEquipmentInId;
- this.ctlAuditFlow.ProjectId = this.ProjectId;
- this.ctlAuditFlow.UnitId = this.CurrUser.UnitId;
}
}
@@ -98,11 +94,13 @@ namespace FineUIPro.Web.HSSE.InApproveManager
///
private void InitDropDownList()
{
- this.drpUnitId.DataValueField = "UnitId";
- this.drpUnitId.DataTextField = "UnitName";
- this.drpUnitId.DataSource = BLL.UnitService.GetUnitByProjectIdList(this.ProjectId);
- this.drpUnitId.DataBind();
- Funs.FineUIPleaseSelect(this.drpUnitId);
+ UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
+
+ //this.drpUnitId.DataValueField = "UnitId";
+ //this.drpUnitId.DataTextField = "UnitName";
+ //this.drpUnitId.DataSource = BLL.UnitService.GetUnitByProjectIdList(this.ProjectId);
+ //this.drpUnitId.DataBind();
+ //Funs.FineUIPleaseSelect(this.drpUnitId);
}
///
@@ -253,27 +251,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
- ///
- /// 提交按钮
- ///
- ///
- ///
- protected void btnSubmit_Click(object sender, EventArgs e)
- {
- if (this.drpUnitId.SelectedValue == BLL.Const._Null)
- {
- Alert.ShowInTop("请选择单位名称!", MessageBoxIcon.Warning);
- return;
- }
- 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());
- }
-
///
/// 保存数据
///
@@ -293,11 +270,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
generalEquipmentIn.SubProjectName = this.txtSubProjectName.Text.Trim();
generalEquipmentIn.ContentDef = this.txtContentDef.Text.Trim();
generalEquipmentIn.OtherDef = this.txtOtherDef.Text.Trim();
- generalEquipmentIn.State = BLL.Const.State_0;
- if (type==BLL.Const.BtnSubmit)
- {
- generalEquipmentIn.State = this.ctlAuditFlow.NextStep;
- }
+ generalEquipmentIn.State = BLL.Const.State_2;
generalEquipmentIn.CompileMan = this.CurrUser.UserId;
generalEquipmentIn.CompileDate = DateTime.Now;
if (!string.IsNullOrEmpty(this.GeneralEquipmentInId))
@@ -313,8 +286,7 @@ namespace FineUIPro.Web.HSSE.InApproveManager
BLL.GeneralEquipmentInService.AddGeneralEquipmentIn(generalEquipmentIn);
BLL.LogService.AddSys_Log(this.CurrUser, generalEquipmentIn.GeneralEquipmentInCode, generalEquipmentIn.GeneralEquipmentInId,BLL.Const.GeneralEquipmentInMenuId,BLL.Const.BtnAdd);
}
- ////保存流程审核数据
- this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.GeneralEquipmentInMenuId, this.GeneralEquipmentInId, (type == BLL.Const.BtnSubmit ? true : false), (generalEquipmentIn.CarNumber + generalEquipmentIn.SubProjectName), "../InApproveManager/GeneralEquipmentInView.aspx?GeneralEquipmentInId={0}");
+ Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ConstructionEquipment);
}
#endregion
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInEdit.aspx.designer.cs
index 2c1bcebc..87afd87e 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInEdit.aspx.designer.cs
@@ -192,24 +192,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.DropDownList ddlPageSize;
- ///
- /// ContentPanel1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.ContentPanel ContentPanel1;
-
- ///
- /// ctlAuditFlow 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
-
///
/// Toolbar1 控件。
///
@@ -255,15 +237,6 @@ namespace FineUIPro.Web.HSSE.InApproveManager {
///
protected global::FineUIPro.Button btnSave;
- ///
- /// btnSubmit 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Button btnSubmit;
-
///
/// btnClose 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx
index 74b8e55e..73a39526 100644
--- a/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/InApproveManager/GeneralEquipmentInItemEdit.aspx
@@ -40,17 +40,22 @@
MaxLength="50" LabelWidth="150px">
-
+
+
+
+
+
+
-
-
+
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/License/LicenseManager.aspx b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx
index ee664221..cd922240 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx
@@ -25,10 +25,13 @@
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="220px" LabelWidth="50px"
LabelAlign="right">
-
-
+
+
@@ -36,12 +39,12 @@
-
+
-
-
@@ -65,12 +68,15 @@
-
-
+
+
-
+
+
+
@@ -83,10 +89,9 @@
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="结束时间"
HeaderTextAlign="Center" TextAlign="Center">
-
-
+
+
<%-- --%>
diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.cs
index 18baa579..8b21017a 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.cs
@@ -46,6 +46,7 @@ namespace FineUIPro.Web.HSSE.License
}
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
+ UnitTypeService.InitUnitTypeDropDownList(this.drpUnitType,true);
BLL.LicenseTypeService.InitLicenseTypeDropDownList(this.drpLicenseType, true);
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
@@ -68,7 +69,7 @@ namespace FineUIPro.Web.HSSE.License
///
private void BindGrid()
{
- string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,LicenseManager.ProfessionalName,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
+ string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.WorkStatesStr,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.IsHighRisk,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UnitTypeName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
+ @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
+ @" FROM View_License_LicenseManager AS LicenseManager "
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON LicenseManager.LicenseManagerId=CodeRecords.DataId "
@@ -77,13 +78,16 @@ namespace FineUIPro.Web.HSSE.License
+ @" WHERE 1=1 ";
List listStr = new List();
strSql += " AND LicenseManager.ProjectId = @ProjectId";
- listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
- {
+ {
+ listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
strSql += " AND LicenseManager.States = @States"; ///状态为已完成
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
}
-
+ else
+ {
+ listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
+ }
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
strSql += " AND LicenseManager.UnitId = @UnitId"; ///状态为已完成
@@ -114,6 +118,11 @@ namespace FineUIPro.Web.HSSE.License
strSql += " AND LicenseManager.UnitId = @UnitId2";
listStr.Add(new SqlParameter("@UnitId2", this.drpUnit.SelectedValue));
}
+ if (this.drpUnitType.SelectedValue!=BLL.Const._Null)
+ {
+ strSql += " AND LicenseManager.UnitTypeId = @UnitTypeId";
+ listStr.Add(new SqlParameter("@UnitTypeId", this.drpUnitType.SelectedValue));
+ }
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -217,7 +226,7 @@ namespace FineUIPro.Web.HSSE.License
var licenseManager = BLL.LicenseManagerService.GetLicenseManagerById(id);
if (licenseManager != null)
{
- if (this.btnMenuEdit.Hidden || licenseManager.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
+ if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LicenseManagerView.aspx?LicenseManagerId={0}", id, "查看 - ")));
}
@@ -249,7 +258,7 @@ namespace FineUIPro.Web.HSSE.License
BLL.LicenseManagerService.DeleteLicenseManagerById(rowID);
}
}
-
+ Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.WorkPermit);
this.BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.designer.cs
index 31957023..46633d25 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.HSSE.License {
-
-
- public partial class LicenseManager {
-
+namespace FineUIPro.Web.HSSE.License
+{
+
+
+ public partial class LicenseManager
+ {
+
///
/// form1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// Grid1 控件。
///
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Toolbar2 控件。
///
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar2;
-
+
///
/// drpLicenseType 控件。
///
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpLicenseType;
-
+
///
/// drpUnit 控件。
///
@@ -74,7 +76,16 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
+ ///
+ /// drpUnitType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitType;
+
///
/// txtStartDate 控件。
///
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtStartDate;
-
+
///
/// lblTo 控件。
///
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lblTo;
-
+
///
/// txtEndDate 控件。
///
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtEndDate;
-
+
///
/// ToolbarFill1 控件。
///
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
-
+
///
/// btnNew 控件。
///
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// btnOut 控件。
///
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnOut;
-
+
///
/// lblNumber 控件。
///
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label lblNumber;
-
+
///
/// ToolbarSeparator1 控件。
///
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
-
+
///
/// ToolbarText1 控件。
///
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlPageSize;
-
+
///
/// Window1 控件。
///
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// WindowAtt 控件。
///
@@ -182,7 +193,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window WindowAtt;
-
+
///
/// Menu1 控件。
///
@@ -191,7 +202,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Menu Menu1;
-
+
///
/// btnMenuEdit 控件。
///
@@ -200,7 +211,7 @@ namespace FineUIPro.Web.HSSE.License {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuEdit;
-
+
///
/// btnMenuDelete 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx
index fbacb2d1..4179c598 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx
@@ -1,8 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LicenseManagerEdit.aspx.cs"
Inherits="FineUIPro.Web.HSSE.License.LicenseManagerEdit" ValidateRequest="false" %>
-<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl"
- TagPrefix="uc1" %>
@@ -16,7 +14,7 @@
-
+
@@ -24,7 +22,7 @@
-
+
@@ -63,14 +61,6 @@
-
-
-
-
-
-
-
@@ -82,13 +72,10 @@
-
-
-
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx.cs
index 960de202..182042de 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx.cs
@@ -67,10 +67,6 @@ namespace FineUIPro.Web.HSSE.License
{
this.drpUnitId.SelectedValue = licenseManager.UnitId;
}
- if (!string.IsNullOrEmpty(licenseManager.CNProfessionalId))
- {
- this.drpCNProfessionalId.SelectedValue = licenseManager.CNProfessionalId;
- }
if (!string.IsNullOrEmpty(licenseManager.LicenseTypeId))
{
this.drpLicenseTypeId.SelectedValue = licenseManager.LicenseTypeId;
@@ -85,6 +81,10 @@ namespace FineUIPro.Web.HSSE.License
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", licenseManager.StartDate);
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", licenseManager.EndDate);
this.drpStates.SelectedValue = licenseManager.WorkStates;
+ if (licenseManager.IsHighRisk == true)
+ {
+ this.cbIsHighRisk.Checked = true;
+ }
}
}
else
@@ -102,12 +102,6 @@ namespace FineUIPro.Web.HSSE.License
////自动生成编码
this.txtLicenseManagerCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectLicenseManagerMenuId, this.ProjectId, this.CurrUser.UnitId);
}
-
- ///初始化审核菜单
- this.ctlAuditFlow.MenuId = BLL.Const.ProjectLicenseManagerMenuId;
- this.ctlAuditFlow.DataId = this.LicenseManagerId;
- this.ctlAuditFlow.ProjectId = this.ProjectId;
- this.ctlAuditFlow.UnitId = this.CurrUser.UnitId;
}
}
#endregion
@@ -118,7 +112,6 @@ namespace FineUIPro.Web.HSSE.License
private void InitDropDownList()
{
UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
- BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
LicenseTypeService.InitLicenseTypeDropDownList(this.drpLicenseTypeId, true);
UnitWorkService.InitUnitWorkDownList(this.drpWorkAreaId, this.ProjectId, false);
}
@@ -130,27 +123,11 @@ namespace FineUIPro.Web.HSSE.License
///
///
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());
- }
-
///
/// 保存数据
///
@@ -182,10 +159,7 @@ namespace FineUIPro.Web.HSSE.License
{
licenseManager.UnitId = this.drpUnitId.SelectedValue;
}
- if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null)
- {
- licenseManager.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
- }
+ licenseManager.IsHighRisk = Convert.ToBoolean(this.cbIsHighRisk.Checked);
licenseManager.ApplicantMan = this.txtApplicantMan.Text.Trim();
if (!string.IsNullOrEmpty(this.drpWorkAreaId.SelectedValue))
{
@@ -201,22 +175,14 @@ namespace FineUIPro.Web.HSSE.License
licenseManager.EndDate = Funs.GetNewDateTime(this.txtEndDate.Text);
licenseManager.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim());
licenseManager.LicenseManageContents = HttpUtility.HtmlEncode(this.txtLicenseManageContents.Text);
- licenseManager.States = BLL.Const.State_0;
+ licenseManager.States = BLL.Const.State_2;
if (!string.IsNullOrEmpty(this.drpStates.SelectedValue))
{
licenseManager.WorkStates = this.drpStates.SelectedValue;
}
else
{
- licenseManager.WorkStates =null;
- }
- if (type == BLL.Const.BtnSubmit)
- {
- licenseManager.States = this.ctlAuditFlow.NextStep;
- //if (licenseManager.States == Const.State_2 && licenseManager.WorkStates != Const.State_R)
- //{
- // licenseManager.WorkStates = Const.State_3;
- //}
+ licenseManager.WorkStates = null;
}
if (!string.IsNullOrEmpty(this.LicenseManagerId))
{
@@ -232,8 +198,7 @@ namespace FineUIPro.Web.HSSE.License
BLL.LicenseManagerService.AddLicenseManager(licenseManager);
BLL.LogService.AddSys_Log(this.CurrUser, licenseManager.LicenseManagerCode, licenseManager.LicenseManagerId, BLL.Const.ProjectLicenseManagerMenuId, BLL.Const.BtnAdd);
}
- ////保存流程审核数据
- this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectLicenseManagerMenuId, this.LicenseManagerId, (type == BLL.Const.BtnSubmit ? true : false), licenseManager.LicenseManageName, "../License/LicenseManagerView.aspx?LicenseManagerId={0}");
+ Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.WorkPermit);
}
#endregion
diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx.designer.cs
index 81dc818c..f5307ee9 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerEdit.aspx.designer.cs
@@ -58,13 +58,13 @@ namespace FineUIPro.Web.HSSE.License {
protected global::FineUIPro.DropDownList drpUnitId;
///
- /// drpCNProfessionalId 控件。
+ /// cbIsHighRisk 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.DropDownList drpCNProfessionalId;
+ protected global::FineUIPro.CheckBox cbIsHighRisk;
///
/// drpLicenseTypeId 控件。
@@ -138,24 +138,6 @@ namespace FineUIPro.Web.HSSE.License {
///
protected global::FineUIPro.HtmlEditor txtLicenseManageContents;
- ///
- /// ContentPanel1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.ContentPanel ContentPanel1;
-
- ///
- /// ctlAuditFlow 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
-
///
/// Toolbar1 控件。
///
@@ -192,15 +174,6 @@ namespace FineUIPro.Web.HSSE.License {
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
- ///
- /// btnSubmit 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Button btnSubmit;
-
///
/// btnSave 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx
index b7c20bee..36947079 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx
@@ -16,13 +16,14 @@
-
+
+
@@ -72,7 +73,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx.cs
index 5950586f..c2d0f3bc 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx.cs
@@ -48,6 +48,10 @@ namespace FineUIPro.Web.HSSE.License
this.txtUnitName.Text = unit.UnitName;
}
}
+ if (licenseManager.IsHighRisk == true)
+ {
+ this.cbIsHighRisk.Checked = true;
+ }
if (!string.IsNullOrEmpty(licenseManager.LicenseTypeId))
{
var licenseType = BLL.LicenseTypeService.GetLicenseTypeById(licenseManager.LicenseTypeId);
diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx.designer.cs
index 6b1c260b..6ab7e585 100644
--- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManagerView.aspx.designer.cs
@@ -57,6 +57,15 @@ namespace FineUIPro.Web.HSSE.License {
///
protected global::FineUIPro.TextBox txtUnitName;
+ ///
+ /// cbIsHighRisk 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox cbIsHighRisk;
+
///
/// txtLicenseTypeName 控件。
///
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/HSSE/SitePerson/PersonListEdit.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx
index eced8832..024c13f6 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx
@@ -109,6 +109,7 @@
+
protected global::FineUIPro.DatePicker txtOutTime;
+ ///
+ /// ckIsSafetyMonitoring 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox ckIsSafetyMonitoring;
+
///
/// Panel4 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx
index 8117806c..7acc56d3 100644
--- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx
@@ -1,5 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LargerHazardEdit.aspx.cs" ValidateRequest="false" Inherits="FineUIPro.Web.HSSE.Solution.LargerHazardEdit" %>
-<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
@@ -29,9 +28,24 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
@@ -64,13 +70,10 @@
-
-
-
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs
index bed9af40..44c25725 100644
--- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs
@@ -54,7 +54,8 @@ namespace FineUIPro.Web.HSSE.Solution
BLL.ConstValue.InitConstValueDropDownList(this.drpHazardType, ConstValue.Group_LargerHazardType, true);
//是否需要专家论证
BLL.ConstValue.InitConstValueRadioButtonList(this.rblIsArgument, ConstValue.Group_0001, "False");
-
+ //是否超危大工程
+ BLL.ConstValue.InitConstValueRadioButtonList(this.rblIsSuperLargerHazard, ConstValue.Group_0001, "False");
this.HazardId = Request.Params["HazardId"];
var largerHazard = BLL.LargerHazardService.GetLargerHazardByHazardId(this.HazardId);
if (largerHazard != null)
@@ -82,6 +83,19 @@ namespace FineUIPro.Web.HSSE.Solution
{
this.rblIsArgument.SelectedValue = "False";
}
+ if (largerHazard.IsSuperLargerHazard == true)
+ {
+ this.rblIsSuperLargerHazard.SelectedValue = "True";
+ }
+ else
+ {
+ this.rblIsSuperLargerHazard.SelectedValue = "False";
+ }
+ if (largerHazard.TrainPersonNum != null)
+ {
+ this.txtTrainPersonNum.Text = largerHazard.TrainPersonNum.ToString();
+ }
+ this.drpStates.SelectedValue = largerHazard.States;
this.txtRemark.Text = HttpUtility.HtmlDecode(largerHazard.Remark);
this.txtDescriptions.Text = largerHazard.Descriptions;
}
@@ -93,38 +107,10 @@ namespace FineUIPro.Web.HSSE.Solution
this.txtRemark.Text = HttpUtility.HtmlDecode("描述");
this.txtRecordTime.Text = string.Format("{0:yyyy-MM-dd}",DateTime.Now);
}
- ///初始化审核菜单
- this.ctlAuditFlow.MenuId = BLL.Const.ProjectLargerHazardListMenuId;
- this.ctlAuditFlow.DataId = this.HazardId;
- this.ctlAuditFlow.ProjectId = this.ProjectId;
- this.ctlAuditFlow.UnitId = this.CurrUser.UnitId;
}
}
#endregion
- #region 提交按钮
- ///
- /// 提交按钮
- ///
- ///
- ///
- protected void btnSubmit_Click(object sender, EventArgs e)
- {
- if (this.drpHazardType.SelectedValue == BLL.Const._Null)
- {
- ShowNotify("请选择类型!", MessageBoxIcon.Warning);
- return;
- }
- 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());
- }
- #endregion
-
#region 保存按钮
///
/// 保存按钮
@@ -156,17 +142,14 @@ namespace FineUIPro.Web.HSSE.Solution
Address = this.txtAddress.Text.Trim(),
ExpectedTime = Funs.GetNewDateTime(this.txtExpectedTime.Text.Trim()),
IsArgument = Convert.ToBoolean(this.rblIsArgument.SelectedValue),
+ IsSuperLargerHazard = Convert.ToBoolean(this.rblIsSuperLargerHazard.SelectedValue),
+ TrainPersonNum=Funs.GetNewIntOrZero(this.txtTrainPersonNum.Text.Trim()),
Remark = HttpUtility.HtmlEncode(this.txtRemark.Text.Trim()),
Descriptions = this.txtDescriptions.Text.Trim(),
RecordTime = Funs.GetNewDateTime(this.txtRecordTime.Text.Trim()),
ProjectId = this.ProjectId,
- ////单据状态
- States = BLL.Const.State_0
+ States = this.drpStates.SelectedValue,
};
- if (type == BLL.Const.BtnSubmit)
- {
- largerHazard.States = this.ctlAuditFlow.NextStep;
- }
if (!string.IsNullOrEmpty(this.HazardId))
{
largerHazard.HazardId = this.HazardId;
@@ -181,8 +164,8 @@ namespace FineUIPro.Web.HSSE.Solution
BLL.LargerHazardService.AddLargerHazard(largerHazard);
BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId, BLL.Const.ProjectLargerHazardListMenuId, BLL.Const.BtnAdd);
}
- ////保存流程审核数据
- this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectLargerHazardListMenuId, this.HazardId, (type == BLL.Const.BtnSubmit ? true : false), this.drpHazardType.SelectedItem.Text, "../Solution/LargerHazardView.aspx?HazardId={0}");
+ Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ProjectInformation);
+ Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.DangerousProject);
}
#region 附件上传
@@ -212,8 +195,7 @@ namespace FineUIPro.Web.HSSE.Solution
IsArgument = Convert.ToBoolean(this.rblIsArgument.SelectedValue),
Remark = HttpUtility.HtmlEncode(this.txtRemark.Text.Trim()),
ProjectId = this.ProjectId,
- ////单据状态
- States = BLL.Const.State_0,
+ States = this.drpStates.SelectedValue,
HazardId = SQLHelper.GetNewID(typeof(Model.Solution_LargerHazard)),
RecardMan = this.CurrUser.UserId,
RecordTime = Funs.GetNewDateTime(this.txtRecordTime.Text.Trim())
diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.designer.cs
index 7bf9fe62..0188caad 100644
--- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.designer.cs
@@ -93,6 +93,33 @@ namespace FineUIPro.Web.HSSE.Solution {
///
protected global::FineUIPro.TextBox txtAddress;
+ ///
+ /// rblIsSuperLargerHazard 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIsSuperLargerHazard;
+
+ ///
+ /// txtTrainPersonNum 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtTrainPersonNum;
+
+ ///
+ /// drpStates 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpStates;
+
///
/// txtDescriptions 控件。
///
@@ -111,24 +138,6 @@ namespace FineUIPro.Web.HSSE.Solution {
///
protected global::FineUIPro.HtmlEditor txtRemark;
- ///
- /// ContentPanel1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.ContentPanel ContentPanel1;
-
- ///
- /// ctlAuditFlow 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
-
///
/// Toolbar1 控件。
///
@@ -174,15 +183,6 @@ namespace FineUIPro.Web.HSSE.Solution {
///
protected global::FineUIPro.Button btnSave;
- ///
- /// btnSubmit 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Button btnSubmit;
-
///
/// btnClose 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx
index 6ec855c9..a24e663d 100644
--- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx
@@ -1,5 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LargerHazardList.aspx.cs" Inherits="FineUIPro.Web.HSSE.Solution.LargerHazardList" %>
+<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
@@ -7,115 +8,133 @@
危险性较大的工程清单
+
+
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..4f8b78c6
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs
@@ -0,0 +1,310 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using BLL;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.ZHGL.Emergency
+{
+ public partial class DrillRecordList : PageBase
+ {
+ #region 定义项
+ ///
+ /// 项目id
+ ///
+ public string UnitId
+ {
+ get
+ {
+ return (string)ViewState["UnitId"];
+ }
+ set
+ {
+ ViewState["UnitId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ ////权限按钮方法
+ this.GetButtonPower();
+ this.UnitId = BLL.Const.UnitId_CWCEC;
+
+ 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("| {0} | ", 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("| {0} | ", html);
+ }
+
+ sb.Append("
");
+ }
+
+ sb.Append("
");
+
+ 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..4f3d26af
--- /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 = BLL.UnitService.GetUnitByUnitId(BLL.Const.UnitId_CWCEC);
+ 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..5c416cbc
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs
@@ -0,0 +1,281 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+
+namespace FineUIPro.Web.ZHGL.Emergency
+{
+ public partial class EmergencyList : PageBase
+ {
+ ///
+ /// 项目id
+ ///
+ public string UnitId
+ {
+ get
+ {
+ return (string)ViewState["UnitId"];
+ }
+ set
+ {
+ ViewState["UnitId"] = value;
+ }
+ }
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ ////权限按钮方法
+ this.GetButtonPower();
+ this.UnitId = BLL.Const.UnitId_CWCEC;
+
+ //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..89d4783c
--- /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 = BLL.UnitService.GetUnitByUnitId(BLL.Const.UnitId_CWCEC);
+ 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/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..66f2f1ee
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.aspx.cs
@@ -0,0 +1,101 @@
+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..22805c21
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPerson.aspx.cs
@@ -0,0 +1,347 @@
+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, "按单位查询");
+ if (this.CurrUser.UnitId != null && this.CurrUser.UnitId != BLL.Const.UnitId_CWCEC)
+ {
+ 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() + "%"));
+ }
+ strSql += " AND CompanyBranchPerson.UnitId != @UnitId2";
+ listStr.Add(new SqlParameter("@UnitId2", BLL.Const.UnitId_CWCEC));
+ 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..89c8a304
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Person/BranchPersonEdit.aspx.cs
@@ -0,0 +1,206 @@
+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);
+ if (this.CurrUser.UnitId != null && this.CurrUser.UnitId != BLL.Const.UnitId_CWCEC)
+ {
+ 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..f615b993
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPerson.aspx.cs
@@ -0,0 +1,322 @@
+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() + "%"));
+ }
+ strSql += " AND CompanyBranchPerson.UnitId = @UnitId";
+ listStr.Add(new SqlParameter("@UnitId", BLL.Const.UnitId_CWCEC));
+ 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..74ba56e7
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonEdit.aspx.cs
@@ -0,0 +1,188 @@
+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;
+ }
+ newCompanyBranchPerson.UnitId = BLL.Const.UnitId_CWCEC;
+ 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..508987c8
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Person/CompanyPersonIn.aspx.cs
@@ -0,0 +1,457 @@
+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();
+ companyBranchPerson.UnitId = BLL.Const.UnitId_CWCEC;
+ 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/Person/ProjectPerson.aspx b/SGGL/FineUIPro.Web/ZHGL/Person/ProjectPerson.aspx
new file mode 100644
index 00000000..696cb3c8
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Person/ProjectPerson.aspx
@@ -0,0 +1,150 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectPerson.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Person.ProjectPerson" %>
+
+
+
+
+
+ 员工信息
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Person/ProjectPerson.aspx.cs
new file mode 100644
index 00000000..0de80c7a
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Person/ProjectPerson.aspx.cs
@@ -0,0 +1,182 @@
+using BLL;
+using System;
+using System.Linq;
+
+namespace FineUIPro.Web.ZHGL.Person
+{
+ public partial class ProjectPerson : PageBase
+ {
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ ProjectService.InitProjectDropDownList(this.drpProject, false);
+ Funs.FineUIPleaseSelect(drpProject, "按项目查询");
+ Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
+ WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false);
+ Funs.FineUIPleaseSelect(drpWorkPost, "按岗位查询");
+ if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ {
+ this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
+ this.drpProject.Readonly = true;
+ if (this.CurrUser.UnitId != BLL.Const.UnitId_CWCEC && !string.IsNullOrEmpty(this.CurrUser.UnitId))
+ {
+ UnitService.InitUnitDropDownList(this.drpUnit, this.drpProject.SelectedValue, false);
+ Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
+ this.drpUnit.SelectedValue = this.CurrUser.UnitId;
+ this.drpUnit.Readonly = true;
+ }
+ }
+ // 绑定表格
+ this.BindGrid();
+ }
+ }
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ var getData = PersonService.getListData(this.drpProject.SelectedValue, this.drpUnit.SelectedValue, this.drpWorkPost.SelectedValue,
+ this.txtPersonName.Text.Trim(), this.txtIdCard.Text.Trim(), this.rbIsPostStates.SelectedValue, Grid1);
+ Grid1.RecordCount = PersonService.count;
+ Grid1.DataSource = getData;
+ Grid1.DataBind();
+ }
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void btSearch_Click(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 分页
+ ///
+ /// 分页
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ 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();
+ }
+ #endregion
+
+ #region Grid编辑事件
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ 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.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ //if (this.btnMenuEdit.Hidden)
+ //{
+ SeePersonInfo(Grid1.SelectedRowID);
+ //}
+ //else
+ //{
+ // string sitepersonId = Funs.GetStrListByStr(Grid1.SelectedRowID, '#')[0];
+ // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectPersonEdit.aspx?SitePersonId={0}", sitepersonId, "编辑 - ")));
+ //}
+ }
+ #endregion
+
+ #region 查看人员详细信息
+ ///
+ /// 查看人员详细信息
+ ///
+ ///
+ ///
+ protected void btnSee_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInParent("请选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ SeePersonInfo(Grid1.SelectedRowID);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ private void SeePersonInfo(string PersonId)
+ {
+ //string sitepersonId = Funs.GetStrListByStr(Grid1.SelectedRowID, '#')[0];
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../HSSE/SitePerson/PersonListEdit.aspx?PersonId={0}&Company=Company", PersonId, "查看 - ")));
+ }
+ #endregion
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void drpProject_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.drpUnit.Items.Clear();
+ UnitService.InitUnitDropDownList(this.drpUnit, this.drpProject.SelectedValue, false);
+ Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
+ this.BindGrid();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ZHGL/Person/ProjectPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Person/ProjectPerson.aspx.designer.cs
new file mode 100644
index 00000000..9cd6c103
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ZHGL/Person/ProjectPerson.aspx.designer.cs
@@ -0,0 +1,195 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ZHGL.Person {
+
+
+ public partial class ProjectPerson {
+
+ ///
+ /// 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;
+
+ ///
+ /// drpProject 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpProject;
+
+ ///
+ /// drpUnit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnit;
+
+ ///
+ /// drpWorkPost 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpWorkPost;
+
+ ///
+ /// txtPersonName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtPersonName;
+
+ ///
+ /// txtIdCard 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIdCard;
+
+ ///
+ /// rbIsPostStates 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rbIsPostStates;
+
+ ///
+ /// btSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btSearch;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// 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;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnSee 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnSee;
+ }
+}
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 dcae285e..ec408d5c 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx
+++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx
@@ -1,6 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowRectifyItem.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Supervise.ShowRectifyItem" %>
+
@@ -41,17 +42,14 @@
-
+
-
- <%--
- --%>
@@ -79,7 +77,12 @@
+ OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs
index 511310b2..0e7ea68e 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/ShowRectifyItem.aspx.cs
@@ -26,7 +26,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
if (!IsPostBack)
{
- Funs.DropDownPageSize(this.ddlPageSize);
list = new List();
string lists = Request.Params["lists"];
list = Funs.GetStrListByStr(lists, ',');
@@ -101,37 +100,33 @@ namespace FineUIPro.Web.ZHGL.Supervise
///
private void BindGrid()
{
- var getData = (from x in Funs.DB.View_Technique_RectifyItem
- where x.RectifyId == this.trRectify.SelectedNode.NodeID && x.IsPass == true
- select x).ToList();
- if (list.Count() > 0 && getData.Count() > 0)
- {
- foreach (var item in getData)
- {
- if (list.Contains(item.RectifyItemId))
+ string strSql = "select * from View_Technique_RectifyItem where RectifyId=@RectifyId and IsPass=@IsPass";
+ SqlParameter[] parameter = new SqlParameter[]
{
- item.IsSelected = true;
- }
- }
- }
+ new SqlParameter("@RectifyId",this.trRectify.SelectedNode.NodeID),
+ new SqlParameter("@IsPass",true)
+ };
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
- DataTable tb = this.LINQToDataTable(getData);
- Grid1.RecordCount = tb.Rows.Count;
+ Grid1.RecordCount = tb.Rows.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
+
Grid1.DataSource = table;
Grid1.DataBind();
- //if (list.Count() > 0)
- //{
- // for (int i = 0; i < Grid1.Rows.Count; i++)
- // {
- // string id = Grid1.DataKeys[i][0].ToString();
- // if (list.Contains(id))
- // {
- // Grid1.Rows[i].Values[0]= "True";
- // }
- // }
- //}
+ if (list.Count() > 0)
+ {
+ 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))
+ {
+ checkField.SetCheckedState(i, true);
+ }
+ }
+ }
}
#endregion
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 0f6ab7f5..ac244cc3 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx
+++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectify.aspx
@@ -36,10 +36,10 @@
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
@@ -48,13 +48,13 @@
AutoPostBack="true" OnTextChanged="txtName_TextChanged">
-
-
-
@@ -73,10 +73,10 @@
-
-
@@ -111,7 +111,12 @@
+ OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
+
+
+
+
+
@@ -119,7 +124,7 @@
-
+
+
@@ -156,13 +159,13 @@
-
<%--
--%>
-
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.cs
index 3ef314e1..84b7fbcc 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.cs
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.ZHGL.Supervise
///
/// 定义集合
///
- //private static List superviseCheckRectifyItems = new List();
+ private static List superviseCheckRectifyItems = new List();
#endregion
#region 加载页面
@@ -69,19 +69,13 @@ namespace FineUIPro.Web.ZHGL.Supervise
{
this.txtIssueDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
}
- if (rectify.HandleState == "4") //已闭环
- {
- this.btnSave.Hidden = true;
- }
+
//this.btnUpdata.Hidden = true;
//if (rectify.IsFromMainUnit == true)
//{
// this.btnUpdata.Hidden = false;
//}
- var superviseCheckRectifyItems = (from x in Funs.DB.View_Supervise_SuperviseCheckRectifyItem
- where x.SuperviseCheckRectifyId == this.SuperviseCheckRectifyId
- orderby x.RectifyCode
- select x).ToList();
+ superviseCheckRectifyItems = (from x in Funs.DB.View_Supervise_SuperviseCheckRectifyItem where x.SuperviseCheckRectifyId == this.SuperviseCheckRectifyId orderby x.RectifyCode select x).ToList();
Grid1.DataSource = superviseCheckRectifyItems;
Grid1.DataBind();
}
@@ -112,16 +106,14 @@ namespace FineUIPro.Web.ZHGL.Supervise
///
private void Save(string type)
{
-
- var superviseCheckRectifyItems = jerqueSaveList();
- var superviseCheckRectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyById(Request.Params["SuperviseCheckRectifyId"]);
+ Model.Supervise_SuperviseCheckRectify superviseCheckRectify = BLL.SuperviseCheckRectifyService.GetSuperviseCheckRectifyById(Request.Params["SuperviseCheckRectifyId"]);
superviseCheckRectify.IssueMan = this.txtIssueMan.Text.Trim();
if (!string.IsNullOrEmpty(this.txtIssueDate.Text.Trim()))
{
superviseCheckRectify.IssueDate = Convert.ToDateTime(this.txtIssueDate.Text.Trim());
}
BLL.SuperviseCheckRectifyItemService.DeleteSuperviseCheckRectifyItemBySuperviseCheckRectifyId(Request.Params["SuperviseCheckRectifyId"]);
-
+ jerqueSaveList();
bool result = true;
bool resultAll = true;
foreach (var item in superviseCheckRectifyItems)
@@ -231,18 +223,14 @@ namespace FineUIPro.Web.ZHGL.Supervise
///
/// 保存集合
///
- private List jerqueSaveList()
+ private void jerqueSaveList()
{
- List newViewList = (from x in Funs.DB.View_Supervise_SuperviseCheckRectifyItem
- where x.SuperviseCheckRectifyId == this.SuperviseCheckRectifyId
- orderby x.RectifyCode
- select x).ToList();
JArray mergedData = Grid1.GetMergedData();
foreach (JObject mergedRow in mergedData)
{
string status = mergedRow.Value("status");
JObject values = mergedRow.Value("values");
- var item = newViewList.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == values.Value("SuperviseCheckRectifyItemId"));
+ var item = superviseCheckRectifyItems.FirstOrDefault(e => e.SuperviseCheckRectifyItemId == values.Value("SuperviseCheckRectifyItemId"));
item.ConfirmMan = values.Value("ConfirmMan");
item.ConfirmDate = Funs.GetNewDateTime(values.Value("ConfirmDate"));
item.OrderEndDate = Funs.GetNewDateTime(values.Value("OrderEndDate"));
@@ -252,8 +240,6 @@ namespace FineUIPro.Web.ZHGL.Supervise
item.VerifierName = values.Value("VerifierName");
item.VerifierDate = Funs.GetNewDateTime(values.Value("VerifierDate"));
}
-
- return newViewList;
}
#endregion
diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.designer.cs
index 14392e07..9794f00d 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckRectifyEdit.aspx.designer.cs
@@ -93,6 +93,15 @@ namespace FineUIPro.Web.ZHGL.Supervise {
///
protected global::FineUIPro.Label Label1;
+ ///
+ /// Label22 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label22;
+
///
/// lbSuperviseCheckRectifyCode 控件。
///
diff --git a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx
index 3485e832..2c6e53b5 100644
--- a/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx
+++ b/SGGL/FineUIPro.Web/ZHGL/Supervise/SuperviseCheckReport.aspx
@@ -30,7 +30,7 @@
SortDirection="DESC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" AllowFilters="true"
- OnFilterChange="Grid1_FilterChange" EnableTextSelection="True" ForceFit="true">
+ OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
@@ -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">
+
+
+
+
+
+
+
@@ -113,11 +122,11 @@
+ Width="1300px" Height="500px">
+ Height="600px" OnClose="Window2_Close1">