This commit is contained in:
2023-06-26 17:30:18 +08:00
90 changed files with 4096 additions and 156 deletions
Binary file not shown.
@@ -0,0 +1,196 @@
UPDATE Sys_Menu SET Url='SmartSite/EquipmentManage.aspx?Type=D' WHERE MenuId='B972AE90-D40C-44E0-9A90-7B47B2A3399B'
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('641B763D-0C0D-4E52-8803-2E5743328A1F','B972AE90-D40C-44E0-9A90-7B47B2A3399B','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('DDE12996-0920-4BE9-A8EB-EB9CB1C7FB2F','B972AE90-D40C-44E0-9A90-7B47B2A3399B','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('8DD3B631-750C-4E0D-AAE0-0B05586C3490','B972AE90-D40C-44E0-9A90-7B47B2A3399B','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('EC0C885F-163C-4D3B-A301-8FF2C291F8D1','B972AE90-D40C-44E0-9A90-7B47B2A3399B','保存',4)
GO
UPDATE Sys_Menu SET Url='SmartSite/EquipmentManage.aspx?Type=M' WHERE MenuId='908325CA-A50A-456D-8A7F-E193C629F2F9'
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('26FC28FB-C3F2-44B5-8CF6-8AF2E153F2DF','908325CA-A50A-456D-8A7F-E193C629F2F9','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('D5D95624-334C-489A-AE3B-A746D024C5A5','908325CA-A50A-456D-8A7F-E193C629F2F9','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('9CB845F6-42BA-4297-91BD-1233CDB97112','908325CA-A50A-456D-8A7F-E193C629F2F9','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('37C274EC-A2E2-4517-AB33-EDC4C36AC43D','908325CA-A50A-456D-8A7F-E193C629F2F9','保存',4)
GO
UPDATE Sys_Menu SET Url='SmartSite/EquipmentManage.aspx?Type=E' WHERE MenuId='E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E'
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('78439D40-B0DC-4BE2-B361-DF3B77F4D0E8','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('3D0BC556-300A-4558-BFE8-4ABFF2A66473','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('373C9D29-445D-4973-B6F6-19621D5BD4B5','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('A07E64A2-4318-4E26-8F84-5A086D72EE9C','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','保存',4)
GO
CREATE TABLE [dbo].[SmartSite_Equipment](
[EquipmentId] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[Type] [varchar](2) NULL,
[EquipmentName] [nvarchar](200) NULL,
[EquipmentModel] [nvarchar](200) NULL,
[Number] [int] NULL,
[RunningState] [nvarchar](50) NULL,
[Supplier] [nvarchar](500) NULL,
[SupplierMan] [nvarchar](50) NULL,
[SupplierTel] [nvarchar](50) NULL,
CONSTRAINT [PK_SmartSite_Equipment] PRIMARY KEY CLUSTERED
(
[EquipmentId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SmartSite_Equipment] WITH CHECK ADD CONSTRAINT [FK_SmartSite_Equipment_Base_Project] FOREIGN KEY([ProjectId])
REFERENCES [dbo].[Base_Project] ([ProjectId])
GO
ALTER TABLE [dbo].[SmartSite_Equipment] CHECK CONSTRAINT [FK_SmartSite_Equipment_Base_Project]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设备ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'EquipmentId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'ProjectId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型(D门禁M视频监控E环境监测)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'Type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设备名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'EquipmentName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设备型号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'EquipmentModel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'运行状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'RunningState'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供货商' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'Supplier'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'售后联系人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'SupplierMan'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'售后联系电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'SupplierTel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设备管理表(智慧工地)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment'
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('C126F42A-09B0-43D1-8DCF-9EA049B800A8','门禁设备管理','SmartSite/SoftManage.aspx?Type=D',10,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('C1945F59-AD5E-4301-9538-67511D0EB0EC','C126F42A-09B0-43D1-8DCF-9EA049B800A8','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('68776A89-A250-4188-99B2-9CD1B3FB7E28','C126F42A-09B0-43D1-8DCF-9EA049B800A8','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('79E96D30-B45F-47F5-8F1C-5E3FF009783C','C126F42A-09B0-43D1-8DCF-9EA049B800A8','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('066CA266-027D-4E74-8F7C-8AFB4F4C9602','C126F42A-09B0-43D1-8DCF-9EA049B800A8','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('9F95F836-E10C-4EFD-B436-5C9D1658BAED','监控设备管理','SmartSite/SoftManage.aspx?Type=M',20,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('49057FC3-538A-4142-B192-D305B0CEF4A2','9F95F836-E10C-4EFD-B436-5C9D1658BAED','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('379D1D1F-CDC1-4C6D-AD3A-CE2186888C0A','9F95F836-E10C-4EFD-B436-5C9D1658BAED','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('AE6803C9-6923-481B-9CE5-AE85AC06B345','9F95F836-E10C-4EFD-B436-5C9D1658BAED','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('08F57065-5251-4EF4-B7D5-EA5C04056BB0','9F95F836-E10C-4EFD-B436-5C9D1658BAED','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('834EE5EA-3DDA-49E1-A951-825392893E85','环境设备管理','SmartSite/SoftManage.aspx?Type=E',30,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('23EC254E-F074-426B-B105-3AB919416CE1','834EE5EA-3DDA-49E1-A951-825392893E85','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('6E414A46-C07B-4780-9D83-1B1993A87229','834EE5EA-3DDA-49E1-A951-825392893E85','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('C6A9D2D7-6A56-4508-9A3E-90986F57C125','834EE5EA-3DDA-49E1-A951-825392893E85','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('AC37EA29-3A1B-4272-9994-ED7AC19970B7','834EE5EA-3DDA-49E1-A951-825392893E85','保存',4)
GO
CREATE TABLE [dbo].[SmartSite_EquipmentSoft](
[EquipmentSoftId] [nvarchar](50) NOT NULL,
[EquipmentId] [nvarchar](50) NULL,
[ProjectId] [nvarchar](50) NULL,
[Type] [varchar](2) NULL,
[EquipmentSoftName] [nvarchar](200) NULL,
[EquipmentSoftModel] [nvarchar](200) NULL,
[Number] [int] NULL,
[RunningState] [nvarchar](50) NULL,
[Supplier] [nvarchar](500) NULL,
[SupplierMan] [nvarchar](50) NULL,
[SupplierTel] [nvarchar](50) NULL,
CONSTRAINT [PK_SmartSite_EquipmentSoft] PRIMARY KEY CLUSTERED
(
[EquipmentSoftId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SmartSite_EquipmentSoft] WITH CHECK ADD CONSTRAINT [FK_SmartSite_EquipmentSoft_Base_Project] FOREIGN KEY([ProjectId])
REFERENCES [dbo].[Base_Project] ([ProjectId])
GO
ALTER TABLE [dbo].[SmartSite_EquipmentSoft] CHECK CONSTRAINT [FK_SmartSite_EquipmentSoft_Base_Project]
GO
ALTER TABLE [dbo].[SmartSite_EquipmentSoft] WITH CHECK ADD CONSTRAINT [FK_SmartSite_EquipmentSoft_SmartSite_Equipment] FOREIGN KEY([EquipmentId])
REFERENCES [dbo].[SmartSite_Equipment] ([EquipmentId])
GO
ALTER TABLE [dbo].[SmartSite_EquipmentSoft] CHECK CONSTRAINT [FK_SmartSite_EquipmentSoft_SmartSite_Equipment]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设备ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'EquipmentSoftId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'EquipmentId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'ProjectId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型(1门禁2视频监控3环境监测)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'Type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'EquipmentSoftName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件版本' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'EquipmentSoftModel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'运行状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'RunningState'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供货商' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'Supplier'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'售后联系人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'SupplierMan'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'售后联系电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'SupplierTel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设备软件管理表(智慧工地)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft'
GO
@@ -0,0 +1,5 @@
--ADD BY YangHongwei 2023-06-16
1、新增设备管理(门禁、监控、环境监测)页面
2、新增设备软件管理(门禁、监控、环境监测)页面
3、优化费用管理模块。
--END
@@ -14,20 +14,91 @@ GO
VALUES('15F04E9B-5893-4401-B864-BCDF7D67D13D','设备管理','',10,'C2C9C4BD-B10B-46AD-9468-66EF063517CF','Menu_SmartSite',1,0,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('B972AE90-D40C-44E0-9A90-7B47B2A3399B','门禁设备管理','',10,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1)
VALUES('B972AE90-D40C-44E0-9A90-7B47B2A3399B','门禁设备管理','SmartSite/EquipmentManage.aspx?Type=D',10,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('641B763D-0C0D-4E52-8803-2E5743328A1F','B972AE90-D40C-44E0-9A90-7B47B2A3399B','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('DDE12996-0920-4BE9-A8EB-EB9CB1C7FB2F','B972AE90-D40C-44E0-9A90-7B47B2A3399B','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('8DD3B631-750C-4E0D-AAE0-0B05586C3490','B972AE90-D40C-44E0-9A90-7B47B2A3399B','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('EC0C885F-163C-4D3B-A301-8FF2C291F8D1','B972AE90-D40C-44E0-9A90-7B47B2A3399B','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('908325CA-A50A-456D-8A7F-E193C629F2F9','监控设备管理','',20,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1)
VALUES('908325CA-A50A-456D-8A7F-E193C629F2F9','监控设备管理','SmartSite/EquipmentManage.aspx?Type=M',20,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('26FC28FB-C3F2-44B5-8CF6-8AF2E153F2DF','908325CA-A50A-456D-8A7F-E193C629F2F9','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('D5D95624-334C-489A-AE3B-A746D024C5A5','908325CA-A50A-456D-8A7F-E193C629F2F9','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('9CB845F6-42BA-4297-91BD-1233CDB97112','908325CA-A50A-456D-8A7F-E193C629F2F9','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('37C274EC-A2E2-4517-AB33-EDC4C36AC43D','908325CA-A50A-456D-8A7F-E193C629F2F9','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','环境设备管理','',30,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1)
VALUES('E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','环境设备管理','SmartSite/EquipmentManage.aspx?Type=E',30,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('78439D40-B0DC-4BE2-B361-DF3B77F4D0E8','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('3D0BC556-300A-4558-BFE8-4ABFF2A66473','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('373C9D29-445D-4973-B6F6-19621D5BD4B5','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('A07E64A2-4318-4E26-8F84-5A086D72EE9C','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('04A361BF-BFC5-4D23-BF3C-3E5472D94A55','预留拓展','',40,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','软件管理','',20,'C2C9C4BD-B10B-46AD-9468-66EF063517CF','Menu_SmartSite',1,0,1)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('C126F42A-09B0-43D1-8DCF-9EA049B800A8','门禁设备管理','SmartSite/SoftManage.aspx?Type=D',10,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('C1945F59-AD5E-4301-9538-67511D0EB0EC','C126F42A-09B0-43D1-8DCF-9EA049B800A8','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('68776A89-A250-4188-99B2-9CD1B3FB7E28','C126F42A-09B0-43D1-8DCF-9EA049B800A8','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('79E96D30-B45F-47F5-8F1C-5E3FF009783C','C126F42A-09B0-43D1-8DCF-9EA049B800A8','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('066CA266-027D-4E74-8F7C-8AFB4F4C9602','C126F42A-09B0-43D1-8DCF-9EA049B800A8','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('9F95F836-E10C-4EFD-B436-5C9D1658BAED','监控设备管理','SmartSite/SoftManage.aspx?Type=M',20,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('49057FC3-538A-4142-B192-D305B0CEF4A2','9F95F836-E10C-4EFD-B436-5C9D1658BAED','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('379D1D1F-CDC1-4C6D-AD3A-CE2186888C0A','9F95F836-E10C-4EFD-B436-5C9D1658BAED','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('AE6803C9-6923-481B-9CE5-AE85AC06B345','9F95F836-E10C-4EFD-B436-5C9D1658BAED','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('08F57065-5251-4EF4-B7D5-EA5C04056BB0','9F95F836-E10C-4EFD-B436-5C9D1658BAED','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('834EE5EA-3DDA-49E1-A951-825392893E85','环境设备管理','SmartSite/SoftManage.aspx?Type=E',30,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('23EC254E-F074-426B-B105-3AB919416CE1','834EE5EA-3DDA-49E1-A951-825392893E85','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('6E414A46-C07B-4780-9D83-1B1993A87229','834EE5EA-3DDA-49E1-A951-825392893E85','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('C6A9D2D7-6A56-4508-9A3E-90986F57C125','834EE5EA-3DDA-49E1-A951-825392893E85','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('AC37EA29-3A1B-4272-9994-ED7AC19970B7','834EE5EA-3DDA-49E1-A951-825392893E85','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('C724ADE0-F445-40C7-9B33-560809A1DBFE','数据接口管理','',30,'C2C9C4BD-B10B-46AD-9468-66EF063517CF','Menu_SmartSite',1,0,1)
GO
+2
View File
@@ -629,6 +629,8 @@
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="SHIYE\InformationProject_SafetyBriefingService.cs" />
<Compile Include="SmartSite\EquipmentSoftService.cs" />
<Compile Include="SmartSite\EquipmentService.cs" />
<Compile Include="SortConditionHelper.cs" />
<Compile Include="SQLHelper.cs" />
<Compile Include="Common\Const.cs" />
+37 -2
View File
@@ -194,6 +194,10 @@
/// </summary>
public const string UnitId_SEDIN = "d72a27c9-4ba9-41c5-ab0b-c010409f20f2";
/// <summary>
/// 集团公司单位id
/// </summary>
public const string UnitId_CNCEC = "722090d1-b5de-4c3c-a4f7-14f308161a3b";
/// <summary>
/// 赛鼎
/// </summary>
public const string AppID_SEDIN = "wxee9d14366730ae44";
@@ -699,8 +703,6 @@
/// </summary>
public const string Menu_Notice = "Menu_Notice";
/*项目*/
/// <summary>
/// 项目设置
@@ -3016,6 +3018,39 @@
#endregion
#endregion
#region 智慧工地
/// <summary>
/// 门禁设备管理
/// </summary>
public const string EquipmentManageDMenuId = "B972AE90-D40C-44E0-9A90-7B47B2A3399B";
/// <summary>
/// 监控设备管理
/// </summary>
public const string EquipmentManageMMenuId = "908325CA-A50A-456D-8A7F-E193C629F2F9";
/// <summary>
/// 环境设备管理
/// </summary>
public const string EquipmentManageEMenuId = "E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E";
/// <summary>
/// 门禁设备管理
/// </summary>
public const string SoftManageDMenuId = "C126F42A-09B0-43D1-8DCF-9EA049B800A8";
/// <summary>
/// 监控设备管理
/// </summary>
public const string SoftManageMMenuId = "9F95F836-E10C-4EFD-B436-5C9D1658BAED";
/// <summary>
/// 环境设备管理
/// </summary>
public const string SoftManageEMenuId = "834EE5EA-3DDA-49E1-A951-825392893E85";
#endregion
#endregion
#region 项目级菜单
@@ -781,17 +781,25 @@ namespace BLL
}
else
{
var getPersons = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == newPerson.IdentityCard);
if (getPersons != null && (!getPersons.MultiProject.HasValue || getPersons.MultiProject == false))
var getDatePItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.ProjectId == person.ProjectId && x.IdentityCard == person.IdentityCard && x.OutTime .HasValue && x.OutTime < person.InTime);
if (getDatePItem != null)
{
var getdate = newPerson.InTime.HasValue ? newPerson.InTime.Value.AddDays(-1) : DateTime.Now;
var getPersonItems = db.SitePerson_PersonItem.Where(x => x.PersonId == newPerson.PersonId && x.ProjectId != newPerson.ProjectId && !x.OutTime.HasValue);
foreach(var item in getPersonItems)
{
item.OutTime = getdate;
db.SubmitChanges();
}
setPersonItemInOut = true;
}
else
{
var getPersons = db.Person_Persons.FirstOrDefault(x => x.IdentityCard == newPerson.IdentityCard);
if (getPersons != null && (!getPersons.MultiProject.HasValue || getPersons.MultiProject == false))
{
var getdate = newPerson.InTime.HasValue ? newPerson.InTime.Value.AddDays(-1) : DateTime.Now;
var getPersonItems = db.SitePerson_PersonItem.Where(x => x.PersonId == newPerson.PersonId && x.ProjectId != newPerson.ProjectId && !x.OutTime.HasValue);
foreach (var item in getPersonItems)
{
item.OutTime = getdate;
db.SubmitChanges();
}
}
}
}
}
if (setPersonItemInOut)
+6 -2
View File
@@ -356,7 +356,7 @@
}
}
#region 项目表下拉框
#region 项目表下拉框 --施工项目
/// <summary>
/// 项目表下拉框
/// </summary>
@@ -364,6 +364,7 @@
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitProjectDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.Items.Clear();
dropName.DataValueField = "ProjectId";
dropName.DataTextField = "ProjectName";
dropName.DataSource = BLL.ProjectService.GetProjectWorkList();
@@ -381,6 +382,7 @@
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitProjectShortNameDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.Items.Clear();
dropName.DataValueField = "ProjectId";
dropName.DataTextField = "ShortName";
dropName.DataSource = BLL.ProjectService.GetProjectWorkList();
@@ -392,7 +394,7 @@
}
/// <summary>
/// 项目表下拉框
/// 项目表下拉框 --所有项目
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
@@ -422,6 +424,7 @@
/// <param name="isShowPlease"></param>
public static void InitAllProjectShortNameDropDownList(FineUIPro.DropDownList dropName, string userId, bool isShowPlease)
{
dropName.Items.Clear();
dropName.DataValueField = "ProjectId";
dropName.DataTextField = "ShortName";
var projectlist = GetProjectByUserIdDropDownList(userId);
@@ -444,6 +447,7 @@
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitProjectByProjectTypeDropDownList(FineUIPro.DropDownList dropName, string projectType, bool isShowPlease)
{
dropName.Items.Clear();
dropName.DataValueField = "ProjectId";
dropName.DataTextField = "ProjectName";
var projectlist = BLL.ProjectService.GetProjectByProjectTypeDropDownList(projectType);
+1 -1
View File
@@ -133,7 +133,7 @@
var pUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(e => e.ProjectId == projectId && e.UnitId == unitId);
if (pUnit != null)
{
if (pUnit.UnitType == Const.ProjectUnitType_2 || pUnit.UnitType == Const.ProjectUnitType_0)
if (pUnit.UnitType == Const.ProjectUnitType_2 || pUnit.UnitType == Const.ProjectUnitType_6 || pUnit.UnitType == Const.ProjectUnitType_0)
{
isShow = true;
}
+130
View File
@@ -0,0 +1,130 @@
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
/// <summary>
/// 设备管理
/// </summary>
public static class EquipmentService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取设备管理
/// </summary>
/// <param name="EquipmentId"></param>
/// <returns></returns>
public static Model.SmartSite_Equipment GetEquipmentByEquipmentId(string EquipmentId)
{
return Funs.DB.SmartSite_Equipment.FirstOrDefault(e => e.EquipmentId == EquipmentId);
}
/// <summary>
/// 获取设备管理名称是否存在
/// </summary>
/// <param name="EquipmentId">设备管理id</param>
/// <param name="Equipment">名称</param>
/// <returns>是否存在</returns>
public static bool IsExistEquipment(string EquipmentId, string EquipmentName)
{
bool isExist = false;
var role = Funs.DB.SmartSite_Equipment.FirstOrDefault(x => x.EquipmentName == EquipmentName && x.EquipmentId != EquipmentId);
if (role != null)
{
isExist = true;
}
return isExist;
}
/// <summary>
/// 添加设备管理
/// </summary>
/// <param name="Equipment"></param>
public static void AddEquipment(Model.SmartSite_Equipment Equipment)
{
Model.SmartSite_Equipment newEquipment = new Model.SmartSite_Equipment
{
EquipmentId = Equipment.EquipmentId,
ProjectId = Equipment.ProjectId,
Type = Equipment.Type,
EquipmentName = Equipment.EquipmentName,
EquipmentModel = Equipment.EquipmentModel,
Number = Equipment.Number,
RunningState = Equipment.RunningState,
Supplier = Equipment.Supplier,
SupplierMan = Equipment.SupplierMan,
SupplierTel = Equipment.SupplierTel,
};
Funs.DB.SmartSite_Equipment.InsertOnSubmit(newEquipment);
Funs.DB.SubmitChanges();
}
/// <summary>
/// 修改设备管理
/// </summary>
/// <param name="Equipment"></param>
public static void UpdateEquipment(Model.SmartSite_Equipment Equipment)
{
Model.SmartSite_Equipment newEquipment = Funs.DB.SmartSite_Equipment.FirstOrDefault(e => e.EquipmentId == Equipment.EquipmentId);
if (newEquipment != null)
{
newEquipment.Type = Equipment.Type;
newEquipment.EquipmentName = Equipment.EquipmentName;
newEquipment.EquipmentModel = Equipment.EquipmentModel;
newEquipment.Number = Equipment.Number;
newEquipment.RunningState = Equipment.RunningState;
newEquipment.Supplier = Equipment.Supplier;
newEquipment.SupplierMan = Equipment.SupplierMan;
newEquipment.SupplierTel = Equipment.SupplierTel;
Funs.DB.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除设备管理
/// </summary>
/// <param name="EquipmentId"></param>
public static void DeleteEquipmentById(string EquipmentId)
{
Model.SmartSite_Equipment Equipment = Funs.DB.SmartSite_Equipment.FirstOrDefault(e => e.EquipmentId == EquipmentId);
if (Equipment != null)
{
Funs.DB.SmartSite_Equipment.DeleteOnSubmit(Equipment);
Funs.DB.SubmitChanges();
}
}
/// <summary>
/// 根据部门Id获取设备管理下拉选择项
/// </summary>
/// <param name="departId"></param>
/// <returns></returns>
public static List<Model.SmartSite_Equipment> GetEquipmentList(string projectId, string type)
{
return (from x in Funs.DB.SmartSite_Equipment
where x.ProjectId == projectId && x.Type == type
orderby x.EquipmentName
select x).ToList();
}
#region 设备管理表下拉框
/// <summary>
/// 设备管理表下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitEquipmentDropDownList(FineUIPro.DropDownList dropName, string projectId, string type, bool isShowPlease)
{
dropName.DataValueField = "EquipmentId";
dropName.DataTextField = "Equipment";
dropName.DataSource = BLL.EquipmentService.GetEquipmentList(projectId, type);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
#endregion
}
}
+131
View File
@@ -0,0 +1,131 @@
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
/// <summary>
/// 软件管理
/// </summary>
public static class EquipmentSoftService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取软件管理
/// </summary>
/// <param name="EquipmentSoftId"></param>
/// <returns></returns>
public static Model.SmartSite_EquipmentSoft GetEquipmentSoftByEquipmentSoftId(string EquipmentSoftId)
{
return Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(e => e.EquipmentSoftId == EquipmentSoftId);
}
/// <summary>
/// 获取软件管理名称是否存在
/// </summary>
/// <param name="EquipmentSoftId">软件管理id</param>
/// <param name="EquipmentSoft">名称</param>
/// <returns>是否存在</returns>
public static bool IsExistEquipmentSoft(string EquipmentSoftId, string EquipmentSoftName)
{
bool isExist = false;
var role = Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(x => x.EquipmentSoftName == EquipmentSoftName && x.EquipmentSoftId != EquipmentSoftId);
if (role != null)
{
isExist = true;
}
return isExist;
}
/// <summary>
/// 添加软件管理
/// </summary>
/// <param name="EquipmentSoft"></param>
public static void AddEquipmentSoft(Model.SmartSite_EquipmentSoft EquipmentSoft)
{
Model.SmartSite_EquipmentSoft newEquipmentSoft = new Model.SmartSite_EquipmentSoft
{
EquipmentSoftId = EquipmentSoft.EquipmentSoftId,
ProjectId = EquipmentSoft.ProjectId,
EquipmentId = EquipmentSoft.EquipmentId,
Type = EquipmentSoft.Type,
EquipmentSoftName = EquipmentSoft.EquipmentSoftName,
EquipmentSoftModel = EquipmentSoft.EquipmentSoftModel,
Number = EquipmentSoft.Number,
RunningState = EquipmentSoft.RunningState,
Supplier = EquipmentSoft.Supplier,
SupplierMan = EquipmentSoft.SupplierMan,
SupplierTel = EquipmentSoft.SupplierTel,
};
Funs.DB.SmartSite_EquipmentSoft.InsertOnSubmit(newEquipmentSoft);
Funs.DB.SubmitChanges();
}
/// <summary>
/// 修改软件管理
/// </summary>
/// <param name="EquipmentSoft"></param>
public static void UpdateEquipmentSoft(Model.SmartSite_EquipmentSoft EquipmentSoft)
{
Model.SmartSite_EquipmentSoft newEquipmentSoft = Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(e => e.EquipmentSoftId == EquipmentSoft.EquipmentSoftId);
if (newEquipmentSoft != null)
{
newEquipmentSoft.EquipmentId = EquipmentSoft.EquipmentId;
newEquipmentSoft.EquipmentSoftName = EquipmentSoft.EquipmentSoftName;
newEquipmentSoft.EquipmentSoftModel = EquipmentSoft.EquipmentSoftModel;
newEquipmentSoft.Number = EquipmentSoft.Number;
newEquipmentSoft.RunningState = EquipmentSoft.RunningState;
newEquipmentSoft.Supplier = EquipmentSoft.Supplier;
newEquipmentSoft.SupplierMan = EquipmentSoft.SupplierMan;
newEquipmentSoft.SupplierTel = EquipmentSoft.SupplierTel;
Funs.DB.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除软件管理
/// </summary>
/// <param name="EquipmentSoftId"></param>
public static void DeleteEquipmentSoftById(string EquipmentSoftId)
{
Model.SmartSite_EquipmentSoft EquipmentSoft = Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(e => e.EquipmentSoftId == EquipmentSoftId);
if (EquipmentSoft != null)
{
Funs.DB.SmartSite_EquipmentSoft.DeleteOnSubmit(EquipmentSoft);
Funs.DB.SubmitChanges();
}
}
/// <summary>
/// 根据部门Id获取软件管理下拉选择项
/// </summary>
/// <param name="departId"></param>
/// <returns></returns>
public static List<Model.SmartSite_EquipmentSoft> GetEquipmentSoftList(string projectId, string type)
{
return (from x in Funs.DB.SmartSite_EquipmentSoft
where x.ProjectId == projectId && x.Type == type
orderby x.EquipmentSoftName
select x).ToList();
}
#region 软件管理表下拉框
/// <summary>
/// 软件管理表下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitEquipmentSoftDropDownList(FineUIPro.DropDownList dropName, string projectId, string type, bool isShowPlease)
{
dropName.DataValueField = "EquipmentSoftId";
dropName.DataTextField = "EquipmentSoft";
dropName.DataSource = BLL.EquipmentSoftService.GetEquipmentSoftList(projectId, type);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
#endregion
}
}
+16 -34
View File
@@ -473,23 +473,6 @@ namespace BLL
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 根据单位类型获取单位表下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void InitUnitNameByProjectIdUnitTypeDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitType, bool isShowPlease)
{
dropName.DataValueField = "UnitName";
dropName.DataTextField = "UnitName";
dropName.DataSource = BLL.UnitService.GetUnitByProjectIdUnitTypeList(projectId, unitType);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
#endregion
/// <summary>
@@ -579,22 +562,6 @@ namespace BLL
}
}
/// <summary>
/// 单位表下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
public static void GetUnit(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
{
dropName.DataValueField = "UnitId";
dropName.DataTextField = "UnitName";
dropName.DataSource = GetUnitByProjectIdList(projectId);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
public static void GetALLUnit(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "UnitId";
@@ -657,6 +624,21 @@ namespace BLL
}
}
public static void InitSeDinAndCNCECUnitDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.Items.Clear();
dropName.DataValueField = "UnitId";
dropName.DataTextField = "UnitName";
dropName.DataSource = (from x in Funs.DB.Base_Unit
where x.UnitId==Const.UnitId_SEDIN || x.UnitId == Const.UnitId_CNCEC
select x).OrderByDescending(x => x.UnitCode).ToList();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
#region 根据多单位ID得到单位名称字符串
/// <summary>
/// 根据多单位ID得到单位名称字符串
@@ -712,7 +694,7 @@ namespace BLL
/// <param name="dropName"></param>
/// <param name="projectId"></param>
/// <param name="isShowPlease"></param>
public static void InitUnitDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
public static void InitMainOrSubUnitDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
@@ -69,7 +69,7 @@ namespace FineUIPro.Web.CQMS.Check
if (!IsPostBack)
{
UnitService.GetUnit(drpProposeUnit, CurrUser.LoginProjectId, false);
UnitService.InitUnitDropDownList(drpProposeUnit, CurrUser.LoginProjectId, false);
var unitWork = UnitWorkService.GetUnitWorkLists(CurrUser.LoginProjectId);
var unitWorks = from x in unitWork
select
@@ -57,7 +57,7 @@ namespace FineUIPro.Web.CQMS.Check
{
if (!IsPostBack)
{
UnitService.GetUnit(drpUnit, CurrUser.LoginProjectId, true);
UnitService.InitUnitDropDownList(drpUnit, CurrUser.LoginProjectId, true);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
btnNew.OnClientClick = Window1.GetShowReference("EditSpotCheck.aspx") + "return false;";
GetButtonPower();
@@ -30,7 +30,7 @@ namespace FineUIPro.Web.CQMS.Check
{
if (!IsPostBack)
{
UnitService.GetUnit(drpUnit, CurrUser.LoginProjectId, true);
UnitService.InitUnitDropDownList(drpUnit, CurrUser.LoginProjectId, true);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
BindData();
@@ -49,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Check
{
if (!IsPostBack)
{
UnitService.GetUnit(drpUnit, CurrUser.LoginProjectId, true);
UnitService.InitUnitDropDownList(drpUnit, CurrUser.LoginProjectId, true);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
GetButtonPower();
BindData();
@@ -58,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Check
{
if (!IsPostBack)
{
UnitService.GetUnit(drpProposeUnit, CurrUser.LoginProjectId, true);
UnitService.InitUnitDropDownList(drpProposeUnit, CurrUser.LoginProjectId, true);
Funs.FineUIPleaseSelect(this.drpContactListType);
Funs.FineUIPleaseSelect(this.drpIsReply);
Funs.FineUIPleaseSelect(this.drpState);
@@ -29,7 +29,7 @@ namespace FineUIPro.Web.CQMS.Check
{
if (!IsPostBack)
{
UnitService.GetUnit(drpProposeUnit, CurrUser.LoginProjectId, true);
UnitService.InitUnitDropDownList(drpProposeUnit, CurrUser.LoginProjectId, true);
Funs.FineUIPleaseSelect(this.drpContactListType);
Funs.FineUIPleaseSelect(this.drpIsReply);
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
@@ -30,7 +30,7 @@ namespace FineUIPro.Web.CQMS.Check
{
if (!IsPostBack)
{
UnitService.GetUnit(drpProposeUnit, CurrUser.LoginProjectId, true);
UnitService.InitUnitDropDownList(drpProposeUnit, CurrUser.LoginProjectId, true);
Funs.FineUIPleaseSelect(this.drpIsReply);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
BindGrid();
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
btnNew.OnClientClick = Window1.GetShowReference("ConstructionTestEdit.aspx") + "return false;";
GetButtonPower();
BindGrid();
@@ -46,8 +46,8 @@ namespace FineUIPro.Web.CQMS.Material
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.GetUnit(this.drpCheckUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpCheckUnit, this.CurrUser.LoginProjectId, true);
BLL.ConstructionTestTypeService.InitConstructionTestType(this.drpConstructionTestType, true);
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpWitness, this.CurrUser.LoginProjectId, string.Empty, string.Empty, true);
ConstructionTestId = Request.Params["ConstructionTestId"];
@@ -46,8 +46,8 @@ namespace FineUIPro.Web.CQMS.Material
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.GetUnit(this.drpCheckUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpCheckUnit, this.CurrUser.LoginProjectId, true);
BLL.ConstructionTestTypeService.InitConstructionTestType(this.drpConstructionTestType, true);
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpWitness, this.CurrUser.LoginProjectId, string.Empty, string.Empty, true);
ConstructionTestId = Request.Params["ConstructionTestId"];
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
btnNew.OnClientClick = Window1.GetShowReference("EquipmentEdit.aspx") + "return false;";
GetButtonPower();
@@ -25,7 +25,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string EquipmentId = Request.Params["EquipmentId"];
@@ -34,7 +34,7 @@ namespace FineUIPro.Web.CQMS.Material
{
this.ProjectId = this.CurrUser.LoginProjectId;
list = new List<string>();
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
if (!string.IsNullOrEmpty(this.CurrUser.UnitId))
{
@@ -25,7 +25,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string EquipmentId = Request.Params["EquipmentId"];
@@ -40,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Material
this.ProjectId = this.CurrUser.LoginProjectId;
//权限按钮方法
GetButtonPower();
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
Funs.FineUIPleaseSelect(this.drpState);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
@@ -46,7 +46,7 @@ namespace FineUIPro.Web.CQMS.Material
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
InspectionId = Request.Params["InspectionId"];
this.HideOptions.Hidden = true;
this.rblIsAgree.Hidden = true;
@@ -46,7 +46,7 @@ namespace FineUIPro.Web.CQMS.Material
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
InspectionId = Request.Params["InspectionId"];
if (!string.IsNullOrEmpty(InspectionId))
{
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
btnNew.OnClientClick = Window1.GetShowReference("MaterialEdit.aspx") + "return false;";
GetButtonPower();
@@ -25,7 +25,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string MaterialId = Request.Params["MaterialId"];
@@ -34,7 +34,7 @@ namespace FineUIPro.Web.CQMS.Material
{
this.ProjectId = this.CurrUser.LoginProjectId;
list = new List<string>();
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
if (!string.IsNullOrEmpty(this.CurrUser.UnitId))
{
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
btnNew.OnClientClick = Window1.GetShowReference("MaterialTestEdit.aspx") + "return false;";
GetButtonPower();
BindGrid();
@@ -46,8 +46,8 @@ namespace FineUIPro.Web.CQMS.Material
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.GetUnit(this.drpCheckUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpCheckUnit, this.CurrUser.LoginProjectId, true);
BLL.MaterialTypeService.InitMaterialType(this.drpMaterialType, true);
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpWitness, this.CurrUser.LoginProjectId, string.Empty, string.Empty, true);
MaterialTestId = Request.Params["MaterialTestId"];
@@ -46,8 +46,8 @@ namespace FineUIPro.Web.CQMS.Material
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.GetUnit(this.drpCheckUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpCheckUnit, this.CurrUser.LoginProjectId, true);
BLL.MaterialTypeService.InitMaterialType(this.drpMaterialType, true);
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpWitness, this.CurrUser.LoginProjectId, string.Empty, string.Empty, true);
MaterialTestId = Request.Params["MaterialTestId"];
@@ -24,7 +24,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string MaterialId = Request.Params["MaterialId"];
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.CQMS.Material
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
btnNew.OnClientClick = Window1.GetShowReference("NoticeAndSupervisionEdit.aspx") + "return false;";
GetButtonPower();
@@ -46,7 +46,7 @@ namespace FineUIPro.Web.CQMS.Material
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.CurrUser.LoginProjectId, true);
BLL.NoticeAndSupervisionTypeService.InitNoticeAndSupervisionType(this.drpNoticeAndSupervisionType, true);
NoticeAndSupervisionId = Request.Params["NoticeAndSupervisionId"];
@@ -46,7 +46,7 @@ namespace FineUIPro.Web.CQMS.Material
{
if (!IsPostBack)
{
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.CurrUser.LoginProjectId, true);
BLL.NoticeAndSupervisionTypeService.InitNoticeAndSupervisionType(this.drpNoticeAndSupervisionType, true);
NoticeAndSupervisionId = Request.Params["NoticeAndSupervisionId"];
@@ -49,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Meeting
MeetingId = Request.Params["MeetingId"];
this.drpHandleType.DataTextField = "Text";
this.drpHandleType.DataValueField = "Value";
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
this.HideOptions.Hidden = true;
this.rblIsAgree.Hidden = true;
BLL.SitePerson_PersonService.InitProjectUserListByProjectUnitTypeDropDownList(this.drpAttentPerson, this.CurrUser.LoginProjectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, true);
@@ -47,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Meeting
if (!IsPostBack)
{
MeetingId = Request.Params["MeetingId"];
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.SitePerson_PersonService.InitProjectUserListByProjectUnitTypeDropDownList(this.drpAttentPerson, this.CurrUser.LoginProjectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, true);
if (!string.IsNullOrEmpty(MeetingId))
{
@@ -49,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Meeting
MeetingId = Request.Params["MeetingId"];
this.drpHandleType.DataTextField = "Text";
this.drpHandleType.DataValueField = "Value";
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
this.HideOptions.Hidden = true;
this.rblIsAgree.Hidden = true;
BLL.SitePerson_PersonService.InitProjectUserListByProjectUnitTypeDropDownList(this.drpAttentPerson, this.CurrUser.LoginProjectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, true);
@@ -47,7 +47,7 @@ namespace FineUIPro.Web.CQMS.Meeting
if (!IsPostBack)
{
MeetingId = Request.Params["MeetingId"];
BLL.UnitService.GetUnit(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.SitePerson_PersonService.InitProjectUserListByProjectUnitTypeDropDownList(this.drpAttentPerson, this.CurrUser.LoginProjectId, Const.ProjectUnitType_1 + "," + Const.ProjectUnitType_2, true);
if (!string.IsNullOrEmpty(MeetingId))
{
@@ -35,7 +35,7 @@ namespace FineUIPro.Web.CQMS.Unqualified
{
if (!IsPostBack)
{
UnitService.GetUnit(drpUnit, CurrUser.LoginProjectId, false);
UnitService.InitUnitDropDownList(drpUnit, CurrUser.LoginProjectId, false);
//主送单位
gvMainSendUnit.DataSource = UnitService.GetUnitByProjectIdList(CurrUser.LoginProjectId);
gvMainSendUnit.DataBind();
@@ -58,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Unqualified
{
if (!IsPostBack)
{
UnitService.GetUnit(drpProposeUnit, CurrUser.LoginProjectId, true);
UnitService.InitUnitDropDownList(drpProposeUnit, CurrUser.LoginProjectId, true);
Funs.FineUIPleaseSelect(this.drpIsReply);
Funs.FineUIPleaseSelect(this.drpState);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
@@ -53,7 +53,7 @@ namespace FineUIPro.Web.CQMS.Unqualified
{
if (!IsPostBack)
{
UnitService.GetUnit(drpUnit, CurrUser.LoginProjectId, false);
UnitService.InitUnitDropDownList(drpUnit, CurrUser.LoginProjectId, false);
//主送单位
gvMainSendUnit.DataSource = UnitService.GetUnitByProjectIdList(CurrUser.LoginProjectId);
gvMainSendUnit.DataBind();
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="04/03/2023 15:49:36" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="06/26/2023 15:31:41" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@@ -99,7 +99,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRHL95wpPPwN6TqtHpqK4gKl"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRGljdG+Vyp/4vwo6KXFJdHA"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="PrefabricatedComponents" DataType="System.String" PropName="CH_TrustCode"/>
<Column Name="PlanStartDate" DataType="System.String" PropName="CH_TrustMan"/>
+33 -1
View File
@@ -1502,6 +1502,10 @@
<Content Include="res\indexv1\js\world.js" />
<Content Include="SHIYE\InformationProject\SafetyBriefing.aspx" />
<Content Include="SHIYE\InformationProject\SafetyBriefingEdit.aspx" />
<Content Include="SmartSite\SoftManage.aspx" />
<Content Include="SmartSite\EquipmentManage.aspx" />
<Content Include="SmartSite\SoftManageEdit.aspx" />
<Content Include="SmartSite\EquipmentManageEdit.aspx" />
<Content Include="SysManage\OutputValueProject.aspx" />
<Content Include="SysManage\ProjectToDo.aspx" />
<Content Include="ZHGL\DataIn\AccidentCauseReportBar.aspx" />
@@ -12879,6 +12883,34 @@
<Compile Include="SHIYE\InformationProject\SafetyBriefingEdit.aspx.designer.cs">
<DependentUpon>SafetyBriefingEdit.aspx</DependentUpon>
</Compile>
<Compile Include="SmartSite\SoftManage.aspx.cs">
<DependentUpon>SoftManage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SmartSite\SoftManage.aspx.designer.cs">
<DependentUpon>SoftManage.aspx</DependentUpon>
</Compile>
<Compile Include="SmartSite\EquipmentManage.aspx.cs">
<DependentUpon>EquipmentManage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SmartSite\EquipmentManage.aspx.designer.cs">
<DependentUpon>EquipmentManage.aspx</DependentUpon>
</Compile>
<Compile Include="SmartSite\SoftManageEdit.aspx.cs">
<DependentUpon>SoftManageEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SmartSite\SoftManageEdit.aspx.designer.cs">
<DependentUpon>SoftManageEdit.aspx</DependentUpon>
</Compile>
<Compile Include="SmartSite\EquipmentManageEdit.aspx.cs">
<DependentUpon>EquipmentManageEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SmartSite\EquipmentManageEdit.aspx.designer.cs">
<DependentUpon>EquipmentManageEdit.aspx</DependentUpon>
</Compile>
<Compile Include="SysManage\CustomQuery.aspx.cs">
<DependentUpon>CustomQuery.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -13887,7 +13919,7 @@
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:8667/</IISUrl>
<IISUrl>http://localhost:1773/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
@@ -72,7 +72,10 @@
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="txtWeldJointCode_TextChanged"
Width="240px" LabelWidth="80px" LabelAlign="Right">
</f:TextBox>--%>
<f:TextBox ID="txtMaterialCode2" runat="server" Label="材料编码"
EmptyText="输入查询条件"
Width="240px" LabelWidth="100px" LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<%--<f:Button ID="btnSelectColumn" Text="选择显示列" Icon="ShapesManySelect"
@@ -80,7 +83,7 @@
</f:Button>--%>
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
</f:Button>
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Hidden="true"
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
</f:Button>
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
@@ -106,7 +109,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工厂预制"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipeLineMatId"
EnableColumnLines="true" DataIDField="PipeLineMatId" AllowSorting="true"
EnableColumnLines="true" DataIDField="PipeLineMatId" AllowSorting="true" EnableCheckBoxSelect="true"
SortField="PrefabricatedComponents" SortDirection="ASC" OnSort="Grid1_Sort"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
<Columns>
@@ -158,7 +161,7 @@
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="现场施工"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipeLineMatId"
EnableColumnLines="true" DataIDField="PipeLineMatId" AllowSorting="true"
SortField="PipeLineMatId" SortDirection="ASC" OnSort="Grid2_Sort"
SortField="PipeLineMatId" SortDirection="ASC" OnSort="Grid2_Sort" EnableCheckBoxSelect="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid2_RowDoubleClick">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
@@ -293,11 +293,17 @@ namespace FineUIPro.Web.HJGL.DataImport
//}
if (!string.IsNullOrEmpty(pipelineId))
{
strSql += " and pipe.PipelineId=@PipelineId order by PrefabricatedComponents ";
strSql += " and pipe.PipelineId=@PipelineId ";
listStr.Add(new SqlParameter("@PipelineId", pipelineId));
}
if (!string.IsNullOrEmpty(txtMaterialCode2.Text.Trim()))
{
strSql += " and lib.MaterialCode like @MaterialCode ";
listStr.Add(new SqlParameter("@MaterialCode","%"+ txtMaterialCode2.Text.Trim()+"%"));
}
strSql += " order by PrefabricatedComponents ";
listStr.Add(new SqlParameter("@UnitWorkId", unitworkid));
SqlParameter[] parameter = listStr.ToArray();
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -321,11 +327,13 @@ namespace FineUIPro.Web.HJGL.DataImport
listStr.Add(new SqlParameter("@PipelineId", pipelineId));
}
//if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim()))
//{
// strSql += " and lib.MaterialCode like @MaterialCode ";
// listStr.Add(new SqlParameter("@MaterialCode", "%"+txtMaterialCode.Text.Trim() + "%"));
//}
if (!string.IsNullOrEmpty(txtMaterialCode2.Text.Trim()))
{
strSql += " and lib.MaterialCode like @MaterialCode ";
listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode2.Text.Trim() + "%"));
}
strSql += " order by PrefabricatedComponents ";
listStr.Add(new SqlParameter("@UnitWorkId", unitworkid));
SqlParameter[] parameter = listStr.ToArray();
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -461,7 +469,8 @@ namespace FineUIPro.Web.HJGL.DataImport
}
// this.BindGrid2(this.Grid1.SelectedRowID);
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
}
else
{
@@ -487,7 +496,8 @@ namespace FineUIPro.Web.HJGL.DataImport
}
//this.BindGrid1(this.Grid1.SelectedRowID);
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
}
else
{
@@ -140,6 +140,15 @@ namespace FineUIPro.Web.HJGL.DataImport
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtMaterialCode2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterialCode2;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -25,7 +25,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string MaterialId = Request.Params["MaterialId"];
@@ -24,7 +24,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetUnit(this.drpUnit, this.ProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string MaterialId = Request.Params["MaterialId"];
@@ -131,8 +131,8 @@
<asp:Label ID="lbProductionState" runat="server" Text='<%# ConvertProductionState(Eval("ProductionState"))%>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="200px" ColumnID="PlanStartDate" DataField="PlanStartDate" SortField="PlanStartDate"
FieldType="String" HeaderText="管线计划安装日期"
<f:RenderField Width="200px" ColumnID="FlowingSection" DataField="FlowingSection" SortField="FlowingSection"
FieldType="String" HeaderText="流水段"
HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
@@ -356,11 +356,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
Model.HJGL_Pipeline_ComponentJoint hJGL_Pipeline_ComponentJoint = new Model.HJGL_Pipeline_ComponentJoint();
hJGL_Pipeline_ComponentJoint.Id = SQLHelper.GetNewID();
ComponetJoint.PipelineComponentCode = item.PipelineComponentCode;
ComponetJoint.PipelineComponentId = item.PipelineComponentId;
ComponetJoint.WeldJointCode = joint.WeldJointCode;
ComponetJoint.WeldJointId=joint.WeldJointId;
HJGL_PipelineComponentjointService.AddHJGL_Pipeline_ComponentJoint(ComponetJoint);
hJGL_Pipeline_ComponentJoint.PipelineComponentCode = item.PipelineComponentCode;
hJGL_Pipeline_ComponentJoint.PipelineComponentId = item.PipelineComponentId;
hJGL_Pipeline_ComponentJoint.WeldJointCode = joint.WeldJointCode;
hJGL_Pipeline_ComponentJoint.WeldJointId=joint.WeldJointId;
HJGL_PipelineComponentjointService.AddHJGL_Pipeline_ComponentJoint(hJGL_Pipeline_ComponentJoint);
}
@@ -1,4 +1,5 @@
using BLL;
using MiniExcelLibs;
using Model;
using System;
using System.Collections.Generic;
@@ -325,6 +326,142 @@ namespace FineUIPro.Web.HJGL.WeldingManage
responeData.message = errorInfos;
}
return responeData;
}
private Model.ResponeData AddDatasetToSQL(List<dynamic> pds, int count)
{
Model.ResponeData responeData = new Model.ResponeData();
List<string> result = new List<string>();
if (count < 4)
{
responeData.code = 0;
responeData.message = "导入Excel格式错误!Excel只有" + count.ToString().Trim() + "列";
return responeData;
}
if (pds.Count > 0 && pds != null)
{
for (int i = 1; i < pds.Count; i++)
{
HJGL_PipeLineMat item = new HJGL_PipeLineMat();
#region 数据验证和赋值
string unitworkId = string.Empty;
unitworkId = Request.Params["UnitWorkId"];
string PipeArea = string.Empty;//管线划分 1工厂预制 2现场施工
if (pds[i].A != null && !string.IsNullOrEmpty(pds[i].A.ToString()))
{
string pipelineCode = pds[i].A.ToString();
var pipeline = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == unitworkId && x.PipelineCode == pipelineCode select x;
if (pipeline.Count() > 0)
{
item.PipelineId = pipeline.First().PipelineId;
PipeArea = pipeline.First().PipeArea;
}
else
{
result.Add("不存在此管线号-" + pds[i].A.ToString());
}
}
else
{
result.Add((i + 2) + "Line, [管线号] 不能为空</br>");
}
if (pds[i].C != null && !string.IsNullOrEmpty(pds[i].C.ToString()))
{
string materialCode = pds[i].C.ToString();
var lib = from x in Funs.DB.HJGL_MaterialCodeLib where x.MaterialCode == materialCode select x;
if (lib.Count() > 0)
{
item.MaterialCode = pds[i].C.ToString();
}
else
{
result.Add("不存在此材料编码-" + pds[i].C.ToString());
}
}
else
{
result.Add((i + 2) + "Line, [材料编码] 不能为空</br>");
}
if (pds[i].D != null && !string.IsNullOrEmpty(pds[i].D.ToString()))
{
try
{
var number = Funs.GetNewDecimal(pds[i].D.ToString());
item.Number = number;
}
catch (Exception)
{
result.Add("第" + (i + 2).ToString() + "行," + "数量格式输入有误</br>");
}
}
else
{
result.Add((i + 2) + "Line, [数量] 不能为空</br>");
}
if (PipeArea == "1")
{
if (pds[i].B != null && !string.IsNullOrEmpty(pds[i].B.ToString()))
{
item.PrefabricatedComponents = pds[i].B.ToString();
}
else
{
result.Add((i + 2) + "Line, [预制组件] 不能为空</br>");
}
}
var model = matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode == item.MaterialCode && x.PrefabricatedComponents == item.PrefabricatedComponents);
if (model.Count() == 0)
{
matList.Add(item);
}
#endregion
}
if (result.Count > 0)
{
matList.Clear();
// result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = string.Join("|", result.Distinct());
//Alert alert = new Alert();
//alert.Message = result;
//alert.Target = Target.Self;
//alert.Show();
responeData.code = 0;
responeData.message = errorInfos;
}
else
{
errorInfos = string.Empty;
}
}
else
{
responeData.code = 0;
responeData.message = "导入数据为空!";
}
return responeData;
}
#endregion
@@ -344,7 +481,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
return;
}
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls" && IsXls != ".xlsx")
if (IsXls != ".xlsx")
{
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
return;
@@ -365,26 +502,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//文件上传服务器后的名称
string fileName = rootPath + initPath + this.hdFileName.Text;
//读取Excel
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
//验证Excel读取是否有误
if (!string.IsNullOrEmpty(errorInfos))
{
Alert alert = new Alert
{
Message = errorInfos,
Target = Target.Self
};
alert.Show();
//ShowNotify(errorInfos, MessageBoxIcon.Warning);
return;
}
var reposedata= AddDatasetToSQL(ds.Tables[0], 4);
var ds = MiniExcel.Query(fileName).ToList();
var columns = MiniExcel.GetColumns(fileName);
var cnt = columns.Count;
var reposedata = AddDatasetToSQL(ds, cnt);
if (reposedata.code == 1)
{
State = (int)ButtonState.Import;
ShowNotify("审核完成请点击导入");
}
else
{
@@ -394,7 +519,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Target = Target.Self
};
alert.Show();
//ShowNotify(reposedata.message);
//ShowNotify(reposedata.message);
}
}
#region 导入
@@ -532,7 +657,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
foreach (var item in matList)
{
var pipeLineMat = from x in Funs.DB.HJGL_PipeLineMat where x.MaterialCode == item.MaterialCode && x.PipelineId == item.PipelineId &&x.PrefabricatedComponents==item.PrefabricatedComponents select x;
if (pipeLineMat.Count() == 0)
if (pipeLineMat.Count() == 0|| pipeLineMat==null)
{
item.PipeLineMatId = SQLHelper.GetNewID(typeof(Model.HJGL_PipeLineMat));
BLL.PipelineMatService.AddPipeLineMat(item);
@@ -139,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Check
Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpPartInPersons, this.ProjectId, null, null, true);
ConstValue.InitConstNameDropDownList(this.drpHandleStep, ConstValue.Group_HandleStep, true);
///责任单位
UnitService.InitUnitNameByProjectIdUnitTypeDropDownList(this.drpWorkUnit, this.ProjectId, Const.ProjectUnitType_2, false);
UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpWorkUnit, this.ProjectId, Const.ProjectUnitType_2, false);
///单位工程
UnitWorkService.InitUnitWorkNameDropDownList(this.drpCheckArea, this.ProjectId, false);
}
@@ -219,7 +219,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
var getCostManageItem = from x in Funs.DB.CostGoods_CostManageItem
join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId)
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId) && y.States==Const.State_2
select new { x.CostManageId, x.CostManageItemId, Year = y.CostManageDate.Value.Year, x.SupCostTypeId, x.CostTypeId, x.PriceMoney };
foreach (var item in getType)
@@ -231,7 +231,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
var getCostManageItem = from x in Funs.DB.CostGoods_CostManageItem
join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId
where y.ProjectId == this.ProjectId && (!year.HasValue || y.CostManageDate.Value.Year == year)
where y.ProjectId == this.ProjectId && (!year.HasValue || y.CostManageDate.Value.Year == year) && y.States == Const.State_2
select new { x.CostManageId, x.CostManageItemId, y.UnitId, Year = y.CostManageDate.Value.Year, x.SupCostTypeId, x.CostTypeId, x.PriceMoney };
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
@@ -153,10 +153,6 @@
SortField="CheckPostName" FieldType="String" HeaderText="工作组职务"
HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="CheckDate" DataField="CheckDate"
SortField="CheckDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
HeaderText="检查日期" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu2" />
@@ -36,7 +36,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
this.GetButtonPower();
BLL.ProjectService.InitAllProjectDropDownList(this.drpSubjectProject, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitSeDinAndCNCECUnitDropDownList(this.drpUnit, false);
this.CheckNoticeId = Request.Params["CheckNoticeId"];
if (!string.IsNullOrEmpty(this.CheckNoticeId))
@@ -24,7 +24,8 @@
<Rows>
<f:FormRow>
<Items>
<f:NumberBox ID="txtSortIndex" runat="server" Label="序号" LabelWidth="120px" MinValue="1" NoDecimal="true" NoNegative="true">
<f:NumberBox ID="txtSortIndex" runat="server" Label="序号" LabelWidth="120px"
MinValue="1" NoDecimal="true" NoNegative="true">
</f:NumberBox>
<f:TextBox ID="txtUserName" runat="server" Label="组成员" LabelWidth="100px" FocusOnPageLoad="true"
ShowRedStar="true" Required="true" AutoPostBack="true" OnTextChanged="txtUserName_TextChanged">
@@ -52,10 +53,10 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCheckPostName" runat="server" Label="评价小组职务" LabelWidth="120px" MaxLength="200">
<f:TextBox ID="txtCheckPostName" runat="server" Label="检查小组职务" LabelWidth="120px" MaxLength="200">
</f:TextBox>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="评价日期" ID="txtCheckDate"
EmptyText="请选择评价日期">
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="检查日期" ID="txtCheckDate"
EmptyText="请选择检查日期">
</f:DatePicker>
</Items>
</f:FormRow>
@@ -50,7 +50,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
this.CheckNoticeId = Request.Params["CheckNoticeId"];
this.CheckTeamId = Request.Params["CheckTeamId"];
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, true);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, null, true);
if (!string.IsNullOrEmpty(this.CheckTeamId))
{
+62 -2
View File
@@ -95,7 +95,7 @@
</f:DropDownList>
<f:RadioButtonList ID="rbPersonType" runat="server" Label="员工类别">
</f:RadioButtonList>
<f:CheckBox runat="server" ID="ckIsOffice" Label="本部"></f:CheckBox>
<f:CheckBox runat="server" ID="ckIsOffice" Label="本部"></f:CheckBox>
</Items>
</f:FormRow>
<f:FormRow>
@@ -440,6 +440,56 @@
</f:Grid>
</Items>
</f:Tab>
<f:Tab ID="QuarterCheck" Title="员工考核" BodyPadding="5px" Layout="VBox" IconFont="Bookmark" runat="server">
<Items>
<f:Grid ID="GridQuarterCheck" ShowBorder="true" ShowHeader="false" Title="员工考核"
runat="server" DataKeyNames="QuarterCheckId" DataIDField="QuarterCheckId" AllowSorting="true"
SortField="StartTime" ForceFit="true" EnableColumnLines="true" BoxFlex="1" PageSize="10"
SortDirection="DESC" OnSort="GridQuarterCheck_Sort" AllowPaging="true" IsDatabasePaging="true"
OnPageIndexChange="GridQuarterCheck_PageIndexChange" EnableTextSelection="True"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridQuarterCheck_RowDoubleClick">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="岗位" ColumnID="RoleName"
DataField="RoleName" FieldType="String" HeaderTextAlign="Center" Width="110px">
</f:RenderField>
<f:RenderField HeaderText="项目名称" ColumnID="ProjectName" DataField="ProjectName"
FieldType="String" HeaderTextAlign="Center" Width="400px">
</f:RenderField>
<f:RenderField HeaderText="开始时间" ColumnID="StartTime" DataField="StartTime"
FieldType="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="结束时间" ColumnID="EndTime"
DataField="EndTime" SortField="EndTime" FieldType="Date" HeaderTextAlign="Center"
Width="100px" RendererArgument="yyyy-MM-dd">
</f:RenderField>
<f:RenderField HeaderText="考核状态" ColumnID="StateName" DataField="StateName"
FieldType="String" HeaderTextAlign="Center" Width="90px">
</f:RenderField>
<f:TemplateField Width="80px" ColumnID="Grade" HeaderText="分数" TextAlign="Left" >
<ItemTemplate>
<asp:Label ID="lbGrade" runat="server" Text='<%# ConvertGrade(Eval("QuarterCheckId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenuQuarterCheck" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator5" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText5" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSizeGridQuarterCheck" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSizeGridQuarterCheck_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Tab>
<f:Tab ID="Duty" Title="责任书" BodyPadding="5px" Layout="VBox" IconFont="Bookmark" runat="server">
<Items>
<f:Grid ID="GridDuty" ShowBorder="true" ShowHeader="false" Title="责任书"
@@ -565,6 +615,11 @@
runat="server" Text="查看" Icon="Find">
</f:MenuButton>
</f:Menu>
<f:Menu ID="MenuQuarterCheck" runat="server">
<f:MenuButton ID="btnQuarterCheckEdit" OnClick="btnQuarterCheckEdit_Click" EnablePostBack="true"
runat="server" Text="查看" Icon="Find">
</f:MenuButton>
</f:Menu>
<f:Menu ID="MenuInOut" runat="server">
<f:MenuButton ID="btnInOutEdit" OnClick="btnInOutEdit_Click" EnablePostBack="true"
@@ -597,7 +652,12 @@
F(menuIDDuty).show(); //showAt(event.pageX, event.pageY);
return false;
}
var menuIDQuarterCheck = '<%= MenuQuarterCheck.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenuQuarterCheck(event, rowId) {
F(menuIDQuarterCheck).show(); //showAt(event.pageX, event.pageY);
return false;
}
var menuIDInOut = '<%= MenuInOut.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenuInOut(event, rowId) {
@@ -2,6 +2,9 @@
using Model;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web.UI.DataVisualization.Charting;
@@ -235,6 +238,7 @@ namespace FineUIPro.Web.Person
getInitGridTrain();
getInitGridDuty();
getInitGridInOut();
getInitGridQuarterCheck();
}
}
#endregion
@@ -889,6 +893,133 @@ namespace FineUIPro.Web.Person
#endregion
#region 员工考核
/// <summary>
///
/// </summary>
private void getInitGridQuarterCheck()
{
Funs.DropDownPageSize(this.ddlPageSizeGridQuarterCheck);
BindGridQuarterCheck();
}
#region 绑定数据
/// <summary>
/// 绑定数据
/// </summary>
private void BindGridQuarterCheck()
{
string strSql = @"select QuarterCheckId, QuarterCheckName, C.UserId, C.ProjectId,
StartTime,EndTime,State,R.RoleName,P.ProjectName,(case when c.State ='1' then '考核结束' else '正在考核' end) as StateName
from [dbo].[Person_QuarterCheck] C
left join Sys_Role R on C.RoleId=R.RoleId
left join Base_Project P on C.ProjectId=P.ProjectId
where 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (this.CurrUser.PersonId != BLL.Const.sysglyId && this.CurrUser.PersonId != BLL.Const.hfnbdId)
{
strSql += " AND C.UserId=@UserId ";
listStr.Add(new SqlParameter("@UserId", this.PersonId));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
GridQuarterCheck.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(GridQuarterCheck, tb);
GridQuarterCheck.DataSource = table;
GridQuarterCheck.DataBind();
}
#endregion
#region gv字段转换
/// <summary>
///
/// </summary>
/// <param name="QuarterCheckId"></param>
/// <returns></returns>
protected string ConvertGrade(object QuarterCheckId)
{
decimal grade = 0;
if (!string.IsNullOrEmpty(QuarterCheckId.ToString()))
{
var list = BLL.Person_QuarterCheckItemService.GetCheckItemListById(QuarterCheckId.ToString());
foreach (var item in list)
{
if (item.Grade != null)
{
grade += item.Grade.Value * item.StandardGrade.Value / 100;
}
}
}
return grade.ToString("0.##");
}
#endregion
#region 分页
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void GridQuarterCheck_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGridQuarterCheck();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSizeGridQuarterCheck_SelectedIndexChanged(object sender, EventArgs e)
{
GridQuarterCheck.PageSize = Convert.ToInt32(ddlPageSizeGridQuarterCheck.SelectedValue);
BindGridQuarterCheck();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void GridQuarterCheck_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
BindGridQuarterCheck();
}
#endregion
/// <summary>
/// 双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void GridQuarterCheck_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.EditDataQuarterCheck();
}
protected void btnQuarterCheckEdit_Click(object sender, EventArgs e)
{
this.EditDataQuarterCheck();
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditDataQuarterCheck()
{
if (GridQuarterCheck.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartPersonCheckingView.aspx?QuarterCheckId={0}", GridQuarterCheck.SelectedRowID, "编辑 - ")));
}
#endregion
#region 员工责任书
/// <summary>
///
+72
View File
@@ -779,6 +779,60 @@ namespace FineUIPro.Web.Person
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSizeGridTrain;
/// <summary>
/// QuarterCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab QuarterCheck;
/// <summary>
/// GridQuarterCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid GridQuarterCheck;
/// <summary>
/// lbGrade 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbGrade;
/// <summary>
/// ToolbarSeparator5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator5;
/// <summary>
/// ToolbarText5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText5;
/// <summary>
/// ddlPageSizeGridQuarterCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSizeGridQuarterCheck;
/// <summary>
/// Duty 控件。
/// </summary>
@@ -977,6 +1031,24 @@ namespace FineUIPro.Web.Person
/// </remarks>
protected global::FineUIPro.MenuButton btnDutyEdit;
/// <summary>
/// MenuQuarterCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu MenuQuarterCheck;
/// <summary>
/// btnQuarterCheckEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnQuarterCheckEdit;
/// <summary>
/// MenuInOut 控件。
/// </summary>
+63 -4
View File
@@ -259,7 +259,7 @@
SortField="SendDate" ForceFit="true" EnableColumnLines="true" BoxFlex="1" PageSize="10"
SortDirection="DESC" OnSort="GridCertificate_Sort" AllowPaging="true" IsDatabasePaging="true"
OnPageIndexChange="GridCertificate_PageIndexChange" EnableTextSelection="True"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridCertificate_RowDoubleClick">
EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridCertificate_RowDoubleClick">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
@@ -284,7 +284,7 @@
<f:RenderField Width="100px" ColumnID="LimitDate" DataField="LimitDate"
FieldType="Date" RendererArgument="yyyy-MM-dd" HeaderText="有效期至" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="tfImageUrl1" Width="90px" HeaderText="证书" HeaderTextAlign="Center"
<f:TemplateField ColumnID="tfImageUrl1" Width="90px" HeaderText="证书" HeaderTextAlign="Center"
TextAlign="Left">
<ItemTemplate>
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageByUrl(Eval("AttachUrl")) %>'></asp:Label>
@@ -313,7 +313,7 @@
SortField="TrainDate" ForceFit="true" EnableColumnLines="true" BoxFlex="1" PageSize="10"
SortDirection="DESC" OnSort="GridTrain_Sort" AllowPaging="true" IsDatabasePaging="true"
OnPageIndexChange="GridTrain_PageIndexChange" EnableTextSelection="True"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridTrain_RowDoubleClick">
EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridTrain_RowDoubleClick">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
@@ -345,6 +345,54 @@
</f:Grid>
</Items>
</f:Tab>
<f:Tab ID="QuarterCheck" Title="员工考核" BodyPadding="5px" Layout="VBox" IconFont="Bookmark" runat="server">
<Items>
<f:Grid ID="GridQuarterCheck" ShowBorder="true" ShowHeader="false" Title="员工考核"
runat="server" DataKeyNames="QuarterCheckId" DataIDField="QuarterCheckId" AllowSorting="true"
SortField="StartTime" ForceFit="true" EnableColumnLines="true" BoxFlex="1" PageSize="10"
SortDirection="DESC" OnSort="GridQuarterCheck_Sort" AllowPaging="true" IsDatabasePaging="true"
OnPageIndexChange="GridQuarterCheck_PageIndexChange" EnableTextSelection="True"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridQuarterCheck_RowDoubleClick">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="岗位" ColumnID="RoleName"
DataField="RoleName" FieldType="String" HeaderTextAlign="Center" Width="110px">
</f:RenderField>
<f:RenderField HeaderText="项目名称" ColumnID="ProjectName" DataField="ProjectName"
FieldType="String" HeaderTextAlign="Center" Width="400px">
</f:RenderField>
<f:RenderField HeaderText="开始时间" ColumnID="StartTime" DataField="StartTime"
FieldType="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="结束时间" ColumnID="EndTime"
DataField="EndTime" SortField="EndTime" FieldType="Date" HeaderTextAlign="Center"
Width="100px" RendererArgument="yyyy-MM-dd">
</f:RenderField>
<f:RenderField HeaderText="考核状态" ColumnID="StateName" DataField="StateName"
FieldType="String" HeaderTextAlign="Center" Width="90px">
</f:RenderField>
<f:TemplateField Width="80px" ColumnID="Grade" HeaderText="分数" TextAlign="Left" >
<ItemTemplate>
<asp:Label ID="lbGrade" runat="server" Text='<%# ConvertGrade(Eval("QuarterCheckId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenuQuarterCheck" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator5" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText5" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSizeGridQuarterCheck" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSizeGridQuarterCheck_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Tab>
<f:Tab ID="Duty" Title="责任书" BodyPadding="5px" Layout="VBox" IconFont="Bookmark" runat="server">
<Items>
<f:Grid ID="GridDuty" ShowBorder="true" ShowHeader="false" Title="责任书"
@@ -388,7 +436,7 @@
SortField="InTime" ForceFit="true" EnableColumnLines="true" BoxFlex="1" PageSize="10"
SortDirection="DESC" OnSort="GridInOut_Sort" AllowPaging="true" IsDatabasePaging="true"
OnPageIndexChange="GridInOut_PageIndexChange" EnableTextSelection="True"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridInOut_RowDoubleClick">
EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridInOut_RowDoubleClick">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
@@ -449,6 +497,11 @@
runat="server" Text="查看" Icon="Find">
</f:MenuButton>
</f:Menu>
<f:Menu ID="MenuQuarterCheck" runat="server">
<f:MenuButton ID="btnQuarterCheckEdit" OnClick="btnQuarterCheckEdit_Click" EnablePostBack="true"
runat="server" Text="查看" Icon="Find">
</f:MenuButton>
</f:Menu>
<f:Menu ID="MenuDuty" runat="server">
<f:MenuButton ID="btnDutyEdit" OnClick="btnDutyEdit_Click" EnablePostBack="true"
runat="server" Text="查看" Icon="Find">
@@ -473,6 +526,12 @@
F(menuIDTrain).show(); //showAt(event.pageX, event.pageY);
return false;
}
var menuIDQuarterCheck = '<%= MenuQuarterCheck.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenuQuarterCheck(event, rowId) {
F(menuIDQuarterCheck).show(); //showAt(event.pageX, event.pageY);
return false;
}
var menuIDDuty = '<%= MenuDuty.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenuDuty(event, rowId) {
@@ -1,5 +1,8 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
namespace FineUIPro.Web.Person
{
@@ -163,6 +166,7 @@ namespace FineUIPro.Web.Person
getInitGridTrain();
getInitGridDuty();
getInitGridInOut();
getInitGridQuarterCheck();
}
}
#endregion
@@ -366,6 +370,133 @@ namespace FineUIPro.Web.Person
}
#endregion
#region 员工考核
/// <summary>
///
/// </summary>
private void getInitGridQuarterCheck()
{
Funs.DropDownPageSize(this.ddlPageSizeGridQuarterCheck);
BindGridQuarterCheck();
}
#region 绑定数据
/// <summary>
/// 绑定数据
/// </summary>
private void BindGridQuarterCheck()
{
string strSql = @"select QuarterCheckId, QuarterCheckName, C.UserId, C.ProjectId,
StartTime,EndTime,State,R.RoleName,P.ProjectName,(case when c.State ='1' then '考核结束' else '正在考核' end) as StateName
from [dbo].[Person_QuarterCheck] C
left join Sys_Role R on C.RoleId=R.RoleId
left join Base_Project P on C.ProjectId=P.ProjectId
where 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (this.CurrUser.PersonId != BLL.Const.sysglyId && this.CurrUser.PersonId != BLL.Const.hfnbdId)
{
strSql += " AND C.UserId=@UserId ";
listStr.Add(new SqlParameter("@UserId", this.PersonId));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
GridQuarterCheck.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(GridQuarterCheck, tb);
GridQuarterCheck.DataSource = table;
GridQuarterCheck.DataBind();
}
#endregion
#region gv字段转换
/// <summary>
///
/// </summary>
/// <param name="QuarterCheckId"></param>
/// <returns></returns>
protected string ConvertGrade(object QuarterCheckId)
{
decimal grade = 0;
if (!string.IsNullOrEmpty(QuarterCheckId.ToString()))
{
var list = BLL.Person_QuarterCheckItemService.GetCheckItemListById(QuarterCheckId.ToString());
foreach (var item in list)
{
if (item.Grade != null)
{
grade += item.Grade.Value * item.StandardGrade.Value / 100;
}
}
}
return grade.ToString("0.##");
}
#endregion
#region 分页
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void GridQuarterCheck_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGridQuarterCheck();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSizeGridQuarterCheck_SelectedIndexChanged(object sender, EventArgs e)
{
GridQuarterCheck.PageSize = Convert.ToInt32(ddlPageSizeGridQuarterCheck.SelectedValue);
BindGridQuarterCheck();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void GridQuarterCheck_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
BindGridQuarterCheck();
}
#endregion
/// <summary>
/// 双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void GridQuarterCheck_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.EditDataQuarterCheck();
}
protected void btnQuarterCheckEdit_Click(object sender, EventArgs e)
{
this.EditDataQuarterCheck();
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditDataQuarterCheck()
{
if (GridQuarterCheck.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartPersonCheckingView.aspx?QuarterCheckId={0}", GridQuarterCheck.SelectedRowID, "编辑 - ")));
}
#endregion
#region 员工责任书
/// <summary>
///
+72
View File
@@ -572,6 +572,60 @@ namespace FineUIPro.Web.Person
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSizeGridTrain;
/// <summary>
/// QuarterCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab QuarterCheck;
/// <summary>
/// GridQuarterCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid GridQuarterCheck;
/// <summary>
/// lbGrade 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbGrade;
/// <summary>
/// ToolbarSeparator5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator5;
/// <summary>
/// ToolbarText5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText5;
/// <summary>
/// ddlPageSizeGridQuarterCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSizeGridQuarterCheck;
/// <summary>
/// Duty 控件。
/// </summary>
@@ -716,6 +770,24 @@ namespace FineUIPro.Web.Person
/// </remarks>
protected global::FineUIPro.MenuButton btnTrainEdit;
/// <summary>
/// MenuQuarterCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu MenuQuarterCheck;
/// <summary>
/// btnQuarterCheckEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnQuarterCheckEdit;
/// <summary>
/// MenuDuty 控件。
/// </summary>
@@ -0,0 +1,103 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentManage.aspx.cs" Inherits="FineUIPro.Web.SmartSite.EquipmentManage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>设备管理</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设备管理" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="EquipmentId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="EquipmentId" AllowSorting="true" SortField="ProjectName,EquipmentName"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true" ForceFit="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
<Items>
<f:TextBox runat="server" ID="txtEquipmentName" EmptyText="按名称查询" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" Width="250px" LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="false" runat="server"
Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField Width="250px" ColumnID="ProjectName" DataField="ProjectName"
FieldType="String" HeaderText="项目名称" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="200px" ColumnID="EquipmentName" DataField="EquipmentName"
FieldType="String" HeaderText="设备名称" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="200px" ColumnID="EquipmentModel" DataField="EquipmentModel"
FieldType="String" HeaderText="设备型号" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="90px" ColumnID="Number" DataField="Number"
FieldType="Int" HeaderText="数量" HeaderTextAlign="Center" TextAlign="Right" >
</f:RenderField>
<f:RenderField Width="90px" ColumnID="RunningState" DataField="RunningState"
FieldType="String" HeaderText="运行状态" HeaderTextAlign="Center" TextAlign="Center" >
</f:RenderField>
<f:RenderField Width="220px" ColumnID="Supplier" DataField="Supplier"
FieldType="String" HeaderText="供货商" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SupplierMan" DataField="SupplierMan"
FieldType="String" HeaderText="售后联系人" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="120px" ColumnID="SupplierTel" DataField="SupplierTel"
FieldType="String" HeaderText="售后联系电话" HeaderTextAlign="Center" TextAlign="Right" >
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="设备管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="800px"
Height="380px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
Hidden="true" runat="server" Text="编辑" Icon="Pencil">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
Hidden="true" ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除"
Icon="Delete">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/jscript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>
@@ -0,0 +1,276 @@
namespace FineUIPro.Web.SmartSite
{
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
public partial class EquipmentManage : PageBase
{
/// <summary>
/// 类型
/// </summary>
public string Type
{
get
{
return (string)ViewState["Type"];
}
set
{
ViewState["Type"] = value;
}
}
/// <summary>
/// 菜单id
/// </summary>
public string MenuId
{
get
{
return (string)ViewState["MenuId"];
}
set
{
ViewState["MenuId"] = value;
}
}
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.Type = Request.Params["type"];
if (this.Type == "D")
{
this.MenuId = Const.EquipmentManageDMenuId;
}
else if (this.Type == "M")
{
this.MenuId = Const.EquipmentManageMMenuId;
}
else
{
this.MenuId = Const.EquipmentManageEMenuId;
}
////权限按钮方法
this.GetButtonPower();
this.btnNew.OnClientClick = Window1.GetShowReference("EquipmentManageEdit.aspx?type="+this.Type) + "return false;";
Funs.DropDownPageSize(this.ddlPageSize);
// 绑定表格
this.BindGrid();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT EquipmentId,EQ.ProjectId,P.ProjectName,Type,EquipmentName,EquipmentModel,Number,RunningState
,Supplier,SupplierMan,SupplierTel
FROM SmartSite_Equipment AS EQ
LEFT JOIN Base_Project AS P ON EQ.ProjectId=P.ProjectId WHERE 1 = 1";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND Type = @Type";
listStr.Add(new SqlParameter("@Type", this.Type));
if (!string.IsNullOrEmpty(this.txtEquipmentName.Text.Trim()))
{
strSql += " AND EquipmentName LIKE @EquipmentName";
listStr.Add(new SqlParameter("@EquipmentName", "%" + this.txtEquipmentName.Text.Trim() + "%"));
}
//if (this.drpLicenseType.SelectedValue != BLL.Const._Null)
//{
// strSql += " AND EquipmentManage.LicenseType = @LicenseTypeId";
// listStr.Add(new SqlParameter("@LicenseTypeId", this.drpLicenseType.SelectedValue));
//}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#region 查询
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region 获取按钮权限
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.MenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(Const.BtnAdd))
{
this.btnNew.Hidden = false;
}
if (buttonList.Contains(Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
}
if (buttonList.Contains(Const.BtnDelete))
{
this.btnMenuDelete.Hidden = false;
}
}
}
#endregion
#region 删除数据
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
this.DeleteData();
}
/// <summary>
/// 删除方法
/// </summary>
private void DeleteData()
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, false))
{
var getD = EquipmentService.GetEquipmentByEquipmentId(rowID);
if (getD != null)
{
LogService.AddSys_Log(this.CurrUser, getD.EquipmentName.ToString(), getD.EquipmentId,this.MenuId, BLL.Const.BtnDelete);
BLL.EquipmentService.DeleteEquipmentById(rowID);
}
}
}
BindGrid();
ShowNotify("删除数据成功!");
}
}
#endregion
#region 分页
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
this.Grid1.PageSize = Funs.GetNewIntOrZero(this.ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
BindGrid();
}
#endregion
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.EditData();
}
/// <summary>
/// 右键编辑事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
this.EditData();
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string Id = Grid1.SelectedRowID;
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentManageEdit.aspx?EquipmentId={0}&type={1}", Id, this.Type, "编辑 - ")));
}
#region 判断是否可删除
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
//if (Funs.DB.Project_ProjectEquipmentManage.FirstOrDefault(x => x.EquipmentManageId == id) != null)
//{
// content = "该用户已在【项目用户】中使用,不能删除!";
//}
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content);
}
return false;
}
}
#endregion
}
}
@@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SmartSite
{
public partial class EquipmentManage
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtEquipmentName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentName;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}
@@ -0,0 +1,67 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentManageEdit.aspx.cs" Inherits="FineUIPro.Web.SmartSite.EquipmentManageEdit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>编辑设备管理</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpProject" runat="server" Label="项目" EnableEdit="true" FocusOnPageLoad="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtEquipmentName" runat="server" Label="设备名称" Required="true" ShowRedStar="true" MaxLength="200">
</f:TextBox>
<f:TextBox ID="txtEquipmentModel" runat="server" Label="型号" MaxLength="200">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtNumber" runat="server" Label="数量" NoDecimal="true" NoNegative="true">
</f:NumberBox>
<f:TextBox ID="txtRunningState" runat="server" Label="运行状态" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtSupplier" runat="server" Label="供货商" MaxLength="500">
</f:TextBox>
<f:TextBox ID="txtSupplierMan" runat="server" Label="联系人" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtSupplierTel" runat="server" Label="联系电话" MaxLength="50">
</f:TextBox>
<f:Label runat="server" ID="lb"></f:Label>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Hidden="true"
OnClick="btnSave_Click" Text="保存">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>
@@ -0,0 +1,167 @@
using BLL;
using FineUIPro.Web.CQMS.Material;
using System;
using System.Linq;
namespace FineUIPro.Web.SmartSite
{
public partial class EquipmentManageEdit : PageBase
{
#region 定义项
/// <summary>
/// 安全措施主键
/// </summary>
public string EquipmentId
{
get
{
return (string)ViewState["EquipmentId"];
}
set
{
ViewState["EquipmentId"] = value;
}
}
/// <summary>
/// 类型
/// </summary>
public string Type
{
get
{
return (string)ViewState["Type"];
}
set
{
ViewState["Type"] = value;
}
}
/// <summary>
/// 菜单id
/// </summary>
public string MenuId
{
get
{
return (string)ViewState["MenuId"];
}
set
{
ViewState["MenuId"] = value;
}
}
#endregion
/// <summary>
/// 安全措施编辑页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.EquipmentId = Request.Params["EquipmentId"];
this.Type = Request.Params["type"];
if (this.Type == "D")
{
this.MenuId = Const.EquipmentManageDMenuId;
}
else if (this.Type == "M")
{
this.MenuId = Const.EquipmentManageMMenuId;
}
else
{
this.MenuId = Const.EquipmentManageEMenuId;
}
///权限
this.GetButtonPower();
ProjectService.InitProjectDropDownList(this.drpProject, true);
if (!string.IsNullOrEmpty(this.EquipmentId))
{
var Equipment = BLL.EquipmentService.GetEquipmentByEquipmentId(this.EquipmentId);
if (Equipment != null)
{
ProjectService.InitAllProjectDropDownList(this.drpProject, true);
this.drpProject.SelectedValue = Equipment.ProjectId;
this.Type = Equipment.Type;
this.txtEquipmentName.Text = Equipment.EquipmentName;
this.txtEquipmentModel.Text = Equipment.EquipmentModel;
this.txtNumber.Text = Equipment.Number.ToString();
this.txtRunningState.Text = Equipment.RunningState;
this.txtSupplier.Text = Equipment.Supplier;
this.txtSupplierMan.Text = Equipment.SupplierMan;
this.txtSupplierTel.Text = Equipment.SupplierTel;
}
}
}
}
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpProject.SelectedValue == Const._Null)
{
Alert.ShowInParent("请选择项目!", MessageBoxIcon.Warning);
return;
}
Model.SmartSite_Equipment newEquipment = new Model.SmartSite_Equipment
{
EquipmentName = this.txtEquipmentName.Text.Trim(),
Type = this.Type,
EquipmentModel = this.txtEquipmentModel.Text.Trim(),
Number = Funs.GetNewIntOrZero(this.txtNumber.Text.Trim()),
RunningState = this.txtRunningState.Text.Trim(),
Supplier = this.txtSupplier.Text.Trim(),
SupplierMan = this.txtSupplierMan.Text.Trim(),
SupplierTel = this.txtSupplierTel.Text.Trim(),
};
if (this.drpProject.SelectedValue != Const._Null)
{
newEquipment.ProjectId = this.drpProject.SelectedValue;
}
if (string.IsNullOrEmpty(this.EquipmentId))
{
newEquipment.EquipmentId = SQLHelper.GetNewID();
BLL.EquipmentService.AddEquipment(newEquipment);
BLL.LogService.AddSys_Log(this.CurrUser, newEquipment.EquipmentName, newEquipment.EquipmentId, this.MenuId, Const.BtnAdd);
}
else
{
newEquipment.EquipmentId = this.EquipmentId;
BLL.EquipmentService.UpdateEquipment(newEquipment);
BLL.LogService.AddSys_Log(this.CurrUser, newEquipment.EquipmentName, newEquipment.EquipmentId, this.MenuId, Const.BtnModify);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#region 获取按钮权限
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.MenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnSave.Hidden = false;
}
}
}
#endregion
}
}
@@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SmartSite
{
public partial class EquipmentManageEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpProject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProject;
/// <summary>
/// txtEquipmentName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentName;
/// <summary>
/// txtEquipmentModel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentModel;
/// <summary>
/// txtNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtNumber;
/// <summary>
/// txtRunningState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRunningState;
/// <summary>
/// txtSupplier 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupplier;
/// <summary>
/// txtSupplierMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupplierMan;
/// <summary>
/// txtSupplierTel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupplierTel;
/// <summary>
/// lb 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lb;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}
@@ -0,0 +1,106 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SoftManage.aspx.cs" Inherits="FineUIPro.Web.SmartSite.SoftManage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>软件管理</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="软件管理" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="EquipmentSoftId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="EquipmentSoftId" AllowSorting="true" SortField="ProjectName,EquipmentSoftName"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true" ForceFit="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
<Items>
<f:TextBox runat="server" ID="txtEquipmentName" EmptyText="按名称查询" AutoPostBack="true"
OnTextChanged="TextBox_TextChanged" Width="250px" LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="false" runat="server"
Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField Width="250px" ColumnID="ProjectName" DataField="ProjectName"
FieldType="String" HeaderText="项目名称" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="200px" ColumnID="EquipmentName" DataField="EquipmentName"
FieldType="String" HeaderText="软件名称" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="200px" ColumnID="EquipmentSoftName" DataField="EquipmentSoftName"
FieldType="String" HeaderText="软件名称" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="200px" ColumnID="EquipmentSoftModel" DataField="EquipmentSoftModel"
FieldType="String" HeaderText="软件版本" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="90px" ColumnID="Number" DataField="Number"
FieldType="Int" HeaderText="数量" HeaderTextAlign="Center" TextAlign="Right" >
</f:RenderField>
<f:RenderField Width="90px" ColumnID="RunningState" DataField="RunningState"
FieldType="String" HeaderText="运行状态" HeaderTextAlign="Center" TextAlign="Center" >
</f:RenderField>
<f:RenderField Width="220px" ColumnID="Supplier" DataField="Supplier"
FieldType="String" HeaderText="供货商" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SupplierMan" DataField="SupplierMan"
FieldType="String" HeaderText="售后联系人" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
<f:RenderField Width="120px" ColumnID="SupplierTel" DataField="SupplierTel"
FieldType="String" HeaderText="售后联系电话" HeaderTextAlign="Center" TextAlign="Right" >
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="软件管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="800px"
Height="380px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
Hidden="true" runat="server" Text="编辑" Icon="Pencil">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
Hidden="true" ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除"
Icon="Delete">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/jscript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>
@@ -0,0 +1,277 @@
namespace FineUIPro.Web.SmartSite
{
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
public partial class SoftManage : PageBase
{
/// <summary>
/// 类型
/// </summary>
public string Type
{
get
{
return (string)ViewState["Type"];
}
set
{
ViewState["Type"] = value;
}
}
/// <summary>
/// 菜单id
/// </summary>
public string MenuId
{
get
{
return (string)ViewState["MenuId"];
}
set
{
ViewState["MenuId"] = value;
}
}
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.Type = Request.Params["type"];
if (this.Type == "D")
{
this.MenuId = Const.SoftManageDMenuId;
}
else if (this.Type == "M")
{
this.MenuId = Const.SoftManageMMenuId;
}
else
{
this.MenuId = Const.SoftManageEMenuId;
}
////权限按钮方法
this.GetButtonPower();
this.btnNew.OnClientClick = Window1.GetShowReference("SoftManageEdit.aspx?type=" + this.Type) + "return false;";
Funs.DropDownPageSize(this.ddlPageSize);
// 绑定表格
this.BindGrid();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT EquipmentSoftId,Soft.ProjectId,P.ProjectName,Soft.Type,Soft.EquipmentSoftName,EQ.EquipmentName,EquipmentModel,Soft.Number,Soft.RunningState
,Soft.Supplier,Soft.SupplierMan,Soft.SupplierTel
FROM SmartSite_EquipmentSoft AS Soft
LEFT JOIN Base_Project AS P ON Soft.ProjectId=P.ProjectId
LEFT JOIN SmartSite_Equipment AS EQ ON Soft.EquipmentId=EQ.EquipmentId WHERE 1 = 1";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND Soft.Type = @Type";
listStr.Add(new SqlParameter("@Type", this.Type));
if (!string.IsNullOrEmpty(this.txtEquipmentName.Text.Trim()))
{
strSql += " AND EquipmentName LIKE @EquipmentName";
listStr.Add(new SqlParameter("@EquipmentName", "%" + this.txtEquipmentName.Text.Trim() + "%"));
}
//if (this.drpLicenseType.SelectedValue != BLL.Const._Null)
//{
// strSql += " AND EquipmentManage.LicenseType = @LicenseTypeId";
// listStr.Add(new SqlParameter("@LicenseTypeId", this.drpLicenseType.SelectedValue));
//}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#region 查询
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region 获取按钮权限
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.MenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(Const.BtnAdd))
{
this.btnNew.Hidden = false;
}
if (buttonList.Contains(Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
}
if (buttonList.Contains(Const.BtnDelete))
{
this.btnMenuDelete.Hidden = false;
}
}
}
#endregion
#region 删除数据
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
this.DeleteData();
}
/// <summary>
/// 删除方法
/// </summary>
private void DeleteData()
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, false))
{
var getD = EquipmentSoftService.GetEquipmentSoftByEquipmentSoftId(rowID);
if (getD != null)
{
LogService.AddSys_Log(this.CurrUser, getD.EquipmentSoftName.ToString(), getD.EquipmentSoftId,this.MenuId, BLL.Const.BtnDelete);
BLL.EquipmentSoftService.DeleteEquipmentSoftById(rowID);
}
}
}
BindGrid();
ShowNotify("删除数据成功!");
}
}
#endregion
#region 分页
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
this.Grid1.PageSize = Funs.GetNewIntOrZero(this.ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
BindGrid();
}
#endregion
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.EditData();
}
/// <summary>
/// 右键编辑事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
this.EditData();
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string Id = Grid1.SelectedRowID;
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SoftManageEdit.aspx?EquipmentSoftId={0}&type={1}", Id, this.Type, "编辑 - ")));
}
#region 判断是否可删除
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
//if (Funs.DB.Project_ProjectEquipmentManage.FirstOrDefault(x => x.EquipmentManageId == id) != null)
//{
// content = "该用户已在【项目用户】中使用,不能删除!";
//}
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content);
}
return false;
}
}
#endregion
}
}
+152
View File
@@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SmartSite
{
public partial class SoftManage
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtEquipmentName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentName;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}
@@ -0,0 +1,70 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SoftManageEdit.aspx.cs" Inherits="FineUIPro.Web.SmartSite.SoftManageEdit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>编辑软件管理</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpProject" runat="server" Label="项目" EnableEdit="true" FocusOnPageLoad="true"
AutoPostBack="true" OnSelectedIndexChanged="drpProject_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpEQ" runat="server" Label="设备" EnableEdit="true" >
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtEquipmentSoftName" runat="server" Label="软件名称" Required="true" ShowRedStar="true" MaxLength="200">
</f:TextBox>
<f:TextBox ID="txtEquipmentSoftModel" runat="server" Label="软件版本" MaxLength="200">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtNumber" runat="server" Label="数量" NoDecimal="true" NoNegative="true">
</f:NumberBox>
<f:TextBox ID="txtRunningState" runat="server" Label="运行状态" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtSupplier" runat="server" Label="供货商" MaxLength="500">
</f:TextBox>
<f:TextBox ID="txtSupplierMan" runat="server" Label="联系人" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtSupplierTel" runat="server" Label="联系电话" MaxLength="50">
</f:TextBox>
<f:Label runat="server" ID="lb"></f:Label>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" Hidden="true"
OnClick="btnSave_Click" Text="保存">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>
@@ -0,0 +1,180 @@
using BLL;
using FineUIPro.Web.CQMS.Material;
using System;
using System.Linq;
namespace FineUIPro.Web.SmartSite
{
public partial class SoftManageEdit : PageBase
{
#region 定义项
/// <summary>
/// 安全措施主键
/// </summary>
public string EquipmentSoftId
{
get
{
return (string)ViewState["EquipmentSoftId"];
}
set
{
ViewState["EquipmentSoftId"] = value;
}
}
/// <summary>
/// 类型
/// </summary>
public string Type
{
get
{
return (string)ViewState["Type"];
}
set
{
ViewState["Type"] = value;
}
}
/// <summary>
/// 菜单id
/// </summary>
public string MenuId
{
get
{
return (string)ViewState["MenuId"];
}
set
{
ViewState["MenuId"] = value;
}
}
#endregion
/// <summary>
/// 安全措施编辑页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.EquipmentSoftId = Request.Params["EquipmentSoftId"];
this.Type = Request.Params["type"];
if (this.Type == "D")
{
this.MenuId = Const.SoftManageDMenuId;
}
else if (this.Type == "M")
{
this.MenuId = Const.SoftManageMMenuId;
}
else
{
this.MenuId = Const.SoftManageEMenuId;
}
///权限
this.GetButtonPower();
ProjectService.InitProjectDropDownList(this.drpProject, true);
EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue, this.Type, true);
if (!string.IsNullOrEmpty(this.EquipmentSoftId))
{
var Equipment = BLL.EquipmentSoftService.GetEquipmentSoftByEquipmentSoftId(this.EquipmentSoftId);
if (Equipment != null)
{
ProjectService.InitAllProjectDropDownList(this.drpProject, true);
this.drpProject.SelectedValue = Equipment.ProjectId;
EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue, this.Type, true);
this.drpEQ.SelectedValue = Equipment.EquipmentId;
this.Type = Equipment.Type;
this.txtEquipmentSoftName.Text = Equipment.EquipmentSoftName;
this.txtEquipmentSoftModel.Text = Equipment.EquipmentSoftModel;
this.txtNumber.Text = Equipment.Number.ToString();
this.txtRunningState.Text = Equipment.RunningState;
this.txtSupplier.Text = Equipment.Supplier;
this.txtSupplierMan.Text = Equipment.SupplierMan;
this.txtSupplierTel.Text = Equipment.SupplierTel;
}
}
}
}
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpProject.SelectedValue == Const._Null)
{
Alert.ShowInParent("请选择项目!", MessageBoxIcon.Warning);
return;
}
Model.SmartSite_EquipmentSoft newEquipment = new Model.SmartSite_EquipmentSoft
{
EquipmentSoftName = this.txtEquipmentSoftName.Text.Trim(),
Type = this.Type,
EquipmentSoftModel = this.txtEquipmentSoftModel.Text.Trim(),
Number = Funs.GetNewIntOrZero(this.txtNumber.Text.Trim()),
RunningState = this.txtRunningState.Text.Trim(),
Supplier = this.txtSupplier.Text.Trim(),
SupplierMan = this.txtSupplierMan.Text.Trim(),
SupplierTel = this.txtSupplierTel.Text.Trim(),
};
if (this.drpProject.SelectedValue != Const._Null)
{
newEquipment.ProjectId = this.drpProject.SelectedValue;
}
if (this.drpEQ.SelectedValue != Const._Null)
{
newEquipment.EquipmentId = this.drpEQ.SelectedValue;
}
if (string.IsNullOrEmpty(this.EquipmentSoftId))
{
newEquipment.EquipmentSoftId = SQLHelper.GetNewID();
BLL.EquipmentSoftService.AddEquipmentSoft(newEquipment);
BLL.LogService.AddSys_Log(this.CurrUser, newEquipment.EquipmentSoftName, newEquipment.EquipmentSoftId, this.MenuId, Const.BtnAdd);
}
else
{
newEquipment.EquipmentSoftId = this.EquipmentSoftId;
BLL.EquipmentSoftService.UpdateEquipmentSoft(newEquipment);
BLL.LogService.AddSys_Log(this.CurrUser, newEquipment.EquipmentSoftName, newEquipment.EquipmentSoftId, this.MenuId, Const.BtnModify);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#region 获取按钮权限
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.MenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnSave.Hidden = false;
}
}
}
#endregion
protected void drpProject_SelectedIndexChanged(object sender, EventArgs e)
{
EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue,this.Type, true);
}
}
}
@@ -0,0 +1,161 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.SmartSite
{
public partial class SoftManageEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpProject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProject;
/// <summary>
/// drpEQ 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpEQ;
/// <summary>
/// txtEquipmentSoftName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentSoftName;
/// <summary>
/// txtEquipmentSoftModel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentSoftModel;
/// <summary>
/// txtNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtNumber;
/// <summary>
/// txtRunningState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRunningState;
/// <summary>
/// txtSupplier 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupplier;
/// <summary>
/// txtSupplierMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupplierMan;
/// <summary>
/// txtSupplierTel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupplierTel;
/// <summary>
/// lb 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lb;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}
+7 -4
View File
@@ -2,12 +2,15 @@
<Tree>
<TreeNode id="B6B783DE-2100-40CC-9910-B9F40C90C688" Text="智慧工地看板" NavigateUrl="">
</TreeNode>
<TreeNode id="C2C9C4BD-B10B-46AD-9468-66EF063517CF" Text="维护与管理" NavigateUrl=""><TreeNode id="15F04E9B-5893-4401-B864-BCDF7D67D13D" Text="设备管理" NavigateUrl=""><TreeNode id="B972AE90-D40C-44E0-9A90-7B47B2A3399B" Text="门禁设备管理" NavigateUrl=""></TreeNode>
<TreeNode id="908325CA-A50A-456D-8A7F-E193C629F2F9" Text="监控设备管理" NavigateUrl=""></TreeNode>
<TreeNode id="E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E" Text="环境设备管理" NavigateUrl=""></TreeNode>
<TreeNode id="C2C9C4BD-B10B-46AD-9468-66EF063517CF" Text="维护与管理" NavigateUrl=""><TreeNode id="15F04E9B-5893-4401-B864-BCDF7D67D13D" Text="设备管理" NavigateUrl=""><TreeNode id="B972AE90-D40C-44E0-9A90-7B47B2A3399B" Text="门禁设备管理" NavigateUrl="SmartSite/EquipmentManage.aspx?Type=D"></TreeNode>
<TreeNode id="908325CA-A50A-456D-8A7F-E193C629F2F9" Text="监控设备管理" NavigateUrl="SmartSite/EquipmentManage.aspx?Type=M"></TreeNode>
<TreeNode id="E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E" Text="环境设备管理" NavigateUrl="SmartSite/EquipmentManage.aspx?Type=E"></TreeNode>
<TreeNode id="04A361BF-BFC5-4D23-BF3C-3E5472D94A55" Text="预留拓展" NavigateUrl=""></TreeNode>
</TreeNode>
<TreeNode id="5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12" Text="软件管理" NavigateUrl=""></TreeNode>
<TreeNode id="5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12" Text="软件管理" NavigateUrl=""><TreeNode id="C126F42A-09B0-43D1-8DCF-9EA049B800A8" Text="门禁设备管理" NavigateUrl="SmartSite/SoftManage.aspx?Type=D"></TreeNode>
<TreeNode id="9F95F836-E10C-4EFD-B436-5C9D1658BAED" Text="监控设备管理" NavigateUrl="SmartSite/SoftManage.aspx?Type=M"></TreeNode>
<TreeNode id="834EE5EA-3DDA-49E1-A951-825392893E85" Text="环境设备管理" NavigateUrl="SmartSite/SoftManage.aspx?Type=E"></TreeNode>
</TreeNode>
<TreeNode id="C724ADE0-F445-40C7-9B33-560809A1DBFE" Text="数据接口管理" NavigateUrl=""><TreeNode id="9840E927-F9D1-4243-975C-56807CE60C95" Text="集团劳务实名制接口" NavigateUrl=""></TreeNode>
<TreeNode id="521E648B-5C61-46AD-9A60-ABF48150932F" Text="项目劳务实名制接口" NavigateUrl=""></TreeNode>
</TreeNode>
+809
View File
@@ -1394,6 +1394,12 @@ namespace Model
partial void InsertSitePerson_PersonItem(SitePerson_PersonItem instance);
partial void UpdateSitePerson_PersonItem(SitePerson_PersonItem instance);
partial void DeleteSitePerson_PersonItem(SitePerson_PersonItem instance);
partial void InsertSmartSite_Equipment(SmartSite_Equipment instance);
partial void UpdateSmartSite_Equipment(SmartSite_Equipment instance);
partial void DeleteSmartSite_Equipment(SmartSite_Equipment instance);
partial void InsertSmartSite_EquipmentSoft(SmartSite_EquipmentSoft instance);
partial void UpdateSmartSite_EquipmentSoft(SmartSite_EquipmentSoft instance);
partial void DeleteSmartSite_EquipmentSoft(SmartSite_EquipmentSoft instance);
partial void InsertSolution_ConstructSolution(Solution_ConstructSolution instance);
partial void UpdateSolution_ConstructSolution(Solution_ConstructSolution instance);
partial void DeleteSolution_ConstructSolution(Solution_ConstructSolution instance);
@@ -5370,6 +5376,22 @@ namespace Model
}
}
public System.Data.Linq.Table<SmartSite_Equipment> SmartSite_Equipment
{
get
{
return this.GetTable<SmartSite_Equipment>();
}
}
public System.Data.Linq.Table<SmartSite_EquipmentSoft> SmartSite_EquipmentSoft
{
get
{
return this.GetTable<SmartSite_EquipmentSoft>();
}
}
public System.Data.Linq.Table<Solution_ConstructSolution> Solution_ConstructSolution
{
get
@@ -23778,6 +23800,10 @@ namespace Model
private EntitySet<SitePerson_PersonItem> _SitePerson_PersonItem;
private EntitySet<SmartSite_Equipment> _SmartSite_Equipment;
private EntitySet<SmartSite_EquipmentSoft> _SmartSite_EquipmentSoft;
private EntitySet<Solution_ConstructSolution> _Solution_ConstructSolution;
private EntitySet<Solution_CQMSConstructSolution> _Solution_CQMSConstructSolution;
@@ -24045,6 +24071,8 @@ namespace Model
this._SitePerson_PersonInOut = new EntitySet<SitePerson_PersonInOut>(new Action<SitePerson_PersonInOut>(this.attach_SitePerson_PersonInOut), new Action<SitePerson_PersonInOut>(this.detach_SitePerson_PersonInOut));
this._SitePerson_PersonInOutNumber = new EntitySet<SitePerson_PersonInOutNumber>(new Action<SitePerson_PersonInOutNumber>(this.attach_SitePerson_PersonInOutNumber), new Action<SitePerson_PersonInOutNumber>(this.detach_SitePerson_PersonInOutNumber));
this._SitePerson_PersonItem = new EntitySet<SitePerson_PersonItem>(new Action<SitePerson_PersonItem>(this.attach_SitePerson_PersonItem), new Action<SitePerson_PersonItem>(this.detach_SitePerson_PersonItem));
this._SmartSite_Equipment = new EntitySet<SmartSite_Equipment>(new Action<SmartSite_Equipment>(this.attach_SmartSite_Equipment), new Action<SmartSite_Equipment>(this.detach_SmartSite_Equipment));
this._SmartSite_EquipmentSoft = new EntitySet<SmartSite_EquipmentSoft>(new Action<SmartSite_EquipmentSoft>(this.attach_SmartSite_EquipmentSoft), new Action<SmartSite_EquipmentSoft>(this.detach_SmartSite_EquipmentSoft));
this._Solution_ConstructSolution = new EntitySet<Solution_ConstructSolution>(new Action<Solution_ConstructSolution>(this.attach_Solution_ConstructSolution), new Action<Solution_ConstructSolution>(this.detach_Solution_ConstructSolution));
this._Solution_CQMSConstructSolution = new EntitySet<Solution_CQMSConstructSolution>(new Action<Solution_CQMSConstructSolution>(this.attach_Solution_CQMSConstructSolution), new Action<Solution_CQMSConstructSolution>(this.detach_Solution_CQMSConstructSolution));
this._Solution_ExpertArgument = new EntitySet<Solution_ExpertArgument>(new Action<Solution_ExpertArgument>(this.attach_Solution_ExpertArgument), new Action<Solution_ExpertArgument>(this.detach_Solution_ExpertArgument));
@@ -26547,6 +26575,32 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_Equipment_Base_Project", Storage="_SmartSite_Equipment", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet<SmartSite_Equipment> SmartSite_Equipment
{
get
{
return this._SmartSite_Equipment;
}
set
{
this._SmartSite_Equipment.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_EquipmentSoft_Base_Project", Storage="_SmartSite_EquipmentSoft", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet<SmartSite_EquipmentSoft> SmartSite_EquipmentSoft
{
get
{
return this._SmartSite_EquipmentSoft;
}
set
{
this._SmartSite_EquipmentSoft.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_ConstructSolution_Base_Project", Storage="_Solution_ConstructSolution", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet<Solution_ConstructSolution> Solution_ConstructSolution
{
@@ -28649,6 +28703,30 @@ namespace Model
entity.Base_Project = null;
}
private void attach_SmartSite_Equipment(SmartSite_Equipment entity)
{
this.SendPropertyChanging();
entity.Base_Project = this;
}
private void detach_SmartSite_Equipment(SmartSite_Equipment entity)
{
this.SendPropertyChanging();
entity.Base_Project = null;
}
private void attach_SmartSite_EquipmentSoft(SmartSite_EquipmentSoft entity)
{
this.SendPropertyChanging();
entity.Base_Project = this;
}
private void detach_SmartSite_EquipmentSoft(SmartSite_EquipmentSoft entity)
{
this.SendPropertyChanging();
entity.Base_Project = null;
}
private void attach_Solution_ConstructSolution(Solution_ConstructSolution entity)
{
this.SendPropertyChanging();
@@ -223496,6 +223574,737 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SmartSite_Equipment")]
public partial class SmartSite_Equipment : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _EquipmentId;
private string _ProjectId;
private string _Type;
private string _EquipmentName;
private string _EquipmentModel;
private System.Nullable<int> _Number;
private string _RunningState;
private string _Supplier;
private string _SupplierMan;
private string _SupplierTel;
private EntityRef<Base_Project> _Base_Project;
private EntitySet<SmartSite_EquipmentSoft> _SmartSite_EquipmentSoft;
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnEquipmentIdChanging(string value);
partial void OnEquipmentIdChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
partial void OnTypeChanging(string value);
partial void OnTypeChanged();
partial void OnEquipmentNameChanging(string value);
partial void OnEquipmentNameChanged();
partial void OnEquipmentModelChanging(string value);
partial void OnEquipmentModelChanged();
partial void OnNumberChanging(System.Nullable<int> value);
partial void OnNumberChanged();
partial void OnRunningStateChanging(string value);
partial void OnRunningStateChanged();
partial void OnSupplierChanging(string value);
partial void OnSupplierChanged();
partial void OnSupplierManChanging(string value);
partial void OnSupplierManChanged();
partial void OnSupplierTelChanging(string value);
partial void OnSupplierTelChanged();
#endregion
public SmartSite_Equipment()
{
this._Base_Project = default(EntityRef<Base_Project>);
this._SmartSite_EquipmentSoft = new EntitySet<SmartSite_EquipmentSoft>(new Action<SmartSite_EquipmentSoft>(this.attach_SmartSite_EquipmentSoft), new Action<SmartSite_EquipmentSoft>(this.detach_SmartSite_EquipmentSoft));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string EquipmentId
{
get
{
return this._EquipmentId;
}
set
{
if ((this._EquipmentId != value))
{
this.OnEquipmentIdChanging(value);
this.SendPropertyChanging();
this._EquipmentId = value;
this.SendPropertyChanged("EquipmentId");
this.OnEquipmentIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
if (this._Base_Project.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnProjectIdChanging(value);
this.SendPropertyChanging();
this._ProjectId = value;
this.SendPropertyChanged("ProjectId");
this.OnProjectIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="VarChar(2)")]
public string Type
{
get
{
return this._Type;
}
set
{
if ((this._Type != value))
{
this.OnTypeChanging(value);
this.SendPropertyChanging();
this._Type = value;
this.SendPropertyChanged("Type");
this.OnTypeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentName", DbType="NVarChar(200)")]
public string EquipmentName
{
get
{
return this._EquipmentName;
}
set
{
if ((this._EquipmentName != value))
{
this.OnEquipmentNameChanging(value);
this.SendPropertyChanging();
this._EquipmentName = value;
this.SendPropertyChanged("EquipmentName");
this.OnEquipmentNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentModel", DbType="NVarChar(200)")]
public string EquipmentModel
{
get
{
return this._EquipmentModel;
}
set
{
if ((this._EquipmentModel != value))
{
this.OnEquipmentModelChanging(value);
this.SendPropertyChanging();
this._EquipmentModel = value;
this.SendPropertyChanged("EquipmentModel");
this.OnEquipmentModelChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Int")]
public System.Nullable<int> Number
{
get
{
return this._Number;
}
set
{
if ((this._Number != value))
{
this.OnNumberChanging(value);
this.SendPropertyChanging();
this._Number = value;
this.SendPropertyChanged("Number");
this.OnNumberChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunningState", DbType="NVarChar(50)")]
public string RunningState
{
get
{
return this._RunningState;
}
set
{
if ((this._RunningState != value))
{
this.OnRunningStateChanging(value);
this.SendPropertyChanging();
this._RunningState = value;
this.SendPropertyChanged("RunningState");
this.OnRunningStateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Supplier", DbType="NVarChar(500)")]
public string Supplier
{
get
{
return this._Supplier;
}
set
{
if ((this._Supplier != value))
{
this.OnSupplierChanging(value);
this.SendPropertyChanging();
this._Supplier = value;
this.SendPropertyChanged("Supplier");
this.OnSupplierChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierMan", DbType="NVarChar(50)")]
public string SupplierMan
{
get
{
return this._SupplierMan;
}
set
{
if ((this._SupplierMan != value))
{
this.OnSupplierManChanging(value);
this.SendPropertyChanging();
this._SupplierMan = value;
this.SendPropertyChanged("SupplierMan");
this.OnSupplierManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierTel", DbType="NVarChar(50)")]
public string SupplierTel
{
get
{
return this._SupplierTel;
}
set
{
if ((this._SupplierTel != value))
{
this.OnSupplierTelChanging(value);
this.SendPropertyChanging();
this._SupplierTel = value;
this.SendPropertyChanged("SupplierTel");
this.OnSupplierTelChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_Equipment_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
get
{
return this._Base_Project.Entity;
}
set
{
Base_Project previousValue = this._Base_Project.Entity;
if (((previousValue != value)
|| (this._Base_Project.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Base_Project.Entity = null;
previousValue.SmartSite_Equipment.Remove(this);
}
this._Base_Project.Entity = value;
if ((value != null))
{
value.SmartSite_Equipment.Add(this);
this._ProjectId = value.ProjectId;
}
else
{
this._ProjectId = default(string);
}
this.SendPropertyChanged("Base_Project");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_EquipmentSoft_SmartSite_Equipment", Storage="_SmartSite_EquipmentSoft", ThisKey="EquipmentId", OtherKey="EquipmentId", DeleteRule="NO ACTION")]
public EntitySet<SmartSite_EquipmentSoft> SmartSite_EquipmentSoft
{
get
{
return this._SmartSite_EquipmentSoft;
}
set
{
this._SmartSite_EquipmentSoft.Assign(value);
}
}
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));
}
}
private void attach_SmartSite_EquipmentSoft(SmartSite_EquipmentSoft entity)
{
this.SendPropertyChanging();
entity.SmartSite_Equipment = this;
}
private void detach_SmartSite_EquipmentSoft(SmartSite_EquipmentSoft entity)
{
this.SendPropertyChanging();
entity.SmartSite_Equipment = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SmartSite_EquipmentSoft")]
public partial class SmartSite_EquipmentSoft : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _EquipmentSoftId;
private string _EquipmentId;
private string _ProjectId;
private string _Type;
private string _EquipmentSoftName;
private string _EquipmentSoftModel;
private System.Nullable<int> _Number;
private string _RunningState;
private string _Supplier;
private string _SupplierMan;
private string _SupplierTel;
private EntityRef<Base_Project> _Base_Project;
private EntityRef<SmartSite_Equipment> _SmartSite_Equipment;
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnEquipmentSoftIdChanging(string value);
partial void OnEquipmentSoftIdChanged();
partial void OnEquipmentIdChanging(string value);
partial void OnEquipmentIdChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
partial void OnTypeChanging(string value);
partial void OnTypeChanged();
partial void OnEquipmentSoftNameChanging(string value);
partial void OnEquipmentSoftNameChanged();
partial void OnEquipmentSoftModelChanging(string value);
partial void OnEquipmentSoftModelChanged();
partial void OnNumberChanging(System.Nullable<int> value);
partial void OnNumberChanged();
partial void OnRunningStateChanging(string value);
partial void OnRunningStateChanged();
partial void OnSupplierChanging(string value);
partial void OnSupplierChanged();
partial void OnSupplierManChanging(string value);
partial void OnSupplierManChanged();
partial void OnSupplierTelChanging(string value);
partial void OnSupplierTelChanged();
#endregion
public SmartSite_EquipmentSoft()
{
this._Base_Project = default(EntityRef<Base_Project>);
this._SmartSite_Equipment = default(EntityRef<SmartSite_Equipment>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentSoftId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string EquipmentSoftId
{
get
{
return this._EquipmentSoftId;
}
set
{
if ((this._EquipmentSoftId != value))
{
this.OnEquipmentSoftIdChanging(value);
this.SendPropertyChanging();
this._EquipmentSoftId = value;
this.SendPropertyChanged("EquipmentSoftId");
this.OnEquipmentSoftIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentId", DbType="NVarChar(50)")]
public string EquipmentId
{
get
{
return this._EquipmentId;
}
set
{
if ((this._EquipmentId != value))
{
if (this._SmartSite_Equipment.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnEquipmentIdChanging(value);
this.SendPropertyChanging();
this._EquipmentId = value;
this.SendPropertyChanged("EquipmentId");
this.OnEquipmentIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
if (this._Base_Project.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnProjectIdChanging(value);
this.SendPropertyChanging();
this._ProjectId = value;
this.SendPropertyChanged("ProjectId");
this.OnProjectIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="VarChar(2)")]
public string Type
{
get
{
return this._Type;
}
set
{
if ((this._Type != value))
{
this.OnTypeChanging(value);
this.SendPropertyChanging();
this._Type = value;
this.SendPropertyChanged("Type");
this.OnTypeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentSoftName", DbType="NVarChar(200)")]
public string EquipmentSoftName
{
get
{
return this._EquipmentSoftName;
}
set
{
if ((this._EquipmentSoftName != value))
{
this.OnEquipmentSoftNameChanging(value);
this.SendPropertyChanging();
this._EquipmentSoftName = value;
this.SendPropertyChanged("EquipmentSoftName");
this.OnEquipmentSoftNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentSoftModel", DbType="NVarChar(200)")]
public string EquipmentSoftModel
{
get
{
return this._EquipmentSoftModel;
}
set
{
if ((this._EquipmentSoftModel != value))
{
this.OnEquipmentSoftModelChanging(value);
this.SendPropertyChanging();
this._EquipmentSoftModel = value;
this.SendPropertyChanged("EquipmentSoftModel");
this.OnEquipmentSoftModelChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Int")]
public System.Nullable<int> Number
{
get
{
return this._Number;
}
set
{
if ((this._Number != value))
{
this.OnNumberChanging(value);
this.SendPropertyChanging();
this._Number = value;
this.SendPropertyChanged("Number");
this.OnNumberChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunningState", DbType="NVarChar(50)")]
public string RunningState
{
get
{
return this._RunningState;
}
set
{
if ((this._RunningState != value))
{
this.OnRunningStateChanging(value);
this.SendPropertyChanging();
this._RunningState = value;
this.SendPropertyChanged("RunningState");
this.OnRunningStateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Supplier", DbType="NVarChar(500)")]
public string Supplier
{
get
{
return this._Supplier;
}
set
{
if ((this._Supplier != value))
{
this.OnSupplierChanging(value);
this.SendPropertyChanging();
this._Supplier = value;
this.SendPropertyChanged("Supplier");
this.OnSupplierChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierMan", DbType="NVarChar(50)")]
public string SupplierMan
{
get
{
return this._SupplierMan;
}
set
{
if ((this._SupplierMan != value))
{
this.OnSupplierManChanging(value);
this.SendPropertyChanging();
this._SupplierMan = value;
this.SendPropertyChanged("SupplierMan");
this.OnSupplierManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierTel", DbType="NVarChar(50)")]
public string SupplierTel
{
get
{
return this._SupplierTel;
}
set
{
if ((this._SupplierTel != value))
{
this.OnSupplierTelChanging(value);
this.SendPropertyChanging();
this._SupplierTel = value;
this.SendPropertyChanged("SupplierTel");
this.OnSupplierTelChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_EquipmentSoft_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
get
{
return this._Base_Project.Entity;
}
set
{
Base_Project previousValue = this._Base_Project.Entity;
if (((previousValue != value)
|| (this._Base_Project.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Base_Project.Entity = null;
previousValue.SmartSite_EquipmentSoft.Remove(this);
}
this._Base_Project.Entity = value;
if ((value != null))
{
value.SmartSite_EquipmentSoft.Add(this);
this._ProjectId = value.ProjectId;
}
else
{
this._ProjectId = default(string);
}
this.SendPropertyChanged("Base_Project");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_EquipmentSoft_SmartSite_Equipment", Storage="_SmartSite_Equipment", ThisKey="EquipmentId", OtherKey="EquipmentId", IsForeignKey=true)]
public SmartSite_Equipment SmartSite_Equipment
{
get
{
return this._SmartSite_Equipment.Entity;
}
set
{
SmartSite_Equipment previousValue = this._SmartSite_Equipment.Entity;
if (((previousValue != value)
|| (this._SmartSite_Equipment.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._SmartSite_Equipment.Entity = null;
previousValue.SmartSite_EquipmentSoft.Remove(this);
}
this._SmartSite_Equipment.Entity = value;
if ((value != null))
{
value.SmartSite_EquipmentSoft.Add(this);
this._EquipmentId = value.EquipmentId;
}
else
{
this._EquipmentId = default(string);
}
this.SendPropertyChanged("SmartSite_Equipment");
}
}
}
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.Solution_ConstructSolution")]
public partial class Solution_ConstructSolution : INotifyPropertyChanging, INotifyPropertyChanged
{
+1 -1
View File
@@ -361,7 +361,7 @@
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:9850/</IISUrl>
<IISUrl>http://localhost:3528/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>