diff --git a/CreateModel.bat b/CreateModel.bat index 2b4344ba..9c26d270 100644 --- a/CreateModel.bat +++ b/CreateModel.bat @@ -27,7 +27,7 @@ REM -------------- @echo. @call "%VS100COMNTOOLS%"vsvars32.bat -SqlMetal /views /server:. /database:SGGLDB /code:%Model_ROOT%\Model.cs /namespace:Model +SqlMetal /views /server:.\sql2012 /database:SGGLDB /code:%Model_ROOT%\Model.cs /namespace:Model @ECHO pause diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2021-04-19-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-04-19-001.sql index f8c1f088..27f5bc8b 100644 --- a/DataBase/版本日志/已更新脚本/SGGLDB_V2021-04-19-001.sql +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-04-19-001.sql @@ -1,613 +1,3 @@ alter table JDGL_QuantityCompletion add StartDate datetime null alter table JDGL_QuantityCompletion add EndDate datetime null -GO - - -ALTER VIEW [dbo].[View_JDGL_QuantityCompletion] -AS -select qc.*,ql.DesignNum,ql.Name,ql.Unit, - CONVERT(FLOAT,(select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where QuantityListId=qc.QuantityListId and EndDate<=getdate())) as TotalPlanNum, - CONVERT(FLOAT,(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where QuantityListId=qc.QuantityListId and EndDate<=getdate())) as TotalRealNum, - CONVERT(NVARCHAR(10),((CAST(CASE ISNULL(qc.PlanNum,0) WHEN 0 THEN 0 - ELSE 100*ISNULL(qc.RealNum,0) / (1.0 *qc.PlanNum) END AS DECIMAL(9,2)))))+'%' - AS Rate, - CONVERT(NVARCHAR(10),((CAST(CASE (select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where QuantityListId=qc.QuantityListId and EndDate<=getdate()) WHEN 0 THEN 0 - ELSE 100*(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where QuantityListId=qc.QuantityListId and EndDate<=getdate()) / (1.0 *(select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where QuantityListId=qc.QuantityListId and EndDate<=getdate())) END AS DECIMAL(9,2)))))+'%' - AS TotalRate, - CONVERT(NVARCHAR(10),((CAST(CASE ISNULL(ql.DesignNum,0) WHEN 0 THEN 0 - ELSE 100*(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where QuantityListId=qc.QuantityListId and EndDate<=getdate()) / (1.0 *ql.DesignNum) END AS DECIMAL(9,2)))))+'%' - AS SumRate, - CONVERT(FLOAT,(select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where QuantityListId=qc.QuantityListId and Months= @startTime OR @startTime IS NULL) + AND (RecordDateTime <= @endTime OR @endTime IS NULL) + AND (P.UnitId = @unitId OR @unitId IS NULL) + AND (EmployName like ('%'+@name+'%') OR @name IS NULL) + ORDER BY RecordDateTime DESC + END +ELSE IF(@type='2') + BEGIN + SELECT NewID + ,ID + ,V.ProjectId + ,EmployName + ,DepartmentID + ,DepartName + ,AreaID + ,AreaName + ,EmployNO + ,CAST(V.CardID AS nvarchar(20)) AS CardID + ,RoleID + ,DateTimeRecord + ,RecordDes + ,InOrOut + ,P.UnitId,P.TeamGroupId + FROM t_d_facerecord V + LEFT JOIN SitePerson_Person AS P ON V.EmployNO=P.IdentityCard AND V.ProjectId=P.ProjectId + WHERE V.ProjectId = @ProjectId AND V.RoleID = '΢Ŷ' + AND (DateTimeRecord >= @startTime OR @startTime IS NULL) + AND (DateTimeRecord <= @endTime OR @endTime IS NULL) + AND (P.UnitId = @unitId OR @unitId IS NULL) + AND (EmployName like ('%'+@name+'%') OR @name IS NULL) + ORDER BY DateTimeRecord DESC + END +ELSE + BEGIN + SELECT NewID + ,ID + ,V.ProjectId + ,EmployName + ,DepartmentID + ,DepartName + ,AreaID + ,AreaName + ,EmployNO + ,CAST(V.CardID AS nvarchar(20)) AS CardID + ,RoleID + ,DateTimeRecord + ,RecordDes + ,InOrOut + ,P.UnitId,P.TeamGroupId + FROM t_d_facerecord V + LEFT JOIN SitePerson_Person AS P ON V.EmployNO=P.IdentityCard AND V.ProjectId=P.ProjectId + WHERE V.ProjectId = @ProjectId AND V.RoleID != '΢Ŷ' + AND (DateTimeRecord >= @startTime OR @startTime IS NULL) + AND (DateTimeRecord <= @endTime OR @endTime IS NULL) + AND (P.UnitId = @unitId OR @unitId IS NULL) + AND (EmployName like ('%'+@name+'%') OR @name IS NULL) + ORDER BY DateTimeRecord DESC + END +END +GO + + diff --git a/DataBase/菜单初始化脚本/0-9智慧党建(Menu_Party).sql b/DataBase/菜单初始化脚本/0-9智慧党建(Menu_Party).sql new file mode 100644 index 00000000..8a6ce6e4 --- /dev/null +++ b/DataBase/菜单初始化脚本/0-9智慧党建(Menu_Party).sql @@ -0,0 +1,219 @@ +delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_Party') +go +delete from Sys_Menu where MenuType='Menu_Party' +go + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('621E51AD-0444-4920-846A-BA14D2E1BEE4','党支部情况','',10,'0','Menu_Party',1,0,1) +GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('446A2702-522F-4A06-92A3-B8FAA0814A8B','基本情况','Party/BasicInformation.aspx',10,'621E51AD-0444-4920-846A-BA14D2E1BEE4','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F0FC8A66-BAAA-496C-8771-E3E8E0E9B8B7','446A2702-522F-4A06-92A3-B8FAA0814A8B','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7FC4BCB6-3F71-4A90-A5DF-E341A65B86A9','446A2702-522F-4A06-92A3-B8FAA0814A8B','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BA7A01B0-8DC2-47BA-8DE8-1FEFA98B87D6','446A2702-522F-4A06-92A3-B8FAA0814A8B','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('08557B3E-7CCC-4D05-A61E-2D77AF12DCF3','446A2702-522F-4A06-92A3-B8FAA0814A8B','保存',4) + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('8F93D7AB-A746-4279-A1F2-4EC1E0B45849','党员名册','Party/Partyer.aspx',20,'621E51AD-0444-4920-846A-BA14D2E1BEE4','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('EA315995-BD2D-4588-9F8B-354D8123C79E','8F93D7AB-A746-4279-A1F2-4EC1E0B45849','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B4534067-03A4-494E-B98B-541A88736CCE','8F93D7AB-A746-4279-A1F2-4EC1E0B45849','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7EB5E2D1-E754-4885-8CBC-B9D6CE489E07','8F93D7AB-A746-4279-A1F2-4EC1E0B45849','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2266E638-1BCA-40B6-9CA7-F02BFCC97DC9','8F93D7AB-A746-4279-A1F2-4EC1E0B45849','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('AA2BCCC3-24C7-4766-BF67-90F852E9922B','上年度党建工作总结','Party/LastWorkSummary.aspx',20,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3AE0B700-2018-4A56-ACC9-A9CE4BD76C02','AA2BCCC3-24C7-4766-BF67-90F852E9922B','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('10E013AD-E16B-4884-8F3C-3AD274DF8291','AA2BCCC3-24C7-4766-BF67-90F852E9922B','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2E7BBFB8-605C-41C7-A755-DDA098AAA3B1','AA2BCCC3-24C7-4766-BF67-90F852E9922B','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B16622BA-61CD-4F08-A82E-393E395060BE','AA2BCCC3-24C7-4766-BF67-90F852E9922B','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('5430460E-C495-4699-B039-B457587BBB60','本年度党建工作计划','Party/WorkPlan.aspx',30,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A030AED0-5A21-4A7B-A305-CF7CCE7F86F8','5430460E-C495-4699-B039-B457587BBB60','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('706CF868-23A5-47FC-BCFC-C667F16B5C7A','5430460E-C495-4699-B039-B457587BBB60','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('30DC54FD-6BB9-4BE9-BCEE-2C5C2CB01342','5430460E-C495-4699-B039-B457587BBB60','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('725EFF57-B19D-44B3-B538-CFEAC0889421','5430460E-C495-4699-B039-B457587BBB60','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('9AD721CB-65E8-4705-BA2C-E1CBEEB84A2C','三会一课','',40,'0','Menu_Party',1,0,1) +GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('89815103-D31B-4FD1-89FD-15F47F132C5C','党支部党员大会','Party/PartyCongress.aspx',10,'9AD721CB-65E8-4705-BA2C-E1CBEEB84A2C','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DF7C06EB-34EE-454A-AFE5-94DB3D7AA74B','89815103-D31B-4FD1-89FD-15F47F132C5C','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C1684943-5C40-415D-88F5-F5F4B8442D44','89815103-D31B-4FD1-89FD-15F47F132C5C','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2F39DF3B-E001-4A90-B26A-7763A3A7EB75','89815103-D31B-4FD1-89FD-15F47F132C5C','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('796BCFED-50E3-4057-B0C3-9BACE6E62FA4','89815103-D31B-4FD1-89FD-15F47F132C5C','保存',4) + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('5EEBBF63-CCE2-4D53-ACD4-B21C3A06B97D','党支部委员会','Party/PartyCommittee.aspx',20,'9AD721CB-65E8-4705-BA2C-E1CBEEB84A2C','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('65B3B1D6-9C22-45B2-A4CB-016AE4777600','5EEBBF63-CCE2-4D53-ACD4-B21C3A06B97D','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9A7C70C2-49B2-4BEE-AA12-20F158928139','5EEBBF63-CCE2-4D53-ACD4-B21C3A06B97D','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('0A74D165-35F2-470D-B6AB-6C8430856C24','5EEBBF63-CCE2-4D53-ACD4-B21C3A06B97D','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('518F7DE1-7F4D-4100-BFBD-0BEE25DCC755','5EEBBF63-CCE2-4D53-ACD4-B21C3A06B97D','保存',4) + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('FD3FE3DF-7CF4-4472-AC11-CB93FAA7044F','支部党小组会','Party/PartyMeeting.aspx',30,'9AD721CB-65E8-4705-BA2C-E1CBEEB84A2C','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3CCF0C62-20D3-4D5A-9400-599DA4494B72','FD3FE3DF-7CF4-4472-AC11-CB93FAA7044F','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('062B16D5-4509-42D2-9EBC-2A3730396B30','FD3FE3DF-7CF4-4472-AC11-CB93FAA7044F','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F919C6BE-65AF-4B08-B4B9-F59347C81929','FD3FE3DF-7CF4-4472-AC11-CB93FAA7044F','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('098B579D-4BFA-4C97-A156-C497BA46AE91','FD3FE3DF-7CF4-4472-AC11-CB93FAA7044F','保存',4) + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('5D85CB4D-357D-42AF-9A23-8BF908C9A92F','党课','Party/PartyLecture.aspx',40,'9AD721CB-65E8-4705-BA2C-E1CBEEB84A2C','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DCFC0671-D0D7-4972-A68A-5FAEA276548F','5D85CB4D-357D-42AF-9A23-8BF908C9A92F','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DB0D75B5-0F80-4637-B671-FC55879CE0B5','5D85CB4D-357D-42AF-9A23-8BF908C9A92F','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AE185AFC-28C0-43FC-9D68-E0FD53868DB7','5D85CB4D-357D-42AF-9A23-8BF908C9A92F','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F3B71A65-F0F4-4C42-B54D-245743FE2BC1','5D85CB4D-357D-42AF-9A23-8BF908C9A92F','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('FA19FBD7-6458-4A40-9D2E-9CBCBF5CDBDB','组织生活会','Party/OrganizingLife.aspx',50,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('86D56ED4-61BE-44FB-BAC9-E65B816BCBBD','FA19FBD7-6458-4A40-9D2E-9CBCBF5CDBDB','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F100F907-FD8D-4078-8451-CC1962756638','FA19FBD7-6458-4A40-9D2E-9CBCBF5CDBDB','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('57DC5990-F190-47BB-B125-A26F62C76608','FA19FBD7-6458-4A40-9D2E-9CBCBF5CDBDB','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F6D6F816-F799-4852-B274-A264DBC6915B','FA19FBD7-6458-4A40-9D2E-9CBCBF5CDBDB','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('B0942E8C-BE49-4D96-948B-FDE75C4E27A5','民主评议党员','Party/CommentPartyer.aspx',60,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B8DB5ECA-580F-4681-AE87-B0E42FFED85E','B0942E8C-BE49-4D96-948B-FDE75C4E27A5','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9F8219C0-B168-405C-9823-8F9A6A11D792','B0942E8C-BE49-4D96-948B-FDE75C4E27A5','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B8663CA1-48A9-4EA2-B711-CF9015C26B55','B0942E8C-BE49-4D96-948B-FDE75C4E27A5','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('FF6FD979-25A6-43E8-9976-868FB69D4D0C','B0942E8C-BE49-4D96-948B-FDE75C4E27A5','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('EAB1A564-00A4-4D7C-9655-7DD9741F46C9','集中学习','Party/FocusLearn.aspx',70,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('FA0300AC-87E6-4E08-B0E2-E46A1A623DAC','EAB1A564-00A4-4D7C-9655-7DD9741F46C9','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DD09117F-6D2A-48CF-819E-323E974F8691','EAB1A564-00A4-4D7C-9655-7DD9741F46C9','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E064507E-0FDD-4C24-8C36-A257DD8585A3','EAB1A564-00A4-4D7C-9655-7DD9741F46C9','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('10EE16BC-7B2F-465D-A8ED-1E20312CF176','EAB1A564-00A4-4D7C-9655-7DD9741F46C9','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('BF0340D1-6641-494B-80DC-DB3BDAA43D3E','主题党日活动','Party/ThemePartyDay.aspx',80,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('0DD71225-FC8C-45CF-BE84-651175C39E8B','BF0340D1-6641-494B-80DC-DB3BDAA43D3E','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3BBA2E23-EEB7-420F-8A23-79034332D098','BF0340D1-6641-494B-80DC-DB3BDAA43D3E','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2F6A1833-F396-4118-B125-F841BEB4546E','BF0340D1-6641-494B-80DC-DB3BDAA43D3E','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('45994494-A944-460C-80A6-43DA9276DBE9','BF0340D1-6641-494B-80DC-DB3BDAA43D3E','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A425EF77-1527-473D-85C8-C30DE914F488','党员先锋岗、示范岗','Party/PartyPioneerDemonstration.aspx',90,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('85A8117A-5405-4DEA-81A4-7EAD9052C6DA','A425EF77-1527-473D-85C8-C30DE914F488','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('75B0056D-E358-4213-BD1A-F864A65A67A0','A425EF77-1527-473D-85C8-C30DE914F488','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('227FFAEE-09F8-4540-BCCA-E8D164DE6C63','A425EF77-1527-473D-85C8-C30DE914F488','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8931FED2-E5F6-4A4F-8BF8-0CAB9BBB7F93','A425EF77-1527-473D-85C8-C30DE914F488','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('ECA84DF5-F900-4FD4-A78A-20C725C1483C','“两优一先”评选','Party/TwoOneGoodSelection.aspx',100,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A7B647A8-2007-4D67-ACF8-32BB70FDA629','ECA84DF5-F900-4FD4-A78A-20C725C1483C','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('577BE3EF-6DFE-4FA7-BC28-2B7A153CBED9','ECA84DF5-F900-4FD4-A78A-20C725C1483C','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('45ED1CF5-F9BC-4BDE-9162-BF0716711534','ECA84DF5-F900-4FD4-A78A-20C725C1483C','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('10C65739-43C0-4C10-95B7-B24DF024484C','ECA84DF5-F900-4FD4-A78A-20C725C1483C','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('066CE5C7-FACE-435F-8691-DEFC5A0E9E9B','党史学习教育','Party/PartyHistoryStudy.aspx',110,'0','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2F4CC340-B048-41AE-838A-4FC7691DE505','066CE5C7-FACE-435F-8691-DEFC5A0E9E9B','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('17FFB716-7C98-4ACE-8810-3A7FF8538DF1','066CE5C7-FACE-435F-8691-DEFC5A0E9E9B','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('60DDC348-3A71-4066-AE3E-4D10DDA66F5A','066CE5C7-FACE-435F-8691-DEFC5A0E9E9B','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('CE2AF6A2-5171-40D5-B99E-61D80EB0B381','066CE5C7-FACE-435F-8691-DEFC5A0E9E9B','保存',4) + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('A3A92342-3361-47CE-AF32-830C0FC9FB77','保障与支撑','',120,'0','Menu_Party',1,0,1) +GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('BA1DA76E-D5D2-4270-ACBF-6E134B8F5952','党组织工作经费使用','Party/PartyMoneyUse.aspx',10,'A3A92342-3361-47CE-AF32-830C0FC9FB77','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('5916E162-4685-4608-BAAD-93D7F65A51B7','BA1DA76E-D5D2-4270-ACBF-6E134B8F5952','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B73D00B1-8C48-46E9-BFBF-64EBDFE13B10','BA1DA76E-D5D2-4270-ACBF-6E134B8F5952','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('571D8DF7-4A0E-406B-86C9-6099F70D63D2','BA1DA76E-D5D2-4270-ACBF-6E134B8F5952','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('50374205-11A9-4CFA-9894-BA4C101FF411','BA1DA76E-D5D2-4270-ACBF-6E134B8F5952','保存',4) + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A4789F38-4431-4497-872E-7121BB53DC22','新闻宣传工作','Party/NewsPropagandaWork.aspx',20,'A3A92342-3361-47CE-AF32-830C0FC9FB77','Menu_Party',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AE13D08C-23EB-49E4-880F-B4C928728CC2','A4789F38-4431-4497-872E-7121BB53DC22','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C97AAC7D-9A9C-414A-AFF4-8AC5E19015E1','A4789F38-4431-4497-872E-7121BB53DC22','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AF641B19-884F-4CF3-AFB5-6A84C75AC9FE','A4789F38-4431-4497-872E-7121BB53DC22','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('877C362B-309E-4318-80D8-EEE7D0DA521C','A4789F38-4431-4497-872E-7121BB53DC22','保存',4) \ No newline at end of file diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 274b0652..5c502f56 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -553,6 +553,13 @@ + + + + + + + diff --git a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs index 0d9ffd02..b56593d8 100644 --- a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs @@ -305,7 +305,24 @@ namespace BLL db.SubmitChanges(); } } + public static List getInspectionManagementListByCNProfessionalIdAndDate(string projectId, string cNProfessionalId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) + { + List InspectionMangementList = (from x in Funs.DB.ProcessControl_InspectionManagement where x.ProjectId == projectId select x).ToList(); + if (!string.IsNullOrEmpty(cNProfessionalId) && cNProfessionalId != "0") + { + InspectionMangementList = (from x in InspectionMangementList where x.CNProfessionalId == cNProfessionalId select x).ToList(); + } + if (isOnceQualified == true) + { + InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == isOnceQualified select x).ToList(); + } + if (startDate != null && SoptDate != null) + { + InspectionMangementList = (from x in InspectionMangementList where x.InspectionDate >= startDate && x.InspectionDate <= SoptDate select x).ToList(); + } + return InspectionMangementList; + } public static List getInspectionManagementDetailListByCNProfessionalIdAndDate(string projectId, string cNProfessionalId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) { List InspectionMangementList = (from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.ProjectId == projectId select x).ToList(); diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 385ce152..feb51df1 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -677,7 +677,7 @@ namespace BLL /// public const string Menu_ZHGL = "Menu_ZHGL"; /// - /// 党建群团 + /// 智慧党建 /// public const string Menu_Party = "Menu_Party"; @@ -4314,6 +4314,43 @@ namespace BLL #endregion #endregion + #region 智慧党建 + /// + /// 上年度党建工作总结 + /// + public const string LastWorkSummaryMenuId = "AA2BCCC3-24C7-4766-BF67-90F852E9922B"; + + /// + /// 本年度党建工作计划 + /// + public const string WorkPlanMenuId = "5430460E-C495-4699-B039-B457587BBB60"; + + /// + /// 党支部党员大会 + /// + public const string PartyCongressMenuId = "89815103-D31B-4FD1-89FD-15F47F132C5C"; + + /// + /// 党支部委员会 + /// + public const string PartyCommitteeMenuId = "5EEBBF63-CCE2-4D53-ACD4-B21C3A06B97D"; + + /// + /// 支部党小组会 + /// + public const string PartyMeetingMenuId = "FD3FE3DF-7CF4-4472-AC11-CB93FAA7044F"; + + /// + /// 党课 + /// + public const string PartyLectureMenuId = "5D85CB4D-357D-42AF-9A23-8BF908C9A92F"; + + /// + /// 组织生活会 + /// + public const string OrganizingLifeMenuId = "FA19FBD7-6458-4A40-9D2E-9CBCBF5CDBDB"; + #endregion + #region 试车管理 /// /// 开车资料收集 diff --git a/SGGL/BLL/Common/ConstValue.cs b/SGGL/BLL/Common/ConstValue.cs index 6f2dc396..95efb213 100644 --- a/SGGL/BLL/Common/ConstValue.cs +++ b/SGGL/BLL/Common/ConstValue.cs @@ -96,6 +96,23 @@ namespace BLL return Funs.DB.Sys_Const.FirstOrDefault(e => e.ConstValue == constValue && e.GroupId == groupId); } + /// + /// 根据值、组ID获取常量字段信息 + /// + /// + /// + /// + public static string GetConstTextByConstValueAndGroupId(string constValue, string groupId) + { + string text = string.Empty; + var c = Funs.DB.Sys_Const.FirstOrDefault(e => e.ConstValue == constValue && e.GroupId == groupId); + if (c != null) + { + text = c.ConstText; + } + return text; + } + #region 根据多ID得到名称字符串 /// /// 根据多ID得到名称字符串 @@ -174,7 +191,7 @@ namespace BLL /// /// 季度 组id /// - public const string Group_0011 = "0011"; + public const string Group_0011 = "0011"; /// /// 事故类型 组id /// @@ -202,11 +219,11 @@ namespace BLL /// /// 资源上传审核状态:未审核,未通过,已通过 /// - public const string Group_UploadResources = "UploadResources"; + public const string Group_UploadResources = "UploadResources"; /// /// 图表类型:组id /// - public const string Group_ChartType = "ChartType"; + public const string Group_ChartType = "ChartType"; /// /// 资源上报状态:组id /// @@ -230,7 +247,7 @@ namespace BLL /// /// -菜单类型:组id /// - public const string Group_MenuType = "MenuType"; + public const string Group_MenuType = "MenuType"; /// /// -项目单位类型:组id /// diff --git a/SGGL/BLL/DoorServer/InOutService.cs b/SGGL/BLL/DoorServer/InOutService.cs index 4bb07064..fb6b0fad 100644 --- a/SGGL/BLL/DoorServer/InOutService.cs +++ b/SGGL/BLL/DoorServer/InOutService.cs @@ -25,11 +25,11 @@ namespace BLL /// 定义变量 /// private static IQueryable qq = from x in db.T_d_facerecord - orderby x.DateTimeRecord descending + orderby x.DateTimeRecord descending select x; - private static IQueryable qq1 = from x in db.T_d_validcardevent - orderby x.RecordDateTime descending - select x; + private static IQueryable qq1= from x in db.T_d_validcardevent + orderby x.RecordDateTime descending + select x; /// /// 获取分页列表 @@ -42,7 +42,7 @@ namespace BLL if (type == "1") { IQueryable q1 = qq1.Where(x => x.ProjectId == projectId); - + if (!string.IsNullOrEmpty(startDate)) { q1 = q1.Where(e => e.RecordDateTime >= Funs.GetNewDateTime(startDate)); @@ -55,8 +55,8 @@ namespace BLL { q1 = from x in q1 join y in db.SitePerson_Person on x.IDCardNo equals y.IdentityCard - where y.UnitId == unitId - select x; + where y.UnitId == unitId + select x; } if (!string.IsNullOrEmpty(name)) { @@ -75,14 +75,14 @@ namespace BLL x.ProjectId, x.EmployName, x.DepartmentID, - DepartName = x.DepartmentName, + DepartName=x.DepartmentName, x.AreaID, x.AreaName, x.EmployNO, - CardID = x.CardNO, - DateTimeRecord = x.RecordDateTime, - RecordDes = x.RecordAll, - InOrOut = (x.InOrOut == 2 ? "出门" : "进门"), + CardID=x.CardNO, + DateTimeRecord=x.RecordDateTime, + RecordDes=x.RecordAll, + InOrOut=(x.InOrOut ==2? "出门" : "进门"), }; } else @@ -107,9 +107,9 @@ namespace BLL if (!string.IsNullOrEmpty(unitId)) { q = from x in q - join y in db.SitePerson_Person on x.EmployNO equals y.IdentityCard - where y.UnitId == unitId - select x; + join y in db.SitePerson_Person on x.EmployNO equals y.IdentityCard + where y.UnitId == unitId + select x; } if (!string.IsNullOrEmpty(name)) { @@ -135,7 +135,7 @@ namespace BLL x.CardID, x.DateTimeRecord, x.RecordDes, - x.InOrOut, + x.InOrOut, }; } } diff --git a/SGGL/BLL/Party/LastWorkSummaryService.cs b/SGGL/BLL/Party/LastWorkSummaryService.cs new file mode 100644 index 00000000..ce8ddae7 --- /dev/null +++ b/SGGL/BLL/Party/LastWorkSummaryService.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 上年度党建工作总结 + /// + public class LastWorkSummaryService + { + /// + /// 根据主键获取上年度党建工作总结 + /// + /// + /// + public static Model.Party_LastWorkSummary GetLastWorkSummaryById(string lastWorkSummaryId) + { + return Funs.DB.Party_LastWorkSummary.FirstOrDefault(e => e.LastWorkSummaryId == lastWorkSummaryId); + } + + /// + /// 添加上年度党建工作总结 + /// + /// + public static void AddLastWorkSummary(Model.Party_LastWorkSummary lastWorkSummary) + { + Model.Party_LastWorkSummary newLastWorkSummary = new Model.Party_LastWorkSummary + { + LastWorkSummaryId = lastWorkSummary.LastWorkSummaryId, + Year = lastWorkSummary.Year, + CompileMan = lastWorkSummary.CompileMan, + CompileDate = lastWorkSummary.CompileDate + }; + Funs.DB.Party_LastWorkSummary.InsertOnSubmit(newLastWorkSummary); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改上年度党建工作总结 + /// + /// + public static void UpdateLastWorkSummary(Model.Party_LastWorkSummary lastWorkSummary) + { + Model.Party_LastWorkSummary newLastWorkSummary = Funs.DB.Party_LastWorkSummary.FirstOrDefault(e => e.LastWorkSummaryId == lastWorkSummary.LastWorkSummaryId); + if (newLastWorkSummary != null) + { + newLastWorkSummary.CompileMan = lastWorkSummary.CompileMan; + newLastWorkSummary.CompileDate = lastWorkSummary.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除上年度党建工作总结 + /// + /// + public static void DeleteLastWorkSummaryById(string lastWorkSummaryId) + { + Model.Party_LastWorkSummary lastWorkSummary = Funs.DB.Party_LastWorkSummary.FirstOrDefault(e => e.LastWorkSummaryId == lastWorkSummaryId); + if (lastWorkSummary != null) + { + CommonService.DeleteAttachFileById(lastWorkSummaryId); + Funs.DB.Party_LastWorkSummary.DeleteOnSubmit(lastWorkSummary); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/Party/OrganizingLifeService.cs b/SGGL/BLL/Party/OrganizingLifeService.cs new file mode 100644 index 00000000..e981ce59 --- /dev/null +++ b/SGGL/BLL/Party/OrganizingLifeService.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 组织生活会 + /// + public class OrganizingLifeService + { + /// + /// 根据主键获取组织生活会 + /// + /// + /// + public static Model.Party_OrganizingLife GetOrganizingLifeById(string organizingLifeId) + { + return Funs.DB.Party_OrganizingLife.FirstOrDefault(e => e.OrganizingLifeId == organizingLifeId); + } + + /// + /// 添加组织生活会 + /// + /// + public static void AddOrganizingLife(Model.Party_OrganizingLife organizingLife) + { + Model.Party_OrganizingLife newOrganizingLife = new Model.Party_OrganizingLife + { + OrganizingLifeId = organizingLife.OrganizingLifeId, + Year = organizingLife.Year, + Quarter = organizingLife.Quarter, + Theme = organizingLife.Theme, + OrganizingLifeDate = organizingLife.OrganizingLifeDate, + Partyers = organizingLife.Partyers, + CompileMan = organizingLife.CompileMan, + CompileDate = organizingLife.CompileDate + }; + Funs.DB.Party_OrganizingLife.InsertOnSubmit(newOrganizingLife); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改组织生活会 + /// + /// + public static void UpdateOrganizingLife(Model.Party_OrganizingLife organizingLife) + { + Model.Party_OrganizingLife newOrganizingLife = Funs.DB.Party_OrganizingLife.FirstOrDefault(e => e.OrganizingLifeId == organizingLife.OrganizingLifeId); + if (newOrganizingLife != null) + { + newOrganizingLife.Quarter = organizingLife.Quarter; + newOrganizingLife.Theme = organizingLife.Theme; + newOrganizingLife.OrganizingLifeDate = organizingLife.OrganizingLifeDate; + newOrganizingLife.Partyers = organizingLife.Partyers; + newOrganizingLife.CompileMan = organizingLife.CompileMan; + newOrganizingLife.CompileDate = organizingLife.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除组织生活会 + /// + /// + public static void DeleteOrganizingLifeById(string organizingLifeId) + { + Model.Party_OrganizingLife organizingLife = Funs.DB.Party_OrganizingLife.FirstOrDefault(e => e.OrganizingLifeId == organizingLifeId); + if (organizingLife != null) + { + CommonService.DeleteAttachFileById(organizingLifeId); + Funs.DB.Party_OrganizingLife.DeleteOnSubmit(organizingLife); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/Party/PartyCommitteeService.cs b/SGGL/BLL/Party/PartyCommitteeService.cs new file mode 100644 index 00000000..b8d70e16 --- /dev/null +++ b/SGGL/BLL/Party/PartyCommitteeService.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 党支部委员会 + /// + public class PartyCommitteeService + { + /// + /// 根据主键获取党支部委员会 + /// + /// + /// + public static Model.Party_PartyCommittee GetPartyCommitteeById(string partyCommitteeId) + { + return Funs.DB.Party_PartyCommittee.FirstOrDefault(e => e.PartyCommitteeId == partyCommitteeId); + } + + /// + /// 添加党支部委员会 + /// + /// + public static void AddPartyCommittee(Model.Party_PartyCommittee partyCommittee) + { + Model.Party_PartyCommittee newPartyCommittee = new Model.Party_PartyCommittee + { + PartyCommitteeId = partyCommittee.PartyCommitteeId, + Year = partyCommittee.Year, + Month = partyCommittee.Month, + CompileMan = partyCommittee.CompileMan, + CompileDate = partyCommittee.CompileDate + }; + Funs.DB.Party_PartyCommittee.InsertOnSubmit(newPartyCommittee); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改党支部委员会 + /// + /// + public static void UpdatePartyCommittee(Model.Party_PartyCommittee partyCommittee) + { + Model.Party_PartyCommittee newPartyCommittee = Funs.DB.Party_PartyCommittee.FirstOrDefault(e => e.PartyCommitteeId == partyCommittee.PartyCommitteeId); + if (newPartyCommittee != null) + { + newPartyCommittee.Month = partyCommittee.Month; + newPartyCommittee.CompileMan = partyCommittee.CompileMan; + newPartyCommittee.CompileDate = partyCommittee.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除党支部委员会 + /// + /// + public static void DeletePartyCommitteeById(string partyCommitteeId) + { + Model.Party_PartyCommittee partyCommittee = Funs.DB.Party_PartyCommittee.FirstOrDefault(e => e.PartyCommitteeId == partyCommitteeId); + if (partyCommittee != null) + { + CommonService.DeleteAttachFileById(partyCommitteeId); + CommonService.DeleteAttachFileById(partyCommitteeId + "2"); + CommonService.DeleteAttachFileById(partyCommitteeId + "3"); + Funs.DB.Party_PartyCommittee.DeleteOnSubmit(partyCommittee); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/Party/PartyCongressService.cs b/SGGL/BLL/Party/PartyCongressService.cs new file mode 100644 index 00000000..a7e40df3 --- /dev/null +++ b/SGGL/BLL/Party/PartyCongressService.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 党支部党员大会 + /// + public class PartyCongressService + { + /// + /// 根据主键获取党支部党员大会 + /// + /// + /// + public static Model.Party_PartyCongress GetPartyCongressById(string partyCongressId) + { + return Funs.DB.Party_PartyCongress.FirstOrDefault(e => e.PartyCongressId == partyCongressId); + } + + /// + /// 添加党支部党员大会 + /// + /// + public static void AddPartyCongress(Model.Party_PartyCongress partyCongress) + { + Model.Party_PartyCongress newPartyCongress = new Model.Party_PartyCongress + { + PartyCongressId = partyCongress.PartyCongressId, + Year = partyCongress.Year, + Quarter = partyCongress.Quarter, + CompileMan = partyCongress.CompileMan, + CompileDate = partyCongress.CompileDate + }; + Funs.DB.Party_PartyCongress.InsertOnSubmit(newPartyCongress); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改党支部党员大会 + /// + /// + public static void UpdatePartyCongress(Model.Party_PartyCongress partyCongress) + { + Model.Party_PartyCongress newPartyCongress = Funs.DB.Party_PartyCongress.FirstOrDefault(e => e.PartyCongressId == partyCongress.PartyCongressId); + if (newPartyCongress != null) + { + newPartyCongress.Quarter = partyCongress.Quarter; + newPartyCongress.CompileMan = partyCongress.CompileMan; + newPartyCongress.CompileDate = partyCongress.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除党支部党员大会 + /// + /// + public static void DeletePartyCongressById(string partyCongressId) + { + Model.Party_PartyCongress partyCongress = Funs.DB.Party_PartyCongress.FirstOrDefault(e => e.PartyCongressId == partyCongressId); + if (partyCongress != null) + { + CommonService.DeleteAttachFileById(partyCongressId); + CommonService.DeleteAttachFileById(partyCongressId + "2"); + CommonService.DeleteAttachFileById(partyCongressId + "3"); + Funs.DB.Party_PartyCongress.DeleteOnSubmit(partyCongress); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/Party/PartyLectureService.cs b/SGGL/BLL/Party/PartyLectureService.cs new file mode 100644 index 00000000..c136ffb8 --- /dev/null +++ b/SGGL/BLL/Party/PartyLectureService.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 党课 + /// + public class PartyLectureService + { + /// + /// 根据主键获取党课 + /// + /// + /// + public static Model.Party_PartyLecture GetPartyLectureById(string partyLectureId) + { + return Funs.DB.Party_PartyLecture.FirstOrDefault(e => e.PartyLectureId == partyLectureId); + } + + /// + /// 添加党课 + /// + /// + public static void AddPartyLecture(Model.Party_PartyLecture partyLecture) + { + Model.Party_PartyLecture newPartyLecture = new Model.Party_PartyLecture + { + PartyLectureId = partyLecture.PartyLectureId, + Year = partyLecture.Year, + Quarter = partyLecture.Quarter, + CompileMan = partyLecture.CompileMan, + CompileDate = partyLecture.CompileDate + }; + Funs.DB.Party_PartyLecture.InsertOnSubmit(newPartyLecture); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改党课 + /// + /// + public static void UpdatePartyLecture(Model.Party_PartyLecture partyLecture) + { + Model.Party_PartyLecture newPartyLecture = Funs.DB.Party_PartyLecture.FirstOrDefault(e => e.PartyLectureId == partyLecture.PartyLectureId); + if (newPartyLecture != null) + { + newPartyLecture.Quarter = partyLecture.Quarter; + newPartyLecture.CompileMan = partyLecture.CompileMan; + newPartyLecture.CompileDate = partyLecture.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除党课 + /// + /// + public static void DeletePartyLectureById(string partyLectureId) + { + Model.Party_PartyLecture partyLecture = Funs.DB.Party_PartyLecture.FirstOrDefault(e => e.PartyLectureId == partyLectureId); + if (partyLecture != null) + { + CommonService.DeleteAttachFileById(partyLectureId); + CommonService.DeleteAttachFileById(partyLectureId + "2"); + CommonService.DeleteAttachFileById(partyLectureId + "3"); + Funs.DB.Party_PartyLecture.DeleteOnSubmit(partyLecture); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/Party/PartyMeetingService.cs b/SGGL/BLL/Party/PartyMeetingService.cs new file mode 100644 index 00000000..9eece685 --- /dev/null +++ b/SGGL/BLL/Party/PartyMeetingService.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 支部党小组会 + /// + public class PartyMeetingService + { + /// + /// 根据主键获取支部党小组会 + /// + /// + /// + public static Model.Party_PartyMeeting GetPartyMeetingById(string partyMeetingId) + { + return Funs.DB.Party_PartyMeeting.FirstOrDefault(e => e.PartyMeetingId == partyMeetingId); + } + + /// + /// 添加支部党小组会 + /// + /// + public static void AddPartyMeeting(Model.Party_PartyMeeting partyMeeting) + { + Model.Party_PartyMeeting newPartyMeeting = new Model.Party_PartyMeeting + { + PartyMeetingId = partyMeeting.PartyMeetingId, + Year = partyMeeting.Year, + Month = partyMeeting.Month, + CompileMan = partyMeeting.CompileMan, + CompileDate = partyMeeting.CompileDate + }; + Funs.DB.Party_PartyMeeting.InsertOnSubmit(newPartyMeeting); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改支部党小组会 + /// + /// + public static void UpdatePartyMeeting(Model.Party_PartyMeeting partyMeeting) + { + Model.Party_PartyMeeting newPartyMeeting = Funs.DB.Party_PartyMeeting.FirstOrDefault(e => e.PartyMeetingId == partyMeeting.PartyMeetingId); + if (newPartyMeeting != null) + { + newPartyMeeting.Month = partyMeeting.Month; + newPartyMeeting.CompileMan = partyMeeting.CompileMan; + newPartyMeeting.CompileDate = partyMeeting.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除支部党小组会 + /// + /// + public static void DeletePartyMeetingById(string partyMeetingId) + { + Model.Party_PartyMeeting partyMeeting = Funs.DB.Party_PartyMeeting.FirstOrDefault(e => e.PartyMeetingId == partyMeetingId); + if (partyMeeting != null) + { + CommonService.DeleteAttachFileById(partyMeetingId); + CommonService.DeleteAttachFileById(partyMeetingId + "2"); + CommonService.DeleteAttachFileById(partyMeetingId + "3"); + Funs.DB.Party_PartyMeeting.DeleteOnSubmit(partyMeeting); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/Party/WorkPlanService.cs b/SGGL/BLL/Party/WorkPlanService.cs new file mode 100644 index 00000000..f46889de --- /dev/null +++ b/SGGL/BLL/Party/WorkPlanService.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 本年度党建工作计划 + /// + public class WorkPlanService + { + /// + /// 根据主键获取本年度党建工作计划 + /// + /// + /// + public static Model.Party_WorkPlan GetWorkPlanById(string workPlanId) + { + return Funs.DB.Party_WorkPlan.FirstOrDefault(e => e.WorkPlanId == workPlanId); + } + + /// + /// 添加本年度党建工作计划 + /// + /// + public static void AddWorkPlan(Model.Party_WorkPlan workPlan) + { + Model.Party_WorkPlan newWorkPlan = new Model.Party_WorkPlan + { + WorkPlanId = workPlan.WorkPlanId, + Year = workPlan.Year, + CompileMan = workPlan.CompileMan, + CompileDate = workPlan.CompileDate + }; + Funs.DB.Party_WorkPlan.InsertOnSubmit(newWorkPlan); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改本年度党建工作计划 + /// + /// + public static void UpdateWorkPlan(Model.Party_WorkPlan workPlan) + { + Model.Party_WorkPlan newWorkPlan = Funs.DB.Party_WorkPlan.FirstOrDefault(e => e.WorkPlanId == workPlan.WorkPlanId); + if (newWorkPlan != null) + { + newWorkPlan.CompileMan = workPlan.CompileMan; + newWorkPlan.CompileDate = workPlan.CompileDate; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除本年度党建工作计划 + /// + /// + public static void DeleteWorkPlanById(string workPlanId) + { + Model.Party_WorkPlan workPlan = Funs.DB.Party_WorkPlan.FirstOrDefault(e => e.WorkPlanId == workPlanId); + if (workPlan != null) + { + CommonService.DeleteAttachFileById(workPlanId); + Funs.DB.Party_WorkPlan.DeleteOnSubmit(workPlan); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs index 13c4a606..787ad630 100644 --- a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs @@ -345,6 +345,7 @@ namespace FineUIPro.Web.AttachFile { try { + string savedName = item.Value("savedName"); string folder = item.Value("folder"); string xnUrl = AttachPath + "\\" + savedName; diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs index 3ee04b53..b76527ed 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs @@ -56,7 +56,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl EndDate = Convert.ToDateTime(this.txtEndTime.Text); } //统计所给时间段的全部数量 - List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, string.Empty, StartDate, DateTime.Now, false); + List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, string.Empty, StartDate, DateTime.Now, false); List compileMans = managementListSunNumber.Select(x => x.CompileMan).Distinct().ToList(); foreach (var item in compileMans) { diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx index 639be792..9ced3062 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx @@ -22,6 +22,12 @@ + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs index c89b3391..71bfdb56 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs @@ -9,11 +9,12 @@ using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.ProcessControl { - public partial class InspectionManagementStatistics :PageBase + public partial class InspectionManagementStatistics : PageBase { public DateTime StartDate; public DateTime NextDate; public DateTime NewDate; + public DateTime EndDate; public int SunNumber; protected void Page_Load(object sender, EventArgs e) @@ -31,63 +32,123 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// public void BindGvInspectionManagement(string cNProfessionalId) { - List StatisticsList = new List(); - Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); - StartDate = Convert.ToDateTime(project.StartDate); - for (int i = 0; i < i + 1; i++) + if (string.IsNullOrEmpty(this.txtStartTime.Text.Trim()) && string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) //未选择日期,统计项目开始起的每月数据 { - Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics(); - if (i == 0) + List StatisticsList = new List(); + Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); + StartDate = Convert.ToDateTime(project.StartDate); + for (int i = 0; i < i + 1; i++) { - NextDate = Convert.ToDateTime(DateTime.Parse(StartDate.ToString("yyyy-MM-dd")).AddMonths(1).ToShortDateString()); - NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25"); - Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 "; - if (StartDate.Day < 25) + Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics(); + if (i == 0) { - if (DateTime.Now < NewDate) + NextDate = Convert.ToDateTime(DateTime.Parse(StartDate.ToString("yyyy-MM-dd")).AddMonths(1).ToShortDateString()); + NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25"); + Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 "; + if (StartDate.Day < 25) { - //统计所给时间段的全部数量 - List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false); - //统计所给时间段的合格数量 - List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); - - Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now); - Statistics.SunNumber = managementListSunNumber.Count(); - Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); - if (managementListSunNumber.Count() != 0)//被除数不能为零 + if (DateTime.Now < NewDate) { - Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 + //统计所给时间段的全部数量 + List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false); + //统计所给时间段的合格数量 + List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); + + Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now); + Statistics.SunNumber = managementListSunNumber.Count(); + Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); + if (managementListSunNumber.Count() != 0)//被除数不能为零 + { + Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + Statistics.OneStatistics = "0%"; + } + StatisticsList.Add(Statistics); + break; } else { - Statistics.OneStatistics = "0%"; + NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25"); + //统计所给事件段的全部数量 + List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); + + Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate); + Statistics.SunNumber = managementListSunNumber.Count(); + Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); + if (managementListSunNumber.Count() != 0)//被除数不能为零 + { + Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + Statistics.OneStatistics = "0%"; + } } - StatisticsList.Add(Statistics); - break; } else { - NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25"); - //统计所给事件段的全部数量 - List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false); - //统计所给事件段的合格数量 - List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); - - Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate); - Statistics.SunNumber = managementListSunNumber.Count(); - Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); - if (managementListSunNumber.Count() != 0)//被除数不能为零 + if (DateTime.Now < NewDate) { - Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 + //统计所给事件段的全部数量 + List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false); + //统计所给事件段的合格数量 + List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); + + Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now); + Statistics.SunNumber = managementListSunNumber.Count(); + Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); + if (managementListSunNumber.Count() != 0)//被除数不能为零 + { + Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + Statistics.OneStatistics = "0%"; + } + + StatisticsList.Add(Statistics); + break; } else { - Statistics.OneStatistics = "0%"; + //统计所给事件段的全部数量 + List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); + Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate); + Statistics.SunNumber = managementListSunNumber.Count(); + Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); + if (managementListSunNumber.Count() != 0)//被除数不能为零 + { + Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + Statistics.OneStatistics = "0%"; + } } } } else { + + if (StartDate.Day > 25) + { + Statistics.CheckDate = NewDate.Year + "-" + NewDate.Month + "-" + (NewDate.Day + 1) + " 至 "; + StartDate = Convert.ToDateTime(NewDate.Year + "-" + NewDate.Month + "-" + (NewDate.Day + 1));//获取上一记录的结束日期加一天为本次记录的开始日期 + } + else + { + Statistics.CheckDate = NextDate.Year + "-" + NextDate.Month + "-" + (NextDate.Day + 1) + " 至 "; + StartDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-" + (NextDate.Day + 1));//获取上一记录的结束日期加一天为本次记录的开始日期 + } + + NextDate = Convert.ToDateTime(DateTime.Parse(NextDate.ToString("yyyy-MM-dd")).AddMonths(1).ToShortDateString()); + NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25"); if (DateTime.Now < NewDate) { //统计所给事件段的全部数量 @@ -129,95 +190,72 @@ namespace FineUIPro.Web.CQMS.ProcessControl } } } + StatisticsList.Add(Statistics); + } + Model.InspectionManagementStatistics StatisticsLast = new Model.InspectionManagementStatistics(); + StatisticsLast.CheckDate = "合计"; + int sum1 = 0; + int sum2 = 0; + foreach (Model.InspectionManagementStatistics item in StatisticsList) + { + sum1 += item.OneStatisticsSunNumber; + sum2 += item.SunNumber; + + } + StatisticsLast.OneStatisticsSunNumber = sum1; + StatisticsLast.SunNumber = sum2; + if (sum2 != 0)//被除数不能为零 + { + StatisticsLast.OneStatistics = Math.Round((double)sum1 / (double)sum2 * 100, 2) + "%";//保留两位小数、后四舍五入 } else { - - if (StartDate.Day > 25) - { - Statistics.CheckDate = NewDate.Year + "-" + NewDate.Month + "-" + (NewDate.Day + 1) + " 至 "; - StartDate = Convert.ToDateTime(NewDate.Year + "-" + NewDate.Month + "-" + (NewDate.Day + 1));//获取上一记录的结束日期加一天为本次记录的开始日期 - } - else - { - Statistics.CheckDate = NextDate.Year + "-" + NextDate.Month + "-" + (NextDate.Day + 1) + " 至 "; - StartDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-" + (NextDate.Day + 1));//获取上一记录的结束日期加一天为本次记录的开始日期 - } - - NextDate = Convert.ToDateTime(DateTime.Parse(NextDate.ToString("yyyy-MM-dd")).AddMonths(1).ToShortDateString()); - NewDate = Convert.ToDateTime(NextDate.Year + "-" + NextDate.Month + "-25"); - if (DateTime.Now < NewDate) - { - //统计所给事件段的全部数量 - List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false); - //统计所给事件段的合格数量 - List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); - - Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now); - Statistics.SunNumber = managementListSunNumber.Count(); - Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); - if (managementListSunNumber.Count() != 0)//被除数不能为零 - { - Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 - } - else - { - Statistics.OneStatistics = "0%"; - } - - StatisticsList.Add(Statistics); - break; - } - else - { - //统计所给事件段的全部数量 - List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false); - //统计所给事件段的合格数量 - List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); - Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate); - Statistics.SunNumber = managementListSunNumber.Count(); - Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); - if (managementListSunNumber.Count() != 0)//被除数不能为零 - { - Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 - } - else - { - Statistics.OneStatistics = "0%"; - } - } + StatisticsLast.OneStatistics = "0%"; + } + StatisticsList.Add(StatisticsLast); + this.Grid1.DataSource = StatisticsList; + this.Grid1.DataBind(); + } + else //选择日期,统计对应时间段内的数据 + { + List StatisticsList = new List(); + Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); + StartDate = Convert.ToDateTime(project.StartDate); + EndDate = DateTime.Now; + if (!string.IsNullOrEmpty(this.txtStartTime.Text.Trim())) + { + StartDate = Convert.ToDateTime(this.txtStartTime.Text.Trim()); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) + { + EndDate = Convert.ToDateTime(this.txtEndTime.Text.Trim()); + } + Model.InspectionManagementStatistics Statistics = new Model.InspectionManagementStatistics(); + //统计所给时间段的全部数量 + List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false); + //统计所给时间段的合格数量 + List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true); + Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 " + string.Format("{0:yyyy-MM-dd}", EndDate); + Statistics.SunNumber = managementListSunNumber.Count(); + Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); + if (managementListSunNumber.Count() != 0)//被除数不能为零 + { + Statistics.OneStatistics = Math.Round((double)managementListOneNumber.Count() / (double)managementListSunNumber.Count() * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + Statistics.OneStatistics = "0%"; } StatisticsList.Add(Statistics); + this.Grid1.DataSource = StatisticsList; + this.Grid1.DataBind(); } - Model.InspectionManagementStatistics StatisticsLast = new Model.InspectionManagementStatistics(); - StatisticsLast.CheckDate = "合计"; - int sum1 = 0; - int sum2 = 0; - foreach (Model.InspectionManagementStatistics item in StatisticsList) - { - sum1 += item.OneStatisticsSunNumber; - sum2 += item.SunNumber; - - } - StatisticsLast.OneStatisticsSunNumber = sum1; - StatisticsLast.SunNumber = sum2; - if (sum2 != 0)//被除数不能为零 - { - StatisticsLast.OneStatistics = Math.Round((double)sum1 / (double)sum2 * 100, 2) + "%";//保留两位小数、后四舍五入 - } - else - { - StatisticsLast.OneStatistics = "0%"; - } - StatisticsList.Add(StatisticsLast); - this.Grid1.DataSource = StatisticsList; - this.Grid1.DataBind(); } #endregion protected void btnSearch_Click(object sender, EventArgs e) { - if (this.drpCNProfessional.SelectedValue !=BLL.Const._Null) + if (this.drpCNProfessional.SelectedValue != BLL.Const._Null) { BindGvInspectionManagement(this.drpCNProfessional.SelectedValue); } diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs index 43ace4f5..1414cd3e 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.designer.cs @@ -66,6 +66,24 @@ namespace FineUIPro.Web.CQMS.ProcessControl { /// protected global::FineUIPro.DropDownList drpCNProfessional; + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + /// /// btnSearch 控件。 /// diff --git a/SGGL/FineUIPro.Web/Door/InOutList.aspx b/SGGL/FineUIPro.Web/Door/InOutList.aspx index a7aa4b1a..cf14233a 100644 --- a/SGGL/FineUIPro.Web/Door/InOutList.aspx +++ b/SGGL/FineUIPro.Web/Door/InOutList.aspx @@ -6,8 +6,7 @@ 现场出入记录 @@ -141,22 +152,24 @@ <%--头部 开始--%> -
-
-
-
-
中国五环工程有限公司智慧施工管理信息系统(公司级)
+
+
+
+
+
+
+ 中国五环工程有限公司智慧施工管理信息系统(公司级)
- +
-
- <%----%> -
-
-
+
+ <%----%> +
+
+
  • @@ -164,12 +177,12 @@ EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
  • -
  • +
  • - <%--
  • + <%--
  • @@ -188,7 +201,7 @@ -
  • +
  • @@ -202,8 +215,8 @@
-
-
+
+
- +
@@ -245,6 +258,16 @@ + + + + + + + + + + <%--自定义展开折叠工具图标--%> + <%-- + + + + + --%> @@ -644,18 +673,18 @@ var $item = $('.f-tabstrip-header') $item.attr('style', ";display:none !important;") $(".bgbtn,.bgbtntop").removeClass("activeClick") - }); + }); - $(".bgbtn,.bgbtntop").click(function () { - // 切换下tab样式 - var $this = $(this) - if (!$this.hasClass('activeClick')) { - if ($this.hasClass('bgbtn')) { - $(".bgbtn").removeClass('activeClick') - } else { - $(".bgbtntop").removeClass('activeClick') - } - $this.addClass('activeClick') + $(".bgbtn,.bgbtntop").click(function () { + // 切换下tab样式 + var $this = $(this) + if (!$this.hasClass('activeClick')) { + if ($this.hasClass('bgbtn')) { + $(".bgbtn").removeClass('activeClick') + } else { + $(".bgbtntop").removeClass('activeClick') + } + $this.addClass('activeClick') } }); diff --git a/SGGL/FineUIPro.Web/index.aspx.cs b/SGGL/FineUIPro.Web/index.aspx.cs index d3f14c76..dac4d00d 100644 --- a/SGGL/FineUIPro.Web/index.aspx.cs +++ b/SGGL/FineUIPro.Web/index.aspx.cs @@ -49,7 +49,7 @@ namespace FineUIPro.Web return; } //////////////////////////////////////////////////////////////// - + if (!IsPostBack) { this.CurrUser.LoginProjectId = null; @@ -63,7 +63,7 @@ namespace FineUIPro.Web /// ///
/// - private Tree InitTreeMenu() + private Tree InitTreeMenu(string type) { Tree treeMenu = new Tree { @@ -90,7 +90,14 @@ namespace FineUIPro.Web leftPanel.CssClass = "minimodeinside"; } } - + if (type != Const.Menu_Party) + { + this.tbYear.Hidden = true; + } + else + { + this.tbYear.Hidden = false; + } leftPanel.Items.Add(treeMenu); XmlDocument doc = XmlDataSource1.GetXmlDocument(); ResolveXmlDocument(doc); @@ -359,7 +366,7 @@ namespace FineUIPro.Web } } #endregion - + /// /// 功能模块切换方法 /// @@ -399,7 +406,7 @@ namespace FineUIPro.Web } UserService.UpdateLastUserInfo(this.CurrUser.UserId, type, true, string.Empty); - InitTreeMenu(); + InitTreeMenu(type); } protected void btnHome_Click(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/index.aspx.designer.cs b/SGGL/FineUIPro.Web/index.aspx.designer.cs index 4de587c3..adac6b54 100644 --- a/SGGL/FineUIPro.Web/index.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/index.aspx.designer.cs @@ -174,6 +174,24 @@ namespace FineUIPro.Web { /// protected global::FineUIPro.Panel leftPanel; + /// + /// tbYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar tbYear; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + /// /// leftPanelToolCollapse 控件。 /// diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 2d4c0833..cb3062ca 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1190,6 +1190,27 @@ namespace Model partial void InsertOccupationHealth_PhysicalExamination(OccupationHealth_PhysicalExamination instance); partial void UpdateOccupationHealth_PhysicalExamination(OccupationHealth_PhysicalExamination instance); partial void DeleteOccupationHealth_PhysicalExamination(OccupationHealth_PhysicalExamination instance); + partial void InsertParty_LastWorkSummary(Party_LastWorkSummary instance); + partial void UpdateParty_LastWorkSummary(Party_LastWorkSummary instance); + partial void DeleteParty_LastWorkSummary(Party_LastWorkSummary instance); + partial void InsertParty_OrganizingLife(Party_OrganizingLife instance); + partial void UpdateParty_OrganizingLife(Party_OrganizingLife instance); + partial void DeleteParty_OrganizingLife(Party_OrganizingLife instance); + partial void InsertParty_PartyCommittee(Party_PartyCommittee instance); + partial void UpdateParty_PartyCommittee(Party_PartyCommittee instance); + partial void DeleteParty_PartyCommittee(Party_PartyCommittee instance); + partial void InsertParty_PartyCongress(Party_PartyCongress instance); + partial void UpdateParty_PartyCongress(Party_PartyCongress instance); + partial void DeleteParty_PartyCongress(Party_PartyCongress instance); + partial void InsertParty_PartyLecture(Party_PartyLecture instance); + partial void UpdateParty_PartyLecture(Party_PartyLecture instance); + partial void DeleteParty_PartyLecture(Party_PartyLecture instance); + partial void InsertParty_PartyMeeting(Party_PartyMeeting instance); + partial void UpdateParty_PartyMeeting(Party_PartyMeeting instance); + partial void DeleteParty_PartyMeeting(Party_PartyMeeting instance); + partial void InsertParty_WorkPlan(Party_WorkPlan instance); + partial void UpdateParty_WorkPlan(Party_WorkPlan instance); + partial void DeleteParty_WorkPlan(Party_WorkPlan instance); partial void InsertPerfomance_PerfomanceRecord(Perfomance_PerfomanceRecord instance); partial void UpdatePerfomance_PerfomanceRecord(Perfomance_PerfomanceRecord instance); partial void DeletePerfomance_PerfomanceRecord(Perfomance_PerfomanceRecord instance); @@ -5052,6 +5073,62 @@ namespace Model } } + public System.Data.Linq.Table Party_LastWorkSummary + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Party_OrganizingLife + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Party_PartyCommittee + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Party_PartyCongress + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Party_PartyLecture + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Party_PartyMeeting + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Party_WorkPlan + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Perfomance_PerfomanceRecord { get @@ -192189,6 +192266,1423 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Party_LastWorkSummary")] + public partial class Party_LastWorkSummary : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _LastWorkSummaryId; + + private System.Nullable _Year; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnLastWorkSummaryIdChanging(string value); + partial void OnLastWorkSummaryIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Party_LastWorkSummary() + { + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastWorkSummaryId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string LastWorkSummaryId + { + get + { + return this._LastWorkSummaryId; + } + set + { + if ((this._LastWorkSummaryId != value)) + { + this.OnLastWorkSummaryIdChanging(value); + this.SendPropertyChanging(); + this._LastWorkSummaryId = value; + this.SendPropertyChanged("LastWorkSummaryId"); + this.OnLastWorkSummaryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_LastWorkSummary_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Party_LastWorkSummary.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Party_LastWorkSummary.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Party_OrganizingLife")] + public partial class Party_OrganizingLife : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _OrganizingLifeId; + + private System.Nullable _Year; + + private System.Nullable _Quarter; + + private string _Theme; + + private System.Nullable _OrganizingLifeDate; + + private string _Partyers; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnOrganizingLifeIdChanging(string value); + partial void OnOrganizingLifeIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnQuarterChanging(System.Nullable value); + partial void OnQuarterChanged(); + partial void OnThemeChanging(string value); + partial void OnThemeChanged(); + partial void OnOrganizingLifeDateChanging(System.Nullable value); + partial void OnOrganizingLifeDateChanged(); + partial void OnPartyersChanging(string value); + partial void OnPartyersChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Party_OrganizingLife() + { + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrganizingLifeId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string OrganizingLifeId + { + get + { + return this._OrganizingLifeId; + } + set + { + if ((this._OrganizingLifeId != value)) + { + this.OnOrganizingLifeIdChanging(value); + this.SendPropertyChanging(); + this._OrganizingLifeId = value; + this.SendPropertyChanged("OrganizingLifeId"); + this.OnOrganizingLifeIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this.OnQuarterChanging(value); + this.SendPropertyChanging(); + this._Quarter = value; + this.SendPropertyChanged("Quarter"); + this.OnQuarterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Theme", DbType="NVarChar(200)")] + public string Theme + { + get + { + return this._Theme; + } + set + { + if ((this._Theme != value)) + { + this.OnThemeChanging(value); + this.SendPropertyChanging(); + this._Theme = value; + this.SendPropertyChanged("Theme"); + this.OnThemeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrganizingLifeDate", DbType="DateTime")] + public System.Nullable OrganizingLifeDate + { + get + { + return this._OrganizingLifeDate; + } + set + { + if ((this._OrganizingLifeDate != value)) + { + this.OnOrganizingLifeDateChanging(value); + this.SendPropertyChanging(); + this._OrganizingLifeDate = value; + this.SendPropertyChanged("OrganizingLifeDate"); + this.OnOrganizingLifeDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Partyers", DbType="NVarChar(2000)")] + public string Partyers + { + get + { + return this._Partyers; + } + set + { + if ((this._Partyers != value)) + { + this.OnPartyersChanging(value); + this.SendPropertyChanging(); + this._Partyers = value; + this.SendPropertyChanged("Partyers"); + this.OnPartyersChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_OrganizingLife_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Party_OrganizingLife.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Party_OrganizingLife.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Party_PartyCommittee")] + public partial class Party_PartyCommittee : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _PartyCommitteeId; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnPartyCommitteeIdChanging(string value); + partial void OnPartyCommitteeIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnMonthChanging(System.Nullable value); + partial void OnMonthChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Party_PartyCommittee() + { + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PartyCommitteeId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string PartyCommitteeId + { + get + { + return this._PartyCommitteeId; + } + set + { + if ((this._PartyCommitteeId != value)) + { + this.OnPartyCommitteeIdChanging(value); + this.SendPropertyChanging(); + this._PartyCommitteeId = value; + this.SendPropertyChanged("PartyCommitteeId"); + this.OnPartyCommitteeIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this.OnMonthChanging(value); + this.SendPropertyChanging(); + this._Month = value; + this.SendPropertyChanged("Month"); + this.OnMonthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_PartyCommittee_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Party_PartyCommittee.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Party_PartyCommittee.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Party_PartyCongress")] + public partial class Party_PartyCongress : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _PartyCongressId; + + private System.Nullable _Year; + + private System.Nullable _Quarter; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnPartyCongressIdChanging(string value); + partial void OnPartyCongressIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnQuarterChanging(System.Nullable value); + partial void OnQuarterChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Party_PartyCongress() + { + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PartyCongressId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string PartyCongressId + { + get + { + return this._PartyCongressId; + } + set + { + if ((this._PartyCongressId != value)) + { + this.OnPartyCongressIdChanging(value); + this.SendPropertyChanging(); + this._PartyCongressId = value; + this.SendPropertyChanged("PartyCongressId"); + this.OnPartyCongressIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this.OnQuarterChanging(value); + this.SendPropertyChanging(); + this._Quarter = value; + this.SendPropertyChanged("Quarter"); + this.OnQuarterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_PartyCongress_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Party_PartyCongress.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Party_PartyCongress.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Party_PartyLecture")] + public partial class Party_PartyLecture : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _PartyLectureId; + + private System.Nullable _Year; + + private System.Nullable _Quarter; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnPartyLectureIdChanging(string value); + partial void OnPartyLectureIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnQuarterChanging(System.Nullable value); + partial void OnQuarterChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Party_PartyLecture() + { + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PartyLectureId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string PartyLectureId + { + get + { + return this._PartyLectureId; + } + set + { + if ((this._PartyLectureId != value)) + { + this.OnPartyLectureIdChanging(value); + this.SendPropertyChanging(); + this._PartyLectureId = value; + this.SendPropertyChanged("PartyLectureId"); + this.OnPartyLectureIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this.OnQuarterChanging(value); + this.SendPropertyChanging(); + this._Quarter = value; + this.SendPropertyChanged("Quarter"); + this.OnQuarterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_PartyLecture_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Party_PartyLecture.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Party_PartyLecture.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Party_PartyMeeting")] + public partial class Party_PartyMeeting : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _PartyMeetingId; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnPartyMeetingIdChanging(string value); + partial void OnPartyMeetingIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnMonthChanging(System.Nullable value); + partial void OnMonthChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Party_PartyMeeting() + { + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PartyMeetingId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string PartyMeetingId + { + get + { + return this._PartyMeetingId; + } + set + { + if ((this._PartyMeetingId != value)) + { + this.OnPartyMeetingIdChanging(value); + this.SendPropertyChanging(); + this._PartyMeetingId = value; + this.SendPropertyChanged("PartyMeetingId"); + this.OnPartyMeetingIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this.OnMonthChanging(value); + this.SendPropertyChanging(); + this._Month = value; + this.SendPropertyChanged("Month"); + this.OnMonthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_PartyMeeting_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Party_PartyMeeting.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Party_PartyMeeting.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Party_WorkPlan")] + public partial class Party_WorkPlan : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _WorkPlanId; + + private System.Nullable _Year; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnWorkPlanIdChanging(string value); + partial void OnWorkPlanIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public Party_WorkPlan() + { + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPlanId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string WorkPlanId + { + get + { + return this._WorkPlanId; + } + set + { + if ((this._WorkPlanId != value)) + { + this.OnWorkPlanIdChanging(value); + this.SendPropertyChanging(); + this._WorkPlanId = value; + this.SendPropertyChanged("WorkPlanId"); + this.OnWorkPlanIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_WorkPlan_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Party_WorkPlan.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Party_WorkPlan.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Perfomance_PerfomanceRecord")] public partial class Perfomance_PerfomanceRecord : INotifyPropertyChanging, INotifyPropertyChanged { @@ -208259,6 +209753,8 @@ namespace Model private string _UnitId; + private System.Nullable _IsEnd; + private EntitySet _WBS_CnProfession; private EntityRef _Base_Project; @@ -208297,6 +209793,8 @@ namespace Model partial void OnSortIndexChanged(); partial void OnUnitIdChanging(string value); partial void OnUnitIdChanged(); + partial void OnIsEndChanging(System.Nullable value); + partial void OnIsEndChanged(); #endregion public Project_Installation() @@ -208557,6 +210055,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsEnd", DbType="Bit")] + public System.Nullable IsEnd + { + get + { + return this._IsEnd; + } + set + { + if ((this._IsEnd != value)) + { + this.OnIsEndChanging(value); + this.SendPropertyChanging(); + this._IsEnd = value; + this.SendPropertyChanged("IsEnd"); + this.OnIsEndChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Project_CnProfession_Project_Installation", Storage="_WBS_CnProfession", ThisKey="InstallationId", OtherKey="InstallationId", DeleteRule="NO ACTION")] public EntitySet WBS_CnProfession { @@ -257523,6 +259041,20 @@ namespace Model private EntitySet _OccupationHealth_PhysicalExamination; + private EntitySet _Party_LastWorkSummary; + + private EntitySet _Party_OrganizingLife; + + private EntitySet _Party_PartyCommittee; + + private EntitySet _Party_PartyCongress; + + private EntitySet _Party_PartyLecture; + + private EntitySet _Party_PartyMeeting; + + private EntitySet _Party_WorkPlan; + private EntitySet _Perfomance_PerfomanceRecord; private EntitySet _Perfomance_PersonPerfomance; @@ -258032,6 +259564,13 @@ namespace Model this._OccupationHealth_HazardDetection = new EntitySet(new Action(this.attach_OccupationHealth_HazardDetection), new Action(this.detach_OccupationHealth_HazardDetection)); this._OccupationHealth_OccupationalDiseaseAccident = new EntitySet(new Action(this.attach_OccupationHealth_OccupationalDiseaseAccident), new Action(this.detach_OccupationHealth_OccupationalDiseaseAccident)); this._OccupationHealth_PhysicalExamination = new EntitySet(new Action(this.attach_OccupationHealth_PhysicalExamination), new Action(this.detach_OccupationHealth_PhysicalExamination)); + this._Party_LastWorkSummary = new EntitySet(new Action(this.attach_Party_LastWorkSummary), new Action(this.detach_Party_LastWorkSummary)); + this._Party_OrganizingLife = new EntitySet(new Action(this.attach_Party_OrganizingLife), new Action(this.detach_Party_OrganizingLife)); + this._Party_PartyCommittee = new EntitySet(new Action(this.attach_Party_PartyCommittee), new Action(this.detach_Party_PartyCommittee)); + this._Party_PartyCongress = new EntitySet(new Action(this.attach_Party_PartyCongress), new Action(this.detach_Party_PartyCongress)); + this._Party_PartyLecture = new EntitySet(new Action(this.attach_Party_PartyLecture), new Action(this.detach_Party_PartyLecture)); + this._Party_PartyMeeting = new EntitySet(new Action(this.attach_Party_PartyMeeting), new Action(this.detach_Party_PartyMeeting)); + this._Party_WorkPlan = new EntitySet(new Action(this.attach_Party_WorkPlan), new Action(this.detach_Party_WorkPlan)); this._Perfomance_PerfomanceRecord = new EntitySet(new Action(this.attach_Perfomance_PerfomanceRecord), new Action(this.detach_Perfomance_PerfomanceRecord)); this._Perfomance_PersonPerfomance = new EntitySet(new Action(this.attach_Perfomance_PersonPerfomance), new Action(this.detach_Perfomance_PersonPerfomance)); this._Person_Duty = new EntitySet(new Action(this.attach_Person_Duty), new Action(this.detach_Person_Duty)); @@ -261745,6 +263284,97 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_LastWorkSummary_Sys_User", Storage="_Party_LastWorkSummary", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Party_LastWorkSummary + { + get + { + return this._Party_LastWorkSummary; + } + set + { + this._Party_LastWorkSummary.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_OrganizingLife_Sys_User", Storage="_Party_OrganizingLife", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Party_OrganizingLife + { + get + { + return this._Party_OrganizingLife; + } + set + { + this._Party_OrganizingLife.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_PartyCommittee_Sys_User", Storage="_Party_PartyCommittee", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Party_PartyCommittee + { + get + { + return this._Party_PartyCommittee; + } + set + { + this._Party_PartyCommittee.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_PartyCongress_Sys_User", Storage="_Party_PartyCongress", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Party_PartyCongress + { + get + { + return this._Party_PartyCongress; + } + set + { + this._Party_PartyCongress.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_PartyLecture_Sys_User", Storage="_Party_PartyLecture", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Party_PartyLecture + { + get + { + return this._Party_PartyLecture; + } + set + { + this._Party_PartyLecture.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_PartyMeeting_Sys_User", Storage="_Party_PartyMeeting", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Party_PartyMeeting + { + get + { + return this._Party_PartyMeeting; + } + set + { + this._Party_PartyMeeting.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Party_WorkPlan_Sys_User", Storage="_Party_WorkPlan", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Party_WorkPlan + { + get + { + return this._Party_WorkPlan; + } + set + { + this._Party_WorkPlan.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Perfomance_PerfomanceRecord_Sys_User", Storage="_Perfomance_PerfomanceRecord", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet Perfomance_PerfomanceRecord { @@ -265574,6 +267204,90 @@ namespace Model entity.Sys_User = null; } + private void attach_Party_LastWorkSummary(Party_LastWorkSummary entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Party_LastWorkSummary(Party_LastWorkSummary entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_Party_OrganizingLife(Party_OrganizingLife entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Party_OrganizingLife(Party_OrganizingLife entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_Party_PartyCommittee(Party_PartyCommittee entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Party_PartyCommittee(Party_PartyCommittee entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_Party_PartyCongress(Party_PartyCongress entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Party_PartyCongress(Party_PartyCongress entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_Party_PartyLecture(Party_PartyLecture entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Party_PartyLecture(Party_PartyLecture entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_Party_PartyMeeting(Party_PartyMeeting entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Party_PartyMeeting(Party_PartyMeeting entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_Party_WorkPlan(Party_WorkPlan entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Party_WorkPlan(Party_WorkPlan entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_Perfomance_PerfomanceRecord(Perfomance_PerfomanceRecord entity) { this.SendPropertyChanging();