diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2021-04-19-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-04-19-001.sql new file mode 100644 index 00000000..f8c1f088 --- /dev/null +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-04-19-001.sql @@ -0,0 +1,613 @@ +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 1 +LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId +LEFT JOIN Sys_User AS Users ON CheckDay.CompileMan=Users.UserId +LEFT JOIN Sys_User AS CheckPersonUsers ON CheckDay.CheckPerson=CheckPersonUsers.UserId +LEFT JOIN dbo.SitePerson_Person AS person ON person.PersonId = CheckDayDetail.PersonId +WHERE (@StartTime IS NULL OR CheckDay.CheckTime>=@StartTime) + AND (@EndTime IS NULL OR CheckDay.CheckTime <=@EndTime ) + AND CheckDay.ProjectId=@ProjectId + AND (@States IS NULL OR CheckDay.States=@States) + AND (@UnitName IS NULL OR Unit.UnitName LIKE '%'+@UnitName+'%' ) + AND (@WorkAreaName IS NULL OR CheckDayDetail.WorkArea LIKE '%'+@WorkAreaName+'%' ) +ORDER BY CheckDayCode DESC + +END + + +GO + + diff --git a/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql b/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql index a222b28f..cc7b3165 100644 --- a/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql +++ b/DataBase/菜单初始化脚本/0-8综合管理(Menu_ZHGL).sql @@ -1,7 +1,7 @@ ---delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_ZHGL') ---go ---delete from Sys_Menu where MenuType='Menu_ZHGL' ---go +delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_ZHGL') +go +delete from Sys_Menu where MenuType='Menu_ZHGL' +go INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('2572CDC8-BA26-4C74-B6F7-CB3D63E91E72','安全体系','',10,'0','Menu_ZHGL',1,0,1) GO diff --git a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql index 3bfb4532..81451279 100644 --- a/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql +++ b/DataBase/菜单初始化脚本/1-3安全管理(Menu_HSSE).sql @@ -616,16 +616,6 @@ GO INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('D4220548-0C59-42DE-8B1C-17FF237A4DF2','F910062E-98B0-486F-A8BD-D5B0035F808F','',4) GO - - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('29F27641-06ED-435A-9F9B-FCE6366801BE','ҵල','Hazard/ProjectSuperviseCheckRectify.aspx',65,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) - GO - --ҵල - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('B6BC2531-A381-4843-9E08-C49EFB3B541B','29F27641-06ED-435A-9F9B-FCE6366801BE','޸',2) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('FBBC83E5-DF22-4995-8086-CB7A970CE2D3','29F27641-06ED-435A-9F9B-FCE6366801BE','',4) - GO INSERT INTO Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('F057C207-4549-48AE-B838-A1920E5709D8','ϵ','HSSE/Check/ContactList.aspx',70,'467A0CB9-737D-4451-965E-869EBC3A4BD6','Menu_HSSE',0,1,1) GO diff --git a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql index d1e06c1c..1b391f62 100644 --- a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql +++ b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql @@ -3,87 +3,142 @@ go delete from Sys_Menu where MenuType='Menu_JDGL' go -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('B707B4E0-EF73-4010-A13B-59263A5029C7','单位、分部、分项工程设置','',10,'0','Menu_JDGL',0,0,1) -GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('858E83E9-ADE5-452E-BD65-82D8DFF872C0','单位、分部、分项工程设置','JDGL/WBS/WBSSetAudit.aspx',10,'B707B4E0-EF73-4010-A13B-59263A5029C7','Menu_JDGL',0,1,1) - GO - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('004CD808-1E02-4AD8-8C4B-7F805C12CCDC','858E83E9-ADE5-452E-BD65-82D8DFF872C0','增加',1) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('B7FBE5AB-C02A-4FE7-9D6D-D8C4B5EAE146','858E83E9-ADE5-452E-BD65-82D8DFF872C0','修改',2) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('04075797-5B97-41D0-B596-B8CF18B27A35','858E83E9-ADE5-452E-BD65-82D8DFF872C0','删除',3) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('6E53397A-00FB-425B-B884-7AC9710D0924','858E83E9-ADE5-452E-BD65-82D8DFF872C0','保存',4) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('D448EC81-6C97-4B30-A715-D82D1535C58B','858E83E9-ADE5-452E-BD65-82D8DFF872C0','审核',5) - GO +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('B707B4E0-EF73-4010-A13B-59263A5029C7','单位、分部、分项工程设置','',10,'0','Menu_JDGL',0,0,1) +--GO +-- INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +-- VALUES('858E83E9-ADE5-452E-BD65-82D8DFF872C0','单位、分部、分项工程设置','JDGL/WBS/WBSSetAudit.aspx',10,'B707B4E0-EF73-4010-A13B-59263A5029C7','Menu_JDGL',0,1,1) +-- GO +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('004CD808-1E02-4AD8-8C4B-7F805C12CCDC','858E83E9-ADE5-452E-BD65-82D8DFF872C0','增加',1) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('B7FBE5AB-C02A-4FE7-9D6D-D8C4B5EAE146','858E83E9-ADE5-452E-BD65-82D8DFF872C0','修改',2) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('04075797-5B97-41D0-B596-B8CF18B27A35','858E83E9-ADE5-452E-BD65-82D8DFF872C0','删除',3) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('6E53397A-00FB-425B-B884-7AC9710D0924','858E83E9-ADE5-452E-BD65-82D8DFF872C0','保存',4) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('D448EC81-6C97-4B30-A715-D82D1535C58B','858E83E9-ADE5-452E-BD65-82D8DFF872C0','审核',5) +-- GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','进度测量标志(权重)设置','',20,'0','Menu_JDGL',0,0,1) +--GO +-- INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +-- VALUES('6844F671-8545-4DD9-B9A0-AA36CB5F1D6F','进度测量标志(权重)设置','JDGL/WBSWeights/WeightsAudit.aspx',10,'27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','Menu_JDGL',0,1,1) +-- GO +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('DCC4B8BA-9B20-47B8-9067-DD1DC3D55415','6844F671-8545-4DD9-B9A0-AA36CB5F1D6F','保存',1) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('170A1EB4-5102-4A86-B57E-5F61B13A3236','6844F671-8545-4DD9-B9A0-AA36CB5F1D6F','审核',2) +-- GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('BE150D8E-9BAB-4207-9CDD-5B05E847D906','进度计划及计划值设置','',30,'0','Menu_JDGL',0,0,1) +--GO +-- INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +-- VALUES('9FEB264F-4124-48E8-A43C-5663BBFB55F0','进度计划及计划值设置','JDGL/WBSPlan/WBSPlanAudit.aspx',10,'BE150D8E-9BAB-4207-9CDD-5B05E847D906','Menu_JDGL',0,1,1) +-- GO +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('0B90094F-1428-47F9-8939-F997B0E50AC7','9FEB264F-4124-48E8-A43C-5663BBFB55F0','保存',1) +-- GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('0B9BFD3F-AD3A-41D0-9144-9BABCB8E8422','实际进度(完成值/实耗值)测量','',40,'0','Menu_JDGL',0,0,1) +--GO +-- INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +-- VALUES('6CFA0EE1-F075-417E-9D96-05B31122BB95','实际进度(完成值/实耗值)测量录入','JDGL/WBSCompleteAndReal/WBSCompleteAudit.aspx',10,'0B9BFD3F-AD3A-41D0-9144-9BABCB8E8422','Menu_JDGL',0,1,1) +-- GO +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('C9801907-F716-47CF-ACDA-CCE884123AE9','6CFA0EE1-F075-417E-9D96-05B31122BB95','保存',1) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('F3FFB663-83F8-463D-9643-99D564B79BDF','6CFA0EE1-F075-417E-9D96-05B31122BB95','提交',2) +-- GO +-- INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +-- VALUES('4FB962B3-905B-4560-9957-46A11392BB0B','进度(完成值)测量报告','JDGL/WBSCompleteAndReal/WBSReport.aspx',20,'0B9BFD3F-AD3A-41D0-9144-9BABCB8E8422','Menu_JDGL',0,1,1) +-- GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('3478449A-681A-4DB1-8E79-598BB24DD0C4','进度/费用偏差分析与纠偏','',50,'0','Menu_JDGL',0,0,1) +--GO +-- INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +-- VALUES('64197BF4-2622-4588-B49B-815188184CE2','赢得值曲线','JDGL/CostAnalysis/EarnedValueCurve.aspx',10,'3478449A-681A-4DB1-8E79-598BB24DD0C4','Menu_JDGL',0,1,1) +-- GO +-- INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +-- VALUES('AA5C8AB2-CE89-41BC-B7B5-C689ED368B98','计划调整及纠偏措施设置','JDGL/CostAnalysis/PlanAdjust.aspx',20,'3478449A-681A-4DB1-8E79-598BB24DD0C4','Menu_JDGL',0,1,1) +-- GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('2344465A-F43E-495E-98E7-9AC1C6484F5C','工程量清单设置','JDGL/Check/QuantityList.aspx',60,'0','Menu_JDGL',0,1,1) +--GO +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('35BBBD54-29F1-4D46-9745-3500B6B00267','2344465A-F43E-495E-98E7-9AC1C6484F5C','增加',1) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('52B28F04-AECA-4FDD-B5FA-45EC22CAC50B','2344465A-F43E-495E-98E7-9AC1C6484F5C','修改',2) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('FC4DAA4C-7E3A-4627-A2A8-1286018C4B30','2344465A-F43E-495E-98E7-9AC1C6484F5C','删除',3) +-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +-- VALUES('4705582D-0389-4226-9D44-D906691F3310','2344465A-F43E-495E-98E7-9AC1C6484F5C','保存',4) +-- GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','进度测量标志(权重)设置','',20,'0','Menu_JDGL',0,0,1) +VALUES('F3AA42B3-5776-4992-A625-1216C579FEDE','项目进度情况','JDGL/Check/ProgressCompletion.aspx',60,'0','Menu_JDGL',0,1,1) GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('6844F671-8545-4DD9-B9A0-AA36CB5F1D6F','进度测量标志(权重)设置','JDGL/WBSWeights/WeightsAudit.aspx',10,'27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','Menu_JDGL',0,1,1) - GO INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('DCC4B8BA-9B20-47B8-9067-DD1DC3D55415','6844F671-8545-4DD9-B9A0-AA36CB5F1D6F','保存',1) + VALUES('8232DE3C-307C-49ED-9A37-6C29A94AABDF','F3AA42B3-5776-4992-A625-1216C579FEDE','增加',1) INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('170A1EB4-5102-4A86-B57E-5F61B13A3236','6844F671-8545-4DD9-B9A0-AA36CB5F1D6F','审核',2) - GO - -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('BE150D8E-9BAB-4207-9CDD-5B05E847D906','进度计划及计划值设置','',30,'0','Menu_JDGL',0,0,1) -GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('9FEB264F-4124-48E8-A43C-5663BBFB55F0','进度计划及计划值设置','JDGL/WBSPlan/WBSPlanAudit.aspx',10,'BE150D8E-9BAB-4207-9CDD-5B05E847D906','Menu_JDGL',0,1,1) - GO + VALUES('BFF4796D-734B-49C3-BAEA-D15437D72BA4','F3AA42B3-5776-4992-A625-1216C579FEDE','修改',2) INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('0B90094F-1428-47F9-8939-F997B0E50AC7','9FEB264F-4124-48E8-A43C-5663BBFB55F0','保存',1) - GO - -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('0B9BFD3F-AD3A-41D0-9144-9BABCB8E8422','实际进度(完成值/实耗值)测量','',40,'0','Menu_JDGL',0,0,1) -GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('6CFA0EE1-F075-417E-9D96-05B31122BB95','实际进度(完成值/实耗值)测量录入','JDGL/WBSCompleteAndReal/WBSCompleteAudit.aspx',10,'0B9BFD3F-AD3A-41D0-9144-9BABCB8E8422','Menu_JDGL',0,1,1) - GO + VALUES('9884E883-9C71-4F76-A7E0-BBC030911548','F3AA42B3-5776-4992-A625-1216C579FEDE','删除',3) INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('C9801907-F716-47CF-ACDA-CCE884123AE9','6CFA0EE1-F075-417E-9D96-05B31122BB95','保存',1) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('F3FFB663-83F8-463D-9643-99D564B79BDF','6CFA0EE1-F075-417E-9D96-05B31122BB95','提交',2) - GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('4FB962B3-905B-4560-9957-46A11392BB0B','进度(完成值)测量报告','JDGL/WBSCompleteAndReal/WBSReport.aspx',20,'0B9BFD3F-AD3A-41D0-9144-9BABCB8E8422','Menu_JDGL',0,1,1) - GO - -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('3478449A-681A-4DB1-8E79-598BB24DD0C4','进度/费用偏差分析与纠偏','',50,'0','Menu_JDGL',0,0,1) -GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('64197BF4-2622-4588-B49B-815188184CE2','赢得值曲线','JDGL/CostAnalysis/EarnedValueCurve.aspx',10,'3478449A-681A-4DB1-8E79-598BB24DD0C4','Menu_JDGL',0,1,1) - GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('AA5C8AB2-CE89-41BC-B7B5-C689ED368B98','计划调整及纠偏措施设置','JDGL/CostAnalysis/PlanAdjust.aspx',20,'3478449A-681A-4DB1-8E79-598BB24DD0C4','Menu_JDGL',0,1,1) - GO - -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('2344465A-F43E-495E-98E7-9AC1C6484F5C','工程量清单设置','JDGL/Check/QuantityList.aspx',60,'0','Menu_JDGL',0,1,1) -GO - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('35BBBD54-29F1-4D46-9745-3500B6B00267','2344465A-F43E-495E-98E7-9AC1C6484F5C','增加',1) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('52B28F04-AECA-4FDD-B5FA-45EC22CAC50B','2344465A-F43E-495E-98E7-9AC1C6484F5C','修改',2) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('FC4DAA4C-7E3A-4627-A2A8-1286018C4B30','2344465A-F43E-495E-98E7-9AC1C6484F5C','删除',3) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('4705582D-0389-4226-9D44-D906691F3310','2344465A-F43E-495E-98E7-9AC1C6484F5C','保存',4) - GO + VALUES('08C87DB8-494D-47F3-B271-7548CCE72E7A','F3AA42B3-5776-4992-A625-1216C579FEDE','保存',4) + GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('2AE9D982-A499-497F-8F54-ADDA5856887E','工程量完成情况','JDGL/Check/QuantityCompletion.aspx',70,'0','Menu_JDGL',0,1,1) GO INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('BDBABEE5-DE52-47BA-9799-ACB7EE76F3FA','2AE9D982-A499-497F-8F54-ADDA5856887E','保存',1) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('4ACA0647-4D44-462E-8277-1EF9F100566A','钢结构完成情况','JDGL/Check/SteelStructureCompletion.aspx',80,'0','Menu_JDGL',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9EACCE68-163F-4E47-B1AF-179E813B3A12','4ACA0647-4D44-462E-8277-1EF9F100566A','保存',1) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('92FD1845-F56C-4111-8BA0-91838A18B750','设备完成情况','JDGL/Check/EquipmentCompletion.aspx',90,'0','Menu_JDGL',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B69B59B4-E58D-40F6-8097-D6782FE3ED68','92FD1845-F56C-4111-8BA0-91838A18B750','保存',1) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('9AE07A76-3A54-4414-BC8C-C86A18C737BA','管道完成情况','JDGL/Check/PipelineCompletion.aspx',100,'0','Menu_JDGL',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('EB18C5C6-3303-410B-ACA9-A82B3239CDA4','9AE07A76-3A54-4414-BC8C-C86A18C737BA','保存',1) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('8A8A1050-F227-42ED-9456-8CB5ECA36512','电气完成情况','JDGL/Check/ElectricalCompletion.aspx',110,'0','Menu_JDGL',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('5EDC2141-3218-4C80-9A69-AD1FBD5BCEF5','8A8A1050-F227-42ED-9456-8CB5ECA36512','保存',1) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('7EC1FBAF-BEC9-46CD-9E3B-0D0093B4E1C2','仪表完成情况','JDGL/Check/MeterCompletion.aspx',120,'0','Menu_JDGL',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('10527FF2-975E-49DA-B4C7-3FE69FCBA7B3','7EC1FBAF-BEC9-46CD-9E3B-0D0093B4E1C2','保存',1) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('C7037A5D-D8A6-4C1C-A5B8-2083C31C0A7B','全厂地下管网完成情况','JDGL/Check/UndergroundPipeCompletion.aspx',130,'0','Menu_JDGL',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BECB2F6E-90D5-432C-A56C-9F8AAF62C511','C7037A5D-D8A6-4C1C-A5B8-2083C31C0A7B','保存',1) GO \ No newline at end of file diff --git a/SGGL/BLL/API/APIBaseInfoService.cs b/SGGL/BLL/API/APIBaseInfoService.cs index f6b5350f..46d006b8 100644 --- a/SGGL/BLL/API/APIBaseInfoService.cs +++ b/SGGL/BLL/API/APIBaseInfoService.cs @@ -39,7 +39,7 @@ namespace BLL { BaseInfoId = x.ProjectId, BaseInfoCode = x.ProjectCode, - BaseInfoName = x.ProjectName + BaseInfoName = x.ProjectName } ).ToList(); return getDataLists; diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs index 1fdf9123..68cecde5 100644 --- a/SGGL/BLL/API/APIPersonService.cs +++ b/SGGL/BLL/API/APIPersonService.cs @@ -1551,29 +1551,32 @@ namespace BLL /// public static List getPersonInOutLists(string projectId, string unitId, DateTime startTimeD, DateTime endTimeD) { - var personInOuts = from x in Funs.DB.SitePerson_PersonInOut - join y in Funs.DB.SitePerson_Person on x.PersonId equals y.PersonId - where x.ProjectId == projectId && x.ChangeTime >= startTimeD && x.ChangeTime <= endTimeD - select new Model.PersonInOutItem - { - PersonId = x.PersonId, - PersonName = y.PersonName, - ProjectId = x.ProjectId, - UnitId = y.UnitId, - UnitName = Funs.DB.Base_Unit.First(z => z.UnitId == y.UnitId).UnitName, - WorkPostId = y.WorkPostId, - WorkPostName = Funs.DB.Base_WorkPost.First(z => z.WorkPostId == y.WorkPostId).WorkPostName, - IsIn = x.IsIn, - IsInName = x.IsIn == true ? "进场" : "出场", - ChangeTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ChangeTime), - ChangeTimeD = x.ChangeTime, - }; - if (!string.IsNullOrEmpty(unitId)) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - personInOuts = personInOuts.Where(x => x.UnitId == unitId); - } + var personInOuts = from x in db.SitePerson_PersonInOut + join y in db.SitePerson_Person on x.PersonId equals y.PersonId + where x.ProjectId == projectId && x.ChangeTime >= startTimeD && x.ChangeTime <= endTimeD + select new Model.PersonInOutItem + { + PersonId = x.PersonId, + PersonName = y.PersonName, + ProjectId = x.ProjectId, + UnitId = y.UnitId, + UnitName = db.Base_Unit.First(z => z.UnitId == y.UnitId).UnitName, + WorkPostId = y.WorkPostId, + WorkPostName = db.Base_WorkPost.First(z => z.WorkPostId == y.WorkPostId).WorkPostName, + IsIn = x.IsIn, + IsInName = x.IsIn == true ? "进场" : "出场", + ChangeTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ChangeTime), + ChangeTimeD = x.ChangeTime, + }; + if (!string.IsNullOrEmpty(unitId)) + { + personInOuts = personInOuts.Where(x => x.UnitId == unitId); + } - return personInOuts.ToList(); + return personInOuts.ToList(); + } } #endregion diff --git a/SGGL/BLL/API/APIUserService.cs b/SGGL/BLL/API/APIUserService.cs index d529f3c0..3554ebbd 100644 --- a/SGGL/BLL/API/APIUserService.cs +++ b/SGGL/BLL/API/APIUserService.cs @@ -265,5 +265,68 @@ namespace BLL } } } + + /// + /// 根据单位类型获取用户信息 + /// + /// + /// + /// + /// + public static List getUserByProjectIdUserIdsQuery(string projectId, string userIds, string strParam) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + List getDataList = new List(); + List userList = Funs.GetStrListByStr(userIds, ','); + if (userList.Count() > 0) + { + var getDataLists = (from x in db.Sys_User + join y in db.Project_ProjectUser on x.UserId equals y.UserId + where y.ProjectId == projectId + select new Model.UserItem + { + UserId = x.UserId, + Account = x.Account, + UserCode = x.UserCode, + Password = x.Password, + UserName = x.UserName, + RoleId = y.RoleId, + RoleName = RoleService.getRoleNamesRoleIds(y.RoleId), + UnitId = y.UnitId, + UnitName = db.Base_Unit.First(z => z.UnitId == y.UnitId).UnitName, + LoginProjectId = y.ProjectId, + LoginProjectName = db.Base_Project.First(z => z.ProjectId == y.ProjectId).ProjectName, + IdentityCard = x.IdentityCard, + Email = x.Email, + Telephone = x.Telephone, + IsOffice = x.IsOffice, + SignatureUrl = x.SignatureUrl.Replace('\\', '/'), + }); + if (!string.IsNullOrEmpty(strParam)) + { + getDataLists = getDataLists.Where(x => x.UserName.Contains(strParam)); + } + + string unitId = Const.UnitId_CWCEC; + var unitList = (from x in db.Sys_User where userList.Contains(x.UserId) select x.UnitId).Distinct().ToList(); + if (unitList.Count() == 1) + { + unitId = unitList.FirstOrDefault(); + getDataList = getDataLists.Where(x => x.UnitId == unitId).ToList(); + + } + else if (!unitList.Contains(unitId)) + { + getDataList = getDataLists.Where(x => unitList.Contains(x.UnitId)).ToList(); + } + else + { + getDataList = getDataLists.Where(x => x.UnitId == unitId).ToList(); + } + } + return getDataList.OrderBy(x => x.UnitName).ThenBy(x => x.UserName).ToList(); + } + } } } diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 2308c44a..2416c215 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -515,8 +515,15 @@ + + + + + + + diff --git a/SGGL/BLL/BaseInfo/SteelService.cs b/SGGL/BLL/BaseInfo/SteelService.cs index 9c9cff4b..c9bfdfda 100644 --- a/SGGL/BLL/BaseInfo/SteelService.cs +++ b/SGGL/BLL/BaseInfo/SteelService.cs @@ -271,7 +271,7 @@ namespace BLL /// public static void InitSteel(FineUIPro.DropDownList dropName, bool isShowPlease) { - dropName.DataValueField = "Text"; + dropName.DataValueField = "Value"; dropName.DataTextField = "Text"; dropName.DataSource = GetSteelList(); dropName.DataBind(); diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 294a0a4a..ae52b960 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -6,7 +6,7 @@ using System.Text; namespace BLL { public static class Const - { + { #region 查询字段:系统设置 /// /// 系统管理员ID @@ -57,7 +57,7 @@ namespace BLL /// 入场培训类型ID /// public const string EntryTrainTypeId = "dfb6a37e-4412-4ba9-ad59-3bc505bc21f7"; - + /// /// 微信订阅模板ID /// @@ -217,7 +217,7 @@ namespace BLL /// public const string ProjectState_3 = "3"; #endregion - + #region 项目单位类型 /// /// 总包 @@ -230,11 +230,11 @@ namespace BLL /// /// 监理 /// - public const string ProjectUnitType_3 = "3"; + public const string ProjectUnitType_3 = "3"; /// /// 业主 /// - public const string ProjectUnitType_4 = "4"; + public const string ProjectUnitType_4 = "4"; /// /// 检测单位 /// @@ -272,22 +272,117 @@ namespace BLL /// /// HSE工程师岗位Id /// - public static string WorkPost_HSSEEngineer = "9b15af2e-6131-462c-9f8a-71533957ca0e"; + public static string WorkPost_HSSEEngineer = "9b15af2e-6131-462c-9f8a-71533957ca0e"; /// /// HSE经理岗位Id /// public static string WorkPost_SafetyManager = "e426e560-9906-4aba-843e-2daef9ebeb05"; - /// - /// 焊工岗位Id - /// - public static string WorkPost_Welder = "19B8F2A9-28D3-4F20-867A-1B2237C2E228"; - /// /// 无损检测工岗位Id /// public static string WorkPost_Checker = "595999E9-75A8-4064-9BD1-9EE02F236297"; + + /// + /// 木工岗位Id + /// + public static string WorkPost_Carpentry = "4ACC633F-BD81-4CBB-9058-A4E4DFFE7881"; + + /// + /// 钢筋工岗位Id + /// + public static string WorkPost_SteelWorker = "E735CF61-096B-4134-B6D4-766B4B8EF790"; + + /// + /// 瓦工岗位Id + /// + public static string WorkPost_Bricklayer = "5E07B570-2E2C-470E-8379-7FEAECF8F62A"; + + /// + /// 混凝土工岗位Id + /// + public static string WorkPost_ConcreteWorker = "14f1fa16-965e-427d-a342-edbb3230ae3c"; + + /// + /// 钳工岗位Id + /// + public static string WorkPost_Fitter1 = "c7431c69-fb64-4960-a9da-2c7b8d380097"; + + /// + /// 钳工岗位Id + /// + public static string WorkPost_Fitter2 = "F49B8430-AC71-40B2-86A3-6825C73F59E5"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder = "97afac2d-7ffb-49de-bf15-4b49ef24df63"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder1 = "16c736b6-7ee1-4069-8b57-1a658e6a615f"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder2 = "36644e8c-0593-4ca7-880f-6a55510c51a1"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder3 = "5383f797-da4a-4547-b2aa-905a99c1bcfa"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder4 = "97afac2d-7ffb-49de-bf15-4b49ef24df63"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder5 = "F8CD2EB0-1D46-422B-A21C-331669B2CF6C"; + + /// + /// 铆工岗位Id + /// + public static string WorkPost_Riveter = "338A8CB9-FB41-4E09-A2BD-ADD27BDBE9DE"; + + /// + /// 管工岗位Id + /// + public static string WorkPost_Foreman = "edc167d9-e2ed-4ed9-8c4d-9c179ff0286f"; + + /// + /// 电工岗位Id + /// + public static string WorkPost_Electrician1 = "29999836-fcdd-43f5-ab6c-77c5e0d6ce0d"; + + /// + /// 电工岗位Id + /// + public static string WorkPost_Electrician2 = "5CBA1BD0-B66B-4362-8CF3-CEA9D3F425DB"; + + /// + /// 电工岗位Id + /// + public static string WorkPost_Electrician3 = "bb71b5f6-d6c6-49d8-83aa-577c6f0808a0"; + + /// + /// 仪表工岗位Id + /// + public static string WorkPost_Instrumentalist = "EFBA9A9A-FF98-47B4-949E-951A8F4E42E5"; + + /// + /// 防腐保温工岗位Id + /// + public static string WorkPost_AnticorrosionWorker = "010CBFD3-51B9-4C48-A6F8-15326D810AA5"; + + /// + /// 其他岗位Id + /// + public static string WorkPost_Other = "71D6437A-6EE4-434A-A68C-BBB2B00FB6C6"; #endregion #region 系统环境设置常量 @@ -585,7 +680,7 @@ namespace BLL /// 党建群团 /// public const string Menu_Party = "Menu_Party"; - + /*项目*/ /// /// 项目设置 @@ -674,6 +769,8 @@ namespace BLL /// public const string ActionPlan_ProjectManagerRuleMenuId = "ec0942af-b1ae-4676-8442-4be3a5e22ea0"; + + #region 本部检查 /// /// 检查通知单 @@ -970,7 +1067,7 @@ namespace BLL /// /// 安全组织体系 /// - public const string HSSEOrganizeMenuId = "8IDKGJE2-09B1-6UIO-3EFM-5TGED48F0001"; + public const string HSSEOrganizeMenuId = "8IDKGJE2-09B1-6UIO-3EFM-5TGED48F0001"; /// /// 安全管理机构 /// @@ -1212,7 +1309,7 @@ namespace BLL public const string ServerSafeUnitReportMenuId = "2C673125-AAA4-4F41-A827-0F04DFE55DED"; #endregion - + #region 企业安全大检查 /// /// 安全监督检查报告 @@ -1441,15 +1538,15 @@ namespace BLL /// /// 安全组织机构 /// - public const string ProjectSafetyOrganizationMenuId = "1EDD072E-473A-4CDB-A2D3-E401C146B2B2"; + public const string ProjectSafetyOrganizationMenuId = "1EDD072E-473A-4CDB-A2D3-E401C146B2B2"; /// /// 安全体系 /// - public const string ProjectSafetySystemMenuId = "21C779D6-269B-4CB7-AFFB-F59958AC0EF0"; + public const string ProjectSafetySystemMenuId = "21C779D6-269B-4CB7-AFFB-F59958AC0EF0"; /// /// 安全制度 /// - public const string ProjectSafetyInstitutionMenuId = "9D04CD8B-575C-4854-B8B0-F90CEEB75815"; + public const string ProjectSafetyInstitutionMenuId = "9D04CD8B-575C-4854-B8B0-F90CEEB75815"; /// /// 安全管理组织机构 /// @@ -1654,8 +1751,8 @@ namespace BLL /// /// 现场人员统计 /// - public const string PersonStatisticMenuId = "7D36E853-CC79-48B9-9E7F-E34797B4E87E"; - + public const string PersonStatisticMenuId = "7D36E853-CC79-48B9-9E7F-E34797B4E87E"; + /// /// 人员变化 /// @@ -1772,7 +1869,7 @@ namespace BLL /// /// HSSE专项检查 /// - public const string ProjectCheckSpecialMenuId = "1B08048F-93ED-4E84-AE65-DB7917EA2DFB"; + public const string ProjectCheckSpecialMenuId = "1B08048F-93ED-4E84-AE65-DB7917EA2DFB"; /// /// HSSE综合检查 /// @@ -1784,11 +1881,11 @@ namespace BLL /// /// 开工前HSSE检查 /// - public const string ProjectCheckWorkMenuId = "9212291A-FBC5-4F6D-A5F6-60BFF4E30F6F"; + public const string ProjectCheckWorkMenuId = "9212291A-FBC5-4F6D-A5F6-60BFF4E30F6F"; /// /// 季节性/节假日HSSE检查 /// - public const string ProjectCheckHolidayMenuId = "0D23A707-ADA0-4C2B-9665-611134243529"; + public const string ProjectCheckHolidayMenuId = "0D23A707-ADA0-4C2B-9665-611134243529"; /// /// 危险因素统计分析 /// @@ -1898,11 +1995,11 @@ namespace BLL /// /// HSSE月例会 /// - public const string ProjectMonthMeetingMenuId = "D5DD5EBD-A5F2-4A43-BA4C-E9A242B43684"; + public const string ProjectMonthMeetingMenuId = "D5DD5EBD-A5F2-4A43-BA4C-E9A242B43684"; /// /// HSSE专题会议 /// - public const string ProjectSpecialMeetingMenuId = "BB6CEC48-283B-46AD-BEDD-F964D261698F"; + public const string ProjectSpecialMeetingMenuId = "BB6CEC48-283B-46AD-BEDD-F964D261698F"; /// /// 其他会议记录 /// @@ -1994,11 +2091,11 @@ namespace BLL /// /// 合同HSE费用及支付台账 /// - public const string ProjectCostLedgerMenuId = "19C1370F-92C0-4E31-87B4-8BADA74113E4"; + public const string ProjectCostLedgerMenuId = "19C1370F-92C0-4E31-87B4-8BADA74113E4"; /// /// HSSE费用统计表 /// - public const string TC_CostMenuId = "89B42B7B-8AEE-4199-923E-81A602FC77E0"; + public const string TC_CostMenuId = "89B42B7B-8AEE-4199-923E-81A602FC77E0"; /// /// HSSE物资管理 /// @@ -2006,11 +2103,11 @@ namespace BLL /// /// 物资入库管理 /// - public const string GoodsIn2MenuId = "FDA02FCA-4E23-469E-AB26-2D625D0E579A"; + public const string GoodsIn2MenuId = "FDA02FCA-4E23-469E-AB26-2D625D0E579A"; /// /// 物资出库管理 /// - public const string GoodsOut2MenuId = "881D6FE5-C281-4DA8-80CD-D7C6624796FC"; + public const string GoodsOut2MenuId = "881D6FE5-C281-4DA8-80CD-D7C6624796FC"; /// /// 物资库存管理 /// @@ -2037,19 +2134,19 @@ namespace BLL /// /// HSSE检查类别设置 /// - public const string CheckTypeSetMenuId = "7353F3C1-0EAF-4DB7-86B4-93E3B96805F8"; + public const string CheckTypeSetMenuId = "7353F3C1-0EAF-4DB7-86B4-93E3B96805F8"; /// /// HSSE行政管理检查记录 /// - public const string ManageCheckMenuId = "A25EB19A-F06E-4AAF-A589-E2B8F7FA7857"; + public const string ManageCheckMenuId = "A25EB19A-F06E-4AAF-A589-E2B8F7FA7857"; /// /// 现场车辆管理 /// - public const string CarManagerMenuId = "CF82805A-84BE-400A-B939-83F7612D76F5"; + public const string CarManagerMenuId = "CF82805A-84BE-400A-B939-83F7612D76F5"; /// /// 现场驾驶员管理 /// - public const string DriverManagerMenuId = "754C23CA-F1BC-4F44-9D34-B185099EDCA0"; + public const string DriverManagerMenuId = "754C23CA-F1BC-4F44-9D34-B185099EDCA0"; /// /// 职业健康管理 /// @@ -2064,7 +2161,7 @@ namespace BLL /// /// 月度安全评比 /// - public const string ProjectMonthlyRatingMenuId = "293FD782-7B39-4F0F-A826-CA790A70CCC7"; + public const string ProjectMonthlyRatingMenuId = "293FD782-7B39-4F0F-A826-CA790A70CCC7"; /// /// 全国安全月 /// @@ -2078,7 +2175,7 @@ namespace BLL /// public const string ProjectOtherActivitiesMenuId = "446D702B-F0C1-4D12-A862-0B8317D95928"; #endregion - + #region 职业健康 /// /// 危害检测 @@ -2124,7 +2221,7 @@ namespace BLL /// HSSE管理周报 /// public const string ProjectManagerWeekMenuId = "AE118E9C-C309-43B7-A198-8CA90A8D98EB"; - + /// /// 月报(赛鼎) /// @@ -2172,7 +2269,7 @@ namespace BLL /// /// 企业安全管理资料 /// - public const string ProjectSafetyDataMenuId = "54A3E23A-DAC7-484B-8C97-40AD785688FC"; + public const string ProjectSafetyDataMenuId = "54A3E23A-DAC7-484B-8C97-40AD785688FC"; /// /// HSSE日志暨管理数据收集 /// @@ -2206,7 +2303,7 @@ namespace BLL /// public const string ProjectHSEDiaryMenuId = "8E5B4A8E-B06E-4C8A-A2C8-1091A9BCAF72"; #endregion - + #region HSSE绩效评价管理 /// /// HSSE分包方绩效评价 @@ -2287,27 +2384,27 @@ namespace BLL /// /// HSSE宣传活动 /// - public const string ProjectPromotionalActivitiesMenuId = "16092FE7-938B-4713-8084-4FBFA030F386"; + public const string ProjectPromotionalActivitiesMenuId = "16092FE7-938B-4713-8084-4FBFA030F386"; /// /// 项目图片 /// - public const string ProjectPictureMenuId = "B58179BE-FE6E-4E91-84FC-D211E4692354"; + public const string ProjectPictureMenuId = "B58179BE-FE6E-4E91-84FC-D211E4692354"; /// /// 一般来文管理 /// - public const string ReceiveFileManagerMenuId = "4F5C00F3-DA7D-4B2D-B1EF-310DFFCA77DD"; + public const string ReceiveFileManagerMenuId = "4F5C00F3-DA7D-4B2D-B1EF-310DFFCA77DD"; /// /// 项目文件夹 /// - public const string ProjectFolderMenuId = "05C6C2AF-3B0B-4BF0-A8CE-1FC15DAC3C54"; + public const string ProjectFolderMenuId = "05C6C2AF-3B0B-4BF0-A8CE-1FC15DAC3C54"; /// /// 文件柜1 /// - public const string ProjectFileCabinetAMenuId = "C69B7409-BE1E-4754-AC90-57B56EEE198B"; + public const string ProjectFileCabinetAMenuId = "C69B7409-BE1E-4754-AC90-57B56EEE198B"; /// /// 文件柜2 /// - public const string ProjectFileCabinetBMenuId = "200019A4-E24F-4C87-8C52-9970F78DBF73"; + public const string ProjectFileCabinetBMenuId = "200019A4-E24F-4C87-8C52-9970F78DBF73"; /// /// 信息统计 /// @@ -2824,6 +2921,34 @@ namespace BLL /// 人员初步规划导入模板 /// public const string PersonPlanTemplateUrl = "File\\Excel\\DataIn\\人员初步规划导入模板.xls"; + /// + /// 项目进度完成情况导入模版文件原始的虚拟路径 + /// + public const string QuantityCompletionTemplateUrl = "File\\Excel\\DataIn\\项目进度完成情况导入模板.xls"; + /// + /// 钢结构完成情况导入模版文件原始的虚拟路径 + /// + public const string SteelStructureCompletionTemplateUrl = "File\\Excel\\DataIn\\钢结构完成情况导入模板.xls"; + /// + /// 设备完成情况导入模版文件原始的虚拟路径 + /// + public const string EquipmentCompletionTemplateUrl = "File\\Excel\\DataIn\\设备完成情况导入模板.xls"; + /// + /// 管道完成情况导入模版文件原始的虚拟路径 + /// + public const string PipelineCompletionTemplateUrl = "File\\Excel\\DataIn\\管道完成情况导入模板.xls"; + /// + /// 电气完成情况导入模版文件原始的虚拟路径 + /// + public const string ElectricalCompletionTemplateUrl = "File\\Excel\\DataIn\\电气完成情况导入模板.xls"; + /// + /// 仪表完成情况导入模版文件原始的虚拟路径 + /// + public const string MeterCompletionTemplateUrl = "File\\Excel\\DataIn\\仪表完成情况导入模板.xls"; + /// + /// 全厂地下管网完成情况导入模版文件原始的虚拟路径 + /// + public const string UndergroundPipeCompletionTemplateUrl = "File\\Excel\\DataIn\\全厂地下管网完成情况导入模板.xls"; #endregion #region 绩效考核模板文件路径 @@ -2881,19 +3006,19 @@ namespace BLL /// /// 职工伤亡事故原因分析报表 /// - public const string Information_AccidentCauseReportId = "2"; + public const string Information_AccidentCauseReportId = "2"; /// /// 安全生产数据季报 /// - public const string Information_SafetyQuarterlyReportId = "3"; + public const string Information_SafetyQuarterlyReportId = "3"; /// /// 应急演练开展情况季报表 /// - public const string Information_DrillConductedQuarterlyReportId = "4"; + public const string Information_DrillConductedQuarterlyReportId = "4"; /// /// 应急演练工作计划半年报表 /// - public const string Information_DrillPlanHalfYearReportId = "5"; + public const string Information_DrillPlanHalfYearReportId = "5"; /// /// 培训记录 /// @@ -2901,7 +3026,7 @@ namespace BLL /// /// 环境危险源辨识与评价打印报表 /// - public const string EnvironmentalRiskReportId = "12"; + public const string EnvironmentalRiskReportId = "12"; /// /// 环境危险源辨识与评价(重要环境因素)打印报表 /// @@ -2909,7 +3034,7 @@ namespace BLL /// /// 职业健康安全危险源辨识与评价打印报表 /// - public const string HazardListReportId = "14"; + public const string HazardListReportId = "14"; /// /// 职业健康安全危险源辨识与评价(重大危险源)打印报表 /// @@ -4016,7 +4141,7 @@ namespace BLL /// /// 审批完成 /// - public const string ConstructionPlan_Complete= "5"; + public const string ConstructionPlan_Complete = "5"; #endregion #region 总承包商施工报告 @@ -4512,6 +4637,11 @@ namespace BLL /// public const string RectificationMeasureMenuId = "0629BAB1-DB1C-42CE-A333-49F3813617D7"; + /// + /// 进度完成情况 + /// + public const string ProgressCompletionMenuId = "F3AA42B3-5776-4992-A625-1216C579FEDE"; + /// /// 工程量清单设置 /// @@ -4521,6 +4651,36 @@ namespace BLL /// 工程量完成情况 /// public const string QuantityCompletionMenuId = "2AE9D982-A499-497F-8F54-ADDA5856887E"; + + /// + /// 钢结构完成情况 + /// + public const string SteelStructureCompletionMenuId = "4ACA0647-4D44-462E-8277-1EF9F100566A"; + + /// + /// 设备完成情况 + /// + public const string EquipmentCompletionMenuId = "92FD1845-F56C-4111-8BA0-91838A18B750"; + + /// + /// 管道完成情况 + /// + public const string PipelineCompletionMenuId = "9AE07A76-3A54-4414-BC8C-C86A18C737BA"; + + /// + /// 电气完成情况 + /// + public const string ElectricalCompletionMenuId = "8A8A1050-F227-42ED-9456-8CB5ECA36512"; + + /// + /// 仪表完成情况 + /// + public const string MeterCompletionMenuId = "7EC1FBAF-BEC9-46CD-9E3B-0D0093B4E1C2"; + + /// + /// 全厂地下管网完成情况 + /// + public const string UndergroundPipeCompletionMenuId = "C7037A5D-D8A6-4C1C-A5B8-2083C31C0A7B"; #endregion /// diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index a3cee196..c07baebc 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -120,6 +120,24 @@ namespace BLL set; } = 15; + ///// + ///// ݿġ + ///// + //public static SGGLDB DB + //{ + // get + // { + // if (!DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId)) + // { + // DBList.Add(System.Threading.Thread.CurrentThread.ManagedThreadId, new SGGLDB(connString)); + // } + + // // DBList[System.Threading.Thread.CurrentThread.ManagedThreadId].CommandTimeout = 1200; + // return DBList[System.Threading.Thread.CurrentThread.ManagedThreadId]; + // } + //} + + private static object locker = new object(); /// /// ݿġ /// @@ -127,13 +145,32 @@ namespace BLL { get { - if (!DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId)) + lock (locker) { - DBList.Add(System.Threading.Thread.CurrentThread.ManagedThreadId, new SGGLDB(connString)); - } + try + { + if (!DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId)) + { + DBList.Add(System.Threading.Thread.CurrentThread.ManagedThreadId, new SGGLDB(connString)); + } - // DBList[System.Threading.Thread.CurrentThread.ManagedThreadId].CommandTimeout = 1200; - return DBList[System.Threading.Thread.CurrentThread.ManagedThreadId]; + // DBList[System.Threading.Thread.CurrentThread.ManagedThreadId].CommandTimeout = 1200; + return DBList[System.Threading.Thread.CurrentThread.ManagedThreadId]; + } + catch + { + var db = new SGGLDB(connString); + if (DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId)) + { + DBList[System.Threading.Thread.CurrentThread.ManagedThreadId] = db; + } + else + { + DBList.Add(System.Threading.Thread.CurrentThread.ManagedThreadId, db); + } + return db; + } + } } } diff --git a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs index 696dadf2..99343de6 100644 --- a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs +++ b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs @@ -57,6 +57,7 @@ namespace BLL newHazardRegister.ResponsibleMan = hazardRegister.ResponsibleMan; newHazardRegister.CheckManId = hazardRegister.CheckManId; newHazardRegister.CheckTime = hazardRegister.CheckTime; + newHazardRegister.Requirements = hazardRegister.Requirements; newHazardRegister.RectificationPeriod = hazardRegister.RectificationPeriod; newHazardRegister.ImageUrl = hazardRegister.ImageUrl; newHazardRegister.RectificationImageUrl = hazardRegister.RectificationImageUrl; @@ -91,6 +92,7 @@ namespace BLL newHazardRegister.AttachUrl = hazardRegister.AttachUrl; newHazardRegister.ProjectId = hazardRegister.ProjectId; newHazardRegister.States = hazardRegister.States; + newHazardRegister.Requirements = hazardRegister.Requirements; newHazardRegister.IsEffective = hazardRegister.IsEffective; newHazardRegister.ResponsibleMan = hazardRegister.ResponsibleMan; newHazardRegister.CheckManId = hazardRegister.CheckManId; diff --git a/SGGL/BLL/JDGL/Check/ElectricalCompletionService.cs b/SGGL/BLL/JDGL/Check/ElectricalCompletionService.cs new file mode 100644 index 00000000..76a1eeef --- /dev/null +++ b/SGGL/BLL/JDGL/Check/ElectricalCompletionService.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 电气完成情况 + /// + public class ElectricalCompletionService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取电气完成情况 + /// + /// + /// + public static Model.JDGL_ElectricalCompletion GetElectricalCompletionById(string electricalCompletionId) + { + return Funs.DB.JDGL_ElectricalCompletion.FirstOrDefault(e => e.ElectricalCompletionId == electricalCompletionId); + } + + /// + /// 添加电气完成情况 + /// + /// + public static void AddElectricalCompletion(Model.JDGL_ElectricalCompletion electricalCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_ElectricalCompletion newElectricalCompletion = new Model.JDGL_ElectricalCompletion + { + ElectricalCompletionId = electricalCompletion.ElectricalCompletionId, + ProjectId = electricalCompletion.ProjectId, + UnitId = electricalCompletion.UnitId, + Name = electricalCompletion.Name, + Unit = electricalCompletion.Unit, + TotalNum = electricalCompletion.TotalNum, + ThisNum = electricalCompletion.ThisNum, + CompileMan = electricalCompletion.CompileMan, + CompileDate = electricalCompletion.CompileDate, + StartDate = electricalCompletion.StartDate, + EndDate = electricalCompletion.EndDate + }; + db.JDGL_ElectricalCompletion.InsertOnSubmit(newElectricalCompletion); + db.SubmitChanges(); + } + + /// + /// 修改电气完成情况 + /// + /// + public static void UpdateElectricalCompletion(Model.JDGL_ElectricalCompletion electricalCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_ElectricalCompletion newElectricalCompletion = db.JDGL_ElectricalCompletion.FirstOrDefault(e => e.ElectricalCompletionId == electricalCompletion.ElectricalCompletionId); + if (newElectricalCompletion != null) + { + newElectricalCompletion.TotalNum = electricalCompletion.TotalNum; + newElectricalCompletion.ThisNum = electricalCompletion.ThisNum; + newElectricalCompletion.CompileMan = electricalCompletion.CompileMan; + newElectricalCompletion.CompileDate = electricalCompletion.CompileDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除电气完成情况 + /// + /// + public static void DeleteElectricalCompletionById(string electricalCompletionId) + { + Model.SGGLDB db = Funs.DB; + var electricalCompletion = (from x in db.JDGL_ElectricalCompletion where x.ElectricalCompletionId == electricalCompletionId select x).FirstOrDefault(); + if (electricalCompletion != null) + { + db.JDGL_ElectricalCompletion.DeleteOnSubmit(electricalCompletion); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/JDGL/Check/EquipmentCompletionService.cs b/SGGL/BLL/JDGL/Check/EquipmentCompletionService.cs new file mode 100644 index 00000000..7b2b8eec --- /dev/null +++ b/SGGL/BLL/JDGL/Check/EquipmentCompletionService.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 设备完成情况 + /// + public class EquipmentCompletionService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取设备完成情况 + /// + /// + /// + public static Model.JDGL_EquipmentCompletion GetEquipmentCompletionById(string equipmentCompletionId) + { + return Funs.DB.JDGL_EquipmentCompletion.FirstOrDefault(e => e.EquipmentCompletionId == equipmentCompletionId); + } + + /// + /// 添加设备完成情况 + /// + /// + public static void AddEquipmentCompletion(Model.JDGL_EquipmentCompletion equipmentCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_EquipmentCompletion newEquipmentCompletion = new Model.JDGL_EquipmentCompletion + { + EquipmentCompletionId = equipmentCompletion.EquipmentCompletionId, + ProjectId = equipmentCompletion.ProjectId, + UnitId = equipmentCompletion.UnitId, + TotalNum = equipmentCompletion.TotalNum, + ArrivalNum = equipmentCompletion.ArrivalNum, + ThisNum = equipmentCompletion.ThisNum, + CompileMan = equipmentCompletion.CompileMan, + CompileDate = equipmentCompletion.CompileDate, + StartDate = equipmentCompletion.StartDate, + EndDate = equipmentCompletion.EndDate + }; + db.JDGL_EquipmentCompletion.InsertOnSubmit(newEquipmentCompletion); + db.SubmitChanges(); + } + + /// + /// 修改设备完成情况 + /// + /// + public static void UpdateEquipmentCompletion(Model.JDGL_EquipmentCompletion equipmentCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_EquipmentCompletion newEquipmentCompletion = db.JDGL_EquipmentCompletion.FirstOrDefault(e => e.EquipmentCompletionId == equipmentCompletion.EquipmentCompletionId); + if (newEquipmentCompletion != null) + { + newEquipmentCompletion.TotalNum = equipmentCompletion.TotalNum; + newEquipmentCompletion.ArrivalNum = equipmentCompletion.ArrivalNum; + newEquipmentCompletion.ThisNum = equipmentCompletion.ThisNum; + newEquipmentCompletion.CompileMan = equipmentCompletion.CompileMan; + newEquipmentCompletion.CompileDate = equipmentCompletion.CompileDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除设备完成情况 + /// + /// + public static void DeleteEquipmentCompletionById(string equipmentCompletionId) + { + Model.SGGLDB db = Funs.DB; + var equipmentCompletion = (from x in db.JDGL_EquipmentCompletion where x.EquipmentCompletionId == equipmentCompletionId select x).FirstOrDefault(); + if (equipmentCompletion != null) + { + db.JDGL_EquipmentCompletion.DeleteOnSubmit(equipmentCompletion); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/JDGL/Check/MeterCompletionService.cs b/SGGL/BLL/JDGL/Check/MeterCompletionService.cs new file mode 100644 index 00000000..d4e5919d --- /dev/null +++ b/SGGL/BLL/JDGL/Check/MeterCompletionService.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 仪表完成情况 + /// + public class MeterCompletionService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取仪表完成情况 + /// + /// + /// + public static Model.JDGL_MeterCompletion GetMeterCompletionById(string meterCompletionId) + { + return Funs.DB.JDGL_MeterCompletion.FirstOrDefault(e => e.MeterCompletionId == meterCompletionId); + } + + /// + /// 添加仪表完成情况 + /// + /// + public static void AddMeterCompletion(Model.JDGL_MeterCompletion meterCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_MeterCompletion newMeterCompletion = new Model.JDGL_MeterCompletion + { + MeterCompletionId = meterCompletion.MeterCompletionId, + ProjectId = meterCompletion.ProjectId, + UnitId = meterCompletion.UnitId, + Name = meterCompletion.Name, + Unit = meterCompletion.Unit, + TotalNum = meterCompletion.TotalNum, + ThisNum = meterCompletion.ThisNum, + CompileMan = meterCompletion.CompileMan, + CompileDate = meterCompletion.CompileDate, + StartDate = meterCompletion.StartDate, + EndDate = meterCompletion.EndDate + }; + db.JDGL_MeterCompletion.InsertOnSubmit(newMeterCompletion); + db.SubmitChanges(); + } + + /// + /// 修改仪表完成情况 + /// + /// + public static void UpdateMeterCompletion(Model.JDGL_MeterCompletion meterCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_MeterCompletion newMeterCompletion = db.JDGL_MeterCompletion.FirstOrDefault(e => e.MeterCompletionId == meterCompletion.MeterCompletionId); + if (newMeterCompletion != null) + { + newMeterCompletion.TotalNum = meterCompletion.TotalNum; + newMeterCompletion.ThisNum = meterCompletion.ThisNum; + newMeterCompletion.CompileMan = meterCompletion.CompileMan; + newMeterCompletion.CompileDate = meterCompletion.CompileDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除仪表完成情况 + /// + /// + public static void DeleteMeterCompletionById(string meterCompletionId) + { + Model.SGGLDB db = Funs.DB; + var meterCompletion = (from x in db.JDGL_MeterCompletion where x.MeterCompletionId == meterCompletionId select x).FirstOrDefault(); + if (meterCompletion != null) + { + db.JDGL_MeterCompletion.DeleteOnSubmit(meterCompletion); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/JDGL/Check/PipelineCompletionService.cs b/SGGL/BLL/JDGL/Check/PipelineCompletionService.cs new file mode 100644 index 00000000..d9a6a8e8 --- /dev/null +++ b/SGGL/BLL/JDGL/Check/PipelineCompletionService.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 管道完成情况 + /// + public class PipelineCompletionService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取管道完成情况 + /// + /// + /// + public static Model.JDGL_PipelineCompletion GetPipelineCompletionById(string pipelineCompletionId) + { + return Funs.DB.JDGL_PipelineCompletion.FirstOrDefault(e => e.PipelineCompletionId == pipelineCompletionId); + } + + /// + /// 添加管道完成情况 + /// + /// + public static void AddPipelineCompletion(Model.JDGL_PipelineCompletion pipelineCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_PipelineCompletion newPipelineCompletion = new Model.JDGL_PipelineCompletion + { + PipelineCompletionId = pipelineCompletion.PipelineCompletionId, + ProjectId = pipelineCompletion.ProjectId, + UnitId = pipelineCompletion.UnitId, + TotalNum = pipelineCompletion.TotalNum, + ThisNum = pipelineCompletion.ThisNum, + CompileMan = pipelineCompletion.CompileMan, + CompileDate = pipelineCompletion.CompileDate, + StartDate = pipelineCompletion.StartDate, + EndDate = pipelineCompletion.EndDate + }; + db.JDGL_PipelineCompletion.InsertOnSubmit(newPipelineCompletion); + db.SubmitChanges(); + } + + /// + /// 修改管道完成情况 + /// + /// + public static void UpdatePipelineCompletion(Model.JDGL_PipelineCompletion pipelineCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_PipelineCompletion newPipelineCompletion = db.JDGL_PipelineCompletion.FirstOrDefault(e => e.PipelineCompletionId == pipelineCompletion.PipelineCompletionId); + if (newPipelineCompletion != null) + { + newPipelineCompletion.TotalNum = pipelineCompletion.TotalNum; + newPipelineCompletion.ThisNum = pipelineCompletion.ThisNum; + newPipelineCompletion.CompileMan = pipelineCompletion.CompileMan; + newPipelineCompletion.CompileDate = pipelineCompletion.CompileDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除管道完成情况 + /// + /// + public static void DeletePipelineCompletionById(string pipelineCompletionId) + { + Model.SGGLDB db = Funs.DB; + var pipelineCompletion = (from x in db.JDGL_PipelineCompletion where x.PipelineCompletionId == pipelineCompletionId select x).FirstOrDefault(); + if (pipelineCompletion != null) + { + db.JDGL_PipelineCompletion.DeleteOnSubmit(pipelineCompletion); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/JDGL/Check/ProgressCompletionService.cs b/SGGL/BLL/JDGL/Check/ProgressCompletionService.cs new file mode 100644 index 00000000..25a29434 --- /dev/null +++ b/SGGL/BLL/JDGL/Check/ProgressCompletionService.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 进度完成情况 + /// + public class ProgressCompletionService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取进度完成情况 + /// + /// + /// + public static Model.JDGL_ProgressCompletion GetProgressCompletionById(string progressCompletionId) + { + return Funs.DB.JDGL_ProgressCompletion.FirstOrDefault(e => e.ProgressCompletionId == progressCompletionId); + } + + /// + /// 根据项目id和月份获取进度完成情况 + /// + /// + /// + /// + public static Model.JDGL_ProgressCompletion GetProgressCompletionByProjectIdAndMonths(string projectId, string months) + { + return Funs.DB.JDGL_ProgressCompletion.FirstOrDefault(e => e.ProjectId == projectId && e.Months == Convert.ToDateTime(months)); + } + + /// + /// 添加进度完成情况 + /// + /// + public static void AddProgressCompletion(Model.JDGL_ProgressCompletion progressCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_ProgressCompletion newProgressCompletion = new Model.JDGL_ProgressCompletion + { + ProgressCompletionId = progressCompletion.ProgressCompletionId, + ProjectId = progressCompletion.ProjectId, + Months = progressCompletion.Months, + PlanNum = progressCompletion.PlanNum, + RealNum = progressCompletion.RealNum, + CompileMan = progressCompletion.CompileMan, + CompileDate = progressCompletion.CompileDate, + }; + db.JDGL_ProgressCompletion.InsertOnSubmit(newProgressCompletion); + db.SubmitChanges(); + } + + /// + /// 修改进度完成情况 + /// + /// + public static void UpdateProgressCompletion(Model.JDGL_ProgressCompletion progressCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_ProgressCompletion newProgressCompletion = db.JDGL_ProgressCompletion.FirstOrDefault(e => e.ProgressCompletionId == progressCompletion.ProgressCompletionId); + if (newProgressCompletion != null) + { + newProgressCompletion.PlanNum = progressCompletion.PlanNum; + newProgressCompletion.RealNum = progressCompletion.RealNum; + newProgressCompletion.CompileMan = progressCompletion.CompileMan; + newProgressCompletion.CompileDate = progressCompletion.CompileDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除进度完成情况 + /// + /// + public static void DeleteProgressCompletionById(string progressCompletionId) + { + Model.SGGLDB db = Funs.DB; + var progressCompletion = (from x in db.JDGL_ProgressCompletion where x.ProgressCompletionId == progressCompletionId select x).FirstOrDefault(); + if (progressCompletion != null) + { + db.JDGL_ProgressCompletion.DeleteOnSubmit(progressCompletion); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/JDGL/Check/QuantityCompletionService.cs b/SGGL/BLL/JDGL/Check/QuantityCompletionService.cs index 2d4b013e..401eb7c0 100644 --- a/SGGL/BLL/JDGL/Check/QuantityCompletionService.cs +++ b/SGGL/BLL/JDGL/Check/QuantityCompletionService.cs @@ -38,7 +38,9 @@ namespace BLL PlanNum = quantityCompletion.PlanNum, RealNum = quantityCompletion.RealNum, CompileMan = quantityCompletion.CompileMan, - CompileDate = quantityCompletion.CompileDate + CompileDate = quantityCompletion.CompileDate, + StartDate=quantityCompletion.StartDate, + EndDate=quantityCompletion.EndDate }; db.JDGL_QuantityCompletion.InsertOnSubmit(newQuantityCompletion); db.SubmitChanges(); diff --git a/SGGL/BLL/JDGL/Check/SteelStructureCompletionService.cs b/SGGL/BLL/JDGL/Check/SteelStructureCompletionService.cs new file mode 100644 index 00000000..362df03c --- /dev/null +++ b/SGGL/BLL/JDGL/Check/SteelStructureCompletionService.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 钢结构完成情况 + /// + public class SteelStructureCompletionService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取钢结构完成情况 + /// + /// + /// + public static Model.JDGL_SteelStructureCompletion GetSteelStructureCompletionById(string steelStructureCompletionId) + { + return Funs.DB.JDGL_SteelStructureCompletion.FirstOrDefault(e => e.SteelStructureCompletionId == steelStructureCompletionId); + } + + /// + /// 添加钢结构完成情况 + /// + /// + public static void AddSteelStructureCompletion(Model.JDGL_SteelStructureCompletion steelStructureCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_SteelStructureCompletion newSteelStructureCompletion = new Model.JDGL_SteelStructureCompletion + { + SteelStructureCompletionId = steelStructureCompletion.SteelStructureCompletionId, + ProjectId = steelStructureCompletion.ProjectId, + UnitId = steelStructureCompletion.UnitId, + TotalNum = steelStructureCompletion.TotalNum, + ArrivalNum = steelStructureCompletion.ArrivalNum, + ThisNum = steelStructureCompletion.ThisNum, + CompileMan = steelStructureCompletion.CompileMan, + CompileDate = steelStructureCompletion.CompileDate, + StartDate = steelStructureCompletion.StartDate, + EndDate = steelStructureCompletion.EndDate + }; + db.JDGL_SteelStructureCompletion.InsertOnSubmit(newSteelStructureCompletion); + db.SubmitChanges(); + } + + /// + /// 修改钢结构完成情况 + /// + /// + public static void UpdateSteelStructureCompletion(Model.JDGL_SteelStructureCompletion steelStructureCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_SteelStructureCompletion newSteelStructureCompletion = db.JDGL_SteelStructureCompletion.FirstOrDefault(e => e.SteelStructureCompletionId == steelStructureCompletion.SteelStructureCompletionId); + if (newSteelStructureCompletion != null) + { + newSteelStructureCompletion.TotalNum = steelStructureCompletion.TotalNum; + newSteelStructureCompletion.ArrivalNum = steelStructureCompletion.ArrivalNum; + newSteelStructureCompletion.ThisNum = steelStructureCompletion.ThisNum; + newSteelStructureCompletion.CompileMan = steelStructureCompletion.CompileMan; + newSteelStructureCompletion.CompileDate = steelStructureCompletion.CompileDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除钢结构完成情况 + /// + /// + public static void DeleteSteelStructureCompletionById(string steelStructureCompletionId) + { + Model.SGGLDB db = Funs.DB; + var steelStructureCompletion = (from x in db.JDGL_SteelStructureCompletion where x.SteelStructureCompletionId == steelStructureCompletionId select x).FirstOrDefault(); + if (steelStructureCompletion != null) + { + db.JDGL_SteelStructureCompletion.DeleteOnSubmit(steelStructureCompletion); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/JDGL/Check/UndergroundPipeCompletionService.cs b/SGGL/BLL/JDGL/Check/UndergroundPipeCompletionService.cs new file mode 100644 index 00000000..66d2406b --- /dev/null +++ b/SGGL/BLL/JDGL/Check/UndergroundPipeCompletionService.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BLL +{ + /// + /// 全厂地下管网完成情况 + /// + public class UndergroundPipeCompletionService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取全厂地下管网完成情况 + /// + /// + /// + public static Model.JDGL_UndergroundPipeCompletion GetUndergroundPipeCompletionById(string pipelineCompletionId) + { + return Funs.DB.JDGL_UndergroundPipeCompletion.FirstOrDefault(e => e.UndergroundPipeCompletionId == pipelineCompletionId); + } + + /// + /// 添加全厂地下管网完成情况 + /// + /// + public static void AddUndergroundPipeCompletion(Model.JDGL_UndergroundPipeCompletion pipelineCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_UndergroundPipeCompletion newUndergroundPipeCompletion = new Model.JDGL_UndergroundPipeCompletion + { + UndergroundPipeCompletionId = pipelineCompletion.UndergroundPipeCompletionId, + ProjectId = pipelineCompletion.ProjectId, + UnitId = pipelineCompletion.UnitId, + TotalNum = pipelineCompletion.TotalNum, + ThisNum = pipelineCompletion.ThisNum, + CompileMan = pipelineCompletion.CompileMan, + CompileDate = pipelineCompletion.CompileDate, + StartDate = pipelineCompletion.StartDate, + EndDate = pipelineCompletion.EndDate + }; + db.JDGL_UndergroundPipeCompletion.InsertOnSubmit(newUndergroundPipeCompletion); + db.SubmitChanges(); + } + + /// + /// 修改全厂地下管网完成情况 + /// + /// + public static void UpdateUndergroundPipeCompletion(Model.JDGL_UndergroundPipeCompletion pipelineCompletion) + { + Model.SGGLDB db = Funs.DB; + Model.JDGL_UndergroundPipeCompletion newUndergroundPipeCompletion = db.JDGL_UndergroundPipeCompletion.FirstOrDefault(e => e.UndergroundPipeCompletionId == pipelineCompletion.UndergroundPipeCompletionId); + if (newUndergroundPipeCompletion != null) + { + newUndergroundPipeCompletion.TotalNum = pipelineCompletion.TotalNum; + newUndergroundPipeCompletion.ThisNum = pipelineCompletion.ThisNum; + newUndergroundPipeCompletion.CompileMan = pipelineCompletion.CompileMan; + newUndergroundPipeCompletion.CompileDate = pipelineCompletion.CompileDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除全厂地下管网完成情况 + /// + /// + public static void DeleteUndergroundPipeCompletionById(string pipelineCompletionId) + { + Model.SGGLDB db = Funs.DB; + var pipelineCompletion = (from x in db.JDGL_UndergroundPipeCompletion where x.UndergroundPipeCompletionId == pipelineCompletionId select x).FirstOrDefault(); + if (pipelineCompletion != null) + { + db.JDGL_UndergroundPipeCompletion.DeleteOnSubmit(pipelineCompletion); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index e84649ba..67769044 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -265,7 +265,7 @@ { return (from x in Funs.DB.Base_Project join y in Funs.DB.Project_ProjectUser on x.ProjectId equals y.ProjectId - where y.UserId == userId + where y.UserId == userId && y.IsPost == true orderby x.ProjectCode descending select x).Distinct().ToList(); } diff --git a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs index 1fc58ca0..9adcd197 100644 --- a/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs +++ b/SGGL/BLL/ZHGL/Supervise/SuperviseCheckRectifyItemService.cs @@ -47,11 +47,8 @@ namespace BLL OrderEndDate = superviseCheckRectifyItem.OrderEndDate, OrderEndPerson = superviseCheckRectifyItem.OrderEndPerson, RealEndDate = superviseCheckRectifyItem.RealEndDate, - AttachUrl = superviseCheckRectifyItem.AttachUrl, - VerifierDate = superviseCheckRectifyItem.VerifierDate, - VerifierName = superviseCheckRectifyItem.VerifierName, + AttachUrl = superviseCheckRectifyItem.AttachUrl }; - Funs.DB.Supervise_SuperviseCheckRectifyItem.InsertOnSubmit(newSuperviseCheckRectifyItem); Funs.DB.SubmitChanges(); } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx index 987098c7..b2bf2a51 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx @@ -33,6 +33,9 @@ + + @@ -43,7 +46,7 @@ - - + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.cs index d5196500..bec41610 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; namespace FineUIPro.Web.Comprehensive { @@ -249,5 +250,24 @@ namespace FineUIPro.Web.Comprehensive } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("资料发放登记" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.designer.cs index 9289db2c..61f8e0ef 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.designer.cs @@ -102,6 +102,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -112,13 +121,13 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label3 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label3; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx index ad07f1da..0c3bf09a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx @@ -34,6 +34,9 @@ + + @@ -44,7 +47,7 @@ - - + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.cs index d7523390..d02c60ea 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; - +using System.Text; namespace FineUIPro.Web.Comprehensive { @@ -253,5 +253,24 @@ namespace FineUIPro.Web.Comprehensive } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("资料接收登记" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.designer.cs index e2d5b2e6..8b164818 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.designer.cs @@ -102,6 +102,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -112,13 +121,13 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label3 控件。 + /// lbUnitNames 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label3; + protected global::System.Web.UI.WebControls.Label lbUnitNames; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx index f616fcf0..19eb2027 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx @@ -39,6 +39,9 @@ + + @@ -53,7 +56,7 @@ - + - - - + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs index 8497d524..c674232b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; + namespace FineUIPro.Web.Comprehensive { public partial class DesignChangeOrder : PageBase @@ -315,5 +317,24 @@ namespace FineUIPro.Web.Comprehensive } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("设计变更单管理" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.designer.cs index 1ae185ec..bbd2e020 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.designer.cs @@ -129,6 +129,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -139,22 +148,22 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label2 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// - /// Label3 控件。 + /// lbUnitName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label3; + protected global::System.Web.UI.WebControls.Label lbUnitName; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx index 4860f811..56eb37e0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx @@ -27,6 +27,9 @@ + + @@ -45,17 +48,17 @@ - - + - + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs index 14f39513..faa1c877 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; + namespace FineUIPro.Web.Comprehensive { public partial class DesignDetails : PageBase @@ -267,5 +269,24 @@ namespace FineUIPro.Web.Comprehensive } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("设计交底管理" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs index 1c981e4f..43aa169d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs @@ -84,6 +84,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -94,22 +103,22 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label2 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// - /// Label1 控件。 + /// lbUnitName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label1; + protected global::System.Web.UI.WebControls.Label lbUnitName; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx index 88232af6..0a82a214 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx @@ -35,6 +35,9 @@ + + @@ -50,7 +53,7 @@ - + - - - - + + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("图纸收发记录" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs index f2155f5a..42448249 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs @@ -111,6 +111,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -121,22 +130,22 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label2 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// - /// Label3 控件。 + /// lbUnitName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label3; + protected global::System.Web.UI.WebControls.Label lbUnitName; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx index ad5daf82..3d484cb1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx @@ -32,6 +32,9 @@ + + @@ -49,7 +52,7 @@ - + - + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("施工组织设计及施工方案" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs index bd3bbbb2..7a426f68 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs @@ -102,6 +102,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -112,13 +121,13 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label2 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// /// LinkButton1 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx index cb4aa5af..51d0e3b7 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx @@ -16,7 +16,7 @@ @@ -39,6 +39,9 @@ + + @@ -79,7 +82,7 @@ - + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("设备材料报验" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.designer.cs index 7997512e..f81afb0d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.designer.cs @@ -129,6 +129,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx index f4d8f385..f1f60b8a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx @@ -16,7 +16,7 @@ + EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True" OnPageIndexChange="Grid1_PageIndexChange"> @@ -37,6 +37,9 @@ + + @@ -64,7 +67,7 @@ - - - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs index 2d691b0d..03e3cdb7 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; + namespace FineUIPro.Web.Comprehensive { public partial class InspectionMachine : PageBase @@ -239,5 +241,24 @@ namespace FineUIPro.Web.Comprehensive } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("机具报验" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.designer.cs index fda4bb78..d1af5708 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.designer.cs @@ -111,6 +111,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx index a2f460a6..2f0ab856 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx @@ -34,6 +34,9 @@ + + @@ -54,7 +57,7 @@ - + - - - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs index 1658af5c..f506a0f5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; + namespace FineUIPro.Web.Comprehensive { public partial class InspectionPerson : PageBase @@ -308,5 +310,24 @@ namespace FineUIPro.Web.Comprehensive PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PersonItem.aspx?InspectionPersonId={0}", Grid1.SelectedRowID, "编辑 - "))); } } + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员报验" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.designer.cs index 737128cb..d308202d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.designer.cs @@ -111,6 +111,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -121,13 +130,13 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label2 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx index e1db6186..96415a82 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx @@ -32,6 +32,9 @@ + + @@ -50,7 +53,7 @@ - + - + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("超过一定规模的危大施工方案" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs index 37440826..c374e8d4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs @@ -102,6 +102,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -112,13 +121,13 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label2 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// /// LinkButton1 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx index 3d62c276..091a1861 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx @@ -34,6 +34,9 @@ + + @@ -44,7 +47,7 @@ - - + - - + - - + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("NCR管理" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs index 292af1ed..af765984 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs @@ -111,6 +111,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -121,22 +130,22 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label2 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// - /// Label3 控件。 + /// lbUnitNames 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label3; + protected global::System.Web.UI.WebControls.Label lbUnitNames; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx index f6eece10..35e9194a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx @@ -30,6 +30,9 @@ + + @@ -40,7 +43,7 @@ - + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("压力管道管理" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs index d1c1a29d..a0c12997 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs @@ -84,6 +84,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx index c5ac3d63..e5c4bda1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx @@ -25,6 +25,9 @@ + + @@ -35,15 +38,15 @@ - - - + + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("质量事故处理记录" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs index ba2ca68a..8dffecce 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs @@ -66,6 +66,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// @@ -76,13 +85,13 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// Label2 控件。 + /// lbUnitWorkName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbUnitWorkName; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx index 7754d69c..dcfd07f0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx @@ -40,6 +40,9 @@ + + @@ -67,7 +70,7 @@ - + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("现场签证管理" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.designer.cs index f1268b4a..5dde7fee 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.designer.cs @@ -129,6 +129,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnImport; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs index 1aa71454..2aee6d30 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs @@ -374,68 +374,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cns = from x in Funs.DB.Base_CNProfessional select x; var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x; - var oldViewInfos = from x in Funs.DB.Comprehensive_DesignChangeOrder + var oldViewInfos = from x in Funs.DB.Comprehensive_SiteVisaManagement where x.ProjectId == this.CurrUser.LoginProjectId select x; for (int i = 0; i < ir; i++) { - var oldViewInfo = oldViewInfos.Where(x => x.ChangeOrderCode == pds.Rows[i][2].ToString().Trim()).FirstOrDefault(); + var oldViewInfo = oldViewInfos.Where(x => x.VisaCode == pds.Rows[i][1].ToString().Trim()).FirstOrDefault(); if (oldViewInfo == null) { - Model.Comprehensive_DesignChangeOrder Ins = new Model.Comprehensive_DesignChangeOrder(); + Model.Comprehensive_SiteVisaManagement Ins = new Model.Comprehensive_SiteVisaManagement(); Ins.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim())) { - Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][0].ToString().Trim()).CNProfessionalId; + Ins.UnitId = Funs.DB.Base_Unit.First(e => e.UnitName == pds.Rows[i][0].ToString().Trim()).UnitId; } - if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim())) + Ins.VisaCode = pds.Rows[i][1].ToString().Trim(); + Ins.VisaContent = pds.Rows[i][2].ToString().Trim(); + string row3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(row3)) { - Ins.UnitWorkId = Funs.DB.WBS_UnitWork.First(e => e.UnitWorkName == pds.Rows[i][1].ToString().Trim()).UnitWorkId; + Ins.ProcessingState = row3; + } + else + { + Ins.ProcessingState = "未实施"; + } + if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) + { + Ins.UnitWorkId = installations.First(e => e.UnitWorkName == pds.Rows[i][4].ToString().Trim()).UnitWorkId; } - - Ins.ChangeOrderCode = pds.Rows[i][2].ToString().Trim(); - Ins.ChangeReason = pds.Rows[i][3].ToString().Trim(); - Ins.Contents = pds.Rows[i][4].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim())) { - Ins.IssuedDate = Convert.ToDateTime(pds.Rows[i][5].ToString().Trim()); + Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][5].ToString().Trim()).CNProfessionalId; } - if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim())) { - Ins.ApprovalDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); + Ins.VisaDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); } - - if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) - { - Ins.UnitId = BLL.UnitService.GetUnitByUnitId(pds.Rows[i][7].ToString().Trim()).UnitId; - } - - Ins.ImplementationFrontState = pds.Rows[i][8].ToString().Trim(); - - string row9 = pds.Rows[i][9].ToString().Trim(); - if (!string.IsNullOrEmpty(row9)) - { - if (row9 == "未实施") - { - Ins.HandleState = "1"; - } - if (row9 == "进行中") - { - Ins.HandleState = "2"; - } - if (row9 == "已完成") - { - Ins.HandleState = "3"; - } - } - - Ins.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder)); + Ins.SignMan = pds.Rows[i][7].ToString().Trim(); + Ins.AuditMan = pds.Rows[i][8].ToString().Trim(); + Ins.Remark = pds.Rows[i][9].ToString().Trim(); + Ins.VisaId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SiteVisaManagement)); Ins.CompileMan = this.CurrUser.UserId; - Ins.CompileDate = DateTime.Now.Date; - BLL.DesignChangeOrderService.AddDesignChangeOrder(Ins); + + BLL.SiteVisaManagementService.AddSiteVisaManagement(Ins); } } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx index dc9d5257..462dff7a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx @@ -32,6 +32,9 @@ + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs index dd4a4d48..cf872437 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; namespace FineUIPro.Web.Comprehensive { @@ -217,5 +218,24 @@ namespace FineUIPro.Web.Comprehensive } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("特种设备管理" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs index d1877051..ec6ca567 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs @@ -93,6 +93,15 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReport.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReport.aspx index 16e500c8..5fd5b2f2 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReport.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReport.aspx @@ -13,7 +13,7 @@ - diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportEdit.aspx.cs index 80ad4195..f7602b79 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportEdit.aspx.cs @@ -85,8 +85,8 @@ namespace FineUIPro.Web.CQMS.ManageReport } } this.txtPeriod.ReadOnly = true; - this.txtStartDate.Enabled = false; - this.txtEndDate.Enabled = false; + //this.txtStartDate.Enabled = false; + //this.txtEndDate.Enabled = false; GetThisWeekOrMonthContentList(this.ReportId);//本月主要工作内容 GetRowMaterialProblemList(this.ReportId);//原材料问题 GetConstructionProblemsList(this.ReportId);//施工过程问题 diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportPrint.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportPrint.aspx index 78b42a58..2407d111 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportPrint.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/MonthReportPrint.aspx @@ -48,7 +48,7 @@ var WebBrowser = ''; document.body.insertAdjacentHTML('beforeEnd', WebBrowser); //在body标签内加入html(WebBrowser activeX控件) - WebBrowser1.ExecWB(6, 6); //打印 + WebBrowser1.ExecWB(6, 1); //打印 WebBrowser1.outerHTML = ""; //从代码中清除插入的html代码 pagesetup_default(); //打印结束后页眉页脚恢复默认值 document.getElementById("div1").style.display = "block"; @@ -71,13 +71,13 @@ - 页面设置 - 打印设置 - 打印预览 - 打印 diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReport.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReport.aspx index af48e62b..febd418c 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReport.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReport.aspx @@ -13,7 +13,7 @@ - diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReportEdit.aspx.cs index 1ecbbdde..ce810c24 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReportEdit.aspx.cs @@ -85,8 +85,8 @@ namespace FineUIPro.Web.CQMS.ManageReport } } this.txtPeriod.ReadOnly = true; - this.txtStartDate.Enabled = false; - this.txtEndDate.Enabled = false; + //this.txtStartDate.Enabled = false; + //this.txtEndDate.Enabled = false; GetThisWeekOrMonthContentList(this.ReportId);//本周主要工作内容 GetRowMaterialProblemList(this.ReportId);//原材料问题 GetConstructionProblemsList(this.ReportId);//施工过程问题 diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReportPrint.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReportPrint.aspx index fc17b240..df4c291a 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReportPrint.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/WeekReportPrint.aspx @@ -48,7 +48,7 @@ var WebBrowser = ''; document.body.insertAdjacentHTML('beforeEnd', WebBrowser); //在body标签内加入html(WebBrowser activeX控件) - WebBrowser1.ExecWB(6, 6); //打印 + WebBrowser1.ExecWB(6, 1); //打印 WebBrowser1.outerHTML = ""; //从代码中清除插入的html代码 pagesetup_default(); //打印结束后页眉页脚恢复默认值 document.getElementById("div1").style.display = "block"; @@ -71,13 +71,13 @@ - 页面设置 - 打印设置 - 打印预览 - 打印 diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs index 8928cc27..3ee04b53 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using System.Web.UI.WebControls; +using BLL; namespace FineUIPro.Web.CQMS.ProcessControl { public partial class CheckManStatistics : PageBase @@ -83,23 +85,14 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// protected void btnOut_Click(object sender, EventArgs e) { - DateTime dt = DateTime.Now; - string filename = dt.Year.ToString() + dt.Month.ToString() + dt.Day.ToString() + dt.Hour.ToString() + dt.Minute.ToString() + dt.Second.ToString(); - - Response.Clear(); - Response.Buffer = true; - Response.Charset = "GB2312"; - Response.ContentEncoding = System.Text.Encoding.UTF8; - Response.Write(""); - - Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("检查人检查次数统计" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/ms-excel"; - this.EnableViewState = false; - System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); - System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter); - this.gvCheckManStatistics.RenderControl(oHtmlTextWriter); - Response.Write(oStringWriter.ToString()); - Response.Flush(); + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("检查人检查次数统计" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.gvCheckManStatistics.PageSize = gvCheckManStatistics.RecordCount; + BindGvInspectionManagement(); + Response.Write(GetGridTableHtml2(gvCheckManStatistics)); Response.End(); } } diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx index d9d8094a..f20bd3c4 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx @@ -32,6 +32,9 @@ + + diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.cs index defd975c..36a990c5 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; namespace FineUIPro.Web.CQMS.ProcessControl { @@ -232,5 +233,24 @@ namespace FineUIPro.Web.CQMS.ProcessControl } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("热处理检测" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.designer.cs index 9cabde96..7321d0a7 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.designer.cs @@ -111,6 +111,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx index 2f46674e..18567721 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx @@ -38,6 +38,9 @@ EnablePostBack="true" runat="server" ToolTip="查询" OnClick="btnSearch_Click"> + + <%-- --%> @@ -50,7 +53,7 @@ - - diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.cs index 6e05f83b..4a248423 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; namespace FineUIPro.Web.CQMS.ProcessControl { @@ -231,5 +232,24 @@ namespace FineUIPro.Web.CQMS.ProcessControl } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("控制点检查检测" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.designer.cs index 305b4a10..5a5b5b2d 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.designer.cs @@ -111,6 +111,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl { /// protected global::FineUIPro.Button btnSearch; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx index 67c1145b..639be792 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx @@ -15,7 +15,7 @@ @@ -38,14 +38,18 @@ - - - - - - - - + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs index 256b76ed..c89b3391 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; @@ -229,23 +230,21 @@ namespace FineUIPro.Web.CQMS.ProcessControl protected void btnOut_Click(object sender, EventArgs e) { - DateTime dt = DateTime.Now; - string filename = dt.Year.ToString() + dt.Month.ToString() + dt.Day.ToString() + dt.Hour.ToString() + dt.Minute.ToString() + dt.Second.ToString(); - - Response.Clear(); - Response.Buffer = true; - Response.Charset = "GB2312"; - Response.ContentEncoding = System.Text.Encoding.UTF8; - Response.Write(""); - - Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("控制点检查检测合格率统计" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/ms-excel"; - this.EnableViewState = false; - System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); - System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter); - this.Grid1.RenderControl(oHtmlTextWriter); - Response.Write(oStringWriter.ToString()); - Response.Flush(); + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("控制点检查检测合格率统计" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + if (this.drpCNProfessional.SelectedValue != BLL.Const._Null) + { + BindGvInspectionManagement(this.drpCNProfessional.SelectedValue); + } + else + { + BindGvInspectionManagement(null); + } + Response.Write(GetGridTableHtml2(Grid1)); Response.End(); } } diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx index be17ba44..0d339bc8 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx @@ -40,6 +40,9 @@ + + @@ -49,7 +52,7 @@ - + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("共检通知单" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.designer.cs index bc4c4435..3354cdb8 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.designer.cs @@ -120,6 +120,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx index c597f646..87cd2486 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx @@ -41,6 +41,9 @@ + + @@ -72,7 +75,7 @@ - diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx.cs index bdcbc518..03b017b8 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; +using System.Text; + namespace FineUIPro.Web.CQMS.ProcessControl { public partial class NondestructiveTest : PageBase @@ -248,5 +250,24 @@ namespace FineUIPro.Web.CQMS.ProcessControl } } #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("无损检测管理" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx.designer.cs index 6dbf1019..4e6773cb 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest.aspx.designer.cs @@ -129,6 +129,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx index ce0701e8..a862f219 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx @@ -35,6 +35,9 @@ + + @@ -54,10 +57,10 @@ - - + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("管道试压包管理" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml2(Grid1)); + Response.End(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx.designer.cs index 97ff998a..a7a0352c 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx.designer.cs @@ -93,6 +93,15 @@ namespace FineUIPro.Web.CQMS.ProcessControl { /// protected global::FineUIPro.Button btnNew; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// lblPageIndex 控件。 /// diff --git a/SGGL/FineUIPro.Web/Door/InOutList.aspx b/SGGL/FineUIPro.Web/Door/InOutList.aspx index dd767aa6..1593e413 100644 --- a/SGGL/FineUIPro.Web/Door/InOutList.aspx +++ b/SGGL/FineUIPro.Web/Door/InOutList.aspx @@ -65,7 +65,7 @@ SortField="DepartName" FieldType="String" HeaderText="组织" HeaderTextAlign="Center" TextAlign="Left"> - diff --git a/SGGL/FineUIPro.Web/Door/InOutList.aspx.cs b/SGGL/FineUIPro.Web/Door/InOutList.aspx.cs index 140f1b75..88a6eb44 100644 --- a/SGGL/FineUIPro.Web/Door/InOutList.aspx.cs +++ b/SGGL/FineUIPro.Web/Door/InOutList.aspx.cs @@ -76,7 +76,7 @@ namespace FineUIPro.Web.Door } } else - { + { strSql = @"SELECT NewID,ID,V.ProjectId,EmployName,DepartmentID,DepartName,AreaID,AreaName,EmployNO,CardID,RoleID ,DateTimeRecord,RecordDes, InOrOut ,P.UnitId,P.TeamGroupId FROM dbo.t_d_facerecord V diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 2b350569..f89bdc87 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,10 +1,9 @@  错误信息开始=====> 错误类型:SqlException -错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。 +错误信息:对象名 'dbo.View_JDGL_ProgressCompletion' 无效。 错误堆栈: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() @@ -14,542 +13,56 @@ 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.Count[TSource](IQueryable`1 source) - 在 BLL.GetDataService.CorrectingPersonInOutNumber(String projectId) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\GetDataService.cs:行号 139 - 在 BLL.MonitorService.DoSynchData() 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\MonitorService.cs:行号 2180 - 在 BLL.MonitorService.ColligateFormConfirmProcessEve(Object sender, ElapsedEventArgs e) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\MonitorService.cs:行号 112 -----错误类型:Win32Exception -----错误信息: -----等待的操作过时。 -----错误堆栈: - 出错时间:04/16/2021 11:26:57 -出错时间:04/16/2021 11:26:58 - - -错误信息开始=====> -错误类型:ChangeConflictException -错误信息:找不到行或行已更改。 -错误堆栈: - 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) - 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) - 在 System.Data.Linq.DataContext.SubmitChanges() - 在 BLL.ComprehensiveService.DeleteComprehensiveByReportId(String reportId) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\CQMS\ManageReport\ComprehensiveService.cs:行号 63 - 在 FineUIPro.Web.CQMS.ManageReport.WeekReport.btnMenuDel_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\CQMS\ManageReport\WeekReport.aspx.cs:行号 74 - 在 FineUIPro.MenuButton.OnClick(EventArgs e) - 在 (MenuButton , EventArgs ) - 在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/18/2021 10:55:35 -出错文件:http://localhost:8118/CQMS/ManageReport/WeekReport.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/18/2021 10:55:35 - - -错误信息开始=====> -错误类型:InvalidCastException -错误信息:无法将类型为“System.Web.UI.WebControls.TextBox”的对象强制转换为类型“FineUIPro.TextBox”。 -错误堆栈: - 在 FineUIPro.Web.CQMS.ManageReport.WeekReportEdit.saveThisWeekAndMonthContent() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\CQMS\ManageReport\WeekReportEdit.aspx.cs:行号 275 - 在 FineUIPro.Web.CQMS.ManageReport.WeekReportEdit.btnAddThisWeekAndMonthContent_Click(Object sender, ImageClickEventArgs e) 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\CQMS\ManageReport\WeekReportEdit.aspx.cs:行号 257 - 在 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) - 在 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/18/2021 10:56:04 -出错文件:http://localhost:8118/CQMS/ManageReport/WeekReportEdit.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/18/2021 10:56:04 - - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 (PageManager ) - 在 FineUIPro.ControlBase.OnFirstPreRender() - 在 (ControlBase ) - 在 FineUIPro.Component.OnFirstPreRender() - 在 (Component ) - 在 FineUIPro.BoxComponent.OnFirstPreRender() - 在 (BoxComponent ) - 在 FineUIPro.Container.OnFirstPreRender() - 在 (Container ) - 在 FineUIPro.PanelBase.OnFirstPreRender() - 在 (PanelBase ) - 在 FineUIPro.CollapsablePanel.OnFirstPreRender() - 在 (CollapsablePanel ) - 在 FineUIPro.ContentPanel.OnFirstPreRender() - 在 (ControlBase ) - 在 FineUIPro.ControlBase.jcLvABeDsHQyyAbZhsfaLCMRNprM() - 在 (ControlBase ) - 在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs ) - 在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/18/2021 11:13:01 -出错文件:http://localhost:8118/CQMS/ManageReport/MonthReportEdit.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/18/2021 11:13:01 - - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 (PageManager ) - 在 FineUIPro.ControlBase.OnFirstPreRender() - 在 (ControlBase ) - 在 FineUIPro.Component.OnFirstPreRender() - 在 (Component ) - 在 FineUIPro.BoxComponent.OnFirstPreRender() - 在 (BoxComponent ) - 在 FineUIPro.Container.OnFirstPreRender() - 在 (Container ) - 在 FineUIPro.PanelBase.OnFirstPreRender() - 在 (PanelBase ) - 在 FineUIPro.CollapsablePanel.OnFirstPreRender() - 在 (CollapsablePanel ) - 在 FineUIPro.ContentPanel.OnFirstPreRender() - 在 (ControlBase ) - 在 FineUIPro.ControlBase.jcLvABeDsHQyyAbZhsfaLCMRNprM() - 在 (ControlBase ) - 在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs ) - 在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/18/2021 11:14:45 -出错文件:http://localhost:8118/CQMS/ManageReport/MonthReportEdit.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/18/2021 11:14:45 - - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 (PageManager ) - 在 FineUIPro.ControlBase.OnFirstPreRender() - 在 (ControlBase ) - 在 FineUIPro.Component.OnFirstPreRender() - 在 (Component ) - 在 FineUIPro.BoxComponent.OnFirstPreRender() - 在 (BoxComponent ) - 在 FineUIPro.Container.OnFirstPreRender() - 在 (Container ) - 在 FineUIPro.PanelBase.OnFirstPreRender() - 在 (PanelBase ) - 在 FineUIPro.CollapsablePanel.OnFirstPreRender() - 在 (CollapsablePanel ) - 在 FineUIPro.ContentPanel.OnFirstPreRender() - 在 (ControlBase ) - 在 FineUIPro.ControlBase.jcLvABeDsHQyyAbZhsfaLCMRNprM() - 在 (ControlBase ) - 在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs ) - 在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/18/2021 11:16:11 -出错文件:http://localhost:8118/CQMS/ManageReport/MonthReportEdit.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/18/2021 11:16:11 - - -错误信息开始=====> -错误类型:SqlException -错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.Count[TSource](IQueryable`1 source) - 在 BLL.GetDataService.CorrectingPersonInOutNumber(String projectId) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\GetDataService.cs:行号 139 - 在 BLL.MonitorService.DoSynchData() 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\MonitorService.cs:行号 2180 - 在 BLL.MonitorService.ColligateFormConfirmProcessEve(Object sender, ElapsedEventArgs e) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\MonitorService.cs:行号 112 -----错误类型:Win32Exception -----错误信息: -----等待的操作过时。 -----错误堆栈: - 出错时间:04/18/2021 11:24:11 -出错时间:04/18/2021 11:24:12 - - -错误信息开始=====> -错误类型:SqlException -错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.Count[TSource](IQueryable`1 source) - 在 BLL.GetDataService.CorrectingPersonInOutNumber(String projectId) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\GetDataService.cs:行号 139 - 在 BLL.MonitorService.DoSynchData() 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\MonitorService.cs:行号 2180 - 在 BLL.MonitorService.ColligateFormConfirmProcessEve(Object sender, ElapsedEventArgs e) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\MonitorService.cs:行号 112 -----错误类型:Win32Exception -----错误信息: -----等待的操作过时。 -----错误堆栈: - 出错时间:04/18/2021 11:27:39 -出错时间:04/18/2021 11:27:40 - - -错误信息开始=====> -错误类型:ThreadAbortException -错误信息:正在中止线程。 -错误堆栈: - 在 SNIReadSyncOverAsync(SNI_ConnWrapper* , SNI_Packet** , Int32 ) - 在 SNINativeMethodWrapper.SNIReadSyncOverAsync(SafeHandle pConn, IntPtr& packet, Int32 timeout) - 在 System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() - 在 System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket() - 在 System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer() - 在 System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.Count[TSource](IQueryable`1 source) - 在 BLL.GetDataService.CorrectingPersonInOutNumber(String projectId) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\GetDataService.cs:行号 139 - 在 BLL.MonitorService.DoSynchData() 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\MonitorService.cs:行号 2180 - 在 BLL.MonitorService.ColligateFormConfirmProcessEve(Object sender, ElapsedEventArgs e) 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\OpenService\MonitorService.cs:行号 112 -出错时间:04/18/2021 11:29:24 -出错时间:04/18/2021 11:29:25 - - -错误信息开始=====> -错误类型:KeyNotFoundException -错误信息:给定关键字不在字典中。 -错误堆栈: - 在 System.Collections.Generic.Dictionary`2.get_Item(TKey key) - 在 BLL.Funs.get_DB() 位置 E:\工作\五环施工平台\SGGL\SGGL\BLL\Common\Funs.cs:行号 132 - 在 FineUIPro.Web.PageBase.get_CurrUser() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\PageBase.cs:行号 38 - 在 FineUIPro.Web.indexProject.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 293 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 11:19:12 -出错文件:http://localhost:8118/indexProject.aspx?projectId=310e790e-5ede-4345-98a4-8bd0866e69ef -IP地址:::1 - -出错时间:04/19/2021 11:19:12 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 13:51:33 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 13:51:33 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 14:14:55 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 14:14:55 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 14:15:44 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 14:15:44 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 14:16:00 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 14:16:00 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 14:16:09 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 14:16:09 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 14:20:05 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 14:20:06 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 14:20:19 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 14:20:19 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 15:09:48 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 15:09:48 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.common.main.get_Project() 位置 E:\工作\五环施工平台\SGGL\SGGL\FineUIPro.Web\common\main.aspx.cs:行号 60 - 在 ASP.common_main_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) - 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) - 在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) - 在 System.Web.UI.Page.Render(HtmlTextWriter writer) - 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) - 在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/19/2021 15:10:05 -出错文件:http://localhost:8118/common/main.aspx -IP地址:::1 -操作人员:JT - -出错时间:04/19/2021 15:10:06 - - -错误信息开始=====> -错误类型:HttpException -错误信息:文件“/HSSE/Hazard/ProjectSuperviseCheckRectify.aspx”不存在。 -错误堆栈: - 在 System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) - 在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) - 在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) - 在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) - 在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) - 在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) - 在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) - 在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() - 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) - 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -出错时间:04/20/2021 17:39:11 -出错文件:http://localhost:8118/HSSE/Hazard/ProjectSuperviseCheckRectify.aspx -IP地址:::1 - -出错时间:04/20/2021 17:39:11 - - -错误信息开始=====> -错误类型:SqlException -错误信息:列名 'ProfessionalName' 无效。 -列名 'SortIndex' 无效。 -列名 'SortIndex' 无效。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) 在 System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() - 在 FineUIPro.Web.common.mainProject.Page_Load(Object sender, EventArgs e) 位置 D:\WuHuan\SGGL\SGGL\FineUIPro.Web\common\mainProject.aspx.cs:行号 58 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() + 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) + 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) + 在 FineUIPro.Web.common.mainProject.get_Two() 位置 D:\WuHuan\SGGL\SGGL\FineUIPro.Web\common\mainProject.aspx.cs:行号 86 + 在 ASP.common_mainproject_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) + 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) + 在 System.Web.UI.Page.Render(HtmlTextWriter writer) + 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:04/24/2021 16:26:18 -出错文件:http://localhost:8118/common/mainProject.aspx +出错时间:05/20/2021 11:28:56 +出错文件:http://localhost/sggl_wh/common/mainProject.aspx IP地址:::1 -操作人员:JT +操作人员:系统管理员 -出错时间:04/24/2021 16:26:18 +出错时间:05/20/2021 11:28:56 + + +错误信息开始=====> +错误类型:SqlException +错误信息:对象名 'dbo.View_JDGL_ProgressCompletion' 无效。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) + 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) + 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) + 在 System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() + 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) + 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) + 在 FineUIPro.Web.common.mainProject.get_Two() 位置 D:\WuHuan\SGGL\SGGL\FineUIPro.Web\common\mainProject.aspx.cs:行号 86 + 在 ASP.common_mainproject_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) + 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) + 在 System.Web.UI.Page.Render(HtmlTextWriter writer) + 在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:05/20/2021 11:29:14 +出错文件:http://localhost/sggl_wh/common/mainProject.aspx +IP地址:::1 +操作人员:系统管理员 + +出错时间:05/20/2021 11:29:14 diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/仪表完成情况导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/仪表完成情况导入模板.xls new file mode 100644 index 00000000..1b2266b2 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/仪表完成情况导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/全厂地下管网完成情况导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/全厂地下管网完成情况导入模板.xls new file mode 100644 index 00000000..5f8833fc Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/全厂地下管网完成情况导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/电气完成情况导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/电气完成情况导入模板.xls new file mode 100644 index 00000000..1b2266b2 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/电气完成情况导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/管道完成情况导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/管道完成情况导入模板.xls new file mode 100644 index 00000000..ebccc66c Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/管道完成情况导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/设备完成情况导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/设备完成情况导入模板.xls new file mode 100644 index 00000000..c5b67dfe Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/设备完成情况导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/钢结构完成情况导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/钢结构完成情况导入模板.xls new file mode 100644 index 00000000..81835bac Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/钢结构完成情况导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202104190843396760.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202104190843396760.xls new file mode 100644 index 00000000..9d691fbf Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202104190843396760.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202104200419393042.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202104200419393042.xls new file mode 100644 index 00000000..525120b2 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202104200419393042.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202104200421267933.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202104200421267933.xls new file mode 100644 index 00000000..525120b2 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202104200421267933.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202104200422528798.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202104200422528798.xls new file mode 100644 index 00000000..31e9c003 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202104200422528798.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202104221125066241.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202104221125066241.xls new file mode 100644 index 00000000..6bbddd7b Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202104221125066241.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202104270145024513.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202104270145024513.xls new file mode 100644 index 00000000..80026692 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202104270145024513.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202104270228076631.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202104270228076631.xls new file mode 100644 index 00000000..558067e6 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202104270228076631.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202104270228461033.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202104270228461033.xls new file mode 100644 index 00000000..558067e6 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202104270228461033.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202105010610145196.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202105010610145196.xls new file mode 100644 index 00000000..eedafd3c Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202105010610145196.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202105010617373624.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202105010617373624.xls new file mode 100644 index 00000000..eedafd3c Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202105010617373624.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/Temp/202105010628301166.xls b/SGGL/FineUIPro.Web/File/Excel/Temp/202105010628301166.xls new file mode 100644 index 00000000..0e1c472a Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/Temp/202105010628301166.xls differ diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112922885.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112922885.jpg new file mode 100644 index 00000000..34471d39 Binary files /dev/null and b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112922885.jpg differ diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923329.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923329.jpg new file mode 100644 index 00000000..a05fdb30 Binary files /dev/null and b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923329.jpg differ diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923399.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923399.jpg new file mode 100644 index 00000000..2f795faa Binary files /dev/null and b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923399.jpg differ diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923479.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923479.jpg new file mode 100644 index 00000000..c77e6fef Binary files /dev/null and b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923479.jpg differ diff --git a/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923528.jpg b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923528.jpg new file mode 100644 index 00000000..2d08f273 Binary files /dev/null and b/SGGL/FineUIPro.Web/FileUpload/QRCodeFile/20212920112923528.jpg differ diff --git a/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200228347273~微信图片_20210416093321.jpg b/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200228347273~微信图片_20210416093321.jpg deleted file mode 100644 index 347674a0..00000000 Binary files a/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200228347273~微信图片_20210416093321.jpg and /dev/null differ diff --git a/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200238232079~微信图片_20210416093321.jpg b/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200238232079~微信图片_20210416093321.jpg deleted file mode 100644 index 347674a0..00000000 Binary files a/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200238232079~微信图片_20210416093321.jpg and /dev/null differ diff --git a/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200426019004~微信图片_20210416093321.jpg b/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200426019004~微信图片_20210416093321.jpg deleted file mode 100644 index 347674a0..00000000 Binary files a/SGGL/FineUIPro.Web/FileUpload/SuperviseCheckReport/202104200426019004~微信图片_20210416093321.jpg and /dev/null differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 916e9e75..2dc44065 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1106,6 +1106,17 @@ + + + + + + + + + + + @@ -1113,6 +1124,11 @@ + + + + + @@ -11592,6 +11608,83 @@ index.aspx + + ElectricalCompletion.aspx + ASPXCodeBehind + + + ElectricalCompletion.aspx + + + ElectricalCompletionIn.aspx + ASPXCodeBehind + + + ElectricalCompletionIn.aspx + + + EquipmentCompletion.aspx + ASPXCodeBehind + + + EquipmentCompletion.aspx + + + EquipmentCompletionIn.aspx + ASPXCodeBehind + + + EquipmentCompletionIn.aspx + + + MeterCompletion.aspx + ASPXCodeBehind + + + MeterCompletion.aspx + + + MeterCompletionIn.aspx + ASPXCodeBehind + + + MeterCompletionIn.aspx + + + PipelineCompletion.aspx + ASPXCodeBehind + + + PipelineCompletion.aspx + + + PipelineCompletionIn.aspx + ASPXCodeBehind + + + PipelineCompletionIn.aspx + + + ProgressCompletion.aspx + ASPXCodeBehind + + + ProgressCompletion.aspx + + + ProgressCompletionEdit.aspx + ASPXCodeBehind + + + ProgressCompletionEdit.aspx + + + ProgressCompletionView.aspx + ASPXCodeBehind + + + ProgressCompletionView.aspx + ProgressShow.aspx ASPXCodeBehind @@ -11641,6 +11734,41 @@ QuantityListView.aspx + + SteelStructureCompletion.aspx + ASPXCodeBehind + + + SteelStructureCompletion.aspx + + + SteelStructureCompletionIn.aspx + ASPXCodeBehind + + + SteelStructureCompletionIn.aspx + + + TotalCompletion.aspx + ASPXCodeBehind + + + TotalCompletion.aspx + + + UndergroundPipeCompletion.aspx + ASPXCodeBehind + + + UndergroundPipeCompletion.aspx + + + UndergroundPipeCompletionIn.aspx + ASPXCodeBehind + + + UndergroundPipeCompletionIn.aspx + EarnedValueCurve.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx index 1a7feb58..4d19f775 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx @@ -106,7 +106,7 @@ - - + - /// Label2 控件。 + /// lbCheckManNames 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lbCheckManNames; /// /// ToolbarSeparator1 控件。 diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx index 8583f374..929300ed 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx @@ -41,6 +41,12 @@ + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs index 6d3b07b2..ca9ca9d9 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs @@ -99,6 +99,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection this.drpWorkArea.SelectedValue = BLL.Const._Null; this.drpResponsibleMan.SelectedValue = BLL.Const._Null; } + this.txtRequirements.Text = registration.Requirements; if (!string.IsNullOrEmpty(registration.Place)) { this.drpWorkArea.SelectedValue = registration.Place; @@ -223,6 +224,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection register.Place = this.drpWorkArea.SelectedValue; } register.RegisterDef = this.txtRegisterDef.Text.Trim(); + register.Requirements = this.txtRequirements.Text.Trim(); if (this.drpResponsibleMan.SelectedValue != BLL.Const._Null) { register.ResponsibleMan = this.drpResponsibleMan.SelectedValue; diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs index de3f5e73..12428760 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs @@ -84,6 +84,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// protected global::FineUIPro.TextArea txtRegisterDef; + /// + /// txtRequirements 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRequirements; + /// /// txtHandleIdea 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx index dfb721ae..d6da7aa0 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx @@ -36,6 +36,12 @@ + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.cs index bc1929d7..50c310fa 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.cs @@ -74,6 +74,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection this.txtUnitName.Text = registration.ResponsibilityUnitName; this.txtWorkAreaName.Text = registration.WorkAreaName; this.txtRegisterTypesName.Text = registration.RegisterTypesName; + this.txtRequirements.Text = registration.Requirements; if (registration.CheckCycle == "D") { this.txtType.Text = "日检"; diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.designer.cs index 5f41b77d..a7ef3140 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationConfirm.aspx.designer.cs @@ -84,6 +84,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// protected global::FineUIPro.TextArea txtRegisterDef; + /// + /// txtRequirements 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRequirements; + /// /// txtOldHandleIdea 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx index 1862a6d2..118df487 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx @@ -106,6 +106,9 @@ + + @@ -163,7 +166,7 @@ + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationRectify.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationRectify.aspx.cs index 364c55ab..1c27b076 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationRectify.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationRectify.aspx.cs @@ -78,6 +78,7 @@ namespace FineUIPro.Web.HiddenInspection this.txtUnitName.Text = registration.ResponsibilityUnitName; this.txtWorkAreaName.Text = registration.WorkAreaName; this.txtRegisterTypesName.Text = registration.RegisterTypesName; + this.txtRequirements.Text = registration.Requirements; if (registration.CheckCycle == "D") { this.txtType.Text = "日检"; diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationRectify.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationRectify.aspx.designer.cs index 74167574..c78a6b51 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationRectify.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationRectify.aspx.designer.cs @@ -84,6 +84,15 @@ namespace FineUIPro.Web.HiddenInspection { /// protected global::FineUIPro.TextArea txtRegisterDef; + /// + /// txtRequirements 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRequirements; + /// /// txtHandleIdea 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx index 074e795a..7f59a221 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx @@ -33,6 +33,12 @@ + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx.cs index cd0814dc..af76b8cd 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx.cs @@ -74,6 +74,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection this.txtWorkAreaName.Text = registration.WorkAreaName; this.txtResponsibilityUnitName.Text = registration.ResponsibilityUnitName; this.txtRegisterTypesName.Text = registration.RegisterTypesName; + this.txtRequirements.Text = registration.Requirements; this.txtProblemDescription.Text = registration.RegisterDef; this.txtTakeSteps.Text = registration.Rectification; this.txtResponsibilityManName.Text = registration.ResponsibilityManName; diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx.designer.cs index 825acb98..b5017973 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationView.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// protected global::FineUIPro.TextArea txtProblemDescription; + /// + /// txtRequirements 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRequirements; + /// /// txtTakeSteps 控件。 /// diff --git a/SGGL/FineUIPro.Web/Images/Export.gif b/SGGL/FineUIPro.Web/Images/Export.gif new file mode 100644 index 00000000..f543ebbe Binary files /dev/null and b/SGGL/FineUIPro.Web/Images/Export.gif differ diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx new file mode 100644 index 00000000..d64aa7df --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx @@ -0,0 +1,87 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ElectricalCompletion.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.ElectricalCompletion" %> + + + + + +电气完成情况 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx.cs new file mode 100644 index 00000000..dacbbf01 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class ElectricalCompletion : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //GetButtonPower(); + BindGrid(); + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ElectricalCompletionMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + } + } + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"select * + from dbo.View_JDGL_ElectricalCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtMonths_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectricalCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx.designer.cs new file mode 100644 index 00000000..da37c30e --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletion.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class ElectricalCompletion { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx new file mode 100644 index 00000000..8d763a3d --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx @@ -0,0 +1,98 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ElectricalCompletionIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.ElectricalCompletionIn" %> + + + + + +导入信息 + + + +
+ + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%-- + + + + + --%> + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx.cs new file mode 100644 index 00000000..29c5180a --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx.cs @@ -0,0 +1,553 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class ElectricalCompletionIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 人员集合 + /// + public static List electricalCompletions = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (electricalCompletions != null) + { + electricalCompletions.Clear(); + } + errorInfos = string.Empty; + this.ProjectId = Request.Params["ProjectId"]; + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (electricalCompletions != null) + { + electricalCompletions.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - "))); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 5); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + ir = pds.Rows.Count; + var units = from x in Funs.DB.Base_Unit + select x; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + var unit = units.FirstOrDefault(e => e.UnitName == col0); + if (unit != null) + { + var projectUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == unit.UnitId); + if (projectUnit == null) + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在本项目中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在单位表中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "此项为必填项!" + "|"; + } + + string col1 = pds.Rows[i][1].ToString().Trim(); + if (string.IsNullOrEmpty(col1)) + { + result += "第" + (i + 2).ToString() + "行," + "工作项" + "," + "此项为必填项!" + "|"; + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (string.IsNullOrEmpty(col2)) + { + result += "第" + (i + 2).ToString() + "行," + "单位" + "," + "此项为必填项!" + "|"; + } + + string col3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(col3)) + { + try + { + decimal dec = Convert.ToDecimal(col3); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "工程量" + "," + "[" + col3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "工程量" + "," + "此项为必填项!" + "|"; + } + + string col4 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(col4)) + { + try + { + decimal dec = Convert.ToDecimal(col4); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "本期完成量" + "," + "[" + col4 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "本期完成量" + "," + "此项为必填项!" + "|"; + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = result; + Alert alert = new Alert + { + Message = result, + Target = Target.Self + }; + alert.Show(); + + + } + else + { + errorInfos = string.Empty; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 5); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + electricalCompletions.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + var units = from x in Funs.DB.Base_Unit + select x; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + Model.View_JDGL_ElectricalCompletion electricalCompletion = new Model.View_JDGL_ElectricalCompletion(); + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + string col2 = pds.Rows[i][2].ToString().Trim(); + string col3 = pds.Rows[i][3].ToString().Trim(); + string col4 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(col0))//施工单位 + { + var unit = units.FirstOrDefault(x => x.UnitName == col0); + if (unit != null) + { + electricalCompletion.UnitId = unit.UnitId; + electricalCompletion.UnitName = unit.UnitName; + } + } + electricalCompletion.Name = col1; + electricalCompletion.Unit = col2; + if (!string.IsNullOrEmpty(col3))//工程量 + { + electricalCompletion.TotalNum = Funs.GetNewDecimalOrZero(col3); + } + if (!string.IsNullOrEmpty(col4))//本期完成量 + { + electricalCompletion.ThisNum = Funs.GetNewDecimalOrZero(col4); + } + electricalCompletion.ElectricalCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_ElectricalCompletion)); + electricalCompletions.Add(electricalCompletion); + } + if (electricalCompletions.Count > 0) + { + this.Grid1.Hidden = false; + this.Grid1.DataSource = electricalCompletions; + this.Grid1.DataBind(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) + { + ShowNotify("请选择开始、结束日期!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + var electricalCompletionLists = from x in Funs.DB.JDGL_ElectricalCompletion where x.ProjectId == this.ProjectId select x; + int a = electricalCompletions.Count(); + DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); + DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); + for (int i = 0; i < a; i++) + { + var oldElectricalCompletion = electricalCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == electricalCompletions[i].UnitId && x.Name == electricalCompletions[i].Name && x.StartDate == startDate && x.EndDate == endDate); + if (oldElectricalCompletion == null) + { + Model.JDGL_ElectricalCompletion newElectricalCompletion = new Model.JDGL_ElectricalCompletion(); + newElectricalCompletion.ElectricalCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_ElectricalCompletion)); + newElectricalCompletion.ProjectId = this.ProjectId; + newElectricalCompletion.UnitId = electricalCompletions[i].UnitId; + newElectricalCompletion.Name = electricalCompletions[i].Name; + newElectricalCompletion.Unit = electricalCompletions[i].Unit; + newElectricalCompletion.TotalNum = electricalCompletions[i].TotalNum; + newElectricalCompletion.ThisNum = electricalCompletions[i].ThisNum; + newElectricalCompletion.CompileMan = this.CurrUser.UserId; + newElectricalCompletion.CompileDate = DateTime.Now; + newElectricalCompletion.StartDate = startDate; + newElectricalCompletion.EndDate = endDate; + BLL.ElectricalCompletionService.AddElectricalCompletion(newElectricalCompletion); + } + else + { + oldElectricalCompletion.TotalNum = electricalCompletions[i].TotalNum; + oldElectricalCompletion.ThisNum = electricalCompletions[i].ThisNum; + BLL.ElectricalCompletionService.UpdateElectricalCompletion(oldElectricalCompletion); + } + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.ElectricalCompletionTemplateUrl; + string filePath = Const.ElectricalCompletionTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx.designer.cs new file mode 100644 index 00000000..22e6630c --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ElectricalCompletionIn.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class ElectricalCompletionIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx new file mode 100644 index 00000000..a68f4998 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx @@ -0,0 +1,73 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentCompletion.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.EquipmentCompletion" %> + + + + + +设备完成情况 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx.cs new file mode 100644 index 00000000..9e44f123 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class EquipmentCompletion : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //GetButtonPower(); + BindGrid(); + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.EquipmentCompletionMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + } + } + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"select * + from dbo.View_JDGL_EquipmentCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtMonths_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx.designer.cs new file mode 100644 index 00000000..c99beec5 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletion.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class EquipmentCompletion { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx new file mode 100644 index 00000000..577dab1c --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx @@ -0,0 +1,95 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentCompletionIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.EquipmentCompletionIn" %> + + + + + +导入信息 + + + +
+ + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%-- + + + + + --%> + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx.cs new file mode 100644 index 00000000..d3636543 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx.cs @@ -0,0 +1,559 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class EquipmentCompletionIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 人员集合 + /// + public static List equipmentCompletions = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (equipmentCompletions != null) + { + equipmentCompletions.Clear(); + } + errorInfos = string.Empty; + this.ProjectId = Request.Params["ProjectId"]; + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (equipmentCompletions != null) + { + equipmentCompletions.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - "))); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 4); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + ir = pds.Rows.Count; + var units = from x in Funs.DB.Base_Unit + select x; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + var unit = units.FirstOrDefault(e => e.UnitName == col0); + if (unit != null) + { + var projectUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == unit.UnitId); + if (projectUnit == null) + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在本项目中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在单位表中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "此项为必填项!" + "|"; + } + + string col1 = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(col1)) + { + try + { + decimal dec = Convert.ToDecimal(col1); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "设备总数" + "," + "[" + col1 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "设备总数" + "," + "此项为必填项!" + "|"; + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(col2)) + { + try + { + decimal dec = Convert.ToDecimal(col2); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "已到场数量" + "," + "[" + col2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "已到场数量" + "," + "此项为必填项!" + "|"; + } + + string col3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(col3)) + { + try + { + decimal dec = Convert.ToDecimal(col3); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "本期安装就位数量" + "," + "[" + col3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "本期安装就位数量" + "," + "此项为必填项!" + "|"; + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = result; + Alert alert = new Alert + { + Message = result, + Target = Target.Self + }; + alert.Show(); + + + } + else + { + errorInfos = string.Empty; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 4); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + equipmentCompletions.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + var units = from x in Funs.DB.Base_Unit + select x; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + Model.View_JDGL_EquipmentCompletion equipmentCompletion = new Model.View_JDGL_EquipmentCompletion(); + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + string col2 = pds.Rows[i][2].ToString().Trim(); + string col3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(col0))//施工单位 + { + var unit = units.FirstOrDefault(x => x.UnitName == col0); + if (unit != null) + { + equipmentCompletion.UnitId = unit.UnitId; + equipmentCompletion.UnitName = unit.UnitName; + } + } + if (!string.IsNullOrEmpty(col1))//设备总数 + { + equipmentCompletion.TotalNum = Funs.GetNewDecimalOrZero(col1); + } + if (!string.IsNullOrEmpty(col2))//已到场数量 + { + equipmentCompletion.ArrivalNum = Funs.GetNewDecimalOrZero(col2); + } + if (!string.IsNullOrEmpty(col3))//本期安装就位数量 + { + equipmentCompletion.ThisNum = Funs.GetNewDecimalOrZero(col3); + } + equipmentCompletion.EquipmentCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_EquipmentCompletion)); + equipmentCompletions.Add(equipmentCompletion); + } + if (equipmentCompletions.Count > 0) + { + this.Grid1.Hidden = false; + this.Grid1.DataSource = equipmentCompletions; + this.Grid1.DataBind(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) + { + ShowNotify("请选择开始、结束日期!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + var equipmentCompletionLists = from x in Funs.DB.JDGL_EquipmentCompletion where x.ProjectId == this.ProjectId select x; + int a = equipmentCompletions.Count(); + DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); + DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); + for (int i = 0; i < a; i++) + { + var oldEquipmentCompletion = equipmentCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == equipmentCompletions[i].UnitId && x.StartDate == startDate && x.EndDate == endDate); + if (oldEquipmentCompletion == null) + { + Model.JDGL_EquipmentCompletion newEquipmentCompletion = new Model.JDGL_EquipmentCompletion(); + newEquipmentCompletion.EquipmentCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_EquipmentCompletion)); + newEquipmentCompletion.ProjectId = this.ProjectId; + newEquipmentCompletion.UnitId = equipmentCompletions[i].UnitId; + newEquipmentCompletion.TotalNum = equipmentCompletions[i].TotalNum; + newEquipmentCompletion.ArrivalNum = equipmentCompletions[i].ArrivalNum; + newEquipmentCompletion.ThisNum = equipmentCompletions[i].ThisNum; + newEquipmentCompletion.CompileMan = this.CurrUser.UserId; + newEquipmentCompletion.CompileDate = DateTime.Now; + newEquipmentCompletion.StartDate = startDate; + newEquipmentCompletion.EndDate = endDate; + BLL.EquipmentCompletionService.AddEquipmentCompletion(newEquipmentCompletion); + } + else + { + oldEquipmentCompletion.TotalNum = equipmentCompletions[i].TotalNum; + oldEquipmentCompletion.ArrivalNum = equipmentCompletions[i].ArrivalNum; + oldEquipmentCompletion.ThisNum = equipmentCompletions[i].ThisNum; + BLL.EquipmentCompletionService.UpdateEquipmentCompletion(oldEquipmentCompletion); + } + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.EquipmentCompletionTemplateUrl; + string filePath = Const.EquipmentCompletionTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx.designer.cs new file mode 100644 index 00000000..a458586c --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/EquipmentCompletionIn.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class EquipmentCompletionIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx new file mode 100644 index 00000000..8ecfbef2 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx @@ -0,0 +1,87 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MeterCompletion.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.MeterCompletion" %> + + + + + +仪表完成情况 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx.cs new file mode 100644 index 00000000..106f11e2 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class MeterCompletion : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //GetButtonPower(); + BindGrid(); + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.MeterCompletionMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + } + } + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"select * + from dbo.View_JDGL_MeterCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtMonths_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MeterCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx.designer.cs new file mode 100644 index 00000000..82adb0e1 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletion.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class MeterCompletion { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx new file mode 100644 index 00000000..afc9135c --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx @@ -0,0 +1,98 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MeterCompletionIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.MeterCompletionIn" %> + + + + + +导入信息 + + + +
+ + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%-- + + + + + --%> + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx.cs new file mode 100644 index 00000000..87edc017 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx.cs @@ -0,0 +1,553 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class MeterCompletionIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 人员集合 + /// + public static List meterCompletions = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (meterCompletions != null) + { + meterCompletions.Clear(); + } + errorInfos = string.Empty; + this.ProjectId = Request.Params["ProjectId"]; + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (meterCompletions != null) + { + meterCompletions.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - "))); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 5); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + ir = pds.Rows.Count; + var units = from x in Funs.DB.Base_Unit + select x; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + var unit = units.FirstOrDefault(e => e.UnitName == col0); + if (unit != null) + { + var projectUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == unit.UnitId); + if (projectUnit == null) + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在本项目中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在单位表中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "此项为必填项!" + "|"; + } + + string col1 = pds.Rows[i][1].ToString().Trim(); + if (string.IsNullOrEmpty(col1)) + { + result += "第" + (i + 2).ToString() + "行," + "工作项" + "," + "此项为必填项!" + "|"; + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (string.IsNullOrEmpty(col2)) + { + result += "第" + (i + 2).ToString() + "行," + "单位" + "," + "此项为必填项!" + "|"; + } + + string col3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(col3)) + { + try + { + decimal dec = Convert.ToDecimal(col3); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "工程量" + "," + "[" + col3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "工程量" + "," + "此项为必填项!" + "|"; + } + + string col4 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(col4)) + { + try + { + decimal dec = Convert.ToDecimal(col4); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "本期完成量" + "," + "[" + col4 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "本期完成量" + "," + "此项为必填项!" + "|"; + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = result; + Alert alert = new Alert + { + Message = result, + Target = Target.Self + }; + alert.Show(); + + + } + else + { + errorInfos = string.Empty; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 5); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + meterCompletions.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + var units = from x in Funs.DB.Base_Unit + select x; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + Model.View_JDGL_MeterCompletion meterCompletion = new Model.View_JDGL_MeterCompletion(); + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + string col2 = pds.Rows[i][2].ToString().Trim(); + string col3 = pds.Rows[i][3].ToString().Trim(); + string col4 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(col0))//施工单位 + { + var unit = units.FirstOrDefault(x => x.UnitName == col0); + if (unit != null) + { + meterCompletion.UnitId = unit.UnitId; + meterCompletion.UnitName = unit.UnitName; + } + } + meterCompletion.Name = col1; + meterCompletion.Unit = col2; + if (!string.IsNullOrEmpty(col3))//工程量 + { + meterCompletion.TotalNum = Funs.GetNewDecimalOrZero(col3); + } + if (!string.IsNullOrEmpty(col4))//本期完成量 + { + meterCompletion.ThisNum = Funs.GetNewDecimalOrZero(col4); + } + meterCompletion.MeterCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_MeterCompletion)); + meterCompletions.Add(meterCompletion); + } + if (meterCompletions.Count > 0) + { + this.Grid1.Hidden = false; + this.Grid1.DataSource = meterCompletions; + this.Grid1.DataBind(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) + { + ShowNotify("请选择开始、结束日期!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + var meterCompletionLists = from x in Funs.DB.JDGL_MeterCompletion where x.ProjectId == this.ProjectId select x; + int a = meterCompletions.Count(); + DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); + DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); + for (int i = 0; i < a; i++) + { + var oldMeterCompletion = meterCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == meterCompletions[i].UnitId && x.Name == meterCompletions[i].Name && x.StartDate == startDate && x.EndDate == endDate); + if (oldMeterCompletion == null) + { + Model.JDGL_MeterCompletion newMeterCompletion = new Model.JDGL_MeterCompletion(); + newMeterCompletion.MeterCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_MeterCompletion)); + newMeterCompletion.ProjectId = this.ProjectId; + newMeterCompletion.UnitId = meterCompletions[i].UnitId; + newMeterCompletion.Name = meterCompletions[i].Name; + newMeterCompletion.Unit = meterCompletions[i].Unit; + newMeterCompletion.TotalNum = meterCompletions[i].TotalNum; + newMeterCompletion.ThisNum = meterCompletions[i].ThisNum; + newMeterCompletion.CompileMan = this.CurrUser.UserId; + newMeterCompletion.CompileDate = DateTime.Now; + newMeterCompletion.StartDate = startDate; + newMeterCompletion.EndDate = endDate; + BLL.MeterCompletionService.AddMeterCompletion(newMeterCompletion); + } + else + { + oldMeterCompletion.TotalNum = meterCompletions[i].TotalNum; + oldMeterCompletion.ThisNum = meterCompletions[i].ThisNum; + BLL.MeterCompletionService.UpdateMeterCompletion(oldMeterCompletion); + } + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.MeterCompletionTemplateUrl; + string filePath = Const.MeterCompletionTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx.designer.cs new file mode 100644 index 00000000..7b3b545b --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MeterCompletionIn.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class MeterCompletionIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx new file mode 100644 index 00000000..2e13df29 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx @@ -0,0 +1,71 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipelineCompletion.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.PipelineCompletion" %> + + + + + +管道完成情况 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx.cs new file mode 100644 index 00000000..59490bd4 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class PipelineCompletion : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //GetButtonPower(); + BindGrid(); + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PipelineCompletionMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + } + } + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"select * + from dbo.View_JDGL_PipelineCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtMonths_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx.designer.cs new file mode 100644 index 00000000..62c39590 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletion.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class PipelineCompletion { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx new file mode 100644 index 00000000..2065aaf2 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx @@ -0,0 +1,92 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipelineCompletionIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.PipelineCompletionIn" %> + + + + + +导入信息 + + + +
+ + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%-- + + + + + --%> + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx.cs new file mode 100644 index 00000000..196a7bfd --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx.cs @@ -0,0 +1,535 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class PipelineCompletionIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 人员集合 + /// + public static List pipelineCompletions = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (pipelineCompletions != null) + { + pipelineCompletions.Clear(); + } + errorInfos = string.Empty; + this.ProjectId = Request.Params["ProjectId"]; + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (pipelineCompletions != null) + { + pipelineCompletions.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - "))); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 3); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + ir = pds.Rows.Count; + var units = from x in Funs.DB.Base_Unit + select x; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + var unit = units.FirstOrDefault(e => e.UnitName == col0); + if (unit != null) + { + var projectUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == unit.UnitId); + if (projectUnit == null) + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在本项目中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在单位表中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "此项为必填项!" + "|"; + } + + string col1 = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(col1)) + { + try + { + decimal dec = Convert.ToDecimal(col1); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总试压包数" + "," + "[" + col1 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "总试压包数" + "," + "此项为必填项!" + "|"; + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(col2)) + { + try + { + decimal dec = Convert.ToDecimal(col2); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "本期完成量" + "," + "[" + col2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "本期完成量" + "," + "此项为必填项!" + "|"; + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = result; + Alert alert = new Alert + { + Message = result, + Target = Target.Self + }; + alert.Show(); + + + } + else + { + errorInfos = string.Empty; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 3); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + pipelineCompletions.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + var units = from x in Funs.DB.Base_Unit + select x; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + Model.View_JDGL_PipelineCompletion pipelineCompletion = new Model.View_JDGL_PipelineCompletion(); + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + string col2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(col0))//施工单位 + { + var unit = units.FirstOrDefault(x => x.UnitName == col0); + if (unit != null) + { + pipelineCompletion.UnitId = unit.UnitId; + pipelineCompletion.UnitName = unit.UnitName; + } + } + if (!string.IsNullOrEmpty(col1))//总试压包数 + { + pipelineCompletion.TotalNum = Funs.GetNewDecimalOrZero(col1); + } + if (!string.IsNullOrEmpty(col2))//本期完成量 + { + pipelineCompletion.ThisNum = Funs.GetNewDecimalOrZero(col2); + } + pipelineCompletion.PipelineCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_PipelineCompletion)); + pipelineCompletions.Add(pipelineCompletion); + } + if (pipelineCompletions.Count > 0) + { + this.Grid1.Hidden = false; + this.Grid1.DataSource = pipelineCompletions; + this.Grid1.DataBind(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) + { + ShowNotify("请选择开始、结束日期!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + var pipelineCompletionLists = from x in Funs.DB.JDGL_PipelineCompletion where x.ProjectId == this.ProjectId select x; + int a = pipelineCompletions.Count(); + DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); + DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); + for (int i = 0; i < a; i++) + { + var oldPipelineCompletion = pipelineCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == pipelineCompletions[i].UnitId && x.StartDate == startDate && x.EndDate == endDate); + if (oldPipelineCompletion == null) + { + Model.JDGL_PipelineCompletion newPipelineCompletion = new Model.JDGL_PipelineCompletion(); + newPipelineCompletion.PipelineCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_PipelineCompletion)); + newPipelineCompletion.ProjectId = this.ProjectId; + newPipelineCompletion.UnitId = pipelineCompletions[i].UnitId; + newPipelineCompletion.TotalNum = pipelineCompletions[i].TotalNum; + newPipelineCompletion.ThisNum = pipelineCompletions[i].ThisNum; + newPipelineCompletion.CompileMan = this.CurrUser.UserId; + newPipelineCompletion.CompileDate = DateTime.Now; + newPipelineCompletion.StartDate = startDate; + newPipelineCompletion.EndDate = endDate; + BLL.PipelineCompletionService.AddPipelineCompletion(newPipelineCompletion); + } + else + { + oldPipelineCompletion.TotalNum = pipelineCompletions[i].TotalNum; + oldPipelineCompletion.ThisNum = pipelineCompletions[i].ThisNum; + BLL.PipelineCompletionService.UpdatePipelineCompletion(oldPipelineCompletion); + } + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.PipelineCompletionTemplateUrl; + string filePath = Const.PipelineCompletionTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx.designer.cs new file mode 100644 index 00000000..56b21103 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PipelineCompletionIn.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class PipelineCompletionIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx new file mode 100644 index 00000000..7fc79baf --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx @@ -0,0 +1,106 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProgressCompletion.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.ProgressCompletion" %> + + + + + +进度完成情况 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx.cs new file mode 100644 index 00000000..9a618fee --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class ProgressCompletion : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + BindGrid(); + btnNew.OnClientClick = Window1.GetShowReference("ProgressCompletionEdit.aspx") + "return false;"; + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProgressCompletionMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuModify.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + } + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"select * + from dbo.View_JDGL_ProgressCompletion qc + where qc.ProjectId=@ProjectId order by qc.Months desc"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + protected void btnMenuModify_Click(object sender, EventArgs e) + { + EditData(); + } + + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var progressCompletion = BLL.ProgressCompletionService.GetProgressCompletionById(rowID); + if (progressCompletion != null) + { + BLL.ProgressCompletionService.DeleteProgressCompletionById(rowID); + } + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + if (this.btnMenuModify.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProgressCompletionView.aspx?ProgressCompletionId={0}", Grid1.SelectedRowID, "查看 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProgressCompletionEdit.aspx?ProgressCompletionId={0}", Grid1.SelectedRowID, "编辑 - "))); + } + } + + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + EditData(); + } + + + protected void btnMenuView_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProgressCompletionView.aspx?ProgressCompletionId={0}", Grid1.SelectedRowID, "查看 - "))); + } + + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx.designer.cs new file mode 100644 index 00000000..dcefc895 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletion.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class ProgressCompletion { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuModify; + + /// + /// btnMenuView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuView; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx new file mode 100644 index 00000000..8f2f6000 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx @@ -0,0 +1,50 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProgressCompletionEdit.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.ProgressCompletionEdit" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx.cs new file mode 100644 index 00000000..d01ade3f --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx.cs @@ -0,0 +1,118 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class ProgressCompletionEdit : PageBase + { + /// + /// id + /// + public string ProgressCompletionId + { + get + { + return (string)ViewState["ProgressCompletionId"]; + } + set + { + ViewState["ProgressCompletionId"] = value; + } + } + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ProgressCompletionId = Request.Params["ProgressCompletionId"]; + if (!string.IsNullOrEmpty(ProgressCompletionId)) + { + + Model.JDGL_ProgressCompletion ProgressCompletion = BLL.ProgressCompletionService.GetProgressCompletionById(ProgressCompletionId); + if (ProgressCompletion != null) + { + this.ProjectId = ProgressCompletion.ProjectId; + if (ProgressCompletion.Months != null) + { + this.txtMonths.Text = string.Format("{0:yyyy-MM}", ProgressCompletion.Months); + } + if (ProgressCompletion.PlanNum != null) + { + this.txtPlanNum.Text = ProgressCompletion.PlanNum.ToString(); + } + if (ProgressCompletion.RealNum != null) + { + this.txtRealNum.Text = ProgressCompletion.RealNum.ToString(); + } + } + } + else + { + this.txtMonths.Text = string.Format("{0:yyyy-MM}",DateTime.Now); + } + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(ProgressCompletionId)) + { + Model.JDGL_ProgressCompletion oldProgressCompletion = BLL.ProgressCompletionService.GetProgressCompletionByProjectIdAndMonths(this.CurrUser.LoginProjectId,this.txtMonths.Text.Trim()); + if (oldProgressCompletion != null) + { + ShowNotify("该月份记录已存在!", MessageBoxIcon.Warning); + return; + } + } + SaveData(true); + } + + private void SaveData(bool bl) + { + string ProgressCompletionId = Request.Params["ProgressCompletionId"]; + Model.JDGL_ProgressCompletion ProgressCompletion = new Model.JDGL_ProgressCompletion(); + ProgressCompletion.ProjectId = this.CurrUser.LoginProjectId; + ProgressCompletion.Months = Funs.GetNewDateTime(this.txtMonths.Text.Trim()); + if (!string.IsNullOrEmpty(this.txtPlanNum.Text.Trim())) + { + ProgressCompletion.PlanNum = Convert.ToDecimal(this.txtPlanNum.Text.Trim()); + } + if (!string.IsNullOrEmpty(this.txtRealNum.Text.Trim())) + { + ProgressCompletion.RealNum = Convert.ToDecimal(this.txtRealNum.Text.Trim()); + } + if (!string.IsNullOrEmpty(ProgressCompletionId)) + { + ProgressCompletion.ProgressCompletionId = ProgressCompletionId; + BLL.ProgressCompletionService.UpdateProgressCompletion(ProgressCompletion); + } + else + { + ProgressCompletion.ProgressCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_ProgressCompletion)); + BLL.ProgressCompletionService.AddProgressCompletion(ProgressCompletion); + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx.designer.cs new file mode 100644 index 00000000..da8b6af3 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionEdit.aspx.designer.cs @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class ProgressCompletionEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtMonths 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtMonths; + + /// + /// txtPlanNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtPlanNum; + + /// + /// txtRealNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtRealNum; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// hdCheckerId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckerId; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx new file mode 100644 index 00000000..9b23d3c2 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx @@ -0,0 +1,48 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProgressCompletionView.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.ProgressCompletionView" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx.cs new file mode 100644 index 00000000..e27f755c --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx.cs @@ -0,0 +1,72 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class ProgressCompletionView : PageBase + { + /// + /// id + /// + public string ProgressCompletionId + { + get + { + return (string)ViewState["ProgressCompletionId"]; + } + set + { + ViewState["ProgressCompletionId"] = value; + } + } + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ProgressCompletionId = Request.Params["ProgressCompletionId"]; + if (!string.IsNullOrEmpty(ProgressCompletionId)) + { + + Model.JDGL_ProgressCompletion ProgressCompletion = BLL.ProgressCompletionService.GetProgressCompletionById(ProgressCompletionId); + if (ProgressCompletion != null) + { + this.ProjectId = ProgressCompletion.ProjectId; + if (ProgressCompletion.Months != null) + { + this.txtMonths.Text = string.Format("{0:yyyy-MM}", ProgressCompletion.Months); + } + if (ProgressCompletion.PlanNum != null) + { + this.txtPlanNum.Text = ProgressCompletion.PlanNum.ToString(); + } + if (ProgressCompletion.RealNum != null) + { + this.txtRealNum.Text = ProgressCompletion.RealNum.ToString(); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx.designer.cs new file mode 100644 index 00000000..fa26a8d3 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/ProgressCompletionView.aspx.designer.cs @@ -0,0 +1,96 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class ProgressCompletionView { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtMonths 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtMonths; + + /// + /// txtPlanNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtPlanNum; + + /// + /// txtRealNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtRealNum; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// hdCheckerId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckerId; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx index 1f51feef..b55e475a 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx @@ -16,7 +16,7 @@ @@ -30,7 +30,7 @@ OnClick="btnSave_Click"> -
@@ -55,24 +55,14 @@ SortField="DesignNum" FieldType="Float" HeaderText="设计数量" TextAlign="Center" HeaderTextAlign="Center"> - + - - - - - - - - diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.cs index 961d08b9..a2c7533b 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.cs @@ -18,7 +18,6 @@ namespace FineUIPro.Web.JDGL.Check if (!IsPostBack) { //GetButtonPower(); - this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now); BindGrid(); } } @@ -79,28 +78,19 @@ namespace FineUIPro.Web.JDGL.Check ///
private void BindGrid() { - GetQuantityCompletion(); - if (!string.IsNullOrEmpty(this.txtMonths.Text.Trim())) - { - string strSql = @"select * + //GetQuantityCompletion(); + string strSql = @"select * from dbo.View_JDGL_QuantityCompletion qc - where qc.ProjectId=@ProjectId and qc.Months=@Months order by qc.SortIndex,qc.Name"; - List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); - listStr.Add(new SqlParameter("@Months", this.txtMonths.Text.Trim() + "-01")); - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - Grid1.RecordCount = tb.Rows.Count; - //tb = GetFilteredTable(Grid1.FilteredData, tb); - var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = table; - Grid1.DataBind(); - } - else - { - Alert.ShowInTop("请选择月份!", MessageBoxIcon.Warning); - return; - } + where qc.ProjectId=@ProjectId order by qc.Name"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); } #region 月份选择事件 diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.designer.cs index 860288af..c2eb7a1e 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.designer.cs @@ -93,24 +93,6 @@ namespace FineUIPro.Web.JDGL.Check { /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - /// - /// nbPlanNum 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.NumberBox nbPlanNum; - - /// - /// nbRealNum 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.NumberBox nbRealNum; - /// /// Window1 控件。 /// diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx index 60d98762..7b40e96f 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx @@ -15,6 +15,12 @@ + + + + @@ -42,8 +48,8 @@ - diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx.cs index 6dc78ed1..d6c468f9 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx.cs @@ -418,96 +418,61 @@ namespace FineUIPro.Web.JDGL.Check /// protected void btnSave_Click(object sender, EventArgs e) { + if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) + { + ShowNotify("请选择开始、结束日期!", MessageBoxIcon.Warning); + return; + } if (string.IsNullOrEmpty(errorInfos)) { - var certificates = from x in Funs.DB.Base_Certificate select x; + var quantityLists = from x in Funs.DB.JDGL_QuantityList where x.ProjectId == this.ProjectId select x; + var quantityCompletionLists = from x in Funs.DB.JDGL_QuantityCompletion where x.ProjectId == this.ProjectId select x; + string quantityListId = string.Empty; int a = quantityCompletions.Count(); + DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); + DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); for (int i = 0; i < a; i++) { - //if (getPerson == null) - //{ - // Model.SitePerson_Person newPerson = new Model.SitePerson_Person(); - // string newKeyID = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); - // newPerson.PersonId = newKeyID; - // newPerson.ProjectId = Request.Params["ProjectId"]; - // newPerson.CardNo = quantityCompletions[i].CardNo; - // newPerson.PersonName = quantityCompletions[i].PersonName; - // newPerson.Sex = quantityCompletions[i].SexName == "男" ? "1" : "2"; - // newPerson.IdcardType = quantityCompletions[i].IdcardType; - // newPerson.IdentityCard = quantityCompletions[i].IdentityCard; - // newPerson.IdcardStartDate = quantityCompletions[i].IdcardStartDate; - // newPerson.IdcardForever = quantityCompletions[i].IdcardForever; - // newPerson.IdcardEndDate = quantityCompletions[i].IdcardEndDate; - // newPerson.IdcardAddress = quantityCompletions[i].IdcardAddress; - // newPerson.UnitId = quantityCompletions[i].UnitId; - // newPerson.WorkPostId = quantityCompletions[i].WorkPostId; - // newPerson.TeamGroupId = quantityCompletions[i].TeamGroupId; - // newPerson.WorkAreaId = quantityCompletions[i].WorkAreaId; - // newPerson.InTime = quantityCompletions[i].InTime; - // newPerson.PositionId = quantityCompletions[i].PositionId; - // newPerson.PostTitleId = quantityCompletions[i].PostTitleId; - // newPerson.EduLevel = quantityCompletions[i].EduLevel; - // newPerson.MaritalStatus = quantityCompletions[i].MaritalStatus; - // newPerson.PoliticsStatus = quantityCompletions[i].PoliticsStatus; - // newPerson.Nation = quantityCompletions[i].Nation; - // newPerson.CountryCode = quantityCompletions[i].CountryCode; - // newPerson.ProvinceCode = quantityCompletions[i].ProvinceCode; - // newPerson.MainCNProfessionalId = quantityCompletions[i].MainCNProfessionalId; - // newPerson.ViceCNProfessionalId = quantityCompletions[i].ViceCNProfessionalId; - // newPerson.Birthday = quantityCompletions[i].Birthday; - // newPerson.Telephone = quantityCompletions[i].Telephone; - // newPerson.Address = quantityCompletions[i].Address; - // newPerson.OutTime = quantityCompletions[i].OutTime; - // newPerson.OutResult = quantityCompletions[i].OutResult; - // newPerson.IsForeign = quantityCompletions[i].IsForeign; - // newPerson.IsOutside = quantityCompletions[i].IsOutside; - // newPerson.IsUsed = quantityCompletions[i].IsUsedName == "是" ? true : false; - // newPerson.IsCardUsed = quantityCompletions[i].IsCardUsedName == "是" ? true : false; - // BLL.PersonService.AddPerson(newPerson); - - // var item = personQualitys.FirstOrDefault(x => x.Remark == newPerson.IdentityCard); - // if (item != null) - // { - // Model.QualityAudit_PersonQuality newPersonQuality = new Model.QualityAudit_PersonQuality - // { - // PersonQualityId = SQLHelper.GetNewID(typeof(Model.QualityAudit_PersonQuality)), - // PersonId = newPerson.PersonId, - // CompileMan = this.CurrUser.UserId, - // CompileDate = DateTime.Now - // }; - // var certificate = certificates.FirstOrDefault(x => x.CertificateName == item.CertificateName); - // if (certificate != null) - // { - // newPersonQuality.CertificateId = certificate.CertificateId; - // } - // newPersonQuality.CertificateName = item.CertificateName; - // newPersonQuality.CertificateNo = item.CertificateNo; - // newPersonQuality.LimitDate = item.LimitDate; - // BLL.PersonQualityService.AddPersonQuality(newPersonQuality); - // } - //} - //else - //{ - // getPerson.CardNo = quantityCompletions[i].CardNo; - // getPerson.PersonName = quantityCompletions[i].PersonName; - // getPerson.Sex = quantityCompletions[i].SexName == "男" ? "1" : "2"; - // getPerson.IdentityCard = quantityCompletions[i].IdentityCard; - // getPerson.Address = quantityCompletions[i].Address; - // getPerson.UnitId = quantityCompletions[i].UnitId; - // getPerson.TeamGroupId = quantityCompletions[i].TeamGroupId; - // getPerson.WorkAreaId = quantityCompletions[i].WorkAreaId; - // getPerson.WorkPostId = quantityCompletions[i].WorkPostId; - // //newPerson.CertificateId = quantityCompletions[i].CertificateId; - // //newPerson.CertificateCode = quantityCompletions[i].CertificateCode; - // //newPerson.CertificateLimitTime = quantityCompletions[i].CertificateLimitTime; - // getPerson.InTime = quantityCompletions[i].InTime; - // getPerson.OutTime = quantityCompletions[i].OutTime; - // getPerson.OutResult = quantityCompletions[i].OutResult; - // getPerson.Telephone = quantityCompletions[i].Telephone; - // getPerson.IsUsed = quantityCompletions[i].IsUsedName == "是" ? true : false; - // getPerson.IsCardUsed = quantityCompletions[i].IsCardUsedName == "是" ? true : false; - // Funs.DB.SubmitChanges(); - //} + var oldQuantityList = quantityLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.Name == quantityCompletions[i].Name); + if (oldQuantityList == null) + { + Model.JDGL_QuantityList newQuantityList = new Model.JDGL_QuantityList(); + quantityListId = SQLHelper.GetNewID(typeof(Model.JDGL_QuantityList)); + newQuantityList.QuantityListId = quantityListId; + newQuantityList.ProjectId = this.ProjectId; + newQuantityList.Name = quantityCompletions[i].Name; + newQuantityList.Unit = quantityCompletions[i].Unit; + newQuantityList.DesignNum = quantityCompletions[i].DesignNum; + BLL.QuantityListService.AddQuantityList(newQuantityList); + } + else + { + quantityListId = oldQuantityList.QuantityListId; + oldQuantityList.Unit = quantityCompletions[i].Unit; + oldQuantityList.DesignNum = quantityCompletions[i].DesignNum; + BLL.QuantityListService.UpdateQuantityList(oldQuantityList); + } + var oldQuantityCompletion = quantityCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.QuantityListId == quantityListId && x.StartDate == startDate && x.EndDate == endDate); + if (oldQuantityCompletion == null) + { + Model.JDGL_QuantityCompletion newQuantityCompletion = new Model.JDGL_QuantityCompletion(); + newQuantityCompletion.QuantityCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_QuantityCompletion)); + newQuantityCompletion.ProjectId = this.ProjectId; + newQuantityCompletion.QuantityListId = quantityListId; + newQuantityCompletion.PlanNum = quantityCompletions[i].PlanNum; + newQuantityCompletion.RealNum = quantityCompletions[i].RealNum; + newQuantityCompletion.CompileMan = this.CurrUser.UserId; + newQuantityCompletion.CompileDate = DateTime.Now; + newQuantityCompletion.StartDate = startDate; + newQuantityCompletion.EndDate = endDate; + BLL.QuantityCompletionService.AddQuantityCompletion(newQuantityCompletion); + } + else + { + oldQuantityCompletion.PlanNum= quantityCompletions[i].PlanNum; + oldQuantityCompletion.RealNum= quantityCompletions[i].RealNum; + BLL.QuantityCompletionService.UpdateQuantityCompletion(oldQuantityCompletion); + } } string rootPath = Server.MapPath("~/"); string initFullPath = rootPath + initPath; @@ -581,8 +546,8 @@ namespace FineUIPro.Web.JDGL.Check if (e.EventArgument == "Confirm_OK") { string rootPath = Server.MapPath("~/"); - string uploadfilepath = rootPath + Const.PersonTemplateUrl; - string filePath = Const.PersonTemplateUrl; + string uploadfilepath = rootPath + Const.QuantityCompletionTemplateUrl; + string filePath = Const.QuantityCompletionTemplateUrl; string fileName = Path.GetFileName(filePath); FileInfo info = new FileInfo(uploadfilepath); long fileSize = info.Length; diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx.designer.cs index 58a47abb..a6af568c 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx.designer.cs @@ -48,6 +48,24 @@ namespace FineUIPro.Web.JDGL.Check { /// protected global::FineUIPro.Toolbar Toolbar2; + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + /// /// btnAudit 控件。 /// diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityList.aspx b/SGGL/FineUIPro.Web/JDGL/Check/QuantityList.aspx index af30ff3d..26ff76ec 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityList.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityList.aspx @@ -50,7 +50,7 @@ SortField="Name" FieldType="String" HeaderText="工作项" TextAlign="center" HeaderTextAlign="Center"> - diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityListEdit.aspx b/SGGL/FineUIPro.Web/JDGL/Check/QuantityListEdit.aspx index 9bb9555e..75c0310e 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityListEdit.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityListEdit.aspx @@ -20,11 +20,11 @@ - + <%-- - + --%> protected global::FineUIPro.TextBox txtName; - /// - /// drpCNProfessionalId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpCNProfessionalId; - /// /// txtUnit 控件。 /// diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityListView.aspx b/SGGL/FineUIPro.Web/JDGL/Check/QuantityListView.aspx index 9a9e8bd0..9bb325b8 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityListView.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityListView.aspx @@ -20,11 +20,11 @@ - + <%-- - + --%> protected global::FineUIPro.TextBox txtName; - /// - /// drpCNProfessionalId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpCNProfessionalId; - /// /// txtUnit 控件。 /// diff --git a/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx new file mode 100644 index 00000000..6d989fc3 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx @@ -0,0 +1,70 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SteelStructureCompletion.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.SteelStructureCompletion" %> + + + + + +钢结构完成情况 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx.cs new file mode 100644 index 00000000..e68381c4 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class SteelStructureCompletion : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //GetButtonPower(); + BindGrid(); + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SteelStructureCompletionMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + } + } + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"select * + from dbo.View_JDGL_SteelStructureCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtMonths_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SteelStructureCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx.designer.cs new file mode 100644 index 00000000..5a1832c0 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletion.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class SteelStructureCompletion { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx new file mode 100644 index 00000000..eb00576f --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx @@ -0,0 +1,95 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SteelStructureCompletionIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.SteelStructureCompletionIn" %> + + + + + +导入信息 + + + +
+ + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%-- + + + + + --%> + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx.cs new file mode 100644 index 00000000..e33daa3a --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx.cs @@ -0,0 +1,559 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class SteelStructureCompletionIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 人员集合 + /// + public static List steelStructureCompletions = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (steelStructureCompletions != null) + { + steelStructureCompletions.Clear(); + } + errorInfos = string.Empty; + this.ProjectId = Request.Params["ProjectId"]; + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (steelStructureCompletions != null) + { + steelStructureCompletions.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - "))); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 4); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + ir = pds.Rows.Count; + var units = from x in Funs.DB.Base_Unit + select x; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + var unit = units.FirstOrDefault(e => e.UnitName == col0); + if (unit != null) + { + var projectUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == unit.UnitId); + if (projectUnit == null) + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在本项目中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在单位表中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "此项为必填项!" + "|"; + } + + string col1 = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(col1)) + { + try + { + decimal dec = Convert.ToDecimal(col1); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总量" + "," + "[" + col1 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "总量" + "," + "此项为必填项!" + "|"; + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(col2)) + { + try + { + decimal dec = Convert.ToDecimal(col2); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "到货量" + "," + "[" + col2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "到货量" + "," + "此项为必填项!" + "|"; + } + + string col3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(col3)) + { + try + { + decimal dec = Convert.ToDecimal(col3); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "本期安装量" + "," + "[" + col3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "本期安装量" + "," + "此项为必填项!" + "|"; + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = result; + Alert alert = new Alert + { + Message = result, + Target = Target.Self + }; + alert.Show(); + + + } + else + { + errorInfos = string.Empty; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 4); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + steelStructureCompletions.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + var units = from x in Funs.DB.Base_Unit + select x; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + Model.View_JDGL_SteelStructureCompletion steelStructureCompletion = new Model.View_JDGL_SteelStructureCompletion(); + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + string col2 = pds.Rows[i][2].ToString().Trim(); + string col3 = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(col0))//施工单位 + { + var unit = units.FirstOrDefault(x => x.UnitName == col0); + if (unit != null) + { + steelStructureCompletion.UnitId = unit.UnitId; + steelStructureCompletion.UnitName = unit.UnitName; + } + } + if (!string.IsNullOrEmpty(col1))//总量 + { + steelStructureCompletion.TotalNum = Funs.GetNewDecimalOrZero(col1); + } + if (!string.IsNullOrEmpty(col2))//到货量 + { + steelStructureCompletion.ArrivalNum = Funs.GetNewDecimalOrZero(col2); + } + if (!string.IsNullOrEmpty(col3))//本期安装量 + { + steelStructureCompletion.ThisNum = Funs.GetNewDecimalOrZero(col3); + } + steelStructureCompletion.SteelStructureCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_SteelStructureCompletion)); + steelStructureCompletions.Add(steelStructureCompletion); + } + if (steelStructureCompletions.Count > 0) + { + this.Grid1.Hidden = false; + this.Grid1.DataSource = steelStructureCompletions; + this.Grid1.DataBind(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) + { + ShowNotify("请选择开始、结束日期!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + var steelStructureCompletionLists = from x in Funs.DB.JDGL_SteelStructureCompletion where x.ProjectId == this.ProjectId select x; + int a = steelStructureCompletions.Count(); + DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); + DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); + for (int i = 0; i < a; i++) + { + var oldSteelStructureCompletion = steelStructureCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == steelStructureCompletions[i].UnitId && x.StartDate == startDate && x.EndDate == endDate); + if (oldSteelStructureCompletion == null) + { + Model.JDGL_SteelStructureCompletion newSteelStructureCompletion = new Model.JDGL_SteelStructureCompletion(); + newSteelStructureCompletion.SteelStructureCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_SteelStructureCompletion)); + newSteelStructureCompletion.ProjectId = this.ProjectId; + newSteelStructureCompletion.UnitId = steelStructureCompletions[i].UnitId; + newSteelStructureCompletion.TotalNum = steelStructureCompletions[i].TotalNum; + newSteelStructureCompletion.ArrivalNum = steelStructureCompletions[i].ArrivalNum; + newSteelStructureCompletion.ThisNum = steelStructureCompletions[i].ThisNum; + newSteelStructureCompletion.CompileMan = this.CurrUser.UserId; + newSteelStructureCompletion.CompileDate = DateTime.Now; + newSteelStructureCompletion.StartDate = startDate; + newSteelStructureCompletion.EndDate = endDate; + BLL.SteelStructureCompletionService.AddSteelStructureCompletion(newSteelStructureCompletion); + } + else + { + oldSteelStructureCompletion.TotalNum = steelStructureCompletions[i].TotalNum; + oldSteelStructureCompletion.ArrivalNum = steelStructureCompletions[i].ArrivalNum; + oldSteelStructureCompletion.ThisNum = steelStructureCompletions[i].ThisNum; + BLL.SteelStructureCompletionService.UpdateSteelStructureCompletion(oldSteelStructureCompletion); + } + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.SteelStructureCompletionTemplateUrl; + string filePath = Const.SteelStructureCompletionTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx.designer.cs new file mode 100644 index 00000000..ea491a58 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/SteelStructureCompletionIn.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class SteelStructureCompletionIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx new file mode 100644 index 00000000..bd7ff7d7 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx @@ -0,0 +1,433 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TotalCompletion.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.TotalCompletion" %> + + + + + + 工程量完成情况 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx.cs new file mode 100644 index 00000000..830d86bf --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx.cs @@ -0,0 +1,324 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class TotalCompletion : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid0(); + BindGrid1(); + BindGrid2(); + BindGrid3(); + BindGrid4(); + BindGrid5(); + BindGrid6(); + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList0 = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.QuantityCompletionMenuId); + if (buttonList0.Count() > 0) + { + if (buttonList0.Contains(BLL.Const.BtnSave)) + { + this.btnImport0.Hidden = false; + } + } + var buttonList1 = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SteelStructureCompletionMenuId); + if (buttonList1.Count() > 0) + { + if (buttonList1.Contains(BLL.Const.BtnSave)) + { + this.btnImport1.Hidden = false; + } + } + var buttonList2 = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.EquipmentCompletionMenuId); + if (buttonList2.Count() > 0) + { + if (buttonList2.Contains(BLL.Const.BtnSave)) + { + this.btnImport2.Hidden = false; + } + } + var buttonList3 = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PipelineCompletionMenuId); + if (buttonList3.Count() > 0) + { + if (buttonList3.Contains(BLL.Const.BtnSave)) + { + this.btnImport3.Hidden = false; + } + } + var buttonList4 = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ElectricalCompletionMenuId); + if (buttonList4.Count() > 0) + { + if (buttonList4.Contains(BLL.Const.BtnSave)) + { + this.btnImport4.Hidden = false; + } + } + var buttonList5 = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.MeterCompletionMenuId); + if (buttonList5.Count() > 0) + { + if (buttonList5.Contains(BLL.Const.BtnSave)) + { + this.btnImport5.Hidden = false; + } + } + var buttonList6 = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.UndergroundPipeCompletionMenuId); + if (buttonList6.Count() > 0) + { + if (buttonList6.Contains(BLL.Const.BtnSave)) + { + this.btnImport6.Hidden = false; + } + } + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid0() + { + //GetQuantityCompletion(); + string strSql = @"select * + from dbo.View_JDGL_QuantityCompletion qc + where qc.ProjectId=@ProjectId order by qc.Name"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid0.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid0, tb); + Grid0.DataSource = table; + Grid0.DataBind(); + } + + /// + /// 加载Grid + /// + private void BindGrid1() + { + string strSql = @"select * + from dbo.View_JDGL_SteelStructureCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 加载Grid + /// + private void BindGrid2() + { + string strSql = @"select * + from dbo.View_JDGL_EquipmentCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid2.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid2, tb); + Grid2.DataSource = table; + Grid2.DataBind(); + } + + /// + /// 加载Grid + /// + private void BindGrid3() + { + string strSql = @"select * + from dbo.View_JDGL_PipelineCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid3.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid3, tb); + Grid3.DataSource = table; + Grid3.DataBind(); + } + + /// + /// 加载Grid + /// + private void BindGrid4() + { + string strSql = @"select * + from dbo.View_JDGL_ElectricalCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid4.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid4, tb); + Grid4.DataSource = table; + Grid4.DataBind(); + } + + /// + /// 加载Grid + /// + private void BindGrid5() + { + string strSql = @"select * + from dbo.View_JDGL_MeterCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid5.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid5, tb); + Grid5.DataSource = table; + Grid5.DataBind(); + } + + /// + /// 加载Grid + /// + private void BindGrid6() + { + string strSql = @"select * + from dbo.View_JDGL_UndergroundPipeCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid6.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid6, tb); + Grid6.DataSource = table; + Grid6.DataBind(); + } + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport0_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QuantityCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport1_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SteelStructureCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport2_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport3_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelineCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport4_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectricalCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport5_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MeterCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport6_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("UndergroundPipeCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid0(); + BindGrid1(); + BindGrid2(); + BindGrid3(); + BindGrid4(); + BindGrid5(); + BindGrid6(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx.designer.cs new file mode 100644 index 00000000..aa64f795 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/TotalCompletion.aspx.designer.cs @@ -0,0 +1,366 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class TotalCompletion { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Grid0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid0; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lb0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb0; + + /// + /// btnImport0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport0; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// lb1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb1; + + /// + /// btnImport1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport1; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// lb2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb2; + + /// + /// btnImport2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport2; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Grid3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid3; + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// lb3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb3; + + /// + /// btnImport3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport3; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Grid4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid4; + + /// + /// Toolbar5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar5; + + /// + /// lb4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb4; + + /// + /// btnImport4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport4; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Grid5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid5; + + /// + /// Toolbar6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar6; + + /// + /// lb5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb5; + + /// + /// btnImport5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport5; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// Grid6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid6; + + /// + /// Toolbar7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar7; + + /// + /// lb6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb6; + + /// + /// btnImport6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport6; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label6; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx new file mode 100644 index 00000000..c433693d --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx @@ -0,0 +1,71 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UndergroundPipeCompletion.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.UndergroundPipeCompletion" %> + + + + + +全厂地下管网完成情况 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx.cs new file mode 100644 index 00000000..cfa4b0d7 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class UndergroundPipeCompletion : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //GetButtonPower(); + BindGrid(); + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.UndergroundPipeCompletionMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + } + } + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"select * + from dbo.View_JDGL_UndergroundPipeCompletion qc + where qc.ProjectId=@ProjectId order by qc.UnitName"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtMonths_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("UndergroundPipeCompletionIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx.designer.cs new file mode 100644 index 00000000..2820211e --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletion.aspx.designer.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class UndergroundPipeCompletion { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx new file mode 100644 index 00000000..3bb7fd48 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx @@ -0,0 +1,92 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UndergroundPipeCompletionIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.UndergroundPipeCompletionIn" %> + + + + + +导入信息 + + + +
+ + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%-- + + + + + --%> + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx.cs new file mode 100644 index 00000000..96bd92ab --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx.cs @@ -0,0 +1,535 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class UndergroundPipeCompletionIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 人员集合 + /// + public static List undergroundPipeCompletions = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (undergroundPipeCompletions != null) + { + undergroundPipeCompletions.Clear(); + } + errorInfos = string.Empty; + this.ProjectId = Request.Params["ProjectId"]; + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (undergroundPipeCompletions != null) + { + undergroundPipeCompletions.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - "))); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 3); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + ir = pds.Rows.Count; + var units = from x in Funs.DB.Base_Unit + select x; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + var unit = units.FirstOrDefault(e => e.UnitName == col0); + if (unit != null) + { + var projectUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == unit.UnitId); + if (projectUnit == null) + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在本项目中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "[" + col0 + "]不在单位表中!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "施工单位" + "," + "此项为必填项!" + "|"; + } + + string col1 = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(col1)) + { + try + { + decimal dec = Convert.ToDecimal(col1); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "DIN/米" + "," + "[" + col1 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "DIN/米" + "," + "此项为必填项!" + "|"; + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(col2)) + { + try + { + decimal dec = Convert.ToDecimal(col2); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "本期完成量" + "," + "[" + col2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "本期完成量" + "," + "此项为必填项!" + "|"; + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = result; + Alert alert = new Alert + { + Message = result, + Target = Target.Self + }; + alert.Show(); + + + } + else + { + errorInfos = string.Empty; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 3); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + undergroundPipeCompletions.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + var units = from x in Funs.DB.Base_Unit + select x; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + Model.View_JDGL_UndergroundPipeCompletion undergroundPipeCompletion = new Model.View_JDGL_UndergroundPipeCompletion(); + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + string col2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(col0))//施工单位 + { + var unit = units.FirstOrDefault(x => x.UnitName == col0); + if (unit != null) + { + undergroundPipeCompletion.UnitId = unit.UnitId; + undergroundPipeCompletion.UnitName = unit.UnitName; + } + } + if (!string.IsNullOrEmpty(col1))//DIN/米 + { + undergroundPipeCompletion.TotalNum = Funs.GetNewDecimalOrZero(col1); + } + if (!string.IsNullOrEmpty(col2))//本期完成量 + { + undergroundPipeCompletion.ThisNum = Funs.GetNewDecimalOrZero(col2); + } + undergroundPipeCompletion.UndergroundPipeCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_UndergroundPipeCompletion)); + undergroundPipeCompletions.Add(undergroundPipeCompletion); + } + if (undergroundPipeCompletions.Count > 0) + { + this.Grid1.Hidden = false; + this.Grid1.DataSource = undergroundPipeCompletions; + this.Grid1.DataBind(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) + { + ShowNotify("请选择开始、结束日期!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + var undergroundPipeCompletionLists = from x in Funs.DB.JDGL_UndergroundPipeCompletion where x.ProjectId == this.ProjectId select x; + int a = undergroundPipeCompletions.Count(); + DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); + DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); + for (int i = 0; i < a; i++) + { + var oldUndergroundPipeCompletion = undergroundPipeCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitId == undergroundPipeCompletions[i].UnitId && x.StartDate == startDate && x.EndDate == endDate); + if (oldUndergroundPipeCompletion == null) + { + Model.JDGL_UndergroundPipeCompletion newUndergroundPipeCompletion = new Model.JDGL_UndergroundPipeCompletion(); + newUndergroundPipeCompletion.UndergroundPipeCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_UndergroundPipeCompletion)); + newUndergroundPipeCompletion.ProjectId = this.ProjectId; + newUndergroundPipeCompletion.UnitId = undergroundPipeCompletions[i].UnitId; + newUndergroundPipeCompletion.TotalNum = undergroundPipeCompletions[i].TotalNum; + newUndergroundPipeCompletion.ThisNum = undergroundPipeCompletions[i].ThisNum; + newUndergroundPipeCompletion.CompileMan = this.CurrUser.UserId; + newUndergroundPipeCompletion.CompileDate = DateTime.Now; + newUndergroundPipeCompletion.StartDate = startDate; + newUndergroundPipeCompletion.EndDate = endDate; + BLL.UndergroundPipeCompletionService.AddUndergroundPipeCompletion(newUndergroundPipeCompletion); + } + else + { + oldUndergroundPipeCompletion.TotalNum = undergroundPipeCompletions[i].TotalNum; + oldUndergroundPipeCompletion.ThisNum = undergroundPipeCompletions[i].ThisNum; + BLL.UndergroundPipeCompletionService.UpdateUndergroundPipeCompletion(oldUndergroundPipeCompletion); + } + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.UndergroundPipeCompletionTemplateUrl; + string filePath = Const.UndergroundPipeCompletionTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx.designer.cs new file mode 100644 index 00000000..5dc4dc20 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/UndergroundPipeCompletionIn.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class UndergroundPipeCompletionIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + } +} diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXFind.aspx b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXFind.aspx index 5da7f6c7..5bafbeee 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXFind.aspx +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXFind.aspx @@ -69,8 +69,14 @@ - + + + @@ -84,15 +90,11 @@ - - + - - + diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx index f54f09a1..7b2db81e 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx @@ -84,6 +84,11 @@ + + + + + diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.cs index 4dfe483a..df7bc18c 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.cs @@ -279,5 +279,19 @@ namespace FineUIPro.Web.PZHGL.GJSX { BindGrid(); } + + protected string ConvertProgressDetail(object GJSXID) + { + string detailStr = string.Empty; + if (!string.IsNullOrEmpty(GJSXID.ToString())) + { + Model.GJSX_detail detail = (from x in Funs.DB.GJSX_detail where x.GJSXID == GJSXID.ToString() && x.Progress_detail != null && x.Progress_detail != "" orderby x.Date descending select x).FirstOrDefault(); + if (detail != null) + { + detailStr = detail.Progress_detail; + } + } + return detailStr; + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.designer.cs b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.designer.cs index 83282b14..ae0f7386 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXList.aspx.designer.cs @@ -66,6 +66,15 @@ namespace FineUIPro.Web.PZHGL.GJSX { /// protected global::FineUIPro.Button btnNew; + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXListEdit.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXListEdit.aspx.cs index 77734927..8dd53a12 100644 --- a/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/GJSX/GJSXListEdit.aspx.cs @@ -440,7 +440,7 @@ namespace FineUIPro.Web.PZHGL.GJSX gjsx.ProjectId = this.CurrUser.LoginProjectId; gjsx.UnitId = this.DropUnitId.SelectedValue; gjsx.State = state; - gjsx.QuestionTypeID = this.DropQuestionTypeID.SelectedValue; + //gjsx.QuestionTypeID = this.DropQuestionTypeID.SelectedValue; gjsx.IsManypeople = lblIsManyPeople.SelectedValue; gjsx.CompleteDate = DateTime.Parse(Date_CompleteDate.Text); gjsx.AttachUrl = ""; diff --git a/SGGL/FineUIPro.Web/Person/PersonPlan.aspx b/SGGL/FineUIPro.Web/Person/PersonPlan.aspx index 2ffd9121..f77e6a01 100644 --- a/SGGL/FineUIPro.Web/Person/PersonPlan.aspx +++ b/SGGL/FineUIPro.Web/Person/PersonPlan.aspx @@ -6,6 +6,11 @@ 人员初步规划 +
@@ -24,14 +29,15 @@ - + - + - + + @@ -68,42 +74,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Person/PersonPlan.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonPlan.aspx.cs index 5f6b9815..7b53418a 100644 --- a/SGGL/FineUIPro.Web/Person/PersonPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonPlan.aspx.cs @@ -62,36 +62,206 @@ namespace FineUIPro.Web.Person /// private void BindGrid() { - string strSql = @"SELECT * FROM View_Person_PersonPlan WHERE Years=@years"; - List listStr = new List(); - listStr.Add(new SqlParameter("@years", DateTime.Now.Year)); - if (this.drpProjectId.SelectedValue != BLL.Const._Null) + if (!this.ckDistinct.Checked) { - strSql += " AND ProjectId=@projectId"; - listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue)); + string strSql = @"SELECT * FROM View_Person_PersonPlan WHERE Years=@years"; + List listStr = new List(); + listStr.Add(new SqlParameter("@years", DateTime.Now.Year)); + if (this.drpProjectId.SelectedValue != BLL.Const._Null) + { + strSql += " AND ProjectId=@projectId"; + listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue)); + } + if (this.drpDepartId.SelectedValue != BLL.Const._Null) + { + strSql += " AND DepartId=@DepartId"; + listStr.Add(new SqlParameter("@DepartId", this.drpDepartId.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtMajor.Text.Trim())) + { + strSql += " AND Major LIKE @Major"; + listStr.Add(new SqlParameter("@Major", "%" + this.txtMajor.Text.Trim() + "%")); + } + if (this.drpPersonType.SelectedValue != BLL.Const._Null) + { + strSql += " AND PersonType=@PersonType"; + listStr.Add(new SqlParameter("@PersonType", this.drpPersonType.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim())) + { + strSql += " AND UserName LIKE @UserName"; + listStr.Add(new SqlParameter("@UserName", "%" + this.txtUserName.Text.Trim() + "%")); + } + if (this.drpMonth.SelectedValue != BLL.Const._Null) + { + this.Grid1.FindColumn("Month1").Hidden = true; + this.Grid1.FindColumn("Month2").Hidden = true; + this.Grid1.FindColumn("Month3").Hidden = true; + this.Grid1.FindColumn("Month4").Hidden = true; + this.Grid1.FindColumn("Month5").Hidden = true; + this.Grid1.FindColumn("Month6").Hidden = true; + this.Grid1.FindColumn("Month7").Hidden = true; + this.Grid1.FindColumn("Month8").Hidden = true; + this.Grid1.FindColumn("Month9").Hidden = true; + this.Grid1.FindColumn("Month10").Hidden = true; + this.Grid1.FindColumn("Month11").Hidden = true; + this.Grid1.FindColumn("Month12").Hidden = true; + + if (this.drpMonth.SelectedValue == "1") + { + this.Grid1.FindColumn("Month1").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "2") + { + this.Grid1.FindColumn("Month2").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "3") + { + this.Grid1.FindColumn("Month3").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "4") + { + this.Grid1.FindColumn("Month4").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "5") + { + this.Grid1.FindColumn("Month5").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "6") + { + this.Grid1.FindColumn("Month6").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "7") + { + this.Grid1.FindColumn("Month7").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "8") + { + this.Grid1.FindColumn("Month8").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "9") + { + this.Grid1.FindColumn("Month9").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "10") + { + this.Grid1.FindColumn("Month10").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "11") + { + this.Grid1.FindColumn("Month11").Hidden = false; + } + else if (this.drpMonth.SelectedValue == "12") + { + this.Grid1.FindColumn("Month12").Hidden = false; + } + } + else + { + this.Grid1.FindColumn("Month1").Hidden = false; + this.Grid1.FindColumn("Month2").Hidden = false; + this.Grid1.FindColumn("Month3").Hidden = false; + this.Grid1.FindColumn("Month4").Hidden = false; + this.Grid1.FindColumn("Month5").Hidden = false; + this.Grid1.FindColumn("Month6").Hidden = false; + this.Grid1.FindColumn("Month7").Hidden = false; + this.Grid1.FindColumn("Month8").Hidden = false; + this.Grid1.FindColumn("Month9").Hidden = false; + this.Grid1.FindColumn("Month10").Hidden = false; + this.Grid1.FindColumn("Month11").Hidden = false; + this.Grid1.FindColumn("Month12").Hidden = false; + } + this.Grid1.FindColumn("ProjectName").Hidden = false; + this.Grid1.FindColumn("Remark").Hidden = false; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); } - if (this.drpDepartId.SelectedValue != BLL.Const._Null) - { - strSql += " AND DepartId=@DepartId"; - listStr.Add(new SqlParameter("@DepartId", this.drpDepartId.SelectedValue)); - } - if (!string.IsNullOrEmpty(this.txtMajor.Text.Trim())) - { - strSql += " AND Major LIKE @Major"; - listStr.Add(new SqlParameter("@Major", "%" + this.txtMajor.Text.Trim() + "%")); - } - if (this.drpPersonType.SelectedValue != BLL.Const._Null) - { - strSql += " AND PersonType=@PersonType"; - listStr.Add(new SqlParameter("@PersonType", this.drpPersonType.SelectedValue)); - } - if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim())) - { - strSql += " AND UserName LIKE @UserName"; - listStr.Add(new SqlParameter("@UserName", "%" + this.txtUserName.Text.Trim() + "%")); - } - if (this.drpMonth.SelectedValue != BLL.Const._Null) + else //去重复筛选 { + string strSql = @"SELECT distinct DepartName+UserName as PersonPlanId, DepartName,UserName,Major,PersonTypeName,'' as ProjectName,Remark FROM View_Person_PersonPlan WHERE Years=@years"; + List listStr = new List(); + listStr.Add(new SqlParameter("@years", DateTime.Now.Year)); + if (this.drpProjectId.SelectedValue != BLL.Const._Null) + { + strSql += " AND ProjectId=@projectId"; + listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue)); + } + if (this.drpDepartId.SelectedValue != BLL.Const._Null) + { + strSql += " AND DepartId=@DepartId"; + listStr.Add(new SqlParameter("@DepartId", this.drpDepartId.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtMajor.Text.Trim())) + { + strSql += " AND Major LIKE @Major"; + listStr.Add(new SqlParameter("@Major", "%" + this.txtMajor.Text.Trim() + "%")); + } + if (this.drpPersonType.SelectedValue != BLL.Const._Null) + { + strSql += " AND PersonType=@PersonType"; + listStr.Add(new SqlParameter("@PersonType", this.drpPersonType.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim())) + { + strSql += " AND UserName LIKE @UserName"; + listStr.Add(new SqlParameter("@UserName", "%" + this.txtUserName.Text.Trim() + "%")); + } + if (this.drpMonth.SelectedValue != BLL.Const._Null) + { + if (this.drpMonth.SelectedValue == "1") + { + strSql += " AND Month1=1"; + } + else if (this.drpMonth.SelectedValue == "2") + { + strSql += " AND Month2=1"; + } + else if (this.drpMonth.SelectedValue == "3") + { + strSql += " AND Month3=1"; + } + else if (this.drpMonth.SelectedValue == "4") + { + strSql += " AND Month4=1"; + } + else if (this.drpMonth.SelectedValue == "5") + { + strSql += " AND Month5=1"; + } + else if (this.drpMonth.SelectedValue == "6") + { + strSql += " AND Month6=1"; + } + else if (this.drpMonth.SelectedValue == "7") + { + strSql += " AND Month7=1"; + } + else if (this.drpMonth.SelectedValue == "8") + { + strSql += " AND Month8=1"; + } + else if (this.drpMonth.SelectedValue == "9") + { + strSql += " AND Month9=1"; + } + else if (this.drpMonth.SelectedValue == "10") + { + strSql += " AND Month10=1"; + } + else if (this.drpMonth.SelectedValue == "11") + { + strSql += " AND Month11=1"; + } + else if (this.drpMonth.SelectedValue == "12") + { + strSql += " AND Month12=1"; + } + } + this.Grid1.FindColumn("ProjectName").Hidden = true; this.Grid1.FindColumn("Month1").Hidden = true; this.Grid1.FindColumn("Month2").Hidden = true; this.Grid1.FindColumn("Month3").Hidden = true; @@ -104,77 +274,14 @@ namespace FineUIPro.Web.Person this.Grid1.FindColumn("Month10").Hidden = true; this.Grid1.FindColumn("Month11").Hidden = true; this.Grid1.FindColumn("Month12").Hidden = true; - - if (this.drpMonth.SelectedValue=="1") - { - this.Grid1.FindColumn("Month1").Hidden = false; - } - else if (this.drpMonth.SelectedValue=="2") - { - this.Grid1.FindColumn("Month2").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "3") - { - this.Grid1.FindColumn("Month3").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "4") - { - this.Grid1.FindColumn("Month4").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "5") - { - this.Grid1.FindColumn("Month5").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "6") - { - this.Grid1.FindColumn("Month6").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "7") - { - this.Grid1.FindColumn("Month7").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "8") - { - this.Grid1.FindColumn("Month8").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "9") - { - this.Grid1.FindColumn("Month9").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "10") - { - this.Grid1.FindColumn("Month10").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "11") - { - this.Grid1.FindColumn("Month11").Hidden = false; - } - else if (this.drpMonth.SelectedValue == "12") - { - this.Grid1.FindColumn("Month12").Hidden = false; - } + this.Grid1.FindColumn("Remark").Hidden = true; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); } - else - { - this.Grid1.FindColumn("Month1").Hidden = false; - this.Grid1.FindColumn("Month2").Hidden = false; - this.Grid1.FindColumn("Month3").Hidden = false; - this.Grid1.FindColumn("Month4").Hidden = false; - this.Grid1.FindColumn("Month5").Hidden = false; - this.Grid1.FindColumn("Month6").Hidden = false; - this.Grid1.FindColumn("Month7").Hidden = false; - this.Grid1.FindColumn("Month8").Hidden = false; - this.Grid1.FindColumn("Month9").Hidden = false; - this.Grid1.FindColumn("Month10").Hidden = false; - this.Grid1.FindColumn("Month11").Hidden = false; - this.Grid1.FindColumn("Month12").Hidden = false; - } - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - Grid1.RecordCount = tb.Rows.Count; - var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = table; - Grid1.DataBind(); } #endregion diff --git a/SGGL/FineUIPro.Web/Person/PersonPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/Person/PersonPlan.aspx.designer.cs index a207ddc9..1b5af3a7 100644 --- a/SGGL/FineUIPro.Web/Person/PersonPlan.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Person/PersonPlan.aspx.designer.cs @@ -120,6 +120,15 @@ namespace FineUIPro.Web.Person { /// protected global::FineUIPro.TextBox txtUserName; + /// + /// ckDistinct 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckDistinct; + /// /// btnSearch 控件。 /// diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml index 3daf417e..e6bd867a 100644 --- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml @@ -1,19 +1,12 @@  - - - - - - - - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_Person.xml b/SGGL/FineUIPro.Web/common/Menu_Person.xml index fcb7f96e..d6dcfd39 100644 --- a/SGGL/FineUIPro.Web/common/Menu_Person.xml +++ b/SGGL/FineUIPro.Web/common/Menu_Person.xml @@ -12,5 +12,4 @@ - \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/PageBase.cs b/SGGL/FineUIPro.Web/common/PageBase.cs index 5776802c..9cea5c7f 100644 --- a/SGGL/FineUIPro.Web/common/PageBase.cs +++ b/SGGL/FineUIPro.Web/common/PageBase.cs @@ -914,6 +914,10 @@ namespace FineUIPro.Web { html = (row.FindControl("lblSpecialEquipmentId") as AspNet.Label).Text; } + if (column.ColumnID == "CheckManNames") + { + html = (row.FindControl("lbCheckManNames") as AspNet.Label).Text; + } // 处理CheckBox if (html.Contains("f-grid-static-checkbox")) { @@ -938,6 +942,99 @@ namespace FineUIPro.Web return sb.ToString(); } + /// + /// 导出方法 + /// + /// + /// + public static string GetGridTableHtml2(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + + foreach (GridColumn column in grid.Columns) + { + if (column.ColumnID != "AttachFile" && column.ColumnID!= "lbfAction1" && column.ColumnID != "AttachFile2") + { + sb.AppendFormat("", column.HeaderText); + } + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + if (column.ColumnID != "AttachFile" && column.ColumnID != "lbfAction1" && column.ColumnID != "AttachFile2") + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfPageIndex" && (row.FindControl("lblPageIndex") as AspNet.Label) != null) + { + html = (row.FindControl("lblPageIndex") as AspNet.Label).Text; + } + if (column.ColumnID == "UnitWorkName" && (row.FindControl("lbUnitWorkName") as AspNet.Label) != null) + { + html = (row.FindControl("lbUnitWorkName") as AspNet.Label).Text; + } + if (column.ColumnID == "UnitName" && (row.FindControl("lbUnitName") as AspNet.Label) != null) + { + html = (row.FindControl("lbUnitName") as AspNet.Label).Text; + } + if (column.ColumnID == "UnitNames" && (row.FindControl("lbUnitNames") as AspNet.Label) != null) + { + html = (row.FindControl("lbUnitNames") as AspNet.Label).Text; + } + if (column.ColumnID == "tfNumber" && (row.FindControl("labNumber") as AspNet.Label) != null) + { + html = (row.FindControl("labNumber") as AspNet.Label).Text; + } + if (column.ColumnID == "tfTeamType" && (row.FindControl("lbTeamType") as AspNet.Label) != null) + { + html = (row.FindControl("lbTeamType") as AspNet.Label).Text; + } + if (column.ColumnID == "tfI" && (row.FindControl("tfI") as AspNet.Label) != null) + { + html = (row.FindControl("lbI") as AspNet.Label).Text; + } + if (column.ColumnID == "tfCompileMan" && (row.FindControl("tfCompileMan") as AspNet.Label) != null) + { + html = (row.FindControl("lblCompileMan") as AspNet.Label).Text; + } + if (column.ColumnID == "tfSpecialEquipmentId") + { + html = (row.FindControl("lblSpecialEquipmentId") as AspNet.Label).Text; + } + if (column.ColumnID == "CheckManNames") + { + html = (row.FindControl("lbCheckManNames") as AspNet.Label).Text; + } + // 处理CheckBox + if (html.Contains("f-grid-static-checkbox")) + { + if (!html.Contains("f-checked")) + { + html = "×"; + } + else + { + html = "√"; + } + } + sb.AppendFormat("", html); + // sb.AppendFormat("", html); + } + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}{0}
"); + + return sb.ToString(); + } + /// /// DataTable转HTML /// diff --git a/SGGL/FineUIPro.Web/common/mainMenu_JDGL.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_JDGL.aspx.cs index d5109c8f..80cba1cc 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_JDGL.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_JDGL.aspx.cs @@ -24,232 +24,11 @@ namespace FineUIPro.Web { get { - DataTable tb = new DataTable(); - DateTime startDate, endDate, startMonth, endMonth; - List months = new List(); - List weeks = new List(); - List days = new List(); - string isDataOK = string.Empty; - Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); - //默认开始结束日期为项目开始结束日期 - startDate = Convert.ToDateTime(project.StartDate); - endDate = DateTime.Now.Date.AddDays(1).AddSeconds(-1); - if (project.EndDate != null && DateTime.Now > project.EndDate) - { - endDate = project.EndDate.Value.AddDays(1).AddSeconds(-1); - } - List unitWorks = new List(); - List workPackages = new List(); - List controlItemAndCycles = new List(); - List soptCheckDetails = new List(); - unitWorks = BLL.UnitWorkService.GetUnitWorkLists(this.CurrUser.LoginProjectId); - decimal totalUnitWorkWeights = 0; - bool noWeights = false; - bool noProjectWeights = false; - - workPackages = BLL.WorkPackageService.GetAllWorkPackagesByProjectId(this.CurrUser.LoginProjectId); - controlItemAndCycles = BLL.ControlItemAndCycleService.GetControlItemAndCyclesByProjectIdAndDate(this.CurrUser.LoginProjectId, endDate); - soptCheckDetails = BLL.SpotCheckDetailService.GetViewSpotCheckDetailsByProjectIdAndDate(this.CurrUser.LoginProjectId, endDate, isDataOK); - var unitWork1 = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.Weights == null); - if (unitWork1 != null) //存在没有权重值的单位工程 - { - noProjectWeights = true; - } - - //if (noWeights && unitWorkIds.Length > 1) - //{ - // Alert.ShowInTop("请先设置所选单位工程的权重值!", MessageBoxIcon.Warning); - // return; - //} - //if (noProjectWeights) - //{ - // Alert.ShowInTop("请先设置所有单位工程的权重值!", MessageBoxIcon.Warning); - // return; - //} - //if (this.drpUnitWork.SelectedValue != BLL.Const._Null) - //{ - // workPackages = BLL.WorkPackageService.GetAllWorkPackagesByUnitWorkId(this.drpUnitWork.SelectedValue); - // controlItemAndCycles = BLL.ControlItemAndCycleService.GetControlItemAndCyclesByUnitWorkIdAndDate(this.drpUnitWork.SelectedValue, endDate); - // soptCheckDetails = BLL.SpotCheckDetailService.GetViewSpotCheckDetailsByUnitWorkIdAndDate(this.drpUnitWork.SelectedValue, endDate, isDataOK); - //} - //else - //{ - // workPackages = BLL.WorkPackageService.GetAllWorkPackagesByProjectId(this.CurrUser.LoginProjectId); - // controlItemAndCycles = BLL.ControlItemAndCycleService.GetControlItemAndCyclesByProjectIdAndDate(this.CurrUser.LoginProjectId, endDate); - // soptCheckDetails = BLL.SpotCheckDetailService.GetViewSpotCheckDetailsByProjectIdAndDate(this.CurrUser.LoginProjectId, endDate, isDataOK); - //} - decimal lastDPlanTotal = 0; - decimal lastDCompleteTotal = 0; - tb.Columns.Add("月"); - startMonth = Convert.ToDateTime(startDate.Year + "-" + startDate.Month + "-01"); - endMonth = Convert.ToDateTime(endDate.Year + "-" + endDate.Month + "-01"); - do - { - months.Add(startMonth); - startMonth = startMonth.AddMonths(1); - } while (startMonth <= endMonth); - tb.Columns.Add("计划值"); - tb.Columns.Add("累计计划值"); - tb.Columns.Add("实际值"); - tb.Columns.Add("累计实际值"); - for (int i = 0; i < months.Count; i++) - { - DataRow row = tb.NewRow(); - row[0] = string.Format("{0:yyyy-MM}", months[i]); - //对应月份的记录 - decimal dPlan = 0, dPlan1 = 0, dPlanTotal = 0, dComplete = 0, dComplete1 = 0, dCompleteMonth = 0, dCompleteTotal = 0; - //当月及之前所有工作包内容 - var totalPlanCompleteControlItemAndCycles = controlItemAndCycles.Where(x => x.PlanCompleteDate < months[i].AddMonths(1)); - //当月及之前所有验收合格记录 - var totalSoptCheckDetails = soptCheckDetails.Where(x => x.SpotCheckDate < months[i].AddMonths(1)); - foreach (var item in totalPlanCompleteControlItemAndCycles) - { - { - var workPackage1 = workPackages.FirstOrDefault(x => x.WorkPackageId == item.WorkPackageId); - if (workPackage1 != null) - { - //逐级递推计算权重计划值 - dPlan1 = Convert.ToDecimal((workPackage1.Weights ?? 0) / 100) * Convert.ToDecimal(item.Weights / 100); - var workPackage2 = workPackages.FirstOrDefault(x => x.WorkPackageId == workPackage1.SuperWorkPackageId); - if (workPackage2 != null) - { - dPlan1 = Convert.ToDecimal((workPackage2.Weights ?? 0) / 100) * dPlan1; - var workPackage3 = workPackages.FirstOrDefault(x => x.WorkPackageId == workPackage2.SuperWorkPackageId); - if (workPackage3 != null) - { - dPlan1 = Convert.ToDecimal((workPackage3.Weights ?? 0) / 100) * dPlan1; - } - } - } - var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage1.UnitWorkId); - if (unitWork != null) - { - dPlan1 = Convert.ToDecimal((unitWork.Weights ?? 0) / 100) * dPlan1; - } - } - if (item.PlanCompleteDate >= months[i]) //当月计划完成记录 - { - dPlan += dPlan1; //累加当月值 - } - dPlanTotal += dPlan1; //累加累计值 - - } - foreach (var item in controlItemAndCycles) - { - //实际值 - var itemSoptCheckDetails = soptCheckDetails.Where(x => x.ControlItemAndCycleId == item.ControlItemAndCycleId && x.SpotCheckDate < months[i].AddMonths(1)); - var itemMonthSoptCheckDetails = soptCheckDetails.Where(x => x.ControlItemAndCycleId == item.ControlItemAndCycleId && x.SpotCheckDate >= months[i] && x.SpotCheckDate < months[i].AddMonths(1)); - if (itemSoptCheckDetails.Count() > 0) //存在验收合格的记录 - { - //工作包实际值 - dComplete1 = Convert.ToDecimal(itemSoptCheckDetails.Count()) / Convert.ToDecimal(item.CheckNum) * Convert.ToDecimal(item.Weights); - var workPackage1 = workPackages.FirstOrDefault(x => x.WorkPackageId == item.WorkPackageId); - if (workPackage1 != null) - { - //逐级递推计算权重计划值 - dComplete1 = Convert.ToDecimal((workPackage1.Weights ?? 0) / 100) * Convert.ToDecimal(dComplete1 / 100); - var workPackage2 = workPackages.FirstOrDefault(x => x.WorkPackageId == workPackage1.SuperWorkPackageId); - if (workPackage2 != null) - { - dComplete1 = Convert.ToDecimal((workPackage2.Weights ?? 0) / 100) * dComplete1; - var workPackage3 = workPackages.FirstOrDefault(x => x.WorkPackageId == workPackage2.SuperWorkPackageId); - if (workPackage3 != null) - { - dComplete1 = Convert.ToDecimal((workPackage3.Weights ?? 0) / 100) * dComplete1; - } - } - } - var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage1.UnitWorkId); - if (unitWork != null) - { - dComplete1 = Convert.ToDecimal((unitWork.Weights ?? 0) / 100) * dComplete1; - } - dCompleteTotal += dComplete1; - } - if (itemMonthSoptCheckDetails.Count() > 0) //当月存在验收合格的记录 - { - //工作包实际值 - dCompleteMonth = Convert.ToDecimal(itemMonthSoptCheckDetails.Count()) / Convert.ToDecimal(item.CheckNum) * Convert.ToDecimal(item.Weights); - var workPackage1 = workPackages.FirstOrDefault(x => x.WorkPackageId == item.WorkPackageId); - if (workPackage1 != null) - { - //逐级递推计算权重计划值 - dCompleteMonth = Convert.ToDecimal((workPackage1.Weights ?? 0) / 100) * Convert.ToDecimal(dCompleteMonth / 100); - var workPackage2 = workPackages.FirstOrDefault(x => x.WorkPackageId == workPackage1.SuperWorkPackageId); - if (workPackage2 != null) - { - dCompleteMonth = Convert.ToDecimal((workPackage2.Weights ?? 0) / 100) * dCompleteMonth; - var workPackage3 = workPackages.FirstOrDefault(x => x.WorkPackageId == workPackage2.SuperWorkPackageId); - if (workPackage3 != null) - { - dCompleteMonth = Convert.ToDecimal((workPackage3.Weights ?? 0) / 100) * dCompleteMonth; - } - } - } - var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage1.UnitWorkId); - if (unitWork != null) - { - dCompleteMonth = Convert.ToDecimal((unitWork.Weights ?? 0) / 100) * dCompleteMonth; - } - dComplete += dCompleteMonth; - } - } - row[1] = dPlan.ToString(); //计划值 - if (dPlanTotal != lastDPlanTotal) //当期累计计划值不等于上月累计计划值时,再保存累计计划值 - { - row[2] = dPlanTotal.ToString(); //累计计划值 - for (int j = 0; j < i; j++) - { - if (string.IsNullOrEmpty(tb.Rows[j][2].ToString())) - { - tb.Rows[j][2] = lastDPlanTotal.ToString(); - } - } - } - else - { - if (dPlanTotal == 0) - { - row[2] = "0"; //累计计划值 - } - else - { - row[2] = dPlanTotal; - } - } - lastDPlanTotal = dPlanTotal; - row[3] = dComplete.ToString(); //实际值 - if (dCompleteTotal != lastDCompleteTotal) //当期累计实际值不等于上月累计实际值时,再保存累计实际值 - { - row[4] = dCompleteTotal.ToString(); //累计实际值 - for (int j = 0; j < i; j++) - { - if (string.IsNullOrEmpty(tb.Rows[j][4].ToString())) - { - tb.Rows[j][4] = lastDCompleteTotal.ToString(); - } - } - } - else - { - if (dCompleteTotal == 0) - { - row[4] = "0"; //累计实际值 - } - else - { - row[4] = dCompleteTotal; - } - } - lastDCompleteTotal = dCompleteTotal; - tb.Rows.Add(row); - } - List series = new List(); Model.BusinessColumn businessColumn = new Model.BusinessColumn(); List listCategories = new List(); businessColumn.title = "赢得值曲线"; - var units = BLL.ProjectUnitService.GetProjectUnitListByProjectIdUnitType(CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2); + var views = (from x in Funs.DB.View_JDGL_ProgressCompletion where x.ProjectId == this.CurrUser.LoginProjectId orderby x.Months select x).ToList(); Model.SingleSerie s = new Model.SingleSerie(); Model.SingleSerie s2 = new Model.SingleSerie(); Model.SingleSerie s3 = new Model.SingleSerie(); @@ -258,13 +37,13 @@ namespace FineUIPro.Web List listdata2 = new List(); List listdata3 = new List(); List listdata4 = new List(); - for (int i = 0; i < tb.Rows.Count; i++) + for (int i = 0; i < views.Count; i++) { - listCategories.Add(tb.Rows[i][0].ToString()); - listdata.Add(Convert.ToDouble(tb.Rows[i][1].ToString()) * 100); - listdata2.Add(Convert.ToDouble(tb.Rows[i][2].ToString()) * 100); - listdata3.Add(Convert.ToDouble(tb.Rows[i][3].ToString()) * 100); - listdata4.Add(Convert.ToDouble(tb.Rows[i][4].ToString()) * 100); + listCategories.Add(views[i].MonthStr); + listdata.Add(Convert.ToDouble(views[i].PlanNum)); + listdata2.Add(Convert.ToDouble(views[i].TotalPlanNum)); + listdata3.Add(Convert.ToDouble(views[i].RealNum)); + listdata4.Add(Convert.ToDouble(views[i].TotalRealNum)); } s.data = listdata; s2.data = listdata2; diff --git a/SGGL/FineUIPro.Web/common/mainProject.aspx b/SGGL/FineUIPro.Web/common/mainProject.aspx index b2237b20..0492bb43 100644 --- a/SGGL/FineUIPro.Web/common/mainProject.aspx +++ b/SGGL/FineUIPro.Web/common/mainProject.aspx @@ -242,7 +242,10 @@ padding-left: 2em;
-
赢得值曲线
+
+
赢得值曲线
+
更多
+
@@ -255,7 +258,7 @@ padding-left: 2em;
各工种人力情况
-
总数:
+
总数:
@@ -579,7 +582,8 @@ padding-left: 2em; // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option) } - var two = { "title": "赢得值曲线", "xFontNum": 0, "legend": null, "categories": ["2020-07", "2020-08", "2020-09", "2020-10", "2020-11", "2020-12", "2021-01", "2021-02"], "series": [{ "name": null, "type": null, "data": [5.0, 2.0, 0.0, 1.0, 4.0, 8.0, 2.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [8.0, 12.0, 4.0, 9.0, 10.0, 2.0, 3.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [12.0, 2.0, 5.0, 10.0, 3.0, 3.0, 8.0, 10.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [4.0, 3.0, 14.0, 8.0, 10.0, 3.0, 5.0, 10.0], "dataString": null, "dataObject": null }], "series2": null }; + //var two = { "title": "赢得值曲线", "xFontNum": 0, "legend": null, "categories": ["2020-07", "2020-08", "2020-09", "2020-10", "2020-11", "2020-12", "2021-01", "2021-02"], "series": [{ "name": null, "type": null, "data": [5.0, 2.0, 0.0, 1.0, 4.0, 8.0, 2.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [8.0, 12.0, 4.0, 9.0, 10.0, 2.0, 3.0, 3.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [12.0, 2.0, 5.0, 10.0, 3.0, 3.0, 8.0, 10.0], "dataString": null, "dataObject": null }, { "name": null, "type": null, "data": [4.0, 3.0, 14.0, 8.0, 10.0, 3.0, 5.0, 10.0], "dataString": null, "dataObject": null }], "series2": null }; + var two =<%=Two %> var xArr1 = two.categories var data1 = [ { name: '计划值', @@ -851,7 +855,8 @@ padding-left: 2em; var slidesNum = 5 var mySwiper = null $(document).ready(function () { - var swiper_One ='<%=swiper_One %>' + var swiper_One = '<%=swiper_One %>' + $("#swiper2").css("width", ($("#swiper-pre").width()) + 'px') var height = $("#swiper-pre").height() - 40 $("#swiper2").css("height", (height) + 'px') slidesNum = Math.floor((height) / 24) @@ -875,36 +880,45 @@ padding-left: 2em; }); $(".js-more-1").click(function () { - var index = 5; - var str = '' - //for (var i = 0; i < (index + 1) * 3; i++) { - // str += '
项目' + i + '
' - //} - str += '
伊朗马苏化肥项目
' - str += '
内蒙古京能锡林煤化有限责任公司锡盟东乌旗褐煤提质项目净化装置
' - str += '
印尼PKG合成氨/尿素项目
' - str += '
埃及NCIC磷肥项目
' - str += '
湖北云华安化工有限公司合成氨搬迁技改项目
' - str += '
中煤鄂能化100万吨甲醇技改项目
' - str += '
宜都兴发化工有限公司300万吨/年低品位胶磷矿选矿及深加工项目湿法磷酸装置
' - str += '
中化云龙有限公司磷矿浆脱除75t/h燃煤锅炉尾气SO2成套设备项目
' - str += '
印度塔奇尔化肥项目(煤气化净化标段及合成氨尿素标段)
' - str += '
安阳中盈化肥有限公司尿素装置改造工程
' - str += '
俄罗斯晓基诺化肥项目
' - str += '
南通港吕四港区广汇能源LNG分销转运站2#160000m3储罐项目
' - str += '
启东项目
' - str += '
荒煤气综合利用年产40万吨乙二醇项目
' - str += '
济民可信(高安)清洁能源有限公司江西省建筑陶瓷产业基地清洁工业燃气项目主体装置EPC总承包
' - str += '
湖北兴力电子材料有限公司3万吨/年电子级氢氟酸项目
' - str += '
呼伦贝尔金新化工有限公司新增备用锅炉技改项目总承包工程
' - str += '
大石净水厂污泥干化减量服务项目
' - str += '
广汇启东扩建5#20万m3LNG储罐工程项目
' - str += '
东华能源(茂名)烷烃资源综合利用项目配套库区(一期)项目低温罐区(I)EPC项目​
' - str += '
江苏嘉盛燃气有限公司嘉盛LNG调峰储配站工程
' - str += '
山东滨州临港化工产业园首站项目
' - str += '
五环天地项目
' - $("#projectList").html(str) - $(".project-list-wrap").show(); + //var index = 5; + //var str = '' + ////for (var i = 0; i < (index + 1) * 3; i++) { + //// str += '
项目' + i + '
' + ////} + // str += '
伊朗马苏化肥项目
' + //str += '
内蒙古京能锡林煤化有限责任公司锡盟东乌旗褐煤提质项目净化装置
' + //str += '
印尼PKG合成氨/尿素项目
' + //str += '
埃及NCIC磷肥项目
' + //str += '
湖北云华安化工有限公司合成氨搬迁技改项目
' + //str += '
中煤鄂能化100万吨甲醇技改项目
' + //str += '
宜都兴发化工有限公司300万吨/年低品位胶磷矿选矿及深加工项目湿法磷酸装置
' + //str += '
中化云龙有限公司磷矿浆脱除75t/h燃煤锅炉尾气SO2成套设备项目
' + //str += '
印度塔奇尔化肥项目(煤气化净化标段及合成氨尿素标段)
' + //str += '
安阳中盈化肥有限公司尿素装置改造工程
' + //str += '
俄罗斯晓基诺化肥项目
' + //str += '
南通港吕四港区广汇能源LNG分销转运站2#160000m3储罐项目
' + //str += '
启东项目
' + //str += '
荒煤气综合利用年产40万吨乙二醇项目
' + //str += '
济民可信(高安)清洁能源有限公司江西省建筑陶瓷产业基地清洁工业燃气项目主体装置EPC总承包
' + //str += '
湖北兴力电子材料有限公司3万吨/年电子级氢氟酸项目
' + //str += '
呼伦贝尔金新化工有限公司新增备用锅炉技改项目总承包工程
' + //str += '
大石净水厂污泥干化减量服务项目
' + //str += '
广汇启东扩建5#20万m3LNG储罐工程项目
' + //str += '
东华能源(茂名)烷烃资源综合利用项目配套库区(一期)项目低温罐区(I)EPC项目​
' + //str += '
江苏嘉盛燃气有限公司嘉盛LNG调峰储配站工程
' + //str += '
山东滨州临港化工产业园首站项目
' + //str += '
五环天地项目
' + //$("#projectList").html(str) + //$(".project-list-wrap").show(); + window.open("../JDGL/Check/TotalCompletion.aspx"); + }) + + $(".js-more-2").click(function () { + window.open("../JDGL/Check/ProgressCompletion.aspx"); + }) + + $(".js-more-3").click(function () { + window.open("../HSSE/SitePerson/PersonList.aspx"); }) $("#projectList_btn").click(function () { diff --git a/SGGL/FineUIPro.Web/common/mainProject.aspx.cs b/SGGL/FineUIPro.Web/common/mainProject.aspx.cs index 5227a0d9..06959926 100644 --- a/SGGL/FineUIPro.Web/common/mainProject.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainProject.aspx.cs @@ -51,30 +51,70 @@ namespace FineUIPro.Web.common var designChangeOrders = from x in db.Comprehensive_DesignChangeOrder where x.ProjectId == this.CurrUser.LoginProjectId select x; this.divBG.InnerHtml = designChangeOrders.Count().ToString(); //工程量完成情况 - //string quantityCompletionStr = "
序号
类型
单位
设计数量
计划完成
实际完成
计划完成率
累计计划完成
累计实际完成
累计计划完成率
总完成率
"; - //DateTime months = Convert.ToDateTime(DateTime.Now.Year + "-" + DateTime.Now.Month + "-01"); - //var quantityCompletions = from x in Funs.DB.View_JDGL_QuantityCompletion where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months orderby x.SortIndex,x.Name select x; - //int i = 1; - //foreach (var item in quantityCompletions) - //{ - // quantityCompletionStr += "
" - // + i + "
" - // + item.Name + "
" - // + item.Unit + "
" - // + item.DesignNum + "
" - // + item.PlanNum + "
" - // + item.RealNum + "
" - // + item.Rate + "
" - // + item.TotalPlanNum + "
" - // + item.TotalRealNum + "
" - // + item.TotalRate + "
" - // + item.SumRate + "
"; - // i++; - //} - //divGZL.InnerHtml = quantityCompletionStr; + string quantityCompletionStr = "
序号
类型
单位
设计数量
计划完成
实际完成
计划完成率
累计计划完成
累计实际完成
累计计划完成率
总完成率
"; + var quantityCompletions = from x in Funs.DB.View_JDGL_QuantityCompletion where x.ProjectId == this.CurrUser.LoginProjectId orderby x.Name select x; + int i = 1; + foreach (var item in quantityCompletions) + { + quantityCompletionStr += "
" + + i + "
" + + item.Name + "
" + + item.Unit + "
" + + item.DesignNum + "
" + + item.PlanNum + "
" + + item.RealNum + "
" + + item.Rate + "
" + + item.TotalPlanNum + "
" + + item.TotalRealNum + "
" + + item.TotalRate + "
" + + item.SumRate + "
"; + i++; + } + divGZL.InnerHtml = quantityCompletionStr; } } + #region 赢得值曲线 + protected string Two + { + get + { + List series = new List(); + Model.BusinessColumn businessColumn = new Model.BusinessColumn(); + List listCategories = new List(); + businessColumn.title = "赢得值曲线"; + var views = (from x in Funs.DB.View_JDGL_ProgressCompletion where x.ProjectId == this.CurrUser.LoginProjectId orderby x.Months select x).ToList(); + Model.SingleSerie s = new Model.SingleSerie(); + Model.SingleSerie s2 = new Model.SingleSerie(); + Model.SingleSerie s3 = new Model.SingleSerie(); + Model.SingleSerie s4 = new Model.SingleSerie(); + List listdata = new List(); + List listdata2 = new List(); + List listdata3 = new List(); + List listdata4 = new List(); + for (int i = 0; i < views.Count; i++) + { + listCategories.Add(views[i].MonthStr); + listdata.Add(Convert.ToDouble(views[i].PlanNum)); + listdata2.Add(Convert.ToDouble(views[i].TotalPlanNum)); + listdata3.Add(Convert.ToDouble(views[i].RealNum)); + listdata4.Add(Convert.ToDouble(views[i].TotalRealNum)); + } + s.data = listdata; + s2.data = listdata2; + s3.data = listdata3; + s4.data = listdata4; + series.Add(s); + series.Add(s2); + series.Add(s3); + series.Add(s4); + businessColumn.categories = listCategories; + businessColumn.series = series; + return JsonConvert.SerializeObject(businessColumn); + } + } + #endregion + #region 人力情况 protected string Person { @@ -90,12 +130,64 @@ namespace FineUIPro.Web.common select y).Distinct().ToList(); Model.SingleSerie s = new Model.SingleSerie(); List listdata = new List(); - foreach (var post in posts) - { - listCategories.Add(post.WorkPostName); - int workPostCount = persons.Count(x => x.WorkPostId == post.WorkPostId); - listdata.Add(workPostCount); - } + //木工 + listCategories.Add("木工"); + int workPostCount1 = persons.Count(x => x.WorkPostId == Const.WorkPost_Carpentry); + listdata.Add(workPostCount1); + //钢筋工 + listCategories.Add("钢筋工"); + int workPostCount2 = persons.Count(x => x.WorkPostId == Const.WorkPost_SteelWorker); + listdata.Add(workPostCount2); + //瓦工 + listCategories.Add("瓦工"); + int workPostCount3 = persons.Count(x => x.WorkPostId == Const.WorkPost_Bricklayer); + listdata.Add(workPostCount3); + //混凝土工 + listCategories.Add("混凝土工"); + int workPostCount4 = persons.Count(x => x.WorkPostId == Const.WorkPost_ConcreteWorker); + listdata.Add(workPostCount4); + //钳工 + listCategories.Add("钳工"); + int workPostCount5 = persons.Count(x => x.WorkPostId == Const.WorkPost_Fitter1 || x.WorkPostId == Const.WorkPost_Fitter2); + listdata.Add(workPostCount5); + //焊工 + listCategories.Add("焊工"); + int workPostCount6 = persons.Count(x => x.WorkPostId == Const.WorkPost_Welder1 || x.WorkPostId == Const.WorkPost_Welder2 || + x.WorkPostId == Const.WorkPost_Welder3 || x.WorkPostId == Const.WorkPost_Welder4 || x.WorkPostId == Const.WorkPost_Welder5); + listdata.Add(workPostCount6); + //铆工 + listCategories.Add("铆工"); + int workPostCount7 = persons.Count(x => x.WorkPostId == Const.WorkPost_Riveter); + listdata.Add(workPostCount7); + //管工 + listCategories.Add("管工"); + int workPostCount8 = persons.Count(x => x.WorkPostId == Const.WorkPost_Foreman); + listdata.Add(workPostCount8); + //电工 + listCategories.Add("电工"); + int workPostCount9 = persons.Count(x => x.WorkPostId == Const.WorkPost_Electrician1 || x.WorkPostId == Const.WorkPost_Electrician2 + || x.WorkPostId == Const.WorkPost_Electrician3); + listdata.Add(workPostCount9); + //仪表工 + listCategories.Add("仪表工"); + int workPostCount10 = persons.Count(x => x.WorkPostId == Const.WorkPost_Instrumentalist); + listdata.Add(workPostCount10); + //防腐保温工 + listCategories.Add("防腐保温工"); + int workPostCount11 = persons.Count(x => x.WorkPostId == Const.WorkPost_AnticorrosionWorker); + listdata.Add(workPostCount11); + //防腐保温工 + listCategories.Add("管理人员"); + int workPostCount12 = (from x in persons + join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId + where y.PostType == Const.PostType_1 + select x).Count(); + listdata.Add(workPostCount12); + //其他 + listCategories.Add("其他"); + int workPostCount13 = persons.Count()- workPostCount1- workPostCount2- workPostCount3- workPostCount4- workPostCount5- workPostCount6- workPostCount7 + - workPostCount8- workPostCount9- workPostCount10- workPostCount11- workPostCount12; + listdata.Add(workPostCount13); s.data = listdata; series.Add(s); businessColumn.categories = listCategories; @@ -113,7 +205,7 @@ namespace FineUIPro.Web.common { var getGJSX = (from x in Funs.DB.GJSX join y in Funs.DB.Base_QuestionType on x.QuestionTypeID equals y.QuestionTypeID - where x.ProjectId==this.CurrUser.LoginProjectId + where x.ProjectId == this.CurrUser.LoginProjectId orderby x.CreateDate select new { x.GJSXID, x.Detail, x.CreateDate, x.ProjectId, y.QuestionTypeName }).Distinct().Take(20); string strNoticeHtml = string.Empty; diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 630b32cf..2d4c0833 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -929,12 +929,33 @@ namespace Model partial void InsertJDGL_Base_RectificationMeasure(JDGL_Base_RectificationMeasure instance); partial void UpdateJDGL_Base_RectificationMeasure(JDGL_Base_RectificationMeasure instance); partial void DeleteJDGL_Base_RectificationMeasure(JDGL_Base_RectificationMeasure instance); + partial void InsertJDGL_ElectricalCompletion(JDGL_ElectricalCompletion instance); + partial void UpdateJDGL_ElectricalCompletion(JDGL_ElectricalCompletion instance); + partial void DeleteJDGL_ElectricalCompletion(JDGL_ElectricalCompletion instance); + partial void InsertJDGL_EquipmentCompletion(JDGL_EquipmentCompletion instance); + partial void UpdateJDGL_EquipmentCompletion(JDGL_EquipmentCompletion instance); + partial void DeleteJDGL_EquipmentCompletion(JDGL_EquipmentCompletion instance); + partial void InsertJDGL_MeterCompletion(JDGL_MeterCompletion instance); + partial void UpdateJDGL_MeterCompletion(JDGL_MeterCompletion instance); + partial void DeleteJDGL_MeterCompletion(JDGL_MeterCompletion instance); + partial void InsertJDGL_PipelineCompletion(JDGL_PipelineCompletion instance); + partial void UpdateJDGL_PipelineCompletion(JDGL_PipelineCompletion instance); + partial void DeleteJDGL_PipelineCompletion(JDGL_PipelineCompletion instance); + partial void InsertJDGL_ProgressCompletion(JDGL_ProgressCompletion instance); + partial void UpdateJDGL_ProgressCompletion(JDGL_ProgressCompletion instance); + partial void DeleteJDGL_ProgressCompletion(JDGL_ProgressCompletion instance); partial void InsertJDGL_QuantityCompletion(JDGL_QuantityCompletion instance); partial void UpdateJDGL_QuantityCompletion(JDGL_QuantityCompletion instance); partial void DeleteJDGL_QuantityCompletion(JDGL_QuantityCompletion instance); partial void InsertJDGL_QuantityList(JDGL_QuantityList instance); partial void UpdateJDGL_QuantityList(JDGL_QuantityList instance); partial void DeleteJDGL_QuantityList(JDGL_QuantityList instance); + partial void InsertJDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion instance); + partial void UpdateJDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion instance); + partial void DeleteJDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion instance); + partial void InsertJDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion instance); + partial void UpdateJDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion instance); + partial void DeleteJDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion instance); partial void InsertLaw_HSSEStandardsList(Law_HSSEStandardsList instance); partial void UpdateLaw_HSSEStandardsList(Law_HSSEStandardsList instance); partial void DeleteLaw_HSSEStandardsList(Law_HSSEStandardsList instance); @@ -4335,6 +4356,46 @@ namespace Model } } + public System.Data.Linq.Table JDGL_ElectricalCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table JDGL_EquipmentCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table JDGL_MeterCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table JDGL_PipelineCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table JDGL_ProgressCompletion + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table JDGL_QuantityCompletion { get @@ -4351,6 +4412,22 @@ namespace Model } } + public System.Data.Linq.Table JDGL_SteelStructureCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table JDGL_UndergroundPipeCompletion + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Law_HSSEStandardsList { get @@ -7079,6 +7156,46 @@ namespace Model } } + public System.Data.Linq.Table View_JDGL_ElectricalCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_JDGL_EquipmentCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_JDGL_MeterCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_JDGL_PipelineCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_JDGL_ProgressCompletion + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_JDGL_QuantityCompletion { get @@ -7087,6 +7204,22 @@ namespace Model } } + public System.Data.Linq.Table View_JDGL_SteelStructureCompletion + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_JDGL_UndergroundPipeCompletion + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_Law_LawRegulationList { get @@ -22180,10 +22313,22 @@ namespace Model private EntitySet _InformationProject_SafetyQuarterlyReport; + private EntitySet _JDGL_ElectricalCompletion; + + private EntitySet _JDGL_EquipmentCompletion; + + private EntitySet _JDGL_PipelineCompletion; + + private EntitySet _JDGL_ProgressCompletion; + private EntitySet _JDGL_QuantityCompletion; private EntitySet _JDGL_QuantityList; + private EntitySet _JDGL_SteelStructureCompletion; + + private EntitySet _JDGL_UndergroundPipeCompletion; + private EntitySet _Law_LawRegulationIdentify; private EntitySet _License_BreakGround; @@ -22627,8 +22772,14 @@ namespace Model this._InformationProject_PromotionalActivities = new EntitySet(new Action(this.attach_InformationProject_PromotionalActivities), new Action(this.detach_InformationProject_PromotionalActivities)); this._InformationProject_ReceiveFileManager = new EntitySet(new Action(this.attach_InformationProject_ReceiveFileManager), new Action(this.detach_InformationProject_ReceiveFileManager)); this._InformationProject_SafetyQuarterlyReport = new EntitySet(new Action(this.attach_InformationProject_SafetyQuarterlyReport), new Action(this.detach_InformationProject_SafetyQuarterlyReport)); + this._JDGL_ElectricalCompletion = new EntitySet(new Action(this.attach_JDGL_ElectricalCompletion), new Action(this.detach_JDGL_ElectricalCompletion)); + this._JDGL_EquipmentCompletion = new EntitySet(new Action(this.attach_JDGL_EquipmentCompletion), new Action(this.detach_JDGL_EquipmentCompletion)); + this._JDGL_PipelineCompletion = new EntitySet(new Action(this.attach_JDGL_PipelineCompletion), new Action(this.detach_JDGL_PipelineCompletion)); + this._JDGL_ProgressCompletion = new EntitySet(new Action(this.attach_JDGL_ProgressCompletion), new Action(this.detach_JDGL_ProgressCompletion)); this._JDGL_QuantityCompletion = new EntitySet(new Action(this.attach_JDGL_QuantityCompletion), new Action(this.detach_JDGL_QuantityCompletion)); this._JDGL_QuantityList = new EntitySet(new Action(this.attach_JDGL_QuantityList), new Action(this.detach_JDGL_QuantityList)); + this._JDGL_SteelStructureCompletion = new EntitySet(new Action(this.attach_JDGL_SteelStructureCompletion), new Action(this.detach_JDGL_SteelStructureCompletion)); + this._JDGL_UndergroundPipeCompletion = new EntitySet(new Action(this.attach_JDGL_UndergroundPipeCompletion), new Action(this.detach_JDGL_UndergroundPipeCompletion)); this._Law_LawRegulationIdentify = new EntitySet(new Action(this.attach_Law_LawRegulationIdentify), new Action(this.detach_Law_LawRegulationIdentify)); this._License_BreakGround = new EntitySet(new Action(this.attach_License_BreakGround), new Action(this.detach_License_BreakGround)); this._License_EquipmentSafetyList = new EntitySet(new Action(this.attach_License_EquipmentSafetyList), new Action(this.detach_License_EquipmentSafetyList)); @@ -25201,6 +25352,58 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_ElectricalCompletion_Base_Project", Storage="_JDGL_ElectricalCompletion", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JDGL_ElectricalCompletion + { + get + { + return this._JDGL_ElectricalCompletion; + } + set + { + this._JDGL_ElectricalCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_EquipmentCompletion_Base_Project", Storage="_JDGL_EquipmentCompletion", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JDGL_EquipmentCompletion + { + get + { + return this._JDGL_EquipmentCompletion; + } + set + { + this._JDGL_EquipmentCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_PipelineCompletion_Base_Project", Storage="_JDGL_PipelineCompletion", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JDGL_PipelineCompletion + { + get + { + return this._JDGL_PipelineCompletion; + } + set + { + this._JDGL_PipelineCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_ProgressCompletion_Base_Project", Storage="_JDGL_ProgressCompletion", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JDGL_ProgressCompletion + { + get + { + return this._JDGL_ProgressCompletion; + } + set + { + this._JDGL_ProgressCompletion.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_QuantityCompletion_Base_Project", Storage="_JDGL_QuantityCompletion", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet JDGL_QuantityCompletion { @@ -25227,6 +25430,32 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_SteelStructureCompletion_Base_Project", Storage="_JDGL_SteelStructureCompletion", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JDGL_SteelStructureCompletion + { + get + { + return this._JDGL_SteelStructureCompletion; + } + set + { + this._JDGL_SteelStructureCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_UndergroundPipeCompletion_Base_Project", Storage="_JDGL_UndergroundPipeCompletion", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet JDGL_UndergroundPipeCompletion + { + get + { + return this._JDGL_UndergroundPipeCompletion; + } + set + { + this._JDGL_UndergroundPipeCompletion.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Law_LawRegulationIdentify_Base_Project", Storage="_Law_LawRegulationIdentify", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Law_LawRegulationIdentify { @@ -28401,6 +28630,54 @@ namespace Model entity.Base_Project = null; } + private void attach_JDGL_ElectricalCompletion(JDGL_ElectricalCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JDGL_ElectricalCompletion(JDGL_ElectricalCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_JDGL_EquipmentCompletion(JDGL_EquipmentCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JDGL_EquipmentCompletion(JDGL_EquipmentCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_JDGL_PipelineCompletion(JDGL_PipelineCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JDGL_PipelineCompletion(JDGL_PipelineCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_JDGL_ProgressCompletion(JDGL_ProgressCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JDGL_ProgressCompletion(JDGL_ProgressCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_JDGL_QuantityCompletion(JDGL_QuantityCompletion entity) { this.SendPropertyChanging(); @@ -28425,6 +28702,30 @@ namespace Model entity.Base_Project = null; } + private void attach_JDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_JDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_JDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Law_LawRegulationIdentify(Law_LawRegulationIdentify entity) { this.SendPropertyChanging(); @@ -33090,6 +33391,18 @@ namespace Model private EntitySet _InformationProject_SafetyQuarterlyReport; + private EntitySet _JDGL_ElectricalCompletion; + + private EntitySet _JDGL_EquipmentCompletion; + + private EntitySet _JDGL_MeterCompletion; + + private EntitySet _JDGL_PipelineCompletion; + + private EntitySet _JDGL_SteelStructureCompletion; + + private EntitySet _JDGL_UndergroundPipeCompletion; + private EntitySet _License_BreakGround; private EntitySet _License_EquipmentSafetyList; @@ -33359,6 +33672,12 @@ namespace Model this._InformationProject_DrillPlanHalfYearReport = new EntitySet(new Action(this.attach_InformationProject_DrillPlanHalfYearReport), new Action(this.detach_InformationProject_DrillPlanHalfYearReport)); this._InformationProject_ReceiveFileManager = new EntitySet(new Action(this.attach_InformationProject_ReceiveFileManager), new Action(this.detach_InformationProject_ReceiveFileManager)); this._InformationProject_SafetyQuarterlyReport = new EntitySet(new Action(this.attach_InformationProject_SafetyQuarterlyReport), new Action(this.detach_InformationProject_SafetyQuarterlyReport)); + this._JDGL_ElectricalCompletion = new EntitySet(new Action(this.attach_JDGL_ElectricalCompletion), new Action(this.detach_JDGL_ElectricalCompletion)); + this._JDGL_EquipmentCompletion = new EntitySet(new Action(this.attach_JDGL_EquipmentCompletion), new Action(this.detach_JDGL_EquipmentCompletion)); + this._JDGL_MeterCompletion = new EntitySet(new Action(this.attach_JDGL_MeterCompletion), new Action(this.detach_JDGL_MeterCompletion)); + this._JDGL_PipelineCompletion = new EntitySet(new Action(this.attach_JDGL_PipelineCompletion), new Action(this.detach_JDGL_PipelineCompletion)); + this._JDGL_SteelStructureCompletion = new EntitySet(new Action(this.attach_JDGL_SteelStructureCompletion), new Action(this.detach_JDGL_SteelStructureCompletion)); + this._JDGL_UndergroundPipeCompletion = new EntitySet(new Action(this.attach_JDGL_UndergroundPipeCompletion), new Action(this.detach_JDGL_UndergroundPipeCompletion)); this._License_BreakGround = new EntitySet(new Action(this.attach_License_BreakGround), new Action(this.detach_License_BreakGround)); this._License_EquipmentSafetyList = new EntitySet(new Action(this.attach_License_EquipmentSafetyList), new Action(this.detach_License_EquipmentSafetyList)); this._License_FireWork = new EntitySet(new Action(this.attach_License_FireWork), new Action(this.detach_License_FireWork)); @@ -35005,6 +35324,84 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_ElectricalCompletion_Base_Unit", Storage="_JDGL_ElectricalCompletion", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet JDGL_ElectricalCompletion + { + get + { + return this._JDGL_ElectricalCompletion; + } + set + { + this._JDGL_ElectricalCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_EquipmentCompletion_Base_Unit", Storage="_JDGL_EquipmentCompletion", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet JDGL_EquipmentCompletion + { + get + { + return this._JDGL_EquipmentCompletion; + } + set + { + this._JDGL_EquipmentCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_MeterCompletion_Base_Unit", Storage="_JDGL_MeterCompletion", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet JDGL_MeterCompletion + { + get + { + return this._JDGL_MeterCompletion; + } + set + { + this._JDGL_MeterCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_PipelineCompletion_Base_Unit", Storage="_JDGL_PipelineCompletion", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet JDGL_PipelineCompletion + { + get + { + return this._JDGL_PipelineCompletion; + } + set + { + this._JDGL_PipelineCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_SteelStructureCompletion_Base_Unit", Storage="_JDGL_SteelStructureCompletion", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet JDGL_SteelStructureCompletion + { + get + { + return this._JDGL_SteelStructureCompletion; + } + set + { + this._JDGL_SteelStructureCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_UndergroundPipeCompletion_Base_Unit", Storage="_JDGL_UndergroundPipeCompletion", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet JDGL_UndergroundPipeCompletion + { + get + { + return this._JDGL_UndergroundPipeCompletion; + } + set + { + this._JDGL_UndergroundPipeCompletion.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_BreakGround_Base_Unit", Storage="_License_BreakGround", ThisKey="UnitId", OtherKey="ApplyUnitId", DeleteRule="NO ACTION")] public EntitySet License_BreakGround { @@ -36853,6 +37250,78 @@ namespace Model entity.Base_Unit = null; } + private void attach_JDGL_ElectricalCompletion(JDGL_ElectricalCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_JDGL_ElectricalCompletion(JDGL_ElectricalCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_JDGL_EquipmentCompletion(JDGL_EquipmentCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_JDGL_EquipmentCompletion(JDGL_EquipmentCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_JDGL_MeterCompletion(JDGL_MeterCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_JDGL_MeterCompletion(JDGL_MeterCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_JDGL_PipelineCompletion(JDGL_PipelineCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_JDGL_PipelineCompletion(JDGL_PipelineCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_JDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_JDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_JDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_JDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_License_BreakGround(License_BreakGround entity) { this.SendPropertyChanging(); @@ -150195,6 +150664,1840 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JDGL_ElectricalCompletion")] + public partial class JDGL_ElectricalCompletion : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ElectricalCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private string _Name; + + private string _Unit; + + private System.Nullable _TotalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnElectricalCompletionIdChanging(string value); + partial void OnElectricalCompletionIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnNameChanging(string value); + partial void OnNameChanged(); + partial void OnUnitChanging(string value); + partial void OnUnitChanged(); + partial void OnTotalNumChanging(System.Nullable value); + partial void OnTotalNumChanged(); + partial void OnThisNumChanging(System.Nullable value); + partial void OnThisNumChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JDGL_ElectricalCompletion() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ElectricalCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ElectricalCompletionId + { + get + { + return this._ElectricalCompletionId; + } + set + { + if ((this._ElectricalCompletionId != value)) + { + this.OnElectricalCompletionIdChanging(value); + this.SendPropertyChanging(); + this._ElectricalCompletionId = value; + this.SendPropertyChanged("ElectricalCompletionId"); + this.OnElectricalCompletionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this.OnNameChanging(value); + this.SendPropertyChanging(); + this._Name = value; + this.SendPropertyChanged("Name"); + this.OnNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Unit", DbType="NVarChar(50)")] + public string Unit + { + get + { + return this._Unit; + } + set + { + if ((this._Unit != value)) + { + this.OnUnitChanging(value); + this.SendPropertyChanging(); + this._Unit = value; + this.SendPropertyChanged("Unit"); + this.OnUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this.OnTotalNumChanging(value); + this.SendPropertyChanging(); + this._TotalNum = value; + this.SendPropertyChanged("TotalNum"); + this.OnTotalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this.OnThisNumChanging(value); + this.SendPropertyChanging(); + this._ThisNum = value; + this.SendPropertyChanged("ThisNum"); + this.OnThisNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [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_JDGL_ElectricalCompletion_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JDGL_ElectricalCompletion.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JDGL_ElectricalCompletion.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_ElectricalCompletion_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.JDGL_ElectricalCompletion.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.JDGL_ElectricalCompletion.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_ElectricalCompletion_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.JDGL_ElectricalCompletion.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JDGL_ElectricalCompletion.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.JDGL_EquipmentCompletion")] + public partial class JDGL_EquipmentCompletion : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _EquipmentCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _TotalNum; + + private System.Nullable _ArrivalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnEquipmentCompletionIdChanging(string value); + partial void OnEquipmentCompletionIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnTotalNumChanging(System.Nullable value); + partial void OnTotalNumChanged(); + partial void OnArrivalNumChanging(System.Nullable value); + partial void OnArrivalNumChanged(); + partial void OnThisNumChanging(System.Nullable value); + partial void OnThisNumChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JDGL_EquipmentCompletion() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string EquipmentCompletionId + { + get + { + return this._EquipmentCompletionId; + } + set + { + if ((this._EquipmentCompletionId != value)) + { + this.OnEquipmentCompletionIdChanging(value); + this.SendPropertyChanging(); + this._EquipmentCompletionId = value; + this.SendPropertyChanged("EquipmentCompletionId"); + this.OnEquipmentCompletionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this.OnTotalNumChanging(value); + this.SendPropertyChanging(); + this._TotalNum = value; + this.SendPropertyChanged("TotalNum"); + this.OnTotalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArrivalNum", DbType="Decimal(18,2)")] + public System.Nullable ArrivalNum + { + get + { + return this._ArrivalNum; + } + set + { + if ((this._ArrivalNum != value)) + { + this.OnArrivalNumChanging(value); + this.SendPropertyChanging(); + this._ArrivalNum = value; + this.SendPropertyChanged("ArrivalNum"); + this.OnArrivalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this.OnThisNumChanging(value); + this.SendPropertyChanging(); + this._ThisNum = value; + this.SendPropertyChanged("ThisNum"); + this.OnThisNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_EquipmentCompletion_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JDGL_EquipmentCompletion.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JDGL_EquipmentCompletion.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_EquipmentCompletion_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.JDGL_EquipmentCompletion.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.JDGL_EquipmentCompletion.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + 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.JDGL_MeterCompletion")] + public partial class JDGL_MeterCompletion : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _MeterCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private string _Name; + + private string _Unit; + + private System.Nullable _TotalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnMeterCompletionIdChanging(string value); + partial void OnMeterCompletionIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnNameChanging(string value); + partial void OnNameChanged(); + partial void OnUnitChanging(string value); + partial void OnUnitChanged(); + partial void OnTotalNumChanging(System.Nullable value); + partial void OnTotalNumChanged(); + partial void OnThisNumChanging(System.Nullable value); + partial void OnThisNumChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JDGL_MeterCompletion() + { + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeterCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string MeterCompletionId + { + get + { + return this._MeterCompletionId; + } + set + { + if ((this._MeterCompletionId != value)) + { + this.OnMeterCompletionIdChanging(value); + this.SendPropertyChanging(); + this._MeterCompletionId = value; + this.SendPropertyChanged("MeterCompletionId"); + this.OnMeterCompletionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this.OnNameChanging(value); + this.SendPropertyChanging(); + this._Name = value; + this.SendPropertyChanged("Name"); + this.OnNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Unit", DbType="NVarChar(50)")] + public string Unit + { + get + { + return this._Unit; + } + set + { + if ((this._Unit != value)) + { + this.OnUnitChanging(value); + this.SendPropertyChanging(); + this._Unit = value; + this.SendPropertyChanged("Unit"); + this.OnUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this.OnTotalNumChanging(value); + this.SendPropertyChanging(); + this._TotalNum = value; + this.SendPropertyChanged("TotalNum"); + this.OnTotalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this.OnThisNumChanging(value); + this.SendPropertyChanging(); + this._ThisNum = value; + this.SendPropertyChanged("ThisNum"); + this.OnThisNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [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_JDGL_MeterCompletion_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.JDGL_MeterCompletion.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.JDGL_MeterCompletion.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_MeterCompletion_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.JDGL_MeterCompletion.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JDGL_MeterCompletion.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.JDGL_PipelineCompletion")] + public partial class JDGL_PipelineCompletion : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _PipelineCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _TotalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnPipelineCompletionIdChanging(string value); + partial void OnPipelineCompletionIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnTotalNumChanging(System.Nullable value); + partial void OnTotalNumChanged(); + partial void OnThisNumChanging(System.Nullable value); + partial void OnThisNumChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JDGL_PipelineCompletion() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string PipelineCompletionId + { + get + { + return this._PipelineCompletionId; + } + set + { + if ((this._PipelineCompletionId != value)) + { + this.OnPipelineCompletionIdChanging(value); + this.SendPropertyChanging(); + this._PipelineCompletionId = value; + this.SendPropertyChanged("PipelineCompletionId"); + this.OnPipelineCompletionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this.OnTotalNumChanging(value); + this.SendPropertyChanging(); + this._TotalNum = value; + this.SendPropertyChanged("TotalNum"); + this.OnTotalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this.OnThisNumChanging(value); + this.SendPropertyChanging(); + this._ThisNum = value; + this.SendPropertyChanged("ThisNum"); + this.OnThisNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [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_JDGL_PipelineCompletion_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JDGL_PipelineCompletion.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JDGL_PipelineCompletion.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_PipelineCompletion_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.JDGL_PipelineCompletion.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.JDGL_PipelineCompletion.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_PipelineCompletion_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.JDGL_PipelineCompletion.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JDGL_PipelineCompletion.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.JDGL_ProgressCompletion")] + public partial class JDGL_ProgressCompletion : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ProgressCompletionId; + + private string _ProjectId; + + private System.Nullable _Months; + + private System.Nullable _PlanNum; + + private System.Nullable _RealNum; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnProgressCompletionIdChanging(string value); + partial void OnProgressCompletionIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnMonthsChanging(System.Nullable value); + partial void OnMonthsChanged(); + partial void OnPlanNumChanging(System.Nullable value); + partial void OnPlanNumChanged(); + partial void OnRealNumChanging(System.Nullable value); + partial void OnRealNumChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JDGL_ProgressCompletion() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProgressCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ProgressCompletionId + { + get + { + return this._ProgressCompletionId; + } + set + { + if ((this._ProgressCompletionId != value)) + { + this.OnProgressCompletionIdChanging(value); + this.SendPropertyChanging(); + this._ProgressCompletionId = value; + this.SendPropertyChanged("ProgressCompletionId"); + this.OnProgressCompletionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Months", DbType="DateTime")] + public System.Nullable Months + { + get + { + return this._Months; + } + set + { + if ((this._Months != value)) + { + this.OnMonthsChanging(value); + this.SendPropertyChanging(); + this._Months = value; + this.SendPropertyChanged("Months"); + this.OnMonthsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanNum", DbType="Decimal(9,2)")] + public System.Nullable PlanNum + { + get + { + return this._PlanNum; + } + set + { + if ((this._PlanNum != value)) + { + this.OnPlanNumChanging(value); + this.SendPropertyChanging(); + this._PlanNum = value; + this.SendPropertyChanged("PlanNum"); + this.OnPlanNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealNum", DbType="Decimal(9,2)")] + public System.Nullable RealNum + { + get + { + return this._RealNum; + } + set + { + if ((this._RealNum != value)) + { + this.OnRealNumChanging(value); + this.SendPropertyChanging(); + this._RealNum = value; + this.SendPropertyChanged("RealNum"); + this.OnRealNumChanged(); + } + } + } + + [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_JDGL_ProgressCompletion_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JDGL_ProgressCompletion.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JDGL_ProgressCompletion.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_ProgressCompletion_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.JDGL_ProgressCompletion.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JDGL_ProgressCompletion.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.JDGL_QuantityCompletion")] public partial class JDGL_QuantityCompletion : INotifyPropertyChanging, INotifyPropertyChanged { @@ -150217,6 +152520,10 @@ namespace Model private System.Nullable _CompileDate; + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + private EntityRef _Base_Project; private EntityRef _JDGL_QuantityList; @@ -150243,6 +152550,10 @@ namespace Model partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); partial void OnCompileDateChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); #endregion public JDGL_QuantityCompletion() @@ -150425,6 +152736,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_QuantityCompletion_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -150840,6 +153191,784 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JDGL_SteelStructureCompletion")] + public partial class JDGL_SteelStructureCompletion : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SteelStructureCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _TotalNum; + + private System.Nullable _ArrivalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSteelStructureCompletionIdChanging(string value); + partial void OnSteelStructureCompletionIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnTotalNumChanging(System.Nullable value); + partial void OnTotalNumChanged(); + partial void OnArrivalNumChanging(System.Nullable value); + partial void OnArrivalNumChanged(); + partial void OnThisNumChanging(System.Nullable value); + partial void OnThisNumChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JDGL_SteelStructureCompletion() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SteelStructureCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SteelStructureCompletionId + { + get + { + return this._SteelStructureCompletionId; + } + set + { + if ((this._SteelStructureCompletionId != value)) + { + this.OnSteelStructureCompletionIdChanging(value); + this.SendPropertyChanging(); + this._SteelStructureCompletionId = value; + this.SendPropertyChanged("SteelStructureCompletionId"); + this.OnSteelStructureCompletionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this.OnTotalNumChanging(value); + this.SendPropertyChanging(); + this._TotalNum = value; + this.SendPropertyChanged("TotalNum"); + this.OnTotalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArrivalNum", DbType="Decimal(18,2)")] + public System.Nullable ArrivalNum + { + get + { + return this._ArrivalNum; + } + set + { + if ((this._ArrivalNum != value)) + { + this.OnArrivalNumChanging(value); + this.SendPropertyChanging(); + this._ArrivalNum = value; + this.SendPropertyChanged("ArrivalNum"); + this.OnArrivalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this.OnThisNumChanging(value); + this.SendPropertyChanging(); + this._ThisNum = value; + this.SendPropertyChanged("ThisNum"); + this.OnThisNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [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_JDGL_SteelStructureCompletion_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JDGL_SteelStructureCompletion.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JDGL_SteelStructureCompletion.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_SteelStructureCompletion_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.JDGL_SteelStructureCompletion.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.JDGL_SteelStructureCompletion.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_SteelStructureCompletion_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.JDGL_SteelStructureCompletion.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JDGL_SteelStructureCompletion.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.JDGL_UndergroundPipeCompletion")] + public partial class JDGL_UndergroundPipeCompletion : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _UndergroundPipeCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _TotalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnUndergroundPipeCompletionIdChanging(string value); + partial void OnUndergroundPipeCompletionIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnTotalNumChanging(System.Nullable value); + partial void OnTotalNumChanged(); + partial void OnThisNumChanging(System.Nullable value); + partial void OnThisNumChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + #endregion + + public JDGL_UndergroundPipeCompletion() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UndergroundPipeCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string UndergroundPipeCompletionId + { + get + { + return this._UndergroundPipeCompletionId; + } + set + { + if ((this._UndergroundPipeCompletionId != value)) + { + this.OnUndergroundPipeCompletionIdChanging(value); + this.SendPropertyChanging(); + this._UndergroundPipeCompletionId = value; + this.SendPropertyChanged("UndergroundPipeCompletionId"); + this.OnUndergroundPipeCompletionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this.OnTotalNumChanging(value); + this.SendPropertyChanging(); + this._TotalNum = value; + this.SendPropertyChanged("TotalNum"); + this.OnTotalNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this.OnThisNumChanging(value); + this.SendPropertyChanging(); + this._ThisNum = value; + this.SendPropertyChanged("ThisNum"); + this.OnThisNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [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_JDGL_UndergroundPipeCompletion_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.JDGL_UndergroundPipeCompletion.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.JDGL_UndergroundPipeCompletion.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_UndergroundPipeCompletion_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.JDGL_UndergroundPipeCompletion.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.JDGL_UndergroundPipeCompletion.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_UndergroundPipeCompletion_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.JDGL_UndergroundPipeCompletion.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.JDGL_UndergroundPipeCompletion.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.Law_HSSEStandardsList")] public partial class Law_HSSEStandardsList : INotifyPropertyChanging, INotifyPropertyChanged { @@ -254250,8 +257379,20 @@ namespace Model private EntitySet _InformationProject_SafetyQuarterlyReport; + private EntitySet _JDGL_ElectricalCompletion; + + private EntitySet _JDGL_MeterCompletion; + + private EntitySet _JDGL_PipelineCompletion; + + private EntitySet _JDGL_ProgressCompletion; + private EntitySet _JDGL_QuantityCompletion; + private EntitySet _JDGL_SteelStructureCompletion; + + private EntitySet _JDGL_UndergroundPipeCompletion; + private EntitySet _Law_HSSEStandardsList; private EntitySet _Law_LawRegulationList; @@ -254819,7 +257960,13 @@ namespace Model this._InformationProject_PromotionalActivities = new EntitySet(new Action(this.attach_InformationProject_PromotionalActivities), new Action(this.detach_InformationProject_PromotionalActivities)); this._InformationProject_ReceiveFileManager = new EntitySet(new Action(this.attach_InformationProject_ReceiveFileManager), new Action(this.detach_InformationProject_ReceiveFileManager)); this._InformationProject_SafetyQuarterlyReport = new EntitySet(new Action(this.attach_InformationProject_SafetyQuarterlyReport), new Action(this.detach_InformationProject_SafetyQuarterlyReport)); + this._JDGL_ElectricalCompletion = new EntitySet(new Action(this.attach_JDGL_ElectricalCompletion), new Action(this.detach_JDGL_ElectricalCompletion)); + this._JDGL_MeterCompletion = new EntitySet(new Action(this.attach_JDGL_MeterCompletion), new Action(this.detach_JDGL_MeterCompletion)); + this._JDGL_PipelineCompletion = new EntitySet(new Action(this.attach_JDGL_PipelineCompletion), new Action(this.detach_JDGL_PipelineCompletion)); + this._JDGL_ProgressCompletion = new EntitySet(new Action(this.attach_JDGL_ProgressCompletion), new Action(this.detach_JDGL_ProgressCompletion)); this._JDGL_QuantityCompletion = new EntitySet(new Action(this.attach_JDGL_QuantityCompletion), new Action(this.detach_JDGL_QuantityCompletion)); + this._JDGL_SteelStructureCompletion = new EntitySet(new Action(this.attach_JDGL_SteelStructureCompletion), new Action(this.detach_JDGL_SteelStructureCompletion)); + this._JDGL_UndergroundPipeCompletion = new EntitySet(new Action(this.attach_JDGL_UndergroundPipeCompletion), new Action(this.detach_JDGL_UndergroundPipeCompletion)); this._Law_HSSEStandardsList = new EntitySet(new Action(this.attach_Law_HSSEStandardsList), new Action(this.detach_Law_HSSEStandardsList)); this._Law_LawRegulationList = new EntitySet(new Action(this.attach_Law_LawRegulationList), new Action(this.detach_Law_LawRegulationList)); this._Law_ManageRule = new EntitySet(new Action(this.attach_Law_ManageRule), new Action(this.detach_Law_ManageRule)); @@ -257662,6 +260809,58 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_ElectricalCompletion_Sys_User", Storage="_JDGL_ElectricalCompletion", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JDGL_ElectricalCompletion + { + get + { + return this._JDGL_ElectricalCompletion; + } + set + { + this._JDGL_ElectricalCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_MeterCompletion_Sys_User", Storage="_JDGL_MeterCompletion", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JDGL_MeterCompletion + { + get + { + return this._JDGL_MeterCompletion; + } + set + { + this._JDGL_MeterCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_PipelineCompletion_Sys_User", Storage="_JDGL_PipelineCompletion", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JDGL_PipelineCompletion + { + get + { + return this._JDGL_PipelineCompletion; + } + set + { + this._JDGL_PipelineCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_ProgressCompletion_Sys_User", Storage="_JDGL_ProgressCompletion", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JDGL_ProgressCompletion + { + get + { + return this._JDGL_ProgressCompletion; + } + set + { + this._JDGL_ProgressCompletion.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_QuantityCompletion_Sys_User", Storage="_JDGL_QuantityCompletion", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet JDGL_QuantityCompletion { @@ -257675,6 +260874,32 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_SteelStructureCompletion_Sys_User", Storage="_JDGL_SteelStructureCompletion", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JDGL_SteelStructureCompletion + { + get + { + return this._JDGL_SteelStructureCompletion; + } + set + { + this._JDGL_SteelStructureCompletion.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_UndergroundPipeCompletion_Sys_User", Storage="_JDGL_UndergroundPipeCompletion", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet JDGL_UndergroundPipeCompletion + { + get + { + return this._JDGL_UndergroundPipeCompletion; + } + set + { + this._JDGL_UndergroundPipeCompletion.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Law_HSSEStandardsList_Sys_User2", Storage="_Law_HSSEStandardsList", ThisKey="UserId", OtherKey="AuditMan", DeleteRule="NO ACTION")] public EntitySet Law_HSSEStandardsList { @@ -261485,6 +264710,54 @@ namespace Model entity.Sys_User = null; } + private void attach_JDGL_ElectricalCompletion(JDGL_ElectricalCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JDGL_ElectricalCompletion(JDGL_ElectricalCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_JDGL_MeterCompletion(JDGL_MeterCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JDGL_MeterCompletion(JDGL_MeterCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_JDGL_PipelineCompletion(JDGL_PipelineCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JDGL_PipelineCompletion(JDGL_PipelineCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_JDGL_ProgressCompletion(JDGL_ProgressCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JDGL_ProgressCompletion(JDGL_ProgressCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_JDGL_QuantityCompletion(JDGL_QuantityCompletion entity) { this.SendPropertyChanging(); @@ -261497,6 +264770,30 @@ namespace Model entity.Sys_User = null; } + private void attach_JDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JDGL_SteelStructureCompletion(JDGL_SteelStructureCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_JDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_JDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_Law_HSSEStandardsList(Law_HSSEStandardsList entity) { this.SendPropertyChanging(); @@ -307070,6 +310367,1257 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_ElectricalCompletion")] + public partial class View_JDGL_ElectricalCompletion + { + + private string _ElectricalCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private string _Name; + + private string _Unit; + + private System.Nullable _TotalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _UnitName; + + private System.Nullable _TotalThisNum; + + private string _Rate; + + public View_JDGL_ElectricalCompletion() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ElectricalCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ElectricalCompletionId + { + get + { + return this._ElectricalCompletionId; + } + set + { + if ((this._ElectricalCompletionId != value)) + { + this._ElectricalCompletionId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this._Name = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Unit", DbType="NVarChar(50)")] + public string Unit + { + get + { + return this._Unit; + } + set + { + if ((this._Unit != value)) + { + this._Unit = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this._TotalNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this._ThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this._StartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this._EndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalThisNum", DbType="Float")] + public System.Nullable TotalThisNum + { + get + { + return this._TotalThisNum; + } + set + { + if ((this._TotalThisNum != value)) + { + this._TotalThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="NVarChar(11)")] + public string Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this._Rate = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_EquipmentCompletion")] + public partial class View_JDGL_EquipmentCompletion + { + + private string _EquipmentCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _TotalNum; + + private System.Nullable _ArrivalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _UnitName; + + private System.Nullable _TotalThisNum; + + private System.Nullable _TotalLastThisNum; + + private string _Rate; + + public View_JDGL_EquipmentCompletion() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string EquipmentCompletionId + { + get + { + return this._EquipmentCompletionId; + } + set + { + if ((this._EquipmentCompletionId != value)) + { + this._EquipmentCompletionId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this._TotalNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArrivalNum", DbType="Decimal(18,2)")] + public System.Nullable ArrivalNum + { + get + { + return this._ArrivalNum; + } + set + { + if ((this._ArrivalNum != value)) + { + this._ArrivalNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this._ThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this._StartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this._EndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalThisNum", DbType="Float")] + public System.Nullable TotalThisNum + { + get + { + return this._TotalThisNum; + } + set + { + if ((this._TotalThisNum != value)) + { + this._TotalThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLastThisNum", DbType="Float")] + public System.Nullable TotalLastThisNum + { + get + { + return this._TotalLastThisNum; + } + set + { + if ((this._TotalLastThisNum != value)) + { + this._TotalLastThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="NVarChar(11)")] + public string Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this._Rate = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_MeterCompletion")] + public partial class View_JDGL_MeterCompletion + { + + private string _MeterCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private string _Name; + + private string _Unit; + + private System.Nullable _TotalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _UnitName; + + private System.Nullable _TotalThisNum; + + private string _Rate; + + public View_JDGL_MeterCompletion() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MeterCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string MeterCompletionId + { + get + { + return this._MeterCompletionId; + } + set + { + if ((this._MeterCompletionId != value)) + { + this._MeterCompletionId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this._Name = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Unit", DbType="NVarChar(50)")] + public string Unit + { + get + { + return this._Unit; + } + set + { + if ((this._Unit != value)) + { + this._Unit = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this._TotalNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this._ThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this._StartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this._EndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalThisNum", DbType="Float")] + public System.Nullable TotalThisNum + { + get + { + return this._TotalThisNum; + } + set + { + if ((this._TotalThisNum != value)) + { + this._TotalThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="NVarChar(11)")] + public string Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this._Rate = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_PipelineCompletion")] + public partial class View_JDGL_PipelineCompletion + { + + private string _PipelineCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _TotalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _UnitName; + + private System.Nullable _TotalThisNum; + + private System.Nullable _TotalLastThisNum; + + private string _Rate; + + public View_JDGL_PipelineCompletion() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string PipelineCompletionId + { + get + { + return this._PipelineCompletionId; + } + set + { + if ((this._PipelineCompletionId != value)) + { + this._PipelineCompletionId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this._TotalNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this._ThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this._StartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this._EndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalThisNum", DbType="Float")] + public System.Nullable TotalThisNum + { + get + { + return this._TotalThisNum; + } + set + { + if ((this._TotalThisNum != value)) + { + this._TotalThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLastThisNum", DbType="Float")] + public System.Nullable TotalLastThisNum + { + get + { + return this._TotalLastThisNum; + } + set + { + if ((this._TotalLastThisNum != value)) + { + this._TotalLastThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="NVarChar(11)")] + public string Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this._Rate = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_ProgressCompletion")] + public partial class View_JDGL_ProgressCompletion + { + + private string _ProgressCompletionId; + + private string _ProjectId; + + private System.Nullable _Months; + + private string _MonthStr; + + private string _PlanNumStr; + + private string _RealNumStr; + + private System.Nullable _PlanNum; + + private System.Nullable _RealNum; + + private System.Nullable _TotalPlanNum; + + private System.Nullable _TotalRealNum; + + private string _TotalPlanNumStr; + + private string _TotalRealNumStr; + + public View_JDGL_ProgressCompletion() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProgressCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ProgressCompletionId + { + get + { + return this._ProgressCompletionId; + } + set + { + if ((this._ProgressCompletionId != value)) + { + this._ProgressCompletionId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Months", DbType="DateTime")] + public System.Nullable Months + { + get + { + return this._Months; + } + set + { + if ((this._Months != value)) + { + this._Months = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthStr", DbType="NVarChar(21)")] + public string MonthStr + { + get + { + return this._MonthStr; + } + set + { + if ((this._MonthStr != value)) + { + this._MonthStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanNumStr", DbType="NVarChar(11)")] + public string PlanNumStr + { + get + { + return this._PlanNumStr; + } + set + { + if ((this._PlanNumStr != value)) + { + this._PlanNumStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealNumStr", DbType="NVarChar(11)")] + public string RealNumStr + { + get + { + return this._RealNumStr; + } + set + { + if ((this._RealNumStr != value)) + { + this._RealNumStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanNum", DbType="Float")] + public System.Nullable PlanNum + { + get + { + return this._PlanNum; + } + set + { + if ((this._PlanNum != value)) + { + this._PlanNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealNum", DbType="Float")] + public System.Nullable RealNum + { + get + { + return this._RealNum; + } + set + { + if ((this._RealNum != value)) + { + this._RealNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPlanNum", DbType="Float")] + public System.Nullable TotalPlanNum + { + get + { + return this._TotalPlanNum; + } + set + { + if ((this._TotalPlanNum != value)) + { + this._TotalPlanNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRealNum", DbType="Float")] + public System.Nullable TotalRealNum + { + get + { + return this._TotalRealNum; + } + set + { + if ((this._TotalRealNum != value)) + { + this._TotalRealNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPlanNumStr", DbType="NVarChar(11)")] + public string TotalPlanNumStr + { + get + { + return this._TotalPlanNumStr; + } + set + { + if ((this._TotalPlanNumStr != value)) + { + this._TotalPlanNumStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRealNumStr", DbType="NVarChar(11)")] + public string TotalRealNumStr + { + get + { + return this._TotalRealNumStr; + } + set + { + if ((this._TotalRealNumStr != value)) + { + this._TotalRealNumStr = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_QuantityCompletion")] public partial class View_JDGL_QuantityCompletion { @@ -307090,16 +311638,16 @@ namespace Model private System.Nullable _CompileDate; + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + private System.Nullable _DesignNum; private string _Name; private string _Unit; - private string _ProfessionalName; - - private System.Nullable _SortIndex; - private System.Nullable _TotalPlanNum; private System.Nullable _TotalRealNum; @@ -307118,7 +311666,7 @@ namespace Model { } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuantityCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuantityCompletionId", DbType="NVarChar(50)")] public string QuantityCompletionId { get @@ -307246,6 +311794,38 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this._StartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this._EndDate = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignNum", DbType="Decimal(9,2)")] public System.Nullable DesignNum { @@ -307294,38 +311874,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProfessionalName", DbType="NVarChar(30)")] - public string ProfessionalName - { - get - { - return this._ProfessionalName; - } - set - { - if ((this._ProfessionalName != value)) - { - this._ProfessionalName = value; - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] - public System.Nullable SortIndex - { - get - { - return this._SortIndex; - } - set - { - if ((this._SortIndex != value)) - { - this._SortIndex = value; - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPlanNum", DbType="Float")] public System.Nullable TotalPlanNum { @@ -307439,6 +311987,492 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_SteelStructureCompletion")] + public partial class View_JDGL_SteelStructureCompletion + { + + private string _SteelStructureCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _TotalNum; + + private System.Nullable _ArrivalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _UnitName; + + private System.Nullable _TotalThisNum; + + private string _Rate; + + public View_JDGL_SteelStructureCompletion() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SteelStructureCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SteelStructureCompletionId + { + get + { + return this._SteelStructureCompletionId; + } + set + { + if ((this._SteelStructureCompletionId != value)) + { + this._SteelStructureCompletionId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this._TotalNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArrivalNum", DbType="Decimal(18,2)")] + public System.Nullable ArrivalNum + { + get + { + return this._ArrivalNum; + } + set + { + if ((this._ArrivalNum != value)) + { + this._ArrivalNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this._ThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this._StartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this._EndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalThisNum", DbType="Float")] + public System.Nullable TotalThisNum + { + get + { + return this._TotalThisNum; + } + set + { + if ((this._TotalThisNum != value)) + { + this._TotalThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="NVarChar(11)")] + public string Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this._Rate = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_JDGL_UndergroundPipeCompletion")] + public partial class View_JDGL_UndergroundPipeCompletion + { + + private string _UndergroundPipeCompletionId; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _TotalNum; + + private System.Nullable _ThisNum; + + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _UnitName; + + private System.Nullable _TotalThisNum; + + private System.Nullable _TotalLastThisNum; + + private string _Rate; + + public View_JDGL_UndergroundPipeCompletion() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UndergroundPipeCompletionId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string UndergroundPipeCompletionId + { + get + { + return this._UndergroundPipeCompletionId; + } + set + { + if ((this._UndergroundPipeCompletionId != value)) + { + this._UndergroundPipeCompletionId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNum", DbType="Decimal(18,2)")] + public System.Nullable TotalNum + { + get + { + return this._TotalNum; + } + set + { + if ((this._TotalNum != value)) + { + this._TotalNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNum", DbType="Decimal(18,2)")] + public System.Nullable ThisNum + { + get + { + return this._ThisNum; + } + set + { + if ((this._ThisNum != value)) + { + this._ThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this._StartDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this._EndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalThisNum", DbType="Float")] + public System.Nullable TotalThisNum + { + get + { + return this._TotalThisNum; + } + set + { + if ((this._TotalThisNum != value)) + { + this._TotalThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLastThisNum", DbType="Float")] + public System.Nullable TotalLastThisNum + { + get + { + return this._TotalLastThisNum; + } + set + { + if ((this._TotalLastThisNum != value)) + { + this._TotalLastThisNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rate", DbType="NVarChar(11)")] + public string Rate + { + get + { + return this._Rate; + } + set + { + if ((this._Rate != value)) + { + this._Rate = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Law_LawRegulationList")] public partial class View_Law_LawRegulationList { @@ -322564,6 +327598,8 @@ namespace Model private EntityRef _Sys_User; + private EntityRef _WBS_DivisionProject; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -322622,6 +327658,7 @@ namespace Model { this._Base_Project = default(EntityRef); this._Sys_User = default(EntityRef); + this._WBS_DivisionProject = default(EntityRef); OnCreated(); } @@ -322720,6 +327757,10 @@ namespace Model { if ((this._DivisionProjectId != value)) { + if (this._WBS_DivisionProject.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } this.OnDivisionProjectIdChanging(value); this.SendPropertyChanging(); this._DivisionProjectId = value; @@ -323181,6 +328222,40 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_BreakdownProject_WBS_DivisionProject", Storage="_WBS_DivisionProject", ThisKey="DivisionProjectId", OtherKey="DivisionProjectId", IsForeignKey=true)] + public WBS_DivisionProject WBS_DivisionProject + { + get + { + return this._WBS_DivisionProject.Entity; + } + set + { + WBS_DivisionProject previousValue = this._WBS_DivisionProject.Entity; + if (((previousValue != value) + || (this._WBS_DivisionProject.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._WBS_DivisionProject.Entity = null; + previousValue.WBS_BreakdownProject.Remove(this); + } + this._WBS_DivisionProject.Entity = value; + if ((value != null)) + { + value.WBS_BreakdownProject.Add(this); + this._DivisionProjectId = value.DivisionProjectId; + } + else + { + this._DivisionProjectId = default(string); + } + this.SendPropertyChanged("WBS_DivisionProject"); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -325426,6 +330501,8 @@ namespace Model private string _OldDivisionId; + private EntitySet _WBS_BreakdownProject; + private EntityRef _Base_Project; #region 可扩展性方法定义 @@ -325456,6 +330533,7 @@ namespace Model public WBS_DivisionProject() { + this._WBS_BreakdownProject = new EntitySet(new Action(this.attach_WBS_BreakdownProject), new Action(this.detach_WBS_BreakdownProject)); this._Base_Project = default(EntityRef); OnCreated(); } @@ -325664,6 +330742,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_BreakdownProject_WBS_DivisionProject", Storage="_WBS_BreakdownProject", ThisKey="DivisionProjectId", OtherKey="DivisionProjectId", DeleteRule="NO ACTION")] + public EntitySet WBS_BreakdownProject + { + get + { + return this._WBS_BreakdownProject; + } + set + { + this._WBS_BreakdownProject.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_DivisionProject_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -325717,6 +330808,18 @@ namespace Model this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } + + private void attach_WBS_BreakdownProject(WBS_BreakdownProject entity) + { + this.SendPropertyChanging(); + entity.WBS_DivisionProject = this; + } + + private void detach_WBS_BreakdownProject(WBS_BreakdownProject entity) + { + this.SendPropertyChanging(); + entity.WBS_DivisionProject = null; + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.WBS_ForeignBreakdown")] diff --git a/SGGL/WebAPI/Controllers/DoorServerController.cs b/SGGL/WebAPI/Controllers/DoorServerController.cs index ae35f6ab..e2397a53 100644 --- a/SGGL/WebAPI/Controllers/DoorServerController.cs +++ b/SGGL/WebAPI/Controllers/DoorServerController.cs @@ -19,32 +19,44 @@ namespace WebAPI.Controllers /// 获取部门、人员、出入记录最大ID /// /// + /// 查询条件 /// - public string getMaxID(string projectId) + public string getMaxID(string projectId, string queryValue = null) { - int DepartmentID = 0, ID=0; - long EmployID = 0, ValidEventID=0; - var getD = Funs.DB.T_d_department.Where(x=> x.ProjectId == projectId).Select(x => x.DepartmentID); - if (getD.Count()>0) + int DepartmentID = 0, ID = 0; + long EmployID = 0, ValidEventID = 0; + var getD = Funs.DB.T_d_department.Where(x => x.ProjectId == projectId).Select(x => x.DepartmentID); + if (getD.Count() > 0) { DepartmentID = getD.Max(); } - var getE= Funs.DB.T_d_employinfo.Where(x => x.ProjectId == projectId).Select(x => x.EmployID); + var getE = Funs.DB.T_d_employinfo.Where(x => x.ProjectId == projectId).Select(x => x.EmployID); if (getE.Count() > 0) { EmployID = getE.Max(); } - var getI = Funs.DB.T_d_facerecord.Where(x => x.ProjectId == projectId).Select(x => x.ID); - if (getI.Count() > 0) + if (!string.IsNullOrEmpty(queryValue)) { - ID = getI.Max(); + var getI = Funs.DB.T_d_facerecord.Where(x => x.ProjectId == projectId && x.RoleID == queryValue).Select(x => x.ID); + if (getI.Count() > 0) + { + ID = getI.Max(); + } + } + else + { + var getI = Funs.DB.T_d_facerecord.Where(x => x.ProjectId == projectId).Select(x => x.ID); + if (getI.Count() > 0) + { + ID = getI.Max(); + } } var getV = Funs.DB.T_d_validcardevent.Where(x => x.ProjectId == projectId).Select(x => x.ValidEventID); if (getV.Count() > 0) { ValidEventID = getV.Max(); } - return ("$" + DepartmentID.ToString()+"$"+ EmployID.ToString()+"$"+ID.ToString() + "$" + ValidEventID.ToString() + "$"); + return ("$" + DepartmentID.ToString() + "$" + EmployID.ToString() + "$" + ID.ToString() + "$" + ValidEventID.ToString() + "$"); } #endregion diff --git a/SGGL/WebAPI/Controllers/PersonController.cs b/SGGL/WebAPI/Controllers/PersonController.cs index 90390a0f..32774741 100644 --- a/SGGL/WebAPI/Controllers/PersonController.cs +++ b/SGGL/WebAPI/Controllers/PersonController.cs @@ -1025,5 +1025,29 @@ namespace WebAPI.Controllers return responeData; } #endregion + + #region 根据人员ID获取下一步办理人 + /// + /// 根据人员ID获取下一步办理人 + /// + /// + /// + /// + /// + public Model.ResponeData getUserByProjectIdUserIdsQuery(string projectId, string userIds, string strParam) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = APIUserService.getUserByProjectIdUserIdsQuery(projectId, userIds, strParam); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + #endregion } } \ No newline at end of file diff --git a/SGGL/WebAPI/Controllers/UserController.cs b/SGGL/WebAPI/Controllers/UserController.cs index aed36b89..acf1b14f 100644 --- a/SGGL/WebAPI/Controllers/UserController.cs +++ b/SGGL/WebAPI/Controllers/UserController.cs @@ -431,5 +431,29 @@ namespace WebAPI.Controllers return responeData; } #endregion + + #region 根据人员ID获取下一步办理人 + /// + /// 根据人员ID获取下一步办理人 + /// + /// + /// + /// + /// + public Model.ResponeData getUserByProjectIdUserIdsQuery(string projectId, string userIds, string strParam) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = APIUserService.getUserByProjectIdUserIdsQuery(projectId, userIds, strParam); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + #endregion } }