diff --git a/.gitignore b/.gitignore index 232d5edb..27a0fc70 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,5 @@ /SGGL/BLL/obj /SGGL/FineUIPro.Web/obj /SGGL/Model/obj -/SGGL/FineUIPro.Web/FileUpload/TestRun/DriverSub/DriverSubPlan/2024-01 +/SGGL/FineUIPro.Web/web.config +/SGGL/FineUIPro.Web/ErrLog.txt \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_2024-01-26-05.sql b/DataBase/版本日志/SGGLDB_WH_2024-01-26-05.sql new file mode 100644 index 00000000..ed9045bb --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-01-26-05.sql @@ -0,0 +1,71 @@ +CREATE TABLE [dbo].[Transfer_Instrumentation]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [INSTRUMENTATION] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Instrumentation] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Electrical]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [ELECTRICAL] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Electrical] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Civil_Structure]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NOT NULL, + [Civil_Structure] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Civil_Structure] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Firefighting]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Firefighting] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Firefighting] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_2024-01-26-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-01-26-gaofei.sql new file mode 100644 index 00000000..8bb9d8be --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-01-26-gaofei.sql @@ -0,0 +1,208 @@ + +CREATE TABLE [dbo].[Transfer_ProjectSetup]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [SN] [nvarchar](50) NULL, + [PlantNo] [nvarchar](50) NULL, + [PlantName] [nvarchar](200) NULL, + [CommissioningSystem] [nvarchar](50) NULL, + [CommissioningCodeDescription] [nvarchar](50) NULL, + [SubCommissioningSystem] [nvarchar](50) NULL, + [SubCommissioningCodeDescription] [nvarchar](50) NULL, + [DescriptionArea] [nvarchar](50) NULL, + [TurnoverSystemSequenceNumber] [nvarchar](50) NULL, + [Description] [nvarchar](50) NULL, + [TurnoverCode] [nvarchar](50) NULL, + [TurnoverDescription] [nvarchar](50) NULL, + [Remark] [nvarchar](200) NULL, + CONSTRAINT [PK_Transfer_ProjectSetup] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ProjectSetup' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Transfer_ProjectSetup' +GO + + +CREATE TABLE [dbo].[Transfer_Piping]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [PIPINGLINENUMBER] [nvarchar](50) NULL, + [SYSTEM] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [TestPackage] [nvarchar](50) NULL, + [TestPackageSTART] [datetime] NULL, + [TestPackageFINISH] [datetime] NULL, + [FINALStatus] [nvarchar](50) NULL, + [PreTestFINISHED] [nvarchar](50) NULL, + [FinalTestFINISHED] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_Piping] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Piping' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Transfer_Piping' +GO + + + + + + +CREATE TABLE [dbo].[Transfer_Instrumentation]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [INSTRUMENTATION] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Instrumentation] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Electrical]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [ELECTRICAL] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Electrical] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Civil_Structure]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NOT NULL, + [Civil_Structure] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Civil_Structure] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Firefighting]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Firefighting] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Firefighting] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_PunchlistFrom]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Item_No] [nvarchar](50) NULL, + [Punch_No] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Discipline] [nvarchar](50) NULL, + [DESCRIPTION] [nvarchar](50) NULL, + [Identified] [nvarchar](50) NULL, + [Category] [nvarchar](50) NULL, + [PUNCH_ITEM_FINISH_DATE] [datetime] NULL, + [Action_By] [nvarchar](50) NULL, + [Required_By] [nvarchar](50) NULL, + [PUNCH_ITEM_STATUS] [nvarchar](50) NULL, + [Comments] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_PunchlistFrom] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + + +CREATE TABLE [dbo].[Transfer_HVAC]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [HVAC] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_HVAC] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Plumbing]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Plumbing] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_Plumbing] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Telecom]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Telecom] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_Telecom] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_2024-01-26-phf.sql b/DataBase/版本日志/SGGLDB_WH_2024-01-26-phf.sql new file mode 100644 index 00000000..ce48014a --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-01-26-phf.sql @@ -0,0 +1,79 @@ +CREATE TABLE [dbo].[Transfer_PunchlistFrom]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Item_No] [nvarchar](50) NULL, + [Punch_No] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Discipline] [nvarchar](50) NULL, + [DESCRIPTION] [nvarchar](50) NULL, + [Identified] [nvarchar](50) NULL, + [Category] [nvarchar](50) NULL, + [PUNCH_ITEM_FINISH_DATE] [datetime] NULL, + [Action_By] [nvarchar](50) NULL, + [Required_By] [nvarchar](50) NULL, + [PUNCH_ITEM_STATUS] [nvarchar](50) NULL, + [Comments] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_PunchlistFrom] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + + +CREATE TABLE [dbo].[Transfer_HVAC]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [HVAC] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_HVAC] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Plumbing]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Plumbing] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_Plumbing] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +CREATE TABLE [dbo].[Transfer_Telecom]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Telecom] [nvarchar](50) NULL, + [SystemName] [nvarchar](50) NULL, + [Subsystem] [nvarchar](50) NULL, + [Test_Package] [nvarchar](50) NULL, + [Test_Package_START] [datetime] NULL, + [Test_Package_FINISH] [datetime] NULL, + [FINAL_Status] [nvarchar](50) NULL, + CONSTRAINT [PK_Transfer_Telecom] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-13移交管理(Menu_Transfer).sql b/DataBase/菜单初始化脚本/1-13移交管理(Menu_Transfer).sql new file mode 100644 index 00000000..8c2ad907 --- /dev/null +++ b/DataBase/菜单初始化脚本/1-13移交管理(Menu_Transfer).sql @@ -0,0 +1,161 @@ +--delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_Transfer') +--go +--delete from Sys_Menu where MenuType='Menu_Transfer' +--go +/****ƽ******/ + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('48545C6A-9D10-47F4-810F-DAB0CFCD5BF9','Project Set up','Transfer/ProjectSetup.aspx',10,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6E970072-9DFC-40CE-A3A6-9F5A015FEA22','48545C6A-9D10-47F4-810F-DAB0CFCD5BF9','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('39235E4D-19FB-46B8-BB7A-4BC5E3F1AB6A','48545C6A-9D10-47F4-810F-DAB0CFCD5BF9','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E1D85DB5-8707-47DF-9EB3-93A2A99C75EA','48545C6A-9D10-47F4-810F-DAB0CFCD5BF9','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E5CDF4A0-82B2-4DEA-B268-0F5D3301A445','48545C6A-9D10-47F4-810F-DAB0CFCD5BF9','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('D94C1BA4-9DFD-4514-AE12-6F886C5D8C9B','Piping','Transfer/Piping.aspx',20,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AD0B5CEF-B899-457C-ACF8-A67B4DEF878A','D94C1BA4-9DFD-4514-AE12-6F886C5D8C9B','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('70EED055-CC6A-4865-8B2E-114C35E82E39','D94C1BA4-9DFD-4514-AE12-6F886C5D8C9B','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('5FEE485E-6467-4E46-96A3-6BBA9E6F1286','D94C1BA4-9DFD-4514-AE12-6F886C5D8C9B','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A7261F8E-0125-44AE-AF83-BDA183449AD8','D94C1BA4-9DFD-4514-AE12-6F886C5D8C9B','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('982F746C-084C-445C-9AE8-8C37BDFE7994','Static Equipment','Transfer/StaticEquipment.aspx',30,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E2741AC7-5C4C-4139-88CD-12222DC2A4E3','982F746C-084C-445C-9AE8-8C37BDFE7994','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('60049873-F545-41B3-8B08-0DEA553F81FA','982F746C-084C-445C-9AE8-8C37BDFE7994','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('44481C00-0BF4-4EE3-AFC3-411A4F5B881C','982F746C-084C-445C-9AE8-8C37BDFE7994','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('FD7E6267-969E-4901-8049-450C2880872F','982F746C-084C-445C-9AE8-8C37BDFE7994','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('7E2FB5F9-FB99-4455-B68F-460F1F9A2676','Rotating Equipment','Transfer/RotatingEquipment.aspx',40,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B09F73C4-167E-4804-9B20-1C7E7ABA96DB','7E2FB5F9-FB99-4455-B68F-460F1F9A2676','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D5F7C2ED-05D9-43DA-81A9-0034B50AD7DB','7E2FB5F9-FB99-4455-B68F-460F1F9A2676','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('757A58C3-D376-4F19-ACB6-565F5B015DA0','7E2FB5F9-FB99-4455-B68F-460F1F9A2676','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F6EB21B0-E7AD-41E5-BDE2-1DC0CE4CEDD4','7E2FB5F9-FB99-4455-B68F-460F1F9A2676','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('88F51059-55B4-4CD5-A38C-36404E5029F6','Instrumentation','Transfer/Instrumentation.aspx',50,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('889D04B0-5F40-468E-BE65-ED9B576EF313','88F51059-55B4-4CD5-A38C-36404E5029F6','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C91D3869-B79E-4454-8C1B-2B1301FC56C5','88F51059-55B4-4CD5-A38C-36404E5029F6','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('08A02910-BF88-4B9F-A8CB-D54706E81184','88F51059-55B4-4CD5-A38C-36404E5029F6','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('CEA055B3-9520-456C-8D70-8C820D51BBBE','88F51059-55B4-4CD5-A38C-36404E5029F6','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('296E75D2-192A-4D1F-8471-DD34263F8691','Electrical','Transfer/Electrical.aspx',60,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9CF430F0-596E-4BCC-943E-FE799DF72C72','296E75D2-192A-4D1F-8471-DD34263F8691','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AAA49312-75D0-44FE-AD32-3DA1880FD450','296E75D2-192A-4D1F-8471-DD34263F8691','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('62C002B0-7389-49CD-9352-B83405957158','296E75D2-192A-4D1F-8471-DD34263F8691','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('EA70F6FF-580A-4B34-952D-E73CD600FDDC','296E75D2-192A-4D1F-8471-DD34263F8691','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('95C39F86-C060-452E-BA37-D891C466A39B','Civil Structure','Transfer/CivilStructure.aspx',70,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('CC878775-8A81-4CA5-985F-FB98F395BA80','95C39F86-C060-452E-BA37-D891C466A39B','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('40EB1B73-264C-4D13-BD78-8459BC095BAC','95C39F86-C060-452E-BA37-D891C466A39B','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E01E66DA-0D6E-4C21-83FA-BDBE3C7AEF6D','95C39F86-C060-452E-BA37-D891C466A39B','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9CEF63B4-B30E-4649-836C-FC1FCDEA2BE3','95C39F86-C060-452E-BA37-D891C466A39B','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('794E64E2-FDD2-4B7D-8408-F7FB06F9C92A','Firefighting','Transfer/Firefighting.aspx',80,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F3047B05-5EAB-4790-B3BE-7CAF33518A3E','794E64E2-FDD2-4B7D-8408-F7FB06F9C92A','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('4EAD0DCD-2E73-4E0F-BA98-0FFFB92BEDB1','794E64E2-FDD2-4B7D-8408-F7FB06F9C92A','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('76104629-1A9C-4608-BDE7-4BE57DE3984D','794E64E2-FDD2-4B7D-8408-F7FB06F9C92A','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3A4C20E2-8CEF-43C2-BDA6-445C1409B32F','794E64E2-FDD2-4B7D-8408-F7FB06F9C92A','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('58FFBD80-ACB9-4830-A18A-E025D9600D94','Telecom','Transfer/Telecom.aspx',90,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('902C9E46-B643-4A66-90D1-E21E62F8EF58','58FFBD80-ACB9-4830-A18A-E025D9600D94','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B88B8F80-DAC2-4B23-931F-01AD574B1792','58FFBD80-ACB9-4830-A18A-E025D9600D94','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D21FDD31-16CB-4092-AD70-7E850816014B','58FFBD80-ACB9-4830-A18A-E025D9600D94','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('63834C81-A947-4314-94B4-B000B5BB7844','58FFBD80-ACB9-4830-A18A-E025D9600D94','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('95295BF7-FB51-480D-9902-6ADA4E8427FC','Plumbing','Transfer/Plumbing.aspx',100,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DEE3945E-8B3D-41B5-B44F-9B0D9F18839E','95295BF7-FB51-480D-9902-6ADA4E8427FC','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('13D22364-0BF2-4A1D-8174-31853C0525EC','95295BF7-FB51-480D-9902-6ADA4E8427FC','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9BB59439-4DF9-4FCC-80DA-7653F4D60333','95295BF7-FB51-480D-9902-6ADA4E8427FC','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B3932022-EAFD-40A6-B39A-581B6E5B8E65','95295BF7-FB51-480D-9902-6ADA4E8427FC','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('05442049-1310-45B1-9D3D-CAAE759D8F3E','HVAC','Transfer/HVAC.aspx',110,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AF3AC8AB-7BE5-4ED2-9718-AE64410A653B','05442049-1310-45B1-9D3D-CAAE759D8F3E','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B4AA5DC3-7790-4975-988F-D521175655E1','05442049-1310-45B1-9D3D-CAAE759D8F3E','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('87048E37-3EF0-4DD5-B1BF-5A752136A3EB','05442049-1310-45B1-9D3D-CAAE759D8F3E','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D4F571DD-C656-46DF-B70B-A242A2B4CB6E','05442049-1310-45B1-9D3D-CAAE759D8F3E','',4) + GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('016903B1-3B86-4CF5-AFF8-FF8BE389BEE5','Punchlist from','Transfer/PunchlistFrom.aspx',120,'0','Menu_Transfer',0,1,1) +GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1C032535-64B2-4E4C-95CF-E58547017E14','016903B1-3B86-4CF5-AFF8-FF8BE389BEE5','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DA7C63D5-771A-4B95-993D-6051A306A301','016903B1-3B86-4CF5-AFF8-FF8BE389BEE5','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('CF082A4F-D87C-4DC7-AFE0-70880D94F840','016903B1-3B86-4CF5-AFF8-FF8BE389BEE5','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('18C8F0AF-C903-462C-989F-0B30D1B2F75C','016903B1-3B86-4CF5-AFF8-FF8BE389BEE5','',4) + GO \ No newline at end of file diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index ce3749aa..d482c2e6 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -44,9 +44,8 @@ latest - - False - bin\Debug\Apache.NMS.ActiveMQ.dll + + ..\..\..\SGGL_CWCEC\SGGL\BLL\bin\Debug\Apache.NMS.ActiveMQ.dll False @@ -769,6 +768,8 @@ + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index f5ce14c8..2b52aa32 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -735,6 +735,10 @@ namespace BLL /// public const string Menu_TestRun = "Menu_TestRun"; /// + /// 移交管理 + /// + public const string Menu_Transfer = "Menu_Transfer"; + /// /// 关键事项 /// public const string Menu_PGJSX = "Menu_PGJSX"; @@ -3202,6 +3206,10 @@ namespace BLL /// 开车方案编制计划模板文件原始虚拟路径 /// public const string SchemePlan2TemplateUrl = "File\\Excel\\TestRun\\开车方案编制计划2.xlsx"; + /// + /// ProjectSetup导入模版文件原始的虚拟路径 + /// + public const string ProjectSetupDataInUrl = "File\\Excel\\DataIn\\ProjectSetup导入模板.xls"; /// @@ -3988,6 +3996,21 @@ namespace BLL #endregion #endregion + #region + public const string ProjectSetupMenuId = "48545C6A-9D10-47F4-810F-DAB0CFCD5BF9"; + public const string PipingMenuId = "D94C1BA4-9DFD-4514-AE12-6F886C5D8C9B"; + public const string StaticEquipmentMenuId = "982F746C-084C-445C-9AE8-8C37BDFE7994"; + public const string RotatingEquipmentMenuId = "7E2FB5F9-FB99-4455-B68F-460F1F9A2676"; + public const string InstrumentationMenuId = "88F51059-55B4-4CD5-A38C-36404E5029F6"; + public const string ElectricalMenuId = "296E75D2-192A-4D1F-8471-DD34263F8691"; + public const string CivilStructureMenuId = "95C39F86-C060-452E-BA37-D891C466A39B"; + public const string FirefightingMenuId = "794E64E2-FDD2-4B7D-8408-F7FB06F9C92A"; + public const string TelecomMenuId = "58FFBD80-ACB9-4830-A18A-E025D9600D94"; + public const string PlumbingMenuId = "95295BF7-FB51-480D-9902-6ADA4E8427FC"; + public const string HVACMenuId = "05442049-1310-45B1-9D3D-CAAE759D8F3E"; + public const string PunchlistFromMenuId = "016903B1-3B86-4CF5-AFF8-FF8BE389BEE5"; + #endregion + #endregion #region 质量流程定义 diff --git a/SGGL/BLL/Transfer/PipingService.cs b/SGGL/BLL/Transfer/PipingService.cs new file mode 100644 index 00000000..18c4dde1 --- /dev/null +++ b/SGGL/BLL/Transfer/PipingService.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + public class PipingService + { + /// + /// 根据主键获取设备材料报验信息 + /// + /// + /// + public static Model.Transfer_Piping GetPipingById(string Id) + { + return Funs.DB.Transfer_Piping.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 添加设备材料报验 + /// + /// + public static void AddPiping(Model.Transfer_Piping Piping) + { + Model.SGGLDB db = Funs.DB; + Model.Transfer_Piping newPiping = new Model.Transfer_Piping(); + newPiping.Id = Piping.Id; + newPiping.ProjectId = Piping.ProjectId; + newPiping.PIPINGLINENUMBER = Piping.PIPINGLINENUMBER; + newPiping.SYSTEM = Piping.SYSTEM; + newPiping.Subsystem = Piping.Subsystem; + newPiping.TestPackage = Piping.TestPackage; + newPiping.TestPackageSTART = Piping.TestPackageSTART; + newPiping.TestPackageFINISH = Piping.TestPackageFINISH; + newPiping.FINALStatus = Piping.FINALStatus; + newPiping.PreTestFINISHED = Piping.PreTestFINISHED; + newPiping.FinalTestFINISHED = Piping.FinalTestFINISHED; + db.Transfer_Piping.InsertOnSubmit(newPiping); + db.SubmitChanges(); + } + + /// + /// 修改设备材料报验 + /// + /// + public static void UpdatePiping(Model.Transfer_Piping Piping) + { + Model.SGGLDB db = Funs.DB; + Model.Transfer_Piping newPiping = db.Transfer_Piping.FirstOrDefault(e => e.Id == Piping.Id); + if (newPiping != null) + { + newPiping.ProjectId = Piping.ProjectId; + newPiping.PIPINGLINENUMBER = Piping.PIPINGLINENUMBER; + newPiping.SYSTEM = Piping.SYSTEM; + newPiping.Subsystem = Piping.Subsystem; + newPiping.TestPackage = Piping.TestPackage; + newPiping.TestPackageSTART = Piping.TestPackageSTART; + newPiping.TestPackageFINISH = Piping.TestPackageFINISH; + newPiping.FINALStatus = Piping.FINALStatus; + newPiping.PreTestFINISHED = Piping.PreTestFINISHED; + newPiping.FinalTestFINISHED = Piping.FinalTestFINISHED; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除设备材料报验 + /// + /// + public static void DeletePiping(string Id) + { + Model.SGGLDB db = Funs.DB; + Model.Transfer_Piping Piping = db.Transfer_Piping.FirstOrDefault(e => e.Id == Id); + if (Piping != null) + { + db.Transfer_Piping.DeleteOnSubmit(Piping); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/Transfer/ProjectSetupService.cs b/SGGL/BLL/Transfer/ProjectSetupService.cs new file mode 100644 index 00000000..94cd1be4 --- /dev/null +++ b/SGGL/BLL/Transfer/ProjectSetupService.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections; +using System.Web.UI.WebControls; + +namespace BLL +{ + public class ProjectSetupService + { + /// + /// 根据主键获取设备材料报验信息 + /// + /// + /// + public static Model.Transfer_ProjectSetup GetProjectSetupById(string Id) + { + return Funs.DB.Transfer_ProjectSetup.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 添加设备材料报验 + /// + /// + public static void AddProjectSetup(Model.Transfer_ProjectSetup ProjectSetup) + { + Model.SGGLDB db = Funs.DB; + Model.Transfer_ProjectSetup newProjectSetup = new Model.Transfer_ProjectSetup(); + newProjectSetup.Id = ProjectSetup.Id; + newProjectSetup.ProjectId = ProjectSetup.ProjectId; + newProjectSetup.SN = ProjectSetup.SN; + newProjectSetup.PlantNo = ProjectSetup.PlantNo; + newProjectSetup.PlantName = ProjectSetup.PlantName; + newProjectSetup.CommissioningSystem = ProjectSetup.CommissioningSystem; + newProjectSetup.CommissioningCodeDescription = ProjectSetup.CommissioningCodeDescription; + newProjectSetup.SubCommissioningSystem = ProjectSetup.SubCommissioningSystem; + newProjectSetup.SubCommissioningCodeDescription = ProjectSetup.SubCommissioningCodeDescription; + newProjectSetup.DescriptionArea = ProjectSetup.DescriptionArea; + newProjectSetup.TurnoverSystemSequenceNumber = ProjectSetup.TurnoverSystemSequenceNumber; + newProjectSetup.Description = ProjectSetup.Description; + newProjectSetup.TurnoverCode = ProjectSetup.TurnoverCode; + newProjectSetup.TurnoverDescription = ProjectSetup.TurnoverDescription; + newProjectSetup.Remark = ProjectSetup.Remark; + db.Transfer_ProjectSetup.InsertOnSubmit(newProjectSetup); + db.SubmitChanges(); + } + + /// + /// 修改设备材料报验 + /// + /// + public static void UpdateProjectSetup(Model.Transfer_ProjectSetup ProjectSetup) + { + Model.SGGLDB db = Funs.DB; + Model.Transfer_ProjectSetup newProjectSetup = db.Transfer_ProjectSetup.FirstOrDefault(e => e.Id == ProjectSetup.Id); + if (newProjectSetup != null) + { + newProjectSetup.ProjectId = ProjectSetup.ProjectId; + newProjectSetup.SN = ProjectSetup.SN; + newProjectSetup.PlantNo = ProjectSetup.PlantNo; + newProjectSetup.PlantName = ProjectSetup.PlantName; + newProjectSetup.CommissioningSystem = ProjectSetup.CommissioningSystem; + newProjectSetup.CommissioningCodeDescription = ProjectSetup.CommissioningCodeDescription; + newProjectSetup.SubCommissioningSystem = ProjectSetup.SubCommissioningSystem; + newProjectSetup.SubCommissioningCodeDescription = ProjectSetup.SubCommissioningCodeDescription; + newProjectSetup.DescriptionArea = ProjectSetup.DescriptionArea; + newProjectSetup.TurnoverSystemSequenceNumber = ProjectSetup.TurnoverSystemSequenceNumber; + newProjectSetup.Description = ProjectSetup.Description; + newProjectSetup.TurnoverCode = ProjectSetup.TurnoverCode; + newProjectSetup.TurnoverDescription = ProjectSetup.TurnoverDescription; + newProjectSetup.Remark = ProjectSetup.Remark; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除设备材料报验 + /// + /// + public static void DeleteProjectSetup(string Id) + { + Model.SGGLDB db = Funs.DB; + Model.Transfer_ProjectSetup ProjectSetup = db.Transfer_ProjectSetup.FirstOrDefault(e => e.Id == Id); + if (ProjectSetup != null) + { + db.Transfer_ProjectSetup.DeleteOnSubmit(ProjectSetup); + db.SubmitChanges(); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 81484d31..40871f48 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -236,3 +236,222 @@ IP地址:::1 出错时间:01/25/2024 12:39:51 出错时间:01/25/2024 12:39:51 + +错误信息开始=====> +错误类型:FileNotFoundException +错误信息:未能找到文件“E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\common\Menu_Transfer.xml”。 +错误堆栈: + 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) + 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) + 在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) + 在 System.Web.UI.Control.OpenFileAndGetDependency(VirtualPath virtualPath, String physicalPath, CacheDependency& dependency) + 在 System.Web.UI.WebControls.XmlDataSource.GetReader(String path, String content, CacheDependency& cacheDependency) + 在 System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency) + 在 System.Web.UI.WebControls.XmlDataSource.GetXmlDocument() + 在 FineUIPro.Web.indexProject.InitTreeMenu() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 102 + 在 FineUIPro.Web.indexProject.MenuSwitchMethod(String type) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 728 + 在 FineUIPro.Web.indexProject.btnTransfer_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 786 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.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) +出错时间:01/26/2024 09:14:17 +出错文件:http://localhost:8579/indexProject.aspx?projectId=05a4f675-0caa-4e9e-b171-fc2b7d7ba025 +IP地址:::1 +操作人员:JT + +出错时间:01/26/2024 09:14:17 + + +错误信息开始=====> +错误类型:FileNotFoundException +错误信息:未能找到文件“E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\common\Menu_Transfer.xml”。 +错误堆栈: + 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) + 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) + 在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) + 在 System.Web.UI.Control.OpenFileAndGetDependency(VirtualPath virtualPath, String physicalPath, CacheDependency& dependency) + 在 System.Web.UI.WebControls.XmlDataSource.GetReader(String path, String content, CacheDependency& cacheDependency) + 在 System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency) + 在 System.Web.UI.WebControls.XmlDataSource.GetXmlDocument() + 在 FineUIPro.Web.indexProject.InitTreeMenu() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 102 + 在 FineUIPro.Web.indexProject.MenuSwitchMethod(String type) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 728 + 在 FineUIPro.Web.indexProject.btnTransfer_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 786 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.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) +出错时间:01/26/2024 09:14:20 +出错文件:http://localhost:8579/indexProject.aspx?projectId=05a4f675-0caa-4e9e-b171-fc2b7d7ba025 +IP地址:::1 +操作人员:JT + +出错时间:01/26/2024 09:14:20 + + +错误信息开始=====> +错误类型:HttpException +错误信息:文件“/common/mainMenu_Transfer.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) +出错时间:01/26/2024 09:42:36 +出错文件:http://localhost:8579/common/mainMenu_Transfer.aspx +IP地址:::1 + +出错时间:01/26/2024 09:42:36 + + +错误信息开始=====> +错误类型:HttpException +错误信息:文件“/common/mainMenu_Transfer.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) +出错时间:01/26/2024 09:47:07 +出错文件:http://localhost:8579/common/mainMenu_Transfer.aspx +IP地址:::1 + +出错时间:01/26/2024 09:47:07 + + +错误信息开始=====> +错误类型:HttpParseException +错误信息:未能加载类型“FineUIPro.Web.common.mainMenu_Transfer”。 +错误堆栈: + 在 System.Web.UI.TemplateParser.ProcessException(Exception ex) + 在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) + 在 System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) +----错误类型:HttpException +----错误信息: +----未能加载类型“FineUIPro.Web.common.mainMenu_Transfer”。 +----错误堆栈: + 在 System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) + 在 System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) + 在 System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) +出错时间:01/26/2024 09:47:58 +出错文件:http://localhost:8579/common/mainMenu_Transfer.aspx +IP地址:::1 + +出错时间:01/26/2024 09:47:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2180 +出错时间:01/26/2024 12:55:46 +出错时间:01/26/2024 12:55:46 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2045 +出错时间:01/26/2024 12:55:46 +出错时间:01/26/2024 12:55:46 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1941 +出错时间:01/26/2024 12:55:46 +出错时间:01/26/2024 12:55:46 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1883 +出错时间:01/26/2024 12:55:46 +出错时间:01/26/2024 12:55:46 + diff --git a/SGGL/FineUIPro.Web/FakesAssemblies/ThoughtWorks.QRCode.Fakes.dll b/SGGL/FineUIPro.Web/FakesAssemblies/ThoughtWorks.QRCode.Fakes.dll index b45bb54b..561f26ad 100644 Binary files a/SGGL/FineUIPro.Web/FakesAssemblies/ThoughtWorks.QRCode.Fakes.dll and b/SGGL/FineUIPro.Web/FakesAssemblies/ThoughtWorks.QRCode.Fakes.dll differ diff --git a/SGGL/FineUIPro.Web/FakesAssemblies/ThoughtWorks.QRCode.Fakes.messages b/SGGL/FineUIPro.Web/FakesAssemblies/ThoughtWorks.QRCode.Fakes.messages index 4290c17a..1f18a040 100644 --- a/SGGL/FineUIPro.Web/FakesAssemblies/ThoughtWorks.QRCode.Fakes.messages +++ b/SGGL/FineUIPro.Web/FakesAssemblies/ThoughtWorks.QRCode.Fakes.messages @@ -1,15 +1,15 @@ -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Properties.Resources 生成存根: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Reader.Pattern.AlignmentPattern 生成存根: 类型没有系列可见的构造函数。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Util.Color_Fields 生成存根: 类型是一个值类型。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Reader.Pattern.FinderPattern 生成存根: 类型没有系列可见的构造函数。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 {09D8BC6E-02EC-4FA4-99BD-B668F38E6DC6} 生成存根: 类型不受支持,因为存在内部限制。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Util.DebugCanvas 生成填充码: 类型是一个接口。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Geom.SamplingGrid+AreaGrid 生成填充码: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.QRCodeDecoder+DecodeResult 生成填充码: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Data.QRCodeImage 生成填充码: 类型是一个接口。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Properties.Resources 生成填充码: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Reader.QRCodeImageReader+ModulePitch 生成填充码: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.QRCodeEncoder+ENCODE_MODE 生成填充码: 类型是一个枚举。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.QRCodeEncoder+ERROR_CORRECTION 生成填充码: 类型是一个枚举。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Util.Color 生成填充码: 类型是一个接口。 -E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 {09D8BC6E-02EC-4FA4-99BD-B668F38E6DC6} 生成填充码: 类型不受支持,因为存在内部限制。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Properties.Resources 生成存根: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Reader.Pattern.AlignmentPattern 生成存根: 类型没有系列可见的构造函数。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Util.Color_Fields 生成存根: 类型是一个值类型。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Reader.Pattern.FinderPattern 生成存根: 类型没有系列可见的构造函数。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 {09D8BC6E-02EC-4FA4-99BD-B668F38E6DC6} 生成存根: 类型不受支持,因为存在内部限制。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Util.DebugCanvas 生成填充码: 类型是一个接口。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Geom.SamplingGrid+AreaGrid 生成填充码: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.QRCodeDecoder+DecodeResult 生成填充码: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Data.QRCodeImage 生成填充码: 类型是一个接口。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Properties.Resources 生成填充码: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Reader.QRCodeImageReader+ModulePitch 生成填充码: 类型对 exported or assembly(ThoughtWorks.QRCode.Fakes) 不可见。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.QRCodeEncoder+ENCODE_MODE 生成填充码: 类型是一个枚举。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.QRCodeEncoder+ERROR_CORRECTION 生成填充码: 类型是一个枚举。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 ThoughtWorks.QRCode.Codec.Util.Color 生成填充码: 类型是一个接口。 +E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Fakes\ThoughtWorks.QRCode.fakes : warning : 无法为 {09D8BC6E-02EC-4FA4-99BD-B668F38E6DC6} 生成填充码: 类型不受支持,因为存在内部限制。 diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls new file mode 100644 index 00000000..bcabcaae Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/CivilStructure导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Electrical导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Electrical导入模板.xls new file mode 100644 index 00000000..24c5688b Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/Electrical导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Firefighting导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Firefighting导入模板.xls new file mode 100644 index 00000000..7163bb6a Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/Firefighting导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/HVAC导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/HVAC导入模板.xls new file mode 100644 index 00000000..6c1eb7b0 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/HVAC导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls new file mode 100644 index 00000000..e9d02061 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/Instrumentation导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Plumbing导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Plumbing导入模板.xls new file mode 100644 index 00000000..766efdd1 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/Plumbing导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/ProjectSetup导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/ProjectSetup导入模板.xls new file mode 100644 index 00000000..8f5c6e0d Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/ProjectSetup导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/PunchlistFrom导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/PunchlistFrom导入模板.xls new file mode 100644 index 00000000..6a3c3897 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/PunchlistFrom导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Telecom导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Telecom导入模板.xls new file mode 100644 index 00000000..b118a026 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/Telecom导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 7ccfdc88..d34ccb12 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -334,6 +334,7 @@ + @@ -1828,6 +1829,25 @@ + + + + + + + + + + + + + + + + + + + @@ -2079,6 +2099,7 @@ + @@ -6748,6 +6769,13 @@ mainMenu_HSSE.aspx + + mainMenu_Transfer.aspx + ASPXCodeBehind + + + mainMenu_Transfer.aspx + mainProject0.aspx ASPXCodeBehind @@ -16313,6 +16341,139 @@ TestRunRecordUploadList.aspx + + CivilStructure.aspx + ASPXCodeBehind + + + CivilStructure.aspx + + + CivilStructureDataIn.aspx + ASPXCodeBehind + + + CivilStructureDataIn.aspx + + + Electrical.aspx + ASPXCodeBehind + + + Electrical.aspx + + + ElectricalDataIn.aspx + ASPXCodeBehind + + + ElectricalDataIn.aspx + + + Firefighting.aspx + ASPXCodeBehind + + + Firefighting.aspx + + + FirefightingDataIn.aspx + ASPXCodeBehind + + + FirefightingDataIn.aspx + + + HVAC.aspx + ASPXCodeBehind + + + HVAC.aspx + + + HVACDataIn.aspx + ASPXCodeBehind + + + HVACDataIn.aspx + + + Instrumentation.aspx + ASPXCodeBehind + + + Instrumentation.aspx + + + InstrumentationDataIn.aspx + ASPXCodeBehind + + + InstrumentationDataIn.aspx + + + Piping.aspx + ASPXCodeBehind + + + Piping.aspx + + + Plumbing.aspx + ASPXCodeBehind + + + Plumbing.aspx + + + PlumbingDataIn.aspx + ASPXCodeBehind + + + PlumbingDataIn.aspx + + + ProjectSetup.aspx + ASPXCodeBehind + + + ProjectSetup.aspx + + + ProjectSetupDataIn.aspx + ASPXCodeBehind + + + ProjectSetupDataIn.aspx + + + PunchlistFrom.aspx + ASPXCodeBehind + + + PunchlistFrom.aspx + + + PunchlistFromDataIn.aspx + ASPXCodeBehind + + + PunchlistFromDataIn.aspx + + + Telecom.aspx + ASPXCodeBehind + + + Telecom.aspx + + + TelecomDataIn.aspx + ASPXCodeBehind + + + TelecomDataIn.aspx + Video.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunPlan.aspx b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunPlan.aspx index 60048874..6ae89297 100644 --- a/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunPlan.aspx +++ b/SGGL/FineUIPro.Web/TestRun/DriverRun/DriverRunPlan.aspx @@ -9,9 +9,9 @@
- + + ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.cs new file mode 100644 index 00000000..b9844950 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.cs @@ -0,0 +1,200 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Transfer +{ + public partial class CivilStructure : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Civil_Structure + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtCivil_Structure.Text.Trim())) + { + strSql += " AND Civil_Structure like @Civil_Structure"; + listStr.Add(new SqlParameter("@Civil_Structure", "%" + this.txtCivil_Structure.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + } + strSql += " order by Civil_Structure "; + 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 + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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(); + Model.Transfer_Civil_Structure model = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_Civil_Structure.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("CivilStructureDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CivilStructureMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.designer.cs new file mode 100644 index 00000000..783a843e --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructure.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class CivilStructure + { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtCivil_Structure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCivil_Structure; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx new file mode 100644 index 00000000..5752054d --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CivilStructureDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.CivilStructureDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs new file mode 100644 index 00000000..d7472dc3 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.cs @@ -0,0 +1,421 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer +{ + public partial class CivilStructureDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + errorInfos.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + + 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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 7); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 3).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 3).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 7); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Civil_Structure == pds.Rows[i][0].ToString().Trim() + && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly==null) + { + Model.Transfer_Civil_Structure model = new Model.Transfer_Civil_Structure(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.Civil_Structure = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.Civil_Structure = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + modelOnly.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Civil_Structure.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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 + "File\\Excel\\DataIn\\CivilStructure导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\CivilStructure导入模板.xls"; + 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/Transfer/CivilStructureDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.designer.cs new file mode 100644 index 00000000..072f07bb --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/CivilStructureDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class CivilStructureDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/Electrical.aspx b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx new file mode 100644 index 00000000..66d65ca6 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx @@ -0,0 +1,116 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Electrical.aspx.cs" Inherits="FineUIPro.Web.Transfer.Electrical" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.cs new file mode 100644 index 00000000..0c674ca9 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.cs @@ -0,0 +1,202 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Transfer +{ + public partial class Electrical : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Electrical + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtELECTRICAL.Text.Trim())) + { + strSql += " AND ELECTRICAL like @ELECTRICAL"; + listStr.Add(new SqlParameter("@ELECTRICAL", "%" + this.txtELECTRICAL.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + } + + strSql += " order by ELECTRICAL "; + + 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 + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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(); + Model.Transfer_Electrical model = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_Electrical.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ElectricalDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ElectricalMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.designer.cs new file mode 100644 index 00000000..07ce47f3 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Electrical.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class Electrical + { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtELECTRICAL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtELECTRICAL; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx new file mode 100644 index 00000000..97a20417 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ElectricalDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.ElectricalDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs new file mode 100644 index 00000000..add980dc --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.cs @@ -0,0 +1,420 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +namespace FineUIPro.Web.Transfer +{ + public partial class ElectricalDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + errorInfos.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + + 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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 7); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 7); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.ELECTRICAL == pds.Rows[i][0].ToString().Trim() + && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_Electrical model = new Model.Transfer_Electrical(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.ELECTRICAL = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.ELECTRICAL = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + modelOnly.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Electrical.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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 + "File\\Excel\\DataIn\\Electrical导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\Electrical导入模板.xls"; + 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/Transfer/ElectricalDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.designer.cs new file mode 100644 index 00000000..fa61b540 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ElectricalDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class ElectricalDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx new file mode 100644 index 00000000..c342ea2e --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx @@ -0,0 +1,116 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Firefighting.aspx.cs" Inherits="FineUIPro.Web.Transfer.Firefighting" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs new file mode 100644 index 00000000..e31ff404 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs @@ -0,0 +1,202 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Transfer +{ + public partial class Firefighting : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Firefighting + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtFirefighting.Text.Trim())) + { + strSql += " AND Firefighting like @Firefighting"; + listStr.Add(new SqlParameter("@Firefighting", "%" + this.txtFirefighting.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + } + + strSql += " order by Firefighting "; + + 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 + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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(); + Model.Transfer_Firefighting model = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_Firefighting.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("FirefightingDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.FirefightingMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs new file mode 100644 index 00000000..f8080d74 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class Firefighting + { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtFirefighting 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFirefighting; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx new file mode 100644 index 00000000..07e72eb6 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FirefightingDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.FirefightingDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs new file mode 100644 index 00000000..25961140 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs @@ -0,0 +1,420 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer +{ + public partial class FirefightingDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + errorInfos.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + + 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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 7); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 7); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_Firefighting model = new Model.Transfer_Firefighting(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.Firefighting = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.Firefighting = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + modelOnly.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Firefighting.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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 + "File\\Excel\\DataIn\\Firefighting导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\Firefighting导入模板.xls"; + 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/Transfer/FirefightingDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.designer.cs new file mode 100644 index 00000000..910ec5ec --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class FirefightingDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/HVAC.aspx b/SGGL/FineUIPro.Web/Transfer/HVAC.aspx new file mode 100644 index 00000000..0705d0af --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/HVAC.aspx @@ -0,0 +1,117 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HVAC.aspx.cs" Inherits="FineUIPro.Web.Transfer.HVAC" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/HVAC.aspx.cs b/SGGL/FineUIPro.Web/Transfer/HVAC.aspx.cs new file mode 100644 index 00000000..2c981fe7 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/HVAC.aspx.cs @@ -0,0 +1,201 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Transfer +{ + public partial class HVAC : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_HVAC + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtHVAC.Text.Trim())) + { + strSql += " AND Plumbing like @Plumbing"; + listStr.Add(new SqlParameter("@Plumbing", "%" + this.txtHVAC.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + } + strSql += " order by HVAC "; + + 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 + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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(); + Model.Transfer_HVAC model = Funs.DB.Transfer_HVAC.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_HVAC.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("HVACDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HVACMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/HVAC.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/HVAC.aspx.designer.cs new file mode 100644 index 00000000..b796f0e3 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/HVAC.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class HVAC + { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtHVAC 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHVAC; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx new file mode 100644 index 00000000..bdbd0db0 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HVACDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.HVACDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.cs new file mode 100644 index 00000000..3b779322 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.cs @@ -0,0 +1,420 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer +{ + public partial class HVACDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + errorInfos.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + 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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 7); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 7); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_HVAC.FirstOrDefault(x => x.HVAC == pds.Rows[i][0].ToString().Trim() + && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_HVAC model = new Model.Transfer_HVAC(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.HVAC = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.HVAC = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + modelOnly.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_HVAC.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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 + "File\\Excel\\DataIn\\HVAC导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\HVAC导入模板.xls"; + 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/Transfer/HVACDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.designer.cs new file mode 100644 index 00000000..c88dc313 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/HVACDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class HVACDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx new file mode 100644 index 00000000..ca15bdec --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx @@ -0,0 +1,116 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Instrumentation.aspx.cs" Inherits="FineUIPro.Web.Transfer.Instrumentation" %> + + + + + + + Instrumentation + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.cs new file mode 100644 index 00000000..00eb6ea4 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.cs @@ -0,0 +1,202 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Transfer +{ + public partial class Instrumentation : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Instrumentation + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtINSTRUMENTATION.Text.Trim())) + { + strSql += " AND INSTRUMENTATION like @INSTRUMENTATION"; + listStr.Add(new SqlParameter("@INSTRUMENTATION", "%" + this.txtINSTRUMENTATION.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + } + + strSql += " order by INSTRUMENTATION "; + + 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 + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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(); + Model.Transfer_Instrumentation model = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x=>x.Id==rowID); + if (model != null) + { + Funs.DB.Transfer_Instrumentation.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("InstrumentationDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.InstrumentationMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.designer.cs new file mode 100644 index 00000000..e7fd10a4 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Instrumentation.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class Instrumentation + { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtINSTRUMENTATION 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtINSTRUMENTATION; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx new file mode 100644 index 00000000..6149195d --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InstrumentationDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.InstrumentationDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs new file mode 100644 index 00000000..afe7ca2f --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.cs @@ -0,0 +1,420 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer +{ + public partial class InstrumentationDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + errorInfos.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + + 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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 7); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 7); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x => x.INSTRUMENTATION == pds.Rows[i][0].ToString().Trim() + && x.ProjectId==CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_Instrumentation model = new Model.Transfer_Instrumentation(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else { + //修改 + modelOnly.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + modelOnly.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Instrumentation.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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 + "File\\Excel\\DataIn\\Instrumentation导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\Instrumentation导入模板.xls"; + 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/Transfer/InstrumentationDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.designer.cs new file mode 100644 index 00000000..a4806eab --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/InstrumentationDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class InstrumentationDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx b/SGGL/FineUIPro.Web/Transfer/Piping.aspx new file mode 100644 index 00000000..f80d2b82 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx @@ -0,0 +1,129 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Piping.aspx.cs" Inherits="FineUIPro.Web.Transfer.Piping" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.cs new file mode 100644 index 00000000..09da90ac --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.cs @@ -0,0 +1,208 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Transfer +{ + public partial class Piping : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select * from Transfer_ProjectSetup C + where C.ProjectId = @ProjectId"; + 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; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 增加 + /// + /// 新增按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx", "编辑 - "))); + } + #endregion + + #region 编辑 + /// + /// 右键编辑 + /// + /// + /// + protected void btnMenuModify_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx?InspectionEquipmentId={0}", Grid1.SelectedRowID, "编辑 - "))); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnMenuModify_Click(sender, e); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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 data = BLL.ProjectSetupService.GetProjectSetupById(rowID); + if (data != null) + { + BLL.ProjectSetupService.DeleteProjectSetup(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ProjectSetupDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectSetupMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs new file mode 100644 index 00000000..d7ce9219 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs @@ -0,0 +1,177 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer { + + + public partial class Piping { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// g1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g1; + + /// + /// g2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g2; + + /// + /// g3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g3; + + /// + /// g4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g4; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx new file mode 100644 index 00000000..5a7dcf8c --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx @@ -0,0 +1,116 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Plumbing.aspx.cs" Inherits="FineUIPro.Web.Transfer.Plumbing" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.cs new file mode 100644 index 00000000..f1873d04 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.cs @@ -0,0 +1,202 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + + +namespace FineUIPro.Web.Transfer +{ + public partial class Plumbing : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Plumbing + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtPlumbing.Text.Trim())) + { + strSql += " AND Plumbing like @Plumbing"; + listStr.Add(new SqlParameter("@Plumbing", "%" + this.txtPlumbing.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + } + + strSql += " order by Plumbing "; + 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 + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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(); + Model.Transfer_Plumbing model = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_Plumbing.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PlumbingDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PlumbingMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.designer.cs new file mode 100644 index 00000000..d79c6e0c --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class Plumbing + { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtPlumbing 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPlumbing; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx new file mode 100644 index 00000000..bef022a6 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlumbingDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.PlumbingDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs new file mode 100644 index 00000000..1a358706 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs @@ -0,0 +1,421 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer +{ + public partial class PlumbingDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + errorInfos.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + + 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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 7); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 7); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Plumbing == pds.Rows[i][0].ToString().Trim() + && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_Plumbing model = new Model.Transfer_Plumbing(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.Plumbing = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.Plumbing = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + modelOnly.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Plumbing.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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 + "File\\Excel\\DataIn\\Plumbing导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\Plumbing导入模板.xls"; + 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/Transfer/PlumbingDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.designer.cs new file mode 100644 index 00000000..bd6ee9f7 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class PlumbingDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx b/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx new file mode 100644 index 00000000..860fb31f --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx @@ -0,0 +1,141 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectSetup.aspx.cs" Inherits="FineUIPro.Web.Transfer.ProjectSetup" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx.cs b/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx.cs new file mode 100644 index 00000000..61c8f241 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx.cs @@ -0,0 +1,208 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Transfer +{ + public partial class ProjectSetup : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select * from Transfer_ProjectSetup C + where C.ProjectId = @ProjectId"; + 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; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 增加 + /// + /// 新增按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx", "编辑 - "))); + } + #endregion + + #region 编辑 + /// + /// 右键编辑 + /// + /// + /// + protected void btnMenuModify_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx?InspectionEquipmentId={0}", Grid1.SelectedRowID, "编辑 - "))); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnMenuModify_Click(sender, e); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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 data = BLL.ProjectSetupService.GetProjectSetupById(rowID); + if (data != null) + { + BLL.ProjectSetupService.DeleteProjectSetup(rowID); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ProjectSetupDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectSetupMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx.designer.cs new file mode 100644 index 00000000..4a55604b --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ProjectSetup.aspx.designer.cs @@ -0,0 +1,177 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer { + + + public partial class ProjectSetup { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// g1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g1; + + /// + /// g2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g2; + + /// + /// g3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g3; + + /// + /// g4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g4; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/ProjectSetupDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/ProjectSetupDataIn.aspx new file mode 100644 index 00000000..92bd444b --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ProjectSetupDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectSetupDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.ProjectSetupDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/ProjectSetupDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/ProjectSetupDataIn.aspx.cs new file mode 100644 index 00000000..75349cd2 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ProjectSetupDataIn.aspx.cs @@ -0,0 +1,427 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer +{ + public partial class ProjectSetupDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 13); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var oldViewInfos = from x in Funs.DB.Transfer_ProjectSetup + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + var cns = from x in Funs.DB.Base_CNProfessional select x; + + for (int i = 0; i < ir; i++) + { + Model.Transfer_ProjectSetup oldViewInfo = new Model.Transfer_ProjectSetup(); + string row0 = pds.Rows[i][0].ToString().Trim(); + string row1 = pds.Rows[i][1].ToString(); + //if (string.IsNullOrEmpty(row1)) + //{ + // result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|"; + //} + + //string row2 = pds.Rows[i][2].ToString(); + //if (!string.IsNullOrEmpty(row2)) + //{ + // var cn = cns.Where(x => x.ProfessionalName == row2.Trim()).FirstOrDefault(); + // if (cn == null) + // { + // result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row2 + "]不存在!" + "|"; + // } + //} + + //string row10 = pds.Rows[i][10].ToString().Trim(); + //if (!string.IsNullOrEmpty(row10)) + //{ + // if (row10 != "合格" && row10 != "不合格") + // { + // result += (i + 2).ToString() + "," + "本次抽检结果" + "," + "[" + row10 + "]错误!" + "|"; + // } + //} + + //string row11 = pds.Rows[i][11].ToString(); + //if (!string.IsNullOrEmpty(row11)) + //{ + // try + // { + // DateTime date = Convert.ToDateTime(row11.Trim()); + // } + // catch (Exception) + // { + // result += (i + 2).ToString() + "," + "报验日期" + "," + "[" + row11 + "]错误!" + "|"; + // } + //} + + //string row12 = pds.Rows[i][12].ToString(); + //if (string.IsNullOrEmpty(row12)) + //{ + // result += (i + 2).ToString() + "," + "标识编号" + "," + "此项为必填项!" + "|"; + //} + + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 13); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var oldViewInfos = from x in Funs.DB.Comprehensive_InspectionEquipment + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + + var cns = from x in Funs.DB.Base_CNProfessional select x; + + for (int i = 1; i < ir; i++) + { + Model.Transfer_ProjectSetup Ins = new Model.Transfer_ProjectSetup(); + Ins.Id = SQLHelper.GetNewID(); + Ins.ProjectId = this.CurrUser.LoginProjectId; + Ins.SN = pds.Rows[i][0].ToString().Trim(); + Ins.PlantNo = pds.Rows[i][1].ToString().Trim(); + Ins.PlantName = pds.Rows[i][2].ToString().Trim(); + Ins.CommissioningSystem = pds.Rows[i][3].ToString().Trim(); + Ins.CommissioningCodeDescription = pds.Rows[i][4].ToString().Trim(); + Ins.SubCommissioningSystem = pds.Rows[i][5].ToString().Trim(); + Ins.SubCommissioningCodeDescription = pds.Rows[i][6].ToString().Trim(); + Ins.DescriptionArea = pds.Rows[i][7].ToString().Trim(); + Ins.TurnoverSystemSequenceNumber = pds.Rows[i][8].ToString().Trim(); + Ins.Description = pds.Rows[i][9].ToString().Trim(); + Ins.TurnoverCode = pds.Rows[i][10].ToString().Trim(); + Ins.TurnoverDescription = pds.Rows[i][11].ToString().Trim(); + Ins.Remark = pds.Rows[i][12].ToString().Trim(); + BLL.ProjectSetupService.AddProjectSetup(Ins); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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.ProjectSetupDataInUrl; + string filePath = Const.ProjectSetupDataInUrl; + 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/Transfer/ProjectSetupDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/ProjectSetupDataIn.aspx.designer.cs new file mode 100644 index 00000000..8e67ec09 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/ProjectSetupDataIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer { + + + public partial class ProjectSetupDataIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx new file mode 100644 index 00000000..551cf92d --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx @@ -0,0 +1,144 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PunchlistFrom.aspx.cs" Inherits="FineUIPro.Web.Transfer.PunchlistFrom" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs new file mode 100644 index 00000000..81f69bd4 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs @@ -0,0 +1,200 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.Transfer +{ + public partial class PunchlistFrom : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_PunchlistFrom + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtPunch_No.Text.Trim())) + { + strSql += " AND Punch_No like @Punch_No"; + listStr.Add(new SqlParameter("@Punch_No", "%" + this.txtPunch_No.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND PUNCH_ITEM_FINISH_DATE >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND PUNCH_ITEM_FINISH_DATE <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + } + strSql += " order by Punch_No "; + 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 + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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(); + Model.Transfer_PunchlistFrom model = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_PunchlistFrom.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PunchlistFromDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PunchlistFromMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs new file mode 100644 index 00000000..ac2dc2ef --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class PunchlistFrom + { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtPunch_No 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPunch_No; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx new file mode 100644 index 00000000..a48490d0 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PunchlistFromDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.PunchlistFromDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.cs new file mode 100644 index 00000000..6922c30a --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.cs @@ -0,0 +1,425 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer +{ + public partial class PunchlistFromDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + errorInfos.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + + 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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 14); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row4 = pds.Rows[i][9].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "PUNCH ITEM FINISH DATE" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 14); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(x => x.Punch_No == pds.Rows[i][0].ToString().Trim() + && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_PunchlistFrom model = new Model.Transfer_PunchlistFrom(); + + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + + model.Item_No = pds.Rows[i][0].ToString().Trim(); + model.Punch_No = pds.Rows[i][1].ToString().Trim(); + model.SystemName = pds.Rows[i][2].ToString().Trim(); + model.Subsystem = pds.Rows[i][3].ToString().Trim(); + + model.Test_Package = pds.Rows[i][4].ToString().Trim(); + model.Discipline = pds.Rows[i][5].ToString().Trim(); + model.DESCRIPTION = pds.Rows[i][6].ToString().Trim(); + model.Identified = pds.Rows[i][7].ToString().Trim(); + model.Category = pds.Rows[i][8].ToString().Trim(); + DateTime t1; + if (DateTime.TryParse(pds.Rows[i][9].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][9].ToString())) + model.PUNCH_ITEM_FINISH_DATE = t1; + + + model.Action_By = pds.Rows[i][10].ToString().Trim(); + model.Required_By = pds.Rows[i][11].ToString().Trim(); + model.PUNCH_ITEM_STATUS = pds.Rows[i][12].ToString().Trim(); + model.Comments = pds.Rows[i][13].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.Item_No = pds.Rows[i][0].ToString().Trim(); + modelOnly.Punch_No = pds.Rows[i][1].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][2].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][3].ToString().Trim(); + modelOnly.Test_Package = pds.Rows[i][4].ToString().Trim(); + modelOnly.Discipline = pds.Rows[i][5].ToString().Trim(); + modelOnly.DESCRIPTION = pds.Rows[i][6].ToString().Trim(); + modelOnly.Identified = pds.Rows[i][7].ToString().Trim(); + modelOnly.Category = pds.Rows[i][8].ToString().Trim(); + DateTime t1; + if (DateTime.TryParse(pds.Rows[i][9].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][9].ToString())) + modelOnly.PUNCH_ITEM_FINISH_DATE = t1; + modelOnly.Action_By = pds.Rows[i][10].ToString().Trim(); + modelOnly.Required_By = pds.Rows[i][11].ToString().Trim(); + modelOnly.PUNCH_ITEM_STATUS = pds.Rows[i][12].ToString().Trim(); + modelOnly.Comments = pds.Rows[i][13].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_PunchlistFrom.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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 + "File\\Excel\\DataIn\\PunchlistFrom导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\PunchlistFrom导入模板.xls"; + 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/Transfer/PunchlistFromDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.designer.cs new file mode 100644 index 00000000..2dfc56a5 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFromDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class PunchlistFromDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx new file mode 100644 index 00000000..91edfec2 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx @@ -0,0 +1,116 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Telecom.aspx.cs" Inherits="FineUIPro.Web.Transfer.Telecom" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.cs new file mode 100644 index 00000000..767658f8 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.cs @@ -0,0 +1,203 @@ +using BLL; +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + + +namespace FineUIPro.Web.Transfer +{ + public partial class Telecom : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select*from Transfer_Telecom + where ProjectId = @ProjectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.txtTelecom.Text.Trim())) + { + strSql += " AND Telecom like @Telecom"; + listStr.Add(new SqlParameter("@Telecom", "%" + this.txtTelecom.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + { + strSql += " AND Test_Package_START >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + } + if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + { + strSql += " AND Test_Package_START <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + } + + strSql += " order by Telecom "; + + 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 + + #region 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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(); + Model.Transfer_Telecom model = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Id == rowID); + if (model != null) + { + Funs.DB.Transfer_Telecom.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("TelecomDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TelecomMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuModify.Hidden = false; + this.Grid1.EnableRowDoubleClickEvent = true; + } + else + { + this.Grid1.EnableRowDoubleClickEvent = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDel.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnImport.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.designer.cs new file mode 100644 index 00000000..815afe32 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class Telecom + { + + /// + /// 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; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtTelecom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTelecom; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx new file mode 100644 index 00000000..00275ca6 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TelecomDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.TelecomDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs new file mode 100644 index 00000000..bc640cba --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs @@ -0,0 +1,421 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Transfer +{ + public partial class TelecomDataIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdCheckResult.Text = string.Empty; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + errorInfos.Clear(); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + + 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 (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + 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], 7); + hdCheckResult.Text = "1"; + } + catch (Exception exc) + { + Response.Write(exc); + //return null; + // return dt; + } + finally + { + } + } + #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) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + return false; + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row4.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; + } + } + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + DateTime date = Convert.ToDateTime(row5.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + } + errorInfos.Clear(); + if (!string.IsNullOrEmpty(result)) + { + string results = result; + List errorInfoList = results.Split('|').ToList(); + foreach (var item in errorInfoList) + { + string[] errors = item.Split(','); + Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + errorInfo.Row = errors[0]; + errorInfo.Column = errors[1]; + errorInfo.Reason = errors[2]; + errorInfos.Add(errorInfo); + } + if (errorInfos.Count > 0) + { + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + } + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(hdCheckResult.Text)) + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", 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], 7); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + string result = string.Empty; + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + List list = new List(); + for (int i = 1; i < ir; i++) + { + //查询第一列,没查到的情况下作导入处理 + var modelOnly = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Telecom == pds.Rows[i][0].ToString().Trim() + && x.ProjectId == CurrUser.LoginProjectId); + if (modelOnly == null) + { + Model.Transfer_Telecom model = new Model.Transfer_Telecom(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.Telecom = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + model.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + model.Test_Package_FINISH = t2; + + model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + list.Add(model); + } + else + { + //修改 + modelOnly.Telecom = pds.Rows[i][0].ToString().Trim(); + modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + DateTime t1, t2; + if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + modelOnly.Test_Package_START = t1; + if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + modelOnly.Test_Package_FINISH = t2; + modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + Funs.DB.SubmitChanges(); + } + } + if (list.Count > 0) + { + Funs.DB.Transfer_Telecom.InsertAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #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 + "File\\Excel\\DataIn\\Telecom导入模板.xls"; + string filePath = "File\\Excel\\DataIn\\Telecom导入模板.xls"; + 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/Transfer/TelecomDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.designer.cs new file mode 100644 index 00000000..50eacf48 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer +{ + + + public partial class TelecomDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index 37de607d..f2c2e849 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -76,7 +76,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 1544f676..f3c15865 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -20,7 +20,7 @@ - + @@ -153,7 +153,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml index 53aae2a6..a8df02b8 100644 --- a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml +++ b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml @@ -42,12 +42,13 @@ - - - + + + + + - @@ -60,7 +61,6 @@ - diff --git a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml new file mode 100644 index 00000000..c006fd7f --- /dev/null +++ b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx b/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx new file mode 100644 index 00000000..ad361978 --- /dev/null +++ b/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainMenu_Transfer.aspx.cs" Inherits="FineUIPro.Web.common.mainMenu_Transfer" %> + + + + + + + + + +
+
+
+
+ + diff --git a/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx.cs new file mode 100644 index 00000000..cf9c0ce1 --- /dev/null +++ b/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.common +{ + public partial class mainMenu_Transfer : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx.designer.cs b/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx.designer.cs new file mode 100644 index 00000000..644020ca --- /dev/null +++ b/SGGL/FineUIPro.Web/common/mainMenu_Transfer.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.common +{ + + + public partial class mainMenu_Transfer + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/SGGL/FineUIPro.Web/indexProject.aspx b/SGGL/FineUIPro.Web/indexProject.aspx index 4436757e..35c42e74 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx +++ b/SGGL/FineUIPro.Web/indexProject.aspx @@ -188,8 +188,8 @@ .login-icon { } - /*头部按钮样式*/ - .bgbtn_head{ + /*头部按钮样式*/ + .bgbtn_head { display: inline-block; position: absolute; width: 40%; @@ -201,18 +201,18 @@ padding: 0 !important; } - .y_image_default{ - cursor:pointer + .y_image_default { + cursor: pointer } + .y_navbars { align-items: center !important; cursor: pointer; } .f-panel-body .f-field { - margin-bottom: 0px!important; -} - + margin-bottom: 0px !important; + } @@ -240,37 +240,37 @@
中国五环工程有限公司智慧施工管理信息系统(项目级) - + EnableDefaultState="true" EnableDefaultCorner="false" ID="Button21"> +
-
+
帮助
-
+
个人
-
+
设置 + EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnProjectSet" OnClientClick="parent.removeActiveTab();"> +
- <%--
帮助
--%> -
+ <%--
帮助
--%> +
退出 + EnablePostBack="false" EnableDefaultState="true" EnableDefaultCorner="false" ID="Button18"> + + + +
全屏
@@ -282,6 +282,7 @@
焊接管理
材料管理
试车管理
+
移交管理
关键事项
视频监控
现场考勤
@@ -408,8 +409,8 @@ EnableMaximize="true" EnableResize="false"> @@ -433,6 +434,9 @@ + @@ -449,10 +453,10 @@ EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();" Hidden="true"> @@ -477,23 +481,24 @@ var btnHJGLClientID = '<%= btnHJGL.ClientID %>'; var btnCLGLClientID = '<%= btnCLGL.ClientID %>'; var btnTestRunClientID = '<%= btnTestRun.ClientID %>'; + var btnTransferClientID = '<%= btnTransfer.ClientID %>'; var btnPGJSXClientID = '<%= btnPGJSX.ClientID %>'; var btnDigitalSiteClientID = '<%= btnDigitalSite.ClientID %>'; var btnPDigDataClientID = '<%= btnPDigData.ClientID %>'; var btnOpinionClientID = '<%= btnOpinion.ClientID %>'; - var btnDocClientID = '<%= btnDoc.ClientID %>'; + var btnDocClientID = '<%= btnDoc.ClientID %>'; function ProjectZJClick() { F(ProjectZJClientID).click(); } function ProjectTGClick() { F(ProjectTGClientID).click(); - + } function ProjectJGClick() { F(ProjectJGClientID).click(); - + } function CQMSClick() { @@ -538,6 +543,13 @@ $item.attr('style', ";display:block !important;") } + function TransferClick() { + parent.removeActiveTab(); + F(btnTransferClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") + } + function PGJSXClick() { parent.removeActiveTab(); F(btnPGJSXClientID).click(); @@ -582,11 +594,11 @@ $item.attr('style', ";display:block !important;") } - function DocClick() { + function DocClick() { parent.removeActiveTab(); - F(btnDocClientID).click(); - var $item = $('.f-tabstrip-header') - $item.attr('style', ";display:block !important;") + F(btnDocClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } // 展开左侧面板 @@ -869,7 +881,7 @@ var $item = $('.f-tabstrip-header') $item.attr('style', ";display:block !important;") }); - + $(".up-wrap-ul").click(function () { var $item = $('.f-tabstrip-header') $item.attr('style', ";display:block !important;") diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.cs b/SGGL/FineUIPro.Web/indexProject.aspx.cs index 87a7d086..db315f2d 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.cs @@ -781,6 +781,11 @@ namespace FineUIPro.Web this.MenuSwitchMethod(Const.Menu_TestRun); } + protected void btnTransfer_Click(object sender, EventArgs e) + { + this.MenuSwitchMethod(Const.Menu_Transfer); + } + protected void btnPGJSX_Click(object sender, EventArgs e) { this.MenuSwitchMethod(Const.Menu_PGJSX); diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.designer.cs b/SGGL/FineUIPro.Web/indexProject.aspx.designer.cs index e68a85cd..fee189ab 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.designer.cs @@ -7,479 +7,486 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web -{ - - - public partial class indexProject - { - - /// - /// form1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// PageManager1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.PageManager PageManager1; - - /// - /// Panel1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Panel Panel1; - - /// - /// topPanel 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ContentPanel topPanel; - - /// - /// ContentPanel1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ContentPanel ContentPanel1; - - /// - /// drpProject 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpProject; - - /// - /// Button21 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button Button21; - - /// - /// btnHelp 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnHelp; - - /// - /// btnPersonal 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPersonal; - - /// - /// btnProjectSet 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnProjectSet; - - /// - /// Button18 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button Button18; - - /// - /// leftPanel 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Panel leftPanel; - - /// - /// leftPanelToolCollapse 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool leftPanelToolCollapse; - - /// - /// leftPanelToolGear 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool leftPanelToolGear; - - /// - /// btnExpandAll 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnExpandAll; - - /// - /// btnCollapseAll 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnCollapseAll; - - /// - /// MenuMode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton MenuMode; - - /// - /// MenuModeNormal 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuModeNormal; - - /// - /// MenuModeCompact 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuModeCompact; - - /// - /// MenuModeLarge 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuModeLarge; - - /// - /// MenuStyle 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton MenuStyle; - - /// - /// MenuStyleTree 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuStyleTree; - - /// - /// MenuStyleMiniModeTree 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuStyleMiniModeTree; - - /// - /// MenuStylePlainTree 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuStylePlainTree; - - /// - /// MenuLang 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton MenuLang; - - /// - /// MenuLangZHCN 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuLangZHCN; - - /// - /// mainTabStrip 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TabStrip mainTabStrip; - - /// - /// Tab1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tab Tab1; - - /// - /// toolRefresh 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool toolRefresh; - - /// - /// toolNewWindow 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool toolNewWindow; - - /// - /// toolMaximize 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool toolMaximize; - - /// - /// toolSignOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool toolSignOut; - - /// - /// windowCustomQuery 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window windowCustomQuery; - - /// - /// WindowAtt 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window WindowAtt; - - /// - /// XmlDataSource1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.XmlDataSource XmlDataSource1; - - /// - /// ProjectZJ 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button ProjectZJ; - - /// - /// ProjectTG 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button ProjectTG; - - /// - /// ProjectJG 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button ProjectJG; - - /// - /// btnCQMS 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnCQMS; - - /// - /// btnHSSE 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnHSSE; - - /// - /// btnJDGL 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnJDGL; - - /// - /// btnHJGL 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnHJGL; - - /// - /// btnCLGL 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnCLGL; - - /// - /// btnTestRun 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnTestRun; - - /// - /// btnPGJSX 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPGJSX; - - /// - /// btnDigitalSite 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnDigitalSite; - - /// - /// btnPDigData 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPDigData; - - /// - /// btnOpinion 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOpinion; - - /// - /// btnDoc 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnDoc; - - /// - /// SimpleForm1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.SimpleForm SimpleForm1; - - /// - /// hfProjectCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hfProjectCode; - - /// - /// hfMonitorPW 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hfMonitorPW; - } +namespace FineUIPro.Web { + + + public partial class indexProject { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// topPanel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel topPanel; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// Button21 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button Button21; + + /// + /// btnHelp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnHelp; + + /// + /// btnPersonal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPersonal; + + /// + /// btnProjectSet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnProjectSet; + + /// + /// Button18 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button Button18; + + /// + /// leftPanel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel leftPanel; + + /// + /// leftPanelToolCollapse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tool leftPanelToolCollapse; + + /// + /// leftPanelToolGear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tool leftPanelToolGear; + + /// + /// btnExpandAll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnExpandAll; + + /// + /// btnCollapseAll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnCollapseAll; + + /// + /// MenuMode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton MenuMode; + + /// + /// MenuModeNormal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuCheckBox MenuModeNormal; + + /// + /// MenuModeCompact 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuCheckBox MenuModeCompact; + + /// + /// MenuModeLarge 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuCheckBox MenuModeLarge; + + /// + /// MenuStyle 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton MenuStyle; + + /// + /// MenuStyleTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuCheckBox MenuStyleTree; + + /// + /// MenuStyleMiniModeTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuCheckBox MenuStyleMiniModeTree; + + /// + /// MenuStylePlainTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuCheckBox MenuStylePlainTree; + + /// + /// MenuLang 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton MenuLang; + + /// + /// MenuLangZHCN 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuCheckBox MenuLangZHCN; + + /// + /// mainTabStrip 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip mainTabStrip; + + /// + /// Tab1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab1; + + /// + /// toolRefresh 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tool toolRefresh; + + /// + /// toolNewWindow 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tool toolNewWindow; + + /// + /// toolMaximize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tool toolMaximize; + + /// + /// toolSignOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tool toolSignOut; + + /// + /// windowCustomQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window windowCustomQuery; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// XmlDataSource1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.XmlDataSource XmlDataSource1; + + /// + /// ProjectZJ 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button ProjectZJ; + + /// + /// ProjectTG 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button ProjectTG; + + /// + /// ProjectJG 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button ProjectJG; + + /// + /// btnCQMS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCQMS; + + /// + /// btnHSSE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnHSSE; + + /// + /// btnJDGL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnJDGL; + + /// + /// btnHJGL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnHJGL; + + /// + /// btnCLGL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCLGL; + + /// + /// btnTestRun 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnTestRun; + + /// + /// btnTransfer 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnTransfer; + + /// + /// btnPGJSX 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPGJSX; + + /// + /// btnDigitalSite 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDigitalSite; + + /// + /// btnPDigData 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPDigData; + + /// + /// btnOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOpinion; + + /// + /// btnDoc 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDoc; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.SimpleForm SimpleForm1; + + /// + /// hfProjectCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hfProjectCode; + + /// + /// hfMonitorPW 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hfMonitorPW; + } } diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index e42f7755..ead8134f 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -2336,6 +2336,36 @@ namespace Model partial void InsertTraining_TrainTestDBItem(Training_TrainTestDBItem instance); partial void UpdateTraining_TrainTestDBItem(Training_TrainTestDBItem instance); partial void DeleteTraining_TrainTestDBItem(Training_TrainTestDBItem instance); + partial void InsertTransfer_Civil_Structure(Transfer_Civil_Structure instance); + partial void UpdateTransfer_Civil_Structure(Transfer_Civil_Structure instance); + partial void DeleteTransfer_Civil_Structure(Transfer_Civil_Structure instance); + partial void InsertTransfer_Electrical(Transfer_Electrical instance); + partial void UpdateTransfer_Electrical(Transfer_Electrical instance); + partial void DeleteTransfer_Electrical(Transfer_Electrical instance); + partial void InsertTransfer_Firefighting(Transfer_Firefighting instance); + partial void UpdateTransfer_Firefighting(Transfer_Firefighting instance); + partial void DeleteTransfer_Firefighting(Transfer_Firefighting instance); + partial void InsertTransfer_HVAC(Transfer_HVAC instance); + partial void UpdateTransfer_HVAC(Transfer_HVAC instance); + partial void DeleteTransfer_HVAC(Transfer_HVAC instance); + partial void InsertTransfer_Instrumentation(Transfer_Instrumentation instance); + partial void UpdateTransfer_Instrumentation(Transfer_Instrumentation instance); + partial void DeleteTransfer_Instrumentation(Transfer_Instrumentation instance); + partial void InsertTransfer_Piping(Transfer_Piping instance); + partial void UpdateTransfer_Piping(Transfer_Piping instance); + partial void DeleteTransfer_Piping(Transfer_Piping instance); + partial void InsertTransfer_Plumbing(Transfer_Plumbing instance); + partial void UpdateTransfer_Plumbing(Transfer_Plumbing instance); + partial void DeleteTransfer_Plumbing(Transfer_Plumbing instance); + partial void InsertTransfer_ProjectSetup(Transfer_ProjectSetup instance); + partial void UpdateTransfer_ProjectSetup(Transfer_ProjectSetup instance); + partial void DeleteTransfer_ProjectSetup(Transfer_ProjectSetup instance); + partial void InsertTransfer_PunchlistFrom(Transfer_PunchlistFrom instance); + partial void UpdateTransfer_PunchlistFrom(Transfer_PunchlistFrom instance); + partial void DeleteTransfer_PunchlistFrom(Transfer_PunchlistFrom instance); + partial void InsertTransfer_Telecom(Transfer_Telecom instance); + partial void UpdateTransfer_Telecom(Transfer_Telecom instance); + partial void DeleteTransfer_Telecom(Transfer_Telecom instance); partial void InsertUnqualified_WorkContact(Unqualified_WorkContact instance); partial void UpdateUnqualified_WorkContact(Unqualified_WorkContact instance); partial void DeleteUnqualified_WorkContact(Unqualified_WorkContact instance); @@ -8683,6 +8713,86 @@ namespace Model } } + public System.Data.Linq.Table Transfer_Civil_Structure + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_Electrical + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_Firefighting + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_HVAC + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_Instrumentation + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_Piping + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_Plumbing + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_ProjectSetup + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_PunchlistFrom + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_Telecom + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Unqualified_WorkContact { get @@ -368016,6 +368126,2906 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Transfer_Civil_Structure")] + public partial class Transfer_Civil_Structure : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _Civil_Structure; + + private string _SystemName; + + private string _Subsystem; + + private string _Test_Package; + + private System.Nullable _Test_Package_START; + + private System.Nullable _Test_Package_FINISH; + + private string _FINAL_Status; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnCivil_StructureChanging(string value); + partial void OnCivil_StructureChanged(); + partial void OnSystemNameChanging(string value); + partial void OnSystemNameChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTest_PackageChanging(string value); + partial void OnTest_PackageChanged(); + partial void OnTest_Package_STARTChanging(System.Nullable value); + partial void OnTest_Package_STARTChanged(); + partial void OnTest_Package_FINISHChanging(System.Nullable value); + partial void OnTest_Package_FINISHChanged(); + partial void OnFINAL_StatusChanging(string value); + partial void OnFINAL_StatusChanged(); + #endregion + + public Transfer_Civil_Structure() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + 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="_Civil_Structure", DbType="NVarChar(50)")] + public string Civil_Structure + { + get + { + return this._Civil_Structure; + } + set + { + if ((this._Civil_Structure != value)) + { + this.OnCivil_StructureChanging(value); + this.SendPropertyChanging(); + this._Civil_Structure = value; + this.SendPropertyChanged("Civil_Structure"); + this.OnCivil_StructureChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemName", DbType="NVarChar(50)")] + public string SystemName + { + get + { + return this._SystemName; + } + set + { + if ((this._SystemName != value)) + { + this.OnSystemNameChanging(value); + this.SendPropertyChanging(); + this._SystemName = value; + this.SendPropertyChanged("SystemName"); + this.OnSystemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package", DbType="NVarChar(50)")] + public string Test_Package + { + get + { + return this._Test_Package; + } + set + { + if ((this._Test_Package != value)) + { + this.OnTest_PackageChanging(value); + this.SendPropertyChanging(); + this._Test_Package = value; + this.SendPropertyChanged("Test_Package"); + this.OnTest_PackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_START", DbType="DateTime")] + public System.Nullable Test_Package_START + { + get + { + return this._Test_Package_START; + } + set + { + if ((this._Test_Package_START != value)) + { + this.OnTest_Package_STARTChanging(value); + this.SendPropertyChanging(); + this._Test_Package_START = value; + this.SendPropertyChanged("Test_Package_START"); + this.OnTest_Package_STARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_FINISH", DbType="DateTime")] + public System.Nullable Test_Package_FINISH + { + get + { + return this._Test_Package_FINISH; + } + set + { + if ((this._Test_Package_FINISH != value)) + { + this.OnTest_Package_FINISHChanging(value); + this.SendPropertyChanging(); + this._Test_Package_FINISH = value; + this.SendPropertyChanged("Test_Package_FINISH"); + this.OnTest_Package_FINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FINAL_Status", DbType="NVarChar(50)")] + public string FINAL_Status + { + get + { + return this._FINAL_Status; + } + set + { + if ((this._FINAL_Status != value)) + { + this.OnFINAL_StatusChanging(value); + this.SendPropertyChanging(); + this._FINAL_Status = value; + this.SendPropertyChanged("FINAL_Status"); + this.OnFINAL_StatusChanged(); + } + } + } + + 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.Transfer_Electrical")] + public partial class Transfer_Electrical : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _ELECTRICAL; + + private string _SystemName; + + private string _Subsystem; + + private string _Test_Package; + + private System.Nullable _Test_Package_START; + + private System.Nullable _Test_Package_FINISH; + + private string _FINAL_Status; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnELECTRICALChanging(string value); + partial void OnELECTRICALChanged(); + partial void OnSystemNameChanging(string value); + partial void OnSystemNameChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTest_PackageChanging(string value); + partial void OnTest_PackageChanged(); + partial void OnTest_Package_STARTChanging(System.Nullable value); + partial void OnTest_Package_STARTChanged(); + partial void OnTest_Package_FINISHChanging(System.Nullable value); + partial void OnTest_Package_FINISHChanged(); + partial void OnFINAL_StatusChanging(string value); + partial void OnFINAL_StatusChanged(); + #endregion + + public Transfer_Electrical() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_ELECTRICAL", DbType="NVarChar(50)")] + public string ELECTRICAL + { + get + { + return this._ELECTRICAL; + } + set + { + if ((this._ELECTRICAL != value)) + { + this.OnELECTRICALChanging(value); + this.SendPropertyChanging(); + this._ELECTRICAL = value; + this.SendPropertyChanged("ELECTRICAL"); + this.OnELECTRICALChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemName", DbType="NVarChar(50)")] + public string SystemName + { + get + { + return this._SystemName; + } + set + { + if ((this._SystemName != value)) + { + this.OnSystemNameChanging(value); + this.SendPropertyChanging(); + this._SystemName = value; + this.SendPropertyChanged("SystemName"); + this.OnSystemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package", DbType="NVarChar(50)")] + public string Test_Package + { + get + { + return this._Test_Package; + } + set + { + if ((this._Test_Package != value)) + { + this.OnTest_PackageChanging(value); + this.SendPropertyChanging(); + this._Test_Package = value; + this.SendPropertyChanged("Test_Package"); + this.OnTest_PackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_START", DbType="DateTime")] + public System.Nullable Test_Package_START + { + get + { + return this._Test_Package_START; + } + set + { + if ((this._Test_Package_START != value)) + { + this.OnTest_Package_STARTChanging(value); + this.SendPropertyChanging(); + this._Test_Package_START = value; + this.SendPropertyChanged("Test_Package_START"); + this.OnTest_Package_STARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_FINISH", DbType="DateTime")] + public System.Nullable Test_Package_FINISH + { + get + { + return this._Test_Package_FINISH; + } + set + { + if ((this._Test_Package_FINISH != value)) + { + this.OnTest_Package_FINISHChanging(value); + this.SendPropertyChanging(); + this._Test_Package_FINISH = value; + this.SendPropertyChanged("Test_Package_FINISH"); + this.OnTest_Package_FINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FINAL_Status", DbType="NVarChar(50)")] + public string FINAL_Status + { + get + { + return this._FINAL_Status; + } + set + { + if ((this._FINAL_Status != value)) + { + this.OnFINAL_StatusChanging(value); + this.SendPropertyChanging(); + this._FINAL_Status = value; + this.SendPropertyChanged("FINAL_Status"); + this.OnFINAL_StatusChanged(); + } + } + } + + 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.Transfer_Firefighting")] + public partial class Transfer_Firefighting : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _Firefighting; + + private string _SystemName; + + private string _Subsystem; + + private string _Test_Package; + + private System.Nullable _Test_Package_START; + + private System.Nullable _Test_Package_FINISH; + + private string _FINAL_Status; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnFirefightingChanging(string value); + partial void OnFirefightingChanged(); + partial void OnSystemNameChanging(string value); + partial void OnSystemNameChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTest_PackageChanging(string value); + partial void OnTest_PackageChanged(); + partial void OnTest_Package_STARTChanging(System.Nullable value); + partial void OnTest_Package_STARTChanged(); + partial void OnTest_Package_FINISHChanging(System.Nullable value); + partial void OnTest_Package_FINISHChanged(); + partial void OnFINAL_StatusChanging(string value); + partial void OnFINAL_StatusChanged(); + #endregion + + public Transfer_Firefighting() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_Firefighting", DbType="NVarChar(50)")] + public string Firefighting + { + get + { + return this._Firefighting; + } + set + { + if ((this._Firefighting != value)) + { + this.OnFirefightingChanging(value); + this.SendPropertyChanging(); + this._Firefighting = value; + this.SendPropertyChanged("Firefighting"); + this.OnFirefightingChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemName", DbType="NVarChar(50)")] + public string SystemName + { + get + { + return this._SystemName; + } + set + { + if ((this._SystemName != value)) + { + this.OnSystemNameChanging(value); + this.SendPropertyChanging(); + this._SystemName = value; + this.SendPropertyChanged("SystemName"); + this.OnSystemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package", DbType="NVarChar(50)")] + public string Test_Package + { + get + { + return this._Test_Package; + } + set + { + if ((this._Test_Package != value)) + { + this.OnTest_PackageChanging(value); + this.SendPropertyChanging(); + this._Test_Package = value; + this.SendPropertyChanged("Test_Package"); + this.OnTest_PackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_START", DbType="DateTime")] + public System.Nullable Test_Package_START + { + get + { + return this._Test_Package_START; + } + set + { + if ((this._Test_Package_START != value)) + { + this.OnTest_Package_STARTChanging(value); + this.SendPropertyChanging(); + this._Test_Package_START = value; + this.SendPropertyChanged("Test_Package_START"); + this.OnTest_Package_STARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_FINISH", DbType="DateTime")] + public System.Nullable Test_Package_FINISH + { + get + { + return this._Test_Package_FINISH; + } + set + { + if ((this._Test_Package_FINISH != value)) + { + this.OnTest_Package_FINISHChanging(value); + this.SendPropertyChanging(); + this._Test_Package_FINISH = value; + this.SendPropertyChanged("Test_Package_FINISH"); + this.OnTest_Package_FINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FINAL_Status", DbType="NVarChar(50)")] + public string FINAL_Status + { + get + { + return this._FINAL_Status; + } + set + { + if ((this._FINAL_Status != value)) + { + this.OnFINAL_StatusChanging(value); + this.SendPropertyChanging(); + this._FINAL_Status = value; + this.SendPropertyChanged("FINAL_Status"); + this.OnFINAL_StatusChanged(); + } + } + } + + 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.Transfer_HVAC")] + public partial class Transfer_HVAC : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _HVAC; + + private string _SystemName; + + private string _Subsystem; + + private string _Test_Package; + + private System.Nullable _Test_Package_START; + + private System.Nullable _Test_Package_FINISH; + + private string _FINAL_Status; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnHVACChanging(string value); + partial void OnHVACChanged(); + partial void OnSystemNameChanging(string value); + partial void OnSystemNameChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTest_PackageChanging(string value); + partial void OnTest_PackageChanged(); + partial void OnTest_Package_STARTChanging(System.Nullable value); + partial void OnTest_Package_STARTChanged(); + partial void OnTest_Package_FINISHChanging(System.Nullable value); + partial void OnTest_Package_FINISHChanged(); + partial void OnFINAL_StatusChanging(string value); + partial void OnFINAL_StatusChanged(); + #endregion + + public Transfer_HVAC() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_HVAC", DbType="NVarChar(50)")] + public string HVAC + { + get + { + return this._HVAC; + } + set + { + if ((this._HVAC != value)) + { + this.OnHVACChanging(value); + this.SendPropertyChanging(); + this._HVAC = value; + this.SendPropertyChanged("HVAC"); + this.OnHVACChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemName", DbType="NVarChar(50)")] + public string SystemName + { + get + { + return this._SystemName; + } + set + { + if ((this._SystemName != value)) + { + this.OnSystemNameChanging(value); + this.SendPropertyChanging(); + this._SystemName = value; + this.SendPropertyChanged("SystemName"); + this.OnSystemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package", DbType="NVarChar(50)")] + public string Test_Package + { + get + { + return this._Test_Package; + } + set + { + if ((this._Test_Package != value)) + { + this.OnTest_PackageChanging(value); + this.SendPropertyChanging(); + this._Test_Package = value; + this.SendPropertyChanged("Test_Package"); + this.OnTest_PackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_START", DbType="DateTime")] + public System.Nullable Test_Package_START + { + get + { + return this._Test_Package_START; + } + set + { + if ((this._Test_Package_START != value)) + { + this.OnTest_Package_STARTChanging(value); + this.SendPropertyChanging(); + this._Test_Package_START = value; + this.SendPropertyChanged("Test_Package_START"); + this.OnTest_Package_STARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_FINISH", DbType="DateTime")] + public System.Nullable Test_Package_FINISH + { + get + { + return this._Test_Package_FINISH; + } + set + { + if ((this._Test_Package_FINISH != value)) + { + this.OnTest_Package_FINISHChanging(value); + this.SendPropertyChanging(); + this._Test_Package_FINISH = value; + this.SendPropertyChanged("Test_Package_FINISH"); + this.OnTest_Package_FINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FINAL_Status", DbType="NVarChar(50)")] + public string FINAL_Status + { + get + { + return this._FINAL_Status; + } + set + { + if ((this._FINAL_Status != value)) + { + this.OnFINAL_StatusChanging(value); + this.SendPropertyChanging(); + this._FINAL_Status = value; + this.SendPropertyChanged("FINAL_Status"); + this.OnFINAL_StatusChanged(); + } + } + } + + 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.Transfer_Instrumentation")] + public partial class Transfer_Instrumentation : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _INSTRUMENTATION; + + private string _SystemName; + + private string _Subsystem; + + private string _Test_Package; + + private System.Nullable _Test_Package_START; + + private System.Nullable _Test_Package_FINISH; + + private string _FINAL_Status; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnINSTRUMENTATIONChanging(string value); + partial void OnINSTRUMENTATIONChanged(); + partial void OnSystemNameChanging(string value); + partial void OnSystemNameChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTest_PackageChanging(string value); + partial void OnTest_PackageChanged(); + partial void OnTest_Package_STARTChanging(System.Nullable value); + partial void OnTest_Package_STARTChanged(); + partial void OnTest_Package_FINISHChanging(System.Nullable value); + partial void OnTest_Package_FINISHChanged(); + partial void OnFINAL_StatusChanging(string value); + partial void OnFINAL_StatusChanged(); + #endregion + + public Transfer_Instrumentation() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_INSTRUMENTATION", DbType="NVarChar(50)")] + public string INSTRUMENTATION + { + get + { + return this._INSTRUMENTATION; + } + set + { + if ((this._INSTRUMENTATION != value)) + { + this.OnINSTRUMENTATIONChanging(value); + this.SendPropertyChanging(); + this._INSTRUMENTATION = value; + this.SendPropertyChanged("INSTRUMENTATION"); + this.OnINSTRUMENTATIONChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemName", DbType="NVarChar(50)")] + public string SystemName + { + get + { + return this._SystemName; + } + set + { + if ((this._SystemName != value)) + { + this.OnSystemNameChanging(value); + this.SendPropertyChanging(); + this._SystemName = value; + this.SendPropertyChanged("SystemName"); + this.OnSystemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package", DbType="NVarChar(50)")] + public string Test_Package + { + get + { + return this._Test_Package; + } + set + { + if ((this._Test_Package != value)) + { + this.OnTest_PackageChanging(value); + this.SendPropertyChanging(); + this._Test_Package = value; + this.SendPropertyChanged("Test_Package"); + this.OnTest_PackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_START", DbType="DateTime")] + public System.Nullable Test_Package_START + { + get + { + return this._Test_Package_START; + } + set + { + if ((this._Test_Package_START != value)) + { + this.OnTest_Package_STARTChanging(value); + this.SendPropertyChanging(); + this._Test_Package_START = value; + this.SendPropertyChanged("Test_Package_START"); + this.OnTest_Package_STARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_FINISH", DbType="DateTime")] + public System.Nullable Test_Package_FINISH + { + get + { + return this._Test_Package_FINISH; + } + set + { + if ((this._Test_Package_FINISH != value)) + { + this.OnTest_Package_FINISHChanging(value); + this.SendPropertyChanging(); + this._Test_Package_FINISH = value; + this.SendPropertyChanged("Test_Package_FINISH"); + this.OnTest_Package_FINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FINAL_Status", DbType="NVarChar(50)")] + public string FINAL_Status + { + get + { + return this._FINAL_Status; + } + set + { + if ((this._FINAL_Status != value)) + { + this.OnFINAL_StatusChanging(value); + this.SendPropertyChanging(); + this._FINAL_Status = value; + this.SendPropertyChanged("FINAL_Status"); + this.OnFINAL_StatusChanged(); + } + } + } + + 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.Transfer_Piping")] + public partial class Transfer_Piping : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _PIPINGLINENUMBER; + + private string _SYSTEM; + + private string _Subsystem; + + private string _TestPackage; + + private System.Nullable _TestPackageSTART; + + private System.Nullable _TestPackageFINISH; + + private string _FINALStatus; + + private string _PreTestFINISHED; + + private string _FinalTestFINISHED; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnPIPINGLINENUMBERChanging(string value); + partial void OnPIPINGLINENUMBERChanged(); + partial void OnSYSTEMChanging(string value); + partial void OnSYSTEMChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTestPackageChanging(string value); + partial void OnTestPackageChanged(); + partial void OnTestPackageSTARTChanging(System.Nullable value); + partial void OnTestPackageSTARTChanged(); + partial void OnTestPackageFINISHChanging(System.Nullable value); + partial void OnTestPackageFINISHChanged(); + partial void OnFINALStatusChanging(string value); + partial void OnFINALStatusChanged(); + partial void OnPreTestFINISHEDChanging(string value); + partial void OnPreTestFINISHEDChanged(); + partial void OnFinalTestFINISHEDChanging(string value); + partial void OnFinalTestFINISHEDChanged(); + #endregion + + public Transfer_Piping() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_PIPINGLINENUMBER", DbType="NVarChar(50)")] + public string PIPINGLINENUMBER + { + get + { + return this._PIPINGLINENUMBER; + } + set + { + if ((this._PIPINGLINENUMBER != value)) + { + this.OnPIPINGLINENUMBERChanging(value); + this.SendPropertyChanging(); + this._PIPINGLINENUMBER = value; + this.SendPropertyChanged("PIPINGLINENUMBER"); + this.OnPIPINGLINENUMBERChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SYSTEM", DbType="NVarChar(50)")] + public string SYSTEM + { + get + { + return this._SYSTEM; + } + set + { + if ((this._SYSTEM != value)) + { + this.OnSYSTEMChanging(value); + this.SendPropertyChanging(); + this._SYSTEM = value; + this.SendPropertyChanged("SYSTEM"); + this.OnSYSTEMChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackage", DbType="NVarChar(50)")] + public string TestPackage + { + get + { + return this._TestPackage; + } + set + { + if ((this._TestPackage != value)) + { + this.OnTestPackageChanging(value); + this.SendPropertyChanging(); + this._TestPackage = value; + this.SendPropertyChanged("TestPackage"); + this.OnTestPackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackageSTART", DbType="DateTime")] + public System.Nullable TestPackageSTART + { + get + { + return this._TestPackageSTART; + } + set + { + if ((this._TestPackageSTART != value)) + { + this.OnTestPackageSTARTChanging(value); + this.SendPropertyChanging(); + this._TestPackageSTART = value; + this.SendPropertyChanged("TestPackageSTART"); + this.OnTestPackageSTARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackageFINISH", DbType="DateTime")] + public System.Nullable TestPackageFINISH + { + get + { + return this._TestPackageFINISH; + } + set + { + if ((this._TestPackageFINISH != value)) + { + this.OnTestPackageFINISHChanging(value); + this.SendPropertyChanging(); + this._TestPackageFINISH = value; + this.SendPropertyChanged("TestPackageFINISH"); + this.OnTestPackageFINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FINALStatus", DbType="NVarChar(50)")] + public string FINALStatus + { + get + { + return this._FINALStatus; + } + set + { + if ((this._FINALStatus != value)) + { + this.OnFINALStatusChanging(value); + this.SendPropertyChanging(); + this._FINALStatus = value; + this.SendPropertyChanged("FINALStatus"); + this.OnFINALStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PreTestFINISHED", DbType="NVarChar(50)")] + public string PreTestFINISHED + { + get + { + return this._PreTestFINISHED; + } + set + { + if ((this._PreTestFINISHED != value)) + { + this.OnPreTestFINISHEDChanging(value); + this.SendPropertyChanging(); + this._PreTestFINISHED = value; + this.SendPropertyChanged("PreTestFINISHED"); + this.OnPreTestFINISHEDChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FinalTestFINISHED", DbType="NVarChar(50)")] + public string FinalTestFINISHED + { + get + { + return this._FinalTestFINISHED; + } + set + { + if ((this._FinalTestFINISHED != value)) + { + this.OnFinalTestFINISHEDChanging(value); + this.SendPropertyChanging(); + this._FinalTestFINISHED = value; + this.SendPropertyChanged("FinalTestFINISHED"); + this.OnFinalTestFINISHEDChanged(); + } + } + } + + 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.Transfer_Plumbing")] + public partial class Transfer_Plumbing : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _Plumbing; + + private string _SystemName; + + private string _Subsystem; + + private string _Test_Package; + + private System.Nullable _Test_Package_START; + + private System.Nullable _Test_Package_FINISH; + + private string _FINAL_Status; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnPlumbingChanging(string value); + partial void OnPlumbingChanged(); + partial void OnSystemNameChanging(string value); + partial void OnSystemNameChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTest_PackageChanging(string value); + partial void OnTest_PackageChanged(); + partial void OnTest_Package_STARTChanging(System.Nullable value); + partial void OnTest_Package_STARTChanged(); + partial void OnTest_Package_FINISHChanging(System.Nullable value); + partial void OnTest_Package_FINISHChanged(); + partial void OnFINAL_StatusChanging(string value); + partial void OnFINAL_StatusChanged(); + #endregion + + public Transfer_Plumbing() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_Plumbing", DbType="NVarChar(50)")] + public string Plumbing + { + get + { + return this._Plumbing; + } + set + { + if ((this._Plumbing != value)) + { + this.OnPlumbingChanging(value); + this.SendPropertyChanging(); + this._Plumbing = value; + this.SendPropertyChanged("Plumbing"); + this.OnPlumbingChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemName", DbType="NVarChar(50)")] + public string SystemName + { + get + { + return this._SystemName; + } + set + { + if ((this._SystemName != value)) + { + this.OnSystemNameChanging(value); + this.SendPropertyChanging(); + this._SystemName = value; + this.SendPropertyChanged("SystemName"); + this.OnSystemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package", DbType="NVarChar(50)")] + public string Test_Package + { + get + { + return this._Test_Package; + } + set + { + if ((this._Test_Package != value)) + { + this.OnTest_PackageChanging(value); + this.SendPropertyChanging(); + this._Test_Package = value; + this.SendPropertyChanged("Test_Package"); + this.OnTest_PackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_START", DbType="DateTime")] + public System.Nullable Test_Package_START + { + get + { + return this._Test_Package_START; + } + set + { + if ((this._Test_Package_START != value)) + { + this.OnTest_Package_STARTChanging(value); + this.SendPropertyChanging(); + this._Test_Package_START = value; + this.SendPropertyChanged("Test_Package_START"); + this.OnTest_Package_STARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_FINISH", DbType="DateTime")] + public System.Nullable Test_Package_FINISH + { + get + { + return this._Test_Package_FINISH; + } + set + { + if ((this._Test_Package_FINISH != value)) + { + this.OnTest_Package_FINISHChanging(value); + this.SendPropertyChanging(); + this._Test_Package_FINISH = value; + this.SendPropertyChanged("Test_Package_FINISH"); + this.OnTest_Package_FINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FINAL_Status", DbType="NVarChar(50)")] + public string FINAL_Status + { + get + { + return this._FINAL_Status; + } + set + { + if ((this._FINAL_Status != value)) + { + this.OnFINAL_StatusChanging(value); + this.SendPropertyChanging(); + this._FINAL_Status = value; + this.SendPropertyChanged("FINAL_Status"); + this.OnFINAL_StatusChanged(); + } + } + } + + 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.Transfer_ProjectSetup")] + public partial class Transfer_ProjectSetup : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _SN; + + private string _PlantNo; + + private string _PlantName; + + private string _CommissioningSystem; + + private string _CommissioningCodeDescription; + + private string _SubCommissioningSystem; + + private string _SubCommissioningCodeDescription; + + private string _DescriptionArea; + + private string _TurnoverSystemSequenceNumber; + + private string _Description; + + private string _TurnoverCode; + + private string _TurnoverDescription; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnSNChanging(string value); + partial void OnSNChanged(); + partial void OnPlantNoChanging(string value); + partial void OnPlantNoChanged(); + partial void OnPlantNameChanging(string value); + partial void OnPlantNameChanged(); + partial void OnCommissioningSystemChanging(string value); + partial void OnCommissioningSystemChanged(); + partial void OnCommissioningCodeDescriptionChanging(string value); + partial void OnCommissioningCodeDescriptionChanged(); + partial void OnSubCommissioningSystemChanging(string value); + partial void OnSubCommissioningSystemChanged(); + partial void OnSubCommissioningCodeDescriptionChanging(string value); + partial void OnSubCommissioningCodeDescriptionChanged(); + partial void OnDescriptionAreaChanging(string value); + partial void OnDescriptionAreaChanged(); + partial void OnTurnoverSystemSequenceNumberChanging(string value); + partial void OnTurnoverSystemSequenceNumberChanged(); + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + partial void OnTurnoverCodeChanging(string value); + partial void OnTurnoverCodeChanged(); + partial void OnTurnoverDescriptionChanging(string value); + partial void OnTurnoverDescriptionChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Transfer_ProjectSetup() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_SN", DbType="NVarChar(50)")] + public string SN + { + get + { + return this._SN; + } + set + { + if ((this._SN != value)) + { + this.OnSNChanging(value); + this.SendPropertyChanging(); + this._SN = value; + this.SendPropertyChanged("SN"); + this.OnSNChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlantNo", DbType="NVarChar(50)")] + public string PlantNo + { + get + { + return this._PlantNo; + } + set + { + if ((this._PlantNo != value)) + { + this.OnPlantNoChanging(value); + this.SendPropertyChanging(); + this._PlantNo = value; + this.SendPropertyChanged("PlantNo"); + this.OnPlantNoChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlantName", DbType="NVarChar(200)")] + public string PlantName + { + get + { + return this._PlantName; + } + set + { + if ((this._PlantName != value)) + { + this.OnPlantNameChanging(value); + this.SendPropertyChanging(); + this._PlantName = value; + this.SendPropertyChanged("PlantName"); + this.OnPlantNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CommissioningSystem", DbType="NVarChar(50)")] + public string CommissioningSystem + { + get + { + return this._CommissioningSystem; + } + set + { + if ((this._CommissioningSystem != value)) + { + this.OnCommissioningSystemChanging(value); + this.SendPropertyChanging(); + this._CommissioningSystem = value; + this.SendPropertyChanged("CommissioningSystem"); + this.OnCommissioningSystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CommissioningCodeDescription", DbType="NVarChar(50)")] + public string CommissioningCodeDescription + { + get + { + return this._CommissioningCodeDescription; + } + set + { + if ((this._CommissioningCodeDescription != value)) + { + this.OnCommissioningCodeDescriptionChanging(value); + this.SendPropertyChanging(); + this._CommissioningCodeDescription = value; + this.SendPropertyChanged("CommissioningCodeDescription"); + this.OnCommissioningCodeDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubCommissioningSystem", DbType="NVarChar(50)")] + public string SubCommissioningSystem + { + get + { + return this._SubCommissioningSystem; + } + set + { + if ((this._SubCommissioningSystem != value)) + { + this.OnSubCommissioningSystemChanging(value); + this.SendPropertyChanging(); + this._SubCommissioningSystem = value; + this.SendPropertyChanged("SubCommissioningSystem"); + this.OnSubCommissioningSystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubCommissioningCodeDescription", DbType="NVarChar(50)")] + public string SubCommissioningCodeDescription + { + get + { + return this._SubCommissioningCodeDescription; + } + set + { + if ((this._SubCommissioningCodeDescription != value)) + { + this.OnSubCommissioningCodeDescriptionChanging(value); + this.SendPropertyChanging(); + this._SubCommissioningCodeDescription = value; + this.SendPropertyChanged("SubCommissioningCodeDescription"); + this.OnSubCommissioningCodeDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DescriptionArea", DbType="NVarChar(50)")] + public string DescriptionArea + { + get + { + return this._DescriptionArea; + } + set + { + if ((this._DescriptionArea != value)) + { + this.OnDescriptionAreaChanging(value); + this.SendPropertyChanging(); + this._DescriptionArea = value; + this.SendPropertyChanged("DescriptionArea"); + this.OnDescriptionAreaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TurnoverSystemSequenceNumber", DbType="NVarChar(50)")] + public string TurnoverSystemSequenceNumber + { + get + { + return this._TurnoverSystemSequenceNumber; + } + set + { + if ((this._TurnoverSystemSequenceNumber != value)) + { + this.OnTurnoverSystemSequenceNumberChanging(value); + this.SendPropertyChanging(); + this._TurnoverSystemSequenceNumber = value; + this.SendPropertyChanged("TurnoverSystemSequenceNumber"); + this.OnTurnoverSystemSequenceNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(50)")] + public string Description + { + get + { + return this._Description; + } + set + { + if ((this._Description != value)) + { + this.OnDescriptionChanging(value); + this.SendPropertyChanging(); + this._Description = value; + this.SendPropertyChanged("Description"); + this.OnDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TurnoverCode", DbType="NVarChar(50)")] + public string TurnoverCode + { + get + { + return this._TurnoverCode; + } + set + { + if ((this._TurnoverCode != value)) + { + this.OnTurnoverCodeChanging(value); + this.SendPropertyChanging(); + this._TurnoverCode = value; + this.SendPropertyChanged("TurnoverCode"); + this.OnTurnoverCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TurnoverDescription", DbType="NVarChar(50)")] + public string TurnoverDescription + { + get + { + return this._TurnoverDescription; + } + set + { + if ((this._TurnoverDescription != value)) + { + this.OnTurnoverDescriptionChanging(value); + this.SendPropertyChanging(); + this._TurnoverDescription = value; + this.SendPropertyChanged("TurnoverDescription"); + this.OnTurnoverDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + 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.Transfer_PunchlistFrom")] + public partial class Transfer_PunchlistFrom : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _Item_No; + + private string _Punch_No; + + private string _SystemName; + + private string _Subsystem; + + private string _Test_Package; + + private string _Discipline; + + private string _DESCRIPTION; + + private string _Identified; + + private string _Category; + + private System.Nullable _PUNCH_ITEM_FINISH_DATE; + + private string _Action_By; + + private string _Required_By; + + private string _PUNCH_ITEM_STATUS; + + private string _Comments; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnItem_NoChanging(string value); + partial void OnItem_NoChanged(); + partial void OnPunch_NoChanging(string value); + partial void OnPunch_NoChanged(); + partial void OnSystemNameChanging(string value); + partial void OnSystemNameChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTest_PackageChanging(string value); + partial void OnTest_PackageChanged(); + partial void OnDisciplineChanging(string value); + partial void OnDisciplineChanged(); + partial void OnDESCRIPTIONChanging(string value); + partial void OnDESCRIPTIONChanged(); + partial void OnIdentifiedChanging(string value); + partial void OnIdentifiedChanged(); + partial void OnCategoryChanging(string value); + partial void OnCategoryChanged(); + partial void OnPUNCH_ITEM_FINISH_DATEChanging(System.Nullable value); + partial void OnPUNCH_ITEM_FINISH_DATEChanged(); + partial void OnAction_ByChanging(string value); + partial void OnAction_ByChanged(); + partial void OnRequired_ByChanging(string value); + partial void OnRequired_ByChanged(); + partial void OnPUNCH_ITEM_STATUSChanging(string value); + partial void OnPUNCH_ITEM_STATUSChanged(); + partial void OnCommentsChanging(string value); + partial void OnCommentsChanged(); + #endregion + + public Transfer_PunchlistFrom() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_Item_No", DbType="NVarChar(50)")] + public string Item_No + { + get + { + return this._Item_No; + } + set + { + if ((this._Item_No != value)) + { + this.OnItem_NoChanging(value); + this.SendPropertyChanging(); + this._Item_No = value; + this.SendPropertyChanged("Item_No"); + this.OnItem_NoChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Punch_No", DbType="NVarChar(50)")] + public string Punch_No + { + get + { + return this._Punch_No; + } + set + { + if ((this._Punch_No != value)) + { + this.OnPunch_NoChanging(value); + this.SendPropertyChanging(); + this._Punch_No = value; + this.SendPropertyChanged("Punch_No"); + this.OnPunch_NoChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemName", DbType="NVarChar(50)")] + public string SystemName + { + get + { + return this._SystemName; + } + set + { + if ((this._SystemName != value)) + { + this.OnSystemNameChanging(value); + this.SendPropertyChanging(); + this._SystemName = value; + this.SendPropertyChanged("SystemName"); + this.OnSystemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package", DbType="NVarChar(50)")] + public string Test_Package + { + get + { + return this._Test_Package; + } + set + { + if ((this._Test_Package != value)) + { + this.OnTest_PackageChanging(value); + this.SendPropertyChanging(); + this._Test_Package = value; + this.SendPropertyChanged("Test_Package"); + this.OnTest_PackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Discipline", DbType="NVarChar(50)")] + public string Discipline + { + get + { + return this._Discipline; + } + set + { + if ((this._Discipline != value)) + { + this.OnDisciplineChanging(value); + this.SendPropertyChanging(); + this._Discipline = value; + this.SendPropertyChanged("Discipline"); + this.OnDisciplineChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DESCRIPTION", DbType="NVarChar(50)")] + public string DESCRIPTION + { + get + { + return this._DESCRIPTION; + } + set + { + if ((this._DESCRIPTION != value)) + { + this.OnDESCRIPTIONChanging(value); + this.SendPropertyChanging(); + this._DESCRIPTION = value; + this.SendPropertyChanged("DESCRIPTION"); + this.OnDESCRIPTIONChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Identified", DbType="NVarChar(50)")] + public string Identified + { + get + { + return this._Identified; + } + set + { + if ((this._Identified != value)) + { + this.OnIdentifiedChanging(value); + this.SendPropertyChanging(); + this._Identified = value; + this.SendPropertyChanged("Identified"); + this.OnIdentifiedChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Category", DbType="NVarChar(50)")] + public string Category + { + get + { + return this._Category; + } + set + { + if ((this._Category != value)) + { + this.OnCategoryChanging(value); + this.SendPropertyChanging(); + this._Category = value; + this.SendPropertyChanged("Category"); + this.OnCategoryChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PUNCH_ITEM_FINISH_DATE", DbType="DateTime")] + public System.Nullable PUNCH_ITEM_FINISH_DATE + { + get + { + return this._PUNCH_ITEM_FINISH_DATE; + } + set + { + if ((this._PUNCH_ITEM_FINISH_DATE != value)) + { + this.OnPUNCH_ITEM_FINISH_DATEChanging(value); + this.SendPropertyChanging(); + this._PUNCH_ITEM_FINISH_DATE = value; + this.SendPropertyChanged("PUNCH_ITEM_FINISH_DATE"); + this.OnPUNCH_ITEM_FINISH_DATEChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Action_By", DbType="NVarChar(50)")] + public string Action_By + { + get + { + return this._Action_By; + } + set + { + if ((this._Action_By != value)) + { + this.OnAction_ByChanging(value); + this.SendPropertyChanging(); + this._Action_By = value; + this.SendPropertyChanged("Action_By"); + this.OnAction_ByChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Required_By", DbType="NVarChar(50)")] + public string Required_By + { + get + { + return this._Required_By; + } + set + { + if ((this._Required_By != value)) + { + this.OnRequired_ByChanging(value); + this.SendPropertyChanging(); + this._Required_By = value; + this.SendPropertyChanged("Required_By"); + this.OnRequired_ByChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PUNCH_ITEM_STATUS", DbType="NVarChar(50)")] + public string PUNCH_ITEM_STATUS + { + get + { + return this._PUNCH_ITEM_STATUS; + } + set + { + if ((this._PUNCH_ITEM_STATUS != value)) + { + this.OnPUNCH_ITEM_STATUSChanging(value); + this.SendPropertyChanging(); + this._PUNCH_ITEM_STATUS = value; + this.SendPropertyChanged("PUNCH_ITEM_STATUS"); + this.OnPUNCH_ITEM_STATUSChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Comments", DbType="NVarChar(50)")] + public string Comments + { + get + { + return this._Comments; + } + set + { + if ((this._Comments != value)) + { + this.OnCommentsChanging(value); + this.SendPropertyChanging(); + this._Comments = value; + this.SendPropertyChanged("Comments"); + this.OnCommentsChanged(); + } + } + } + + 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.Transfer_Telecom")] + public partial class Transfer_Telecom : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _Telecom; + + private string _SystemName; + + private string _Subsystem; + + private string _Test_Package; + + private System.Nullable _Test_Package_START; + + private System.Nullable _Test_Package_FINISH; + + private string _FINAL_Status; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnTelecomChanging(string value); + partial void OnTelecomChanged(); + partial void OnSystemNameChanging(string value); + partial void OnSystemNameChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTest_PackageChanging(string value); + partial void OnTest_PackageChanged(); + partial void OnTest_Package_STARTChanging(System.Nullable value); + partial void OnTest_Package_STARTChanged(); + partial void OnTest_Package_FINISHChanging(System.Nullable value); + partial void OnTest_Package_FINISHChanged(); + partial void OnFINAL_StatusChanging(string value); + partial void OnFINAL_StatusChanged(); + #endregion + + public Transfer_Telecom() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [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="_Telecom", DbType="NVarChar(50)")] + public string Telecom + { + get + { + return this._Telecom; + } + set + { + if ((this._Telecom != value)) + { + this.OnTelecomChanging(value); + this.SendPropertyChanging(); + this._Telecom = value; + this.SendPropertyChanged("Telecom"); + this.OnTelecomChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemName", DbType="NVarChar(50)")] + public string SystemName + { + get + { + return this._SystemName; + } + set + { + if ((this._SystemName != value)) + { + this.OnSystemNameChanging(value); + this.SendPropertyChanging(); + this._SystemName = value; + this.SendPropertyChanged("SystemName"); + this.OnSystemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package", DbType="NVarChar(50)")] + public string Test_Package + { + get + { + return this._Test_Package; + } + set + { + if ((this._Test_Package != value)) + { + this.OnTest_PackageChanging(value); + this.SendPropertyChanging(); + this._Test_Package = value; + this.SendPropertyChanged("Test_Package"); + this.OnTest_PackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_START", DbType="DateTime")] + public System.Nullable Test_Package_START + { + get + { + return this._Test_Package_START; + } + set + { + if ((this._Test_Package_START != value)) + { + this.OnTest_Package_STARTChanging(value); + this.SendPropertyChanging(); + this._Test_Package_START = value; + this.SendPropertyChanged("Test_Package_START"); + this.OnTest_Package_STARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Test_Package_FINISH", DbType="DateTime")] + public System.Nullable Test_Package_FINISH + { + get + { + return this._Test_Package_FINISH; + } + set + { + if ((this._Test_Package_FINISH != value)) + { + this.OnTest_Package_FINISHChanging(value); + this.SendPropertyChanging(); + this._Test_Package_FINISH = value; + this.SendPropertyChanged("Test_Package_FINISH"); + this.OnTest_Package_FINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FINAL_Status", DbType="NVarChar(50)")] + public string FINAL_Status + { + get + { + return this._FINAL_Status; + } + set + { + if ((this._FINAL_Status != value)) + { + this.OnFINAL_StatusChanging(value); + this.SendPropertyChanging(); + this._FINAL_Status = value; + this.SendPropertyChanged("FINAL_Status"); + this.OnFINAL_StatusChanged(); + } + } + } + + 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.Unqualified_WorkContact")] public partial class Unqualified_WorkContact : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SGGL/SgManager.AI/SgManager.AI.csproj b/SGGL/SgManager.AI/SgManager.AI.csproj index 417aa6e4..bbe7f573 100644 --- a/SGGL/SgManager.AI/SgManager.AI.csproj +++ b/SGGL/SgManager.AI/SgManager.AI.csproj @@ -34,9 +34,8 @@ ..\packages\Baidu.AI.4.15.9\lib\net45\AipSdk.dll - - False - bin\Debug\AOP.Common.dll + + ..\..\..\SGGL_CWCEC\SGGL\SgManager.AI\bin\Debug\AOP.Common.dll ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll