自主管理加分项
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
--1、项目级——设置隐藏部分菜单
|
||||
update Sys_Menu
|
||||
set IsUsed=0
|
||||
where MenuType='Menu_ProjectSet' and MenuName in ('项目概况','项目主项','单位工程','项目状态','项目进度设置')
|
||||
where MenuType='Menu_ProjectSet' and MenuName in ('项目概况','项目主项','项目状态','项目进度设置')
|
||||
|
||||
--2、项目级——员工管理(原:安全管理)隐藏部分菜单
|
||||
update Sys_Menu
|
||||
@@ -28,7 +28,7 @@ END
|
||||
GO
|
||||
|
||||
--HSE绩效考核
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '7DD00BEF-821D-4996-ADF8-695139F201B4')
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '9667D2CB-8AAE-4799-8C94-A051F9846ECE')
|
||||
BEGIN
|
||||
--一人一档
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
@@ -39,22 +39,18 @@ BEGIN
|
||||
--考核扣分情况
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('0BCE76EA-319F-47BF-913A-A32735641F5C','考核扣分情况','HSSE/Examine/MinusScoreSituation.aspx',2,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--个人安全行动计划
|
||||
--自主管理加分项
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('7DD00BEF-821D-4996-ADF8-695139F201B4','个人安全行动计划','HSSE/Examine/PersonalSafetyActionPlan.aspx',10,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--安全经验分享
|
||||
VALUES('9667D2CB-8AAE-4799-8C94-A051F9846ECE','自主管理加分项','HSSE/Examine/BonusScoreSelfManagement.aspx',3,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--自主管理加分项类型
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','安全经验分享','HSSE/Examine/SharingOfSafetyExperience.aspx',20,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--领导人员参加班组作业分析会
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('05F4AC73-1BA2-4FF2-AAED-292DF5E44412','领导人员参加班组作业分析会','HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx',30,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--一线党员联系班组共建活动
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','一线党员联系班组共建活动','HSSE/Examine/CoConstructionActivities.aspx',40,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
--行为安全观察与沟通
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('5049BB69-A75F-47D4-ABF3-DAA719D05C74','行为安全观察与沟通','HSSE/Examine/BehavioralSafetyObservation.aspx',50,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
VALUES('8526FC57-F2A8-483F-A7EF-724785B9B676','自主管理加分项类型','HSSE/Examine/BonusScoreType.aspx',100,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1)
|
||||
END
|
||||
GO
|
||||
DELETE FROM Sys_Menu WHERE MenuId in( '5049BB69-A75F-47D4-ABF3-DAA719D05C74','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','7DD00BEF-821D-4996-ADF8-695139F201B4','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F')
|
||||
|
||||
DELETE FROM Sys_ButtonToMenu WHERE MenuId in( '5049BB69-A75F-47D4-ABF3-DAA719D05C74','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','7DD00BEF-821D-4996-ADF8-695139F201B4','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F')
|
||||
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'AE58F042-DDAA-4980-A3E8-9A1F36349E45')
|
||||
BEGIN
|
||||
@@ -82,6 +78,32 @@ BEGIN
|
||||
VALUES('DCE4B049-B421-4C32-AA2A-2A4E099E1441','6957A732-BA33-499E-AB32-DB1F73BEA8CE','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '8526FC57-F2A8-483F-A7EF-724785B9B676')
|
||||
BEGIN
|
||||
--自主管理加分项类型
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('186FB2FE-E5DC-4DE6-AE85-82601C6CD128','8526FC57-F2A8-483F-A7EF-724785B9B676','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('D75AB4D5-D8E0-43FB-A4C2-3E28E52640A3','8526FC57-F2A8-483F-A7EF-724785B9B676','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('4D8357DA-3875-4EAB-96E7-80874E2C9E72','8526FC57-F2A8-483F-A7EF-724785B9B676','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('74DF5644-CD71-46AF-8E17-EE7BD8A2E579','8526FC57-F2A8-483F-A7EF-724785B9B676','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '9667D2CB-8AAE-4799-8C94-A051F9846ECE')
|
||||
BEGIN
|
||||
--自主管理加分项
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('000A444E-33C0-486D-8AE9-83312C8FD7B6','9667D2CB-8AAE-4799-8C94-A051F9846ECE','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('37DF7EAC-51A0-48F0-8706-7B7F4F42BC5E','9667D2CB-8AAE-4799-8C94-A051F9846ECE','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('43280BEC-8DD0-45A2-AC79-0454E17A795E','9667D2CB-8AAE-4799-8C94-A051F9846ECE','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('AEDA614E-4A1F-48B8-86AE-69A8C5190BE5','9667D2CB-8AAE-4799-8C94-A051F9846ECE','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '0BCE76EA-319F-47BF-913A-A32735641F5C')
|
||||
BEGIN
|
||||
--考核扣分情况
|
||||
@@ -95,72 +117,6 @@ BEGIN
|
||||
VALUES('E1FA46F3-16AD-4490-88AD-78CEF5C6EEB5','0BCE76EA-319F-47BF-913A-A32735641F5C','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '7DD00BEF-821D-4996-ADF8-695139F201B4')
|
||||
BEGIN
|
||||
--个人安全行动计划
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('2BF3A978-509B-4B1D-B753-44CD8022306E','7DD00BEF-821D-4996-ADF8-695139F201B4','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('3998D101-3D6C-4E2B-9A3E-D017C3AA6ECE','7DD00BEF-821D-4996-ADF8-695139F201B4','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('7C4F9425-CB92-4CCE-9D0E-06704FDC0143','7DD00BEF-821D-4996-ADF8-695139F201B4','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('5DE92E82-AD0A-4AF9-8C95-B95D4EA76EE9','7DD00BEF-821D-4996-ADF8-695139F201B4','保存',4)
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'D5FC7B12-0E81-482C-8B29-A9F43DF05D1F')
|
||||
BEGIN
|
||||
--安全经验分享
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('CBFABD5C-B06F-46F2-A16C-77D786842CCE','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('EE65207D-0B5A-436B-9E05-9E3C83A7534B','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('ABCA59A7-EF1B-4048-B49F-DDB9E6EDB6B1','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('35C610A1-14C8-4EF7-AFC9-0AD6F3E9681C','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '05F4AC73-1BA2-4FF2-AAED-292DF5E44412')
|
||||
BEGIN
|
||||
--领导人员参加班组作业分析会
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E3B77A21-145E-4D49-8717-CE3E01520C82','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('A8DA2937-3EA0-4614-BAF1-2A33D2B75D0A','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('2E75AB23-2803-4443-8D32-3496637DFAC1','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('5CA1D1DB-9277-4935-8B75-2B2D35EEACA3','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E')
|
||||
BEGIN
|
||||
--一线党员联系班组共建活动
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('00563682-98B7-4A1C-A350-1F8DB70D617F','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('01DE53E4-6F14-404F-9640-D3E3A9CA04EB','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('FFEC663E-A4B6-46E4-A828-B1385BDB63C3','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('11B87F2F-B1FA-455F-860B-C959C9C1AAC4','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '5049BB69-A75F-47D4-ABF3-DAA719D05C74')
|
||||
BEGIN
|
||||
--行为安全观察与沟通
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('EB59D454-196F-4E25-9100-9008755A2B6C','5049BB69-A75F-47D4-ABF3-DAA719D05C74','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('42E7228B-E763-4A4D-AEC0-0CD4295173DC','5049BB69-A75F-47D4-ABF3-DAA719D05C74','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('BBA6B3D1-27BD-4FFA-9385-0AB018CCFB85','5049BB69-A75F-47D4-ABF3-DAA719D05C74','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('D0E6A314-D55D-4C1E-AA45-F77E05841008','5049BB69-A75F-47D4-ABF3-DAA719D05C74','保存',4)
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
/**************************************新增数据表***************************************************************/
|
||||
@@ -218,6 +174,81 @@ END
|
||||
GO
|
||||
|
||||
|
||||
--自主管理加分项
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_BonusScoreSelfManagement') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_BonusScoreSelfManagement](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[BonusScoreTypeId] [nvarchar](50) NULL,
|
||||
[BonusScoreTypeName] [nvarchar](100) NOT NULL,
|
||||
[Score] [int] NOT NULL,
|
||||
[PersonId] [nvarchar](50) NULL,
|
||||
[Content] [nvarchar](1000) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_BonusScoreSelfManagement] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSelfManagement] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreSelfManagement_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSelfManagement] CHECK CONSTRAINT [FK_Examine_BonusScoreSelfManagement_Base_Project]
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSelfManagement] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreSelfManagement_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreSelfManagement] CHECK CONSTRAINT [FK_Examine_BonusScoreSelfManagement_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加分类型Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'BonusScoreTypeId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加分类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'BonusScoreTypeName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Score'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'PersonId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Content'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自主管理加分项' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
--自主管理加分项类型
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_BonusScoreType') AND type = N'U')
|
||||
BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[Examine_BonusScoreType](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Score] [int] NOT NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Examine_BonusScoreType] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreType] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreType_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[Examine_BonusScoreType] CHECK CONSTRAINT [FK_Examine_BonusScoreType_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Code'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Name'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Score'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Remark'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自主管理加分项类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType'
|
||||
END
|
||||
|
||||
|
||||
--考核扣分情况
|
||||
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
|
||||
--1、公司培训教材补充适用岗位
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Training_CompanyTrainingItem' AND COLUMN_NAME = 'WorkPostNames')
|
||||
BEGIN
|
||||
ALTER TABLE Training_CompanyTrainingItem ADD WorkPostNames nvarchar(max);
|
||||
ALTER TABLE Training_CompanyTrainingItem ALTER COLUMN WorkPostIds nvarchar(max);
|
||||
END
|
||||
GO
|
||||
|
||||
--岗位培训
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
|
||||
|
||||
--1、公司培训教材补充适用岗位、熟练程度
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Training_CompanyTrainingItem' AND COLUMN_NAME = 'WorkPostNames')
|
||||
BEGIN
|
||||
ALTER TABLE Training_CompanyTrainingItem ADD WorkPostNames nvarchar(max);
|
||||
ALTER TABLE Training_CompanyTrainingItem ALTER COLUMN WorkPostIds nvarchar(max);
|
||||
ALTER TABLE Training_CompanyTrainingItem ADD Outcome INT DEFAULT(0) ;
|
||||
END
|
||||
GO
|
||||
ALTER TABLE Training_CompanyTrainingItem
|
||||
DROP COLUMN Effect;
|
||||
|
||||
--2、HSE日常巡检补充重修教材Id
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'HSSE_Hazard_HazardRegister' AND COLUMN_NAME = 'CompanyTrainingItemId')
|
||||
BEGIN
|
||||
ALTER TABLE HSSE_Hazard_HazardRegister ADD CompanyTrainingItemId nvarchar(50);
|
||||
END
|
||||
GO
|
||||
--3、HSE领导带班检查补充责任人、重修教材Id
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Check_ProjectLeaderCheck' AND COLUMN_NAME = 'CompanyTrainingItemId')
|
||||
BEGIN
|
||||
ALTER TABLE Check_ProjectLeaderCheck ADD ResponsibleMan nvarchar(50);
|
||||
ALTER TABLE Check_ProjectLeaderCheck ADD CompanyTrainingItemId nvarchar(50);
|
||||
END
|
||||
GO
|
||||
|
||||
--5、培训计划补充是否重修培训、检查类别、检查记录Id
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Training_Plan' AND COLUMN_NAME = 'IsRetakeCourse')
|
||||
BEGIN
|
||||
--是否重修培训
|
||||
ALTER TABLE Training_Plan ADD IsRetakeCourse INT DEFAULT(0) ;
|
||||
--检查类别
|
||||
ALTER TABLE Training_Plan ADD CheckType nvarchar(50) ;
|
||||
--检查记录Id
|
||||
ALTER TABLE Training_Plan ADD CheckId nvarchar(50) ;
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
/****** Object: View [dbo].[View_Hazard_HazardRegister] Script Date: 2025-2-25 18:12:14 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
ALTER VIEW [dbo].[View_Hazard_HazardRegister] AS SELECT Registration.HazardRegisterId,
|
||||
Registration.HazardCode,
|
||||
Registration.RegisterDate,
|
||||
Registration.RegisterDef,
|
||||
Registration.Rectification,
|
||||
Registration.Place,
|
||||
Registration.ResponsibleUnit,
|
||||
Registration.Observer,
|
||||
Registration.Risk_Level,
|
||||
Registration.RectifiedDate,
|
||||
Registration.ProjectId,
|
||||
Project.UnitId AS PUnitId,
|
||||
ProjectUnit.UnitName AS PUnitName,
|
||||
Registration.states,
|
||||
Registration.IsEffective,
|
||||
Registration.ResponsibleMan,
|
||||
Registration.CheckManId,
|
||||
Registration.CheckTime,
|
||||
Registration.RectificationPeriod,
|
||||
Registration.ImageUrl,
|
||||
Registration.RectificationImageUrl,
|
||||
Registration.RectificationTime,
|
||||
Registration.ConfirmMan,
|
||||
Registration.ConfirmDate,
|
||||
Registration.HandleIdea,
|
||||
Registration.CutPayment,
|
||||
Registration.ProblemTypes,
|
||||
Registration.CheckSpecialId,
|
||||
Registration.CheckItemDetailId,
|
||||
Registration.SupCheckItemSetId,
|
||||
Registration.CheckItemSetId,
|
||||
Registration.SafeSupervisionId,
|
||||
Registration.SafeSupervisionIsOK,
|
||||
Project.ProjectName,
|
||||
Registration.CheckCycle,
|
||||
ISNULL(WorkArea.UnitWorkName,'') AS WorkAreaName,
|
||||
Unit.UnitName as ResponsibilityUnitName,
|
||||
User1.UserName AS ResponsibilityManName,
|
||||
User1.UserId AS ResponsibilityManId,
|
||||
ISNULL(User1.Telephone,'') AS ResponsibilityManTel,
|
||||
User2.UserName AS CheckManName,
|
||||
ISNULL(User2.Telephone,'') AS CheckManTel,
|
||||
User2.UnitId AS SendUnitId,
|
||||
User3.UserName AS ConfirmManName,
|
||||
ISNULL(User3.Telephone,'') AS ConfirmManTel,
|
||||
User4.UserName AS ResponsibilityManName2,
|
||||
ISNULL(User4.Telephone,'') AS ResponsibilityMan2Tel,
|
||||
(CASE WHEN Registration.states='1' and (Registration.SafeSupervisionIsOK is null OR Registration.SafeSupervisionIsOK=0) THEN '待整改'
|
||||
WHEN Registration.states='1' and Registration.SafeSupervisionIsOK=1 THEN '合格'
|
||||
WHEN Registration.states='2' THEN '已整改-待复查验收'
|
||||
WHEN Registration.states='3' THEN '已闭环'
|
||||
ELSE '已作废' END ) AS StatesStr,
|
||||
RegisterTypes.RegisterTypesId,
|
||||
RegisterTypes.RegisterTypesName,
|
||||
Registration.DIC_ID,
|
||||
Registration.CCManIds,
|
||||
CCManNames = STUFF(( SELECT ',' + UserName FROM Sys_User
|
||||
where PATINDEX('%,' + RTRIM(Sys_User.UserId) + ',%',',' + Registration.CCManIds + ',')>0
|
||||
ORDER BY PATINDEX('%,' + RTRIM(Registration.CCManIds) + ',%',',' + Registration.CCManIds + ',')
|
||||
FOR XML PATH('')), 1, 1,''),
|
||||
Registration.Requirements,
|
||||
Registration.CompanyTrainingItemId
|
||||
FROM dbo.HSSE_Hazard_HazardRegister AS Registration
|
||||
LEFT JOIN dbo.Base_Project AS Project ON Project.ProjectId = Registration.ProjectId
|
||||
LEFT JOIN dbo.Base_Unit AS ProjectUnit ON Project.UnitId = ProjectUnit.UnitId
|
||||
LEFT JOIN dbo.WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Registration.Place
|
||||
LEFT JOIN dbo.HSSE_Hazard_HazardRegisterTypes AS RegisterTypes ON RegisterTypes.RegisterTypesId = Registration.RegisterTypesId
|
||||
LEFT JOIN dbo.Base_Unit AS Unit ON Unit.UnitId = Registration.ResponsibleUnit
|
||||
LEFT JOIN dbo.Sys_User AS User1 ON User1.UserId = Registration.ResponsibleMan
|
||||
LEFT JOIN dbo.Sys_User AS User2 ON User2.UserId = Registration.CheckManId
|
||||
LEFT JOIN dbo.Sys_User AS User3 ON User3.UserId = Registration.ConfirmMan
|
||||
LEFT JOIN dbo.Sys_User AS User4 ON User4.UserId = Registration.ResponsibleMan2
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,342 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using EmitMapper;
|
||||
using EmitMapper.MappingConfiguration;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 自主管理加分项
|
||||
/// </summary>
|
||||
public static class APIBonusScoreSelfManagementService
|
||||
{
|
||||
#region 根据projectId、trainTypeId、TrainStates获取培训计划列表
|
||||
/// <summary>
|
||||
/// 根据projectId、trainTypeId、TrainStates获取培训计划列表
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.TrainingPlanItem> getTrainingPlanListByProjectIdTrainTypeIdTrainStates(string projectId, string trainTypeId, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_Plan
|
||||
where x.ProjectId == projectId && (x.States == states || states == null) && x.TrainTypeId == trainTypeId
|
||||
orderby x.TrainStartDate descending
|
||||
select new Model.TrainingPlanItem
|
||||
{
|
||||
PlanId = x.PlanId,
|
||||
PlanCode = x.PlanCode,
|
||||
PlanName = x.PlanName,
|
||||
ProjectId = x.ProjectId,
|
||||
TrainTypeId = x.TrainTypeId,
|
||||
TrainTypeName = db.Base_TrainType.First(y => y.TrainTypeId == x.TrainTypeId).TrainTypeName,
|
||||
TrainLevelId = x.TrainLevelId,
|
||||
TrainLevelName = db.Base_TrainLevel.First(y => y.TrainLevelId == x.TrainLevelId).TrainLevelName,
|
||||
DesignerName = db.Sys_User.First(y => y.UserId == x.DesignerId).UserName,
|
||||
DesignerId = x.DesignerId,
|
||||
DesignerDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.DesignerDate),
|
||||
TeachHour = x.TeachHour ?? 0,
|
||||
TeachAddress = x.TeachAddress,
|
||||
TeachMan = x.TeachMan,
|
||||
TrainStartDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TrainStartDate),
|
||||
States = x.States,
|
||||
QRCodeUrl = x.QRCodeUrl.Replace('\\', '/'),
|
||||
}).ToList();
|
||||
return getDataLists;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据培训ID获取培训计划详细
|
||||
/// <summary>
|
||||
/// 根据培训ID获取培训计划详细
|
||||
/// </summary>
|
||||
/// <param name="planId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.TrainingPlanItem getTrainingPlanByTrainingId(string planId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_Plan
|
||||
where x.PlanId == planId
|
||||
select new Model.TrainingPlanItem
|
||||
{
|
||||
PlanId = x.PlanId,
|
||||
PlanCode = x.PlanCode,
|
||||
PlanName = x.PlanName,
|
||||
ProjectId = x.ProjectId,
|
||||
TrainTypeId = x.TrainTypeId,
|
||||
TrainTypeName = db.Base_TrainType.First(y => y.TrainTypeId == x.TrainTypeId).TrainTypeName,
|
||||
TrainLevelId = x.TrainLevelId,
|
||||
TrainLevelName = db.Base_TrainLevel.First(y => y.TrainLevelId == x.TrainLevelId).TrainLevelName,
|
||||
TeachHour = x.TeachHour ?? 0,
|
||||
TeachAddress = x.TeachAddress,
|
||||
TrainStartDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TrainStartDate),
|
||||
TeachMan = x.TeachMan,
|
||||
UnitIds = x.UnitIds,
|
||||
WorkPostId = x.WorkPostId,
|
||||
TrainContent = x.TrainContent,
|
||||
UnitNames = UnitService.getUnitNamesUnitIds(x.UnitIds),
|
||||
WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIds(x.WorkPostId),
|
||||
DesignerId = x.DesignerId,
|
||||
DesignerName = db.Sys_User.First(y => y.UserId == x.DesignerId).UserName,
|
||||
DesignerDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TrainStartDate),
|
||||
States = x.States,
|
||||
QRCodeUrl = x.QRCodeUrl.Replace('\\', '/'),
|
||||
};
|
||||
return getDataLists.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据TrainingPlanId获取培训教材类型列表
|
||||
/// <summary>
|
||||
/// 根据TrainingPlanId获取培训教材类型列表
|
||||
/// </summary>
|
||||
/// <param name="trainingPlanId"></param>
|
||||
/// <returns>培训计划人员</returns>
|
||||
public static List<Model.TrainingPlanItemItem> getTrainingPlanItemListByTrainingPlanId(string trainingPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_PlanItem
|
||||
join y in db.Training_CompanyTraining on x.CompanyTrainingId equals y.CompanyTrainingId
|
||||
join z in db.Training_CompanyTrainingItem on x.CompanyTrainingItemId equals z.CompanyTrainingItemId
|
||||
where x.PlanId == trainingPlanId
|
||||
orderby y.CompanyTrainingCode
|
||||
select new Model.TrainingPlanItemItem
|
||||
{
|
||||
PlanItemId = x.PlanItemId,
|
||||
PlanId = x.PlanId,
|
||||
CompanyTrainingId = x.CompanyTrainingId,
|
||||
CompanyTrainingName = y.CompanyTrainingName,
|
||||
CompanyTrainingCode = y.CompanyTrainingCode,
|
||||
CompanyTrainingItemId = x.CompanyTrainingItemId,
|
||||
CompanyTrainingItemCode = z.CompanyTrainingItemCode,
|
||||
CompanyTrainingItemName = z.CompanyTrainingItemName,
|
||||
}).ToList();
|
||||
return getDataLists;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存培训计划
|
||||
/// <summary>
|
||||
/// 保存TrainingPlan
|
||||
/// </summary>
|
||||
/// <param name="trainingPlan">培训计划记录</param>
|
||||
/// <param name="trainingTasks">培训人员list</param>
|
||||
/// <param name="trainingPlanItems">培训教材类型list</param>
|
||||
public static void SaveTrainingPlan(Model.TrainingPlanItem trainingPlan)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Training_Plan newTrainingPlan = new Model.Training_Plan
|
||||
{
|
||||
PlanId = trainingPlan.PlanId,
|
||||
PlanCode = trainingPlan.PlanCode,
|
||||
ProjectId = trainingPlan.ProjectId,
|
||||
DesignerId = trainingPlan.DesignerId,
|
||||
PlanName = trainingPlan.PlanName,
|
||||
TrainContent = trainingPlan.TrainContent,
|
||||
TrainStartDate = Funs.GetNewDateTime(trainingPlan.TrainStartDate),
|
||||
TeachHour = trainingPlan.TeachHour,
|
||||
TeachMan = trainingPlan.TeachMan,
|
||||
TeachAddress = trainingPlan.TeachAddress,
|
||||
TrainTypeId = trainingPlan.TrainTypeId,
|
||||
UnitIds = trainingPlan.UnitIds,
|
||||
WorkPostId = trainingPlan.WorkPostId,
|
||||
States = trainingPlan.States,
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(trainingPlan.TrainLevelId))
|
||||
{
|
||||
newTrainingPlan.TrainLevelId = trainingPlan.TrainLevelId;
|
||||
}
|
||||
|
||||
if (newTrainingPlan.TrainStartDate.HasValue && newTrainingPlan.TeachHour.HasValue)
|
||||
{
|
||||
double dd = (double)((decimal)newTrainingPlan.TeachHour.Value);
|
||||
newTrainingPlan.TrainEndDate = newTrainingPlan.TrainStartDate.Value.AddHours(dd);
|
||||
}
|
||||
|
||||
List<Model.TrainingTaskItem> trainingTasks = trainingPlan.TrainingTasks;
|
||||
List<Model.TrainingPlanItemItem> trainingPlanItems = trainingPlan.TrainingPlanItems;
|
||||
|
||||
var isUpdate = db.Training_Plan.FirstOrDefault(x => x.PlanId == newTrainingPlan.PlanId);
|
||||
if (isUpdate == null)
|
||||
{
|
||||
newTrainingPlan.DesignerDate = DateTime.Now;
|
||||
string unitId = string.Empty;
|
||||
var user = UserService.GetUserByUserId(newTrainingPlan.DesignerId);
|
||||
if (user != null)
|
||||
{
|
||||
unitId = user.UnitId;
|
||||
}
|
||||
newTrainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, newTrainingPlan.ProjectId, unitId);
|
||||
if (string.IsNullOrEmpty(newTrainingPlan.PlanId))
|
||||
{
|
||||
newTrainingPlan.PlanId = SQLHelper.GetNewID();
|
||||
}
|
||||
db.Training_Plan.InsertOnSubmit(newTrainingPlan);
|
||||
db.SubmitChanges();
|
||||
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainingPlanMenuId, newTrainingPlan.ProjectId, null, newTrainingPlan.PlanId, newTrainingPlan.DesignerDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newTrainingPlan.States == "0" || newTrainingPlan.States == "1")
|
||||
{
|
||||
isUpdate.PlanName = newTrainingPlan.PlanName;
|
||||
isUpdate.TrainContent = newTrainingPlan.TrainContent;
|
||||
isUpdate.TrainStartDate = newTrainingPlan.TrainStartDate;
|
||||
isUpdate.TeachHour = newTrainingPlan.TeachHour;
|
||||
isUpdate.TrainEndDate = newTrainingPlan.TrainEndDate;
|
||||
isUpdate.TeachMan = newTrainingPlan.TeachMan;
|
||||
isUpdate.TeachAddress = newTrainingPlan.TeachAddress;
|
||||
isUpdate.TrainTypeId = newTrainingPlan.TrainTypeId;
|
||||
isUpdate.TrainLevelId = newTrainingPlan.TrainLevelId;
|
||||
isUpdate.UnitIds = newTrainingPlan.UnitIds;
|
||||
isUpdate.WorkPostId = newTrainingPlan.WorkPostId;
|
||||
isUpdate.States = newTrainingPlan.States;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
////删除培训任务
|
||||
var tasks = from x in db.Training_Task where x.PlanId == newTrainingPlan.PlanId select x;
|
||||
if (tasks.Count() > 0)
|
||||
{
|
||||
var taskItems = from x in db.Training_TaskItem where x.PlanId == newTrainingPlan.PlanId select x;
|
||||
if (tasks.Count() > 0)
|
||||
{
|
||||
db.Training_TaskItem.DeleteAllOnSubmit(taskItems);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
db.Training_Task.DeleteAllOnSubmit(tasks);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
////删除培训教材类型
|
||||
var planItem = (from x in db.Training_PlanItem where x.PlanId == newTrainingPlan.PlanId select x).ToList();
|
||||
if (planItem.Count() > 0)
|
||||
{
|
||||
db.Training_PlanItem.DeleteAllOnSubmit(planItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
if (trainingTasks.Count() > 0)
|
||||
{
|
||||
////新增培训人员明细
|
||||
foreach (var item in trainingTasks)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.PersonId))
|
||||
{
|
||||
Model.Training_Task newTrainDetail = new Model.Training_Task
|
||||
{
|
||||
TaskId = SQLHelper.GetNewID(),
|
||||
ProjectId = newTrainingPlan.ProjectId,
|
||||
PlanId = newTrainingPlan.PlanId,
|
||||
UserId = item.PersonId,
|
||||
TaskDate = DateTime.Now,
|
||||
States = Const.State_0, ////未生成培训教材明细
|
||||
};
|
||||
db.Training_Task.InsertOnSubmit(newTrainDetail);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (trainingPlanItems.Count() > 0)
|
||||
{
|
||||
////新增培训教材类型明细
|
||||
foreach (var item in trainingPlanItems)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.CompanyTrainingId) || !string.IsNullOrEmpty(item.CompanyTrainingItemId))
|
||||
{
|
||||
Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem
|
||||
{
|
||||
PlanItemId = SQLHelper.GetNewID(),
|
||||
PlanId = newTrainingPlan.PlanId,
|
||||
|
||||
};
|
||||
if (!string.IsNullOrEmpty(item.CompanyTrainingId))
|
||||
{
|
||||
newPlanItem.CompanyTrainingId = item.CompanyTrainingId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.CompanyTrainingItemId))
|
||||
{
|
||||
newPlanItem.CompanyTrainingItemId = item.CompanyTrainingItemId;
|
||||
}
|
||||
db.Training_PlanItem.InsertOnSubmit(newPlanItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增 培训人员明细
|
||||
/// </summary>
|
||||
public static void AddTraining_Task(List<Model.TrainingTaskItem> trainingTasks, string planId, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in trainingTasks)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.PersonId))
|
||||
{
|
||||
Model.Training_Task newTrainDetail = new Model.Training_Task
|
||||
{
|
||||
TaskId = SQLHelper.GetNewID(),
|
||||
ProjectId = projectId,
|
||||
PlanId = planId,
|
||||
UserId = item.PersonId,
|
||||
TaskDate = DateTime.Now,
|
||||
States = Const.State_0, ////未生成培训教材明细
|
||||
};
|
||||
|
||||
db.Training_Task.InsertOnSubmit(newTrainDetail);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增 培训教材类型 明细
|
||||
/// </summary>
|
||||
public static void AddTraining_PlanItem(List<Model.TrainingPlanItemItem> trainingPlanItems, string planId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in trainingPlanItems)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.CompanyTrainingId) || !string.IsNullOrEmpty(item.CompanyTrainingItemId))
|
||||
{
|
||||
Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem
|
||||
{
|
||||
PlanItemId = SQLHelper.GetNewID(),
|
||||
PlanId = planId,
|
||||
|
||||
};
|
||||
if (!string.IsNullOrEmpty(item.CompanyTrainingId))
|
||||
{
|
||||
newPlanItem.CompanyTrainingId = item.CompanyTrainingId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.CompanyTrainingItemId))
|
||||
{
|
||||
newPlanItem.CompanyTrainingItemId = item.CompanyTrainingItemId;
|
||||
}
|
||||
db.Training_PlanItem.InsertOnSubmit(newPlanItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -37,8 +37,8 @@ namespace BLL
|
||||
TrainTypeName = db.Base_TrainType.FirstOrDefault(b => b.TrainTypeId == y.TrainTypeId).TrainTypeName,
|
||||
TrainLevelName = db.Base_TrainLevel.FirstOrDefault(b => b.TrainLevelId == y.TrainLevelId).TrainLevelName,
|
||||
PlanStatesName = y.States == "3" ? "已完成" : "培训中",
|
||||
|
||||
}).ToList();
|
||||
|
||||
}).ToList();
|
||||
return getDataLists;
|
||||
}
|
||||
}
|
||||
@@ -66,14 +66,14 @@ namespace BLL
|
||||
TaskId = x.TaskId,
|
||||
PlanId = x.PlanId,
|
||||
PersonId = x.PersonId,
|
||||
StartTime = x.StartTime,
|
||||
EndTime = x.EndTime,
|
||||
LearnTime = x.LearnTime,
|
||||
VideoProgress = x.VideoProgress,
|
||||
TrainingItemCode = x.TrainingItemCode,
|
||||
StartTime = x.StartTime,
|
||||
EndTime = x.EndTime,
|
||||
LearnTime = x.LearnTime,
|
||||
VideoProgress = x.VideoProgress,
|
||||
TrainingItemCode = x.TrainingItemCode,
|
||||
TrainingItemName = x.TrainingItemName,
|
||||
AttachUrl = x.AttachUrl.Replace('\\', '/'),
|
||||
}).ToList();
|
||||
}).ToList();
|
||||
return getDataLists;
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ namespace BLL
|
||||
if (person != null && plan.ProjectId == person.ProjectId && plan.UnitIds.Contains(person.UnitId)
|
||||
&& (string.IsNullOrEmpty(plan.WorkPostId) || plan.WorkPostId.Contains(person.WorkPostId)))
|
||||
{
|
||||
var trainType = db.Base_TrainType.FirstOrDefault(e => e.TrainTypeId == plan.TrainTypeId);
|
||||
var trainType = db.Base_TrainType.FirstOrDefault(e => e.TrainTypeId == plan.TrainTypeId);
|
||||
if (trainType != null)
|
||||
{
|
||||
if (!trainType.IsRepeat.HasValue || trainType.IsRepeat == false)
|
||||
@@ -212,50 +212,50 @@ namespace BLL
|
||||
PersonId = x.UserId,
|
||||
PersonName = db.SitePerson_Person.FirstOrDefault(p => p.PersonId == x.UserId).PersonName,
|
||||
TaskDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TaskDate),
|
||||
States = x.States,
|
||||
States = x.States,
|
||||
}).ToList();
|
||||
return getDataLists;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
#region 根据TrainingPlanId获取培训任务教材明细列表
|
||||
/// <summary>
|
||||
/// 根据TrainingPlanId获取培训任务教材明细列表
|
||||
/// </summary>
|
||||
/// <param name="trainingPlanId"></param>
|
||||
/// <returns>培训计划人员</returns>
|
||||
public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId, DateTime startTime, DateTime endTime, string VideoProgress)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.Training_TaskItem
|
||||
where x.TaskItemId == taskItemId
|
||||
select x;
|
||||
var item = q.FirstOrDefault();
|
||||
if (!item.StartTime.HasValue)
|
||||
{
|
||||
item.StartTime = startTime;
|
||||
}
|
||||
#region 根据TrainingPlanId获取培训任务教材明细列表
|
||||
/// <summary>
|
||||
/// 根据TrainingPlanId获取培训任务教材明细列表
|
||||
/// </summary>
|
||||
/// <param name="trainingPlanId"></param>
|
||||
/// <returns>培训计划人员</returns>
|
||||
public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId, DateTime startTime, DateTime endTime, string VideoProgress)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.Training_TaskItem
|
||||
where x.TaskItemId == taskItemId
|
||||
select x;
|
||||
var item = q.FirstOrDefault();
|
||||
if (!item.StartTime.HasValue)
|
||||
{
|
||||
item.StartTime = startTime;
|
||||
}
|
||||
|
||||
if (!item.LearnTime.HasValue)
|
||||
{
|
||||
item.LearnTime = 0;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(VideoProgress))
|
||||
{
|
||||
item.VideoProgress = int.Parse(VideoProgress);
|
||||
}
|
||||
var span = endTime.Subtract(startTime);
|
||||
item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
||||
item.EndTime = endTime;
|
||||
db.SubmitChanges();
|
||||
return item;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
if (!item.LearnTime.HasValue)
|
||||
{
|
||||
item.LearnTime = 0;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(VideoProgress))
|
||||
{
|
||||
item.VideoProgress = int.Parse(VideoProgress);
|
||||
}
|
||||
var span = endTime.Subtract(startTime);
|
||||
item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes;
|
||||
item.EndTime = endTime;
|
||||
db.SubmitChanges();
|
||||
return item;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -219,6 +219,7 @@
|
||||
<Compile Include="API\HSSE\APIServerTestRecordService.cs" />
|
||||
<Compile Include="API\HSSE\APITestPlanService.cs" />
|
||||
<Compile Include="API\HSSE\APITestRecordService.cs" />
|
||||
<Compile Include="API\HSSE\APIBonusScoreSelfManagementService.cs" />
|
||||
<Compile Include="API\HSSE\APITrainingPlanService.cs" />
|
||||
<Compile Include="API\HSSE\APITrainingTaskService.cs" />
|
||||
<Compile Include="API\HSSE\APITrainTestRecordService.cs" />
|
||||
@@ -265,6 +266,7 @@
|
||||
<Compile Include="Common\Captcha.cs" />
|
||||
<Compile Include="Common\CodeRecordsService.cs" />
|
||||
<Compile Include="Common\CommonService.cs" />
|
||||
<Compile Include="Common\Enums.cs" />
|
||||
<Compile Include="Common\CreateQRCodeService.cs" />
|
||||
<Compile Include="Common\FastReportService.cs" />
|
||||
<Compile Include="Common\IDCardValid.cs" />
|
||||
@@ -553,13 +555,10 @@
|
||||
<Compile Include="HSSE\Environmental\EnvironmentalMonitoringService.cs" />
|
||||
<Compile Include="HSSE\Environmental\UnexpectedEnvironmentalService.cs" />
|
||||
<Compile Include="HSSE\Epidemic\Epidemic_MaterialService.cs" />
|
||||
<Compile Include="HSSE\Examine\BonusScoreSelfManagementService.cs" />
|
||||
<Compile Include="HSSE\Examine\MinusScoreSituationService.cs" />
|
||||
<Compile Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeetingService.cs" />
|
||||
<Compile Include="HSSE\Examine\CoConstructionActivitiesService.cs" />
|
||||
<Compile Include="HSSE\Examine\BehavioralSafetyObservationService.cs" />
|
||||
<Compile Include="HSSE\Examine\BonusScoreSituationService.cs" />
|
||||
<Compile Include="HSSE\Examine\SharingOfSafetyExperienceService.cs" />
|
||||
<Compile Include="HSSE\Examine\PersonalSafetyActionPlanService.cs" />
|
||||
<Compile Include="HSSE\Examine\BonusScoreTypeService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\FinalFileListService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\HSEFinalFileListService.cs" />
|
||||
<Compile Include="HSSE\FinalFileManage\OtherDocumentListService.cs" />
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace BLL
|
||||
var project = ProjectService.GetProjectByProjectId(list[0].ProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
proindex = project.ProjectCode + "-QC-TCC-XJ-";
|
||||
proindex = project.ProjectCode + "-QC-XJYJ-XJ-";
|
||||
}
|
||||
}
|
||||
for (int i = list.Count; i > 0; i--)
|
||||
|
||||
@@ -199,6 +199,60 @@ namespace BLL
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断文件类型是否支持的预览
|
||||
/// </summary>
|
||||
/// <param name="FiletExtension"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsSupportFileType(string FiletExtension)
|
||||
{
|
||||
bool result = false;
|
||||
List<String> list = new List<string>();
|
||||
list.Add(".doc");
|
||||
list.Add(".docx");
|
||||
list.Add(".pdf");
|
||||
list.Add(".txt");
|
||||
list.Add(".xlsx");
|
||||
list.Add(".xls");
|
||||
list.Add(".png");
|
||||
list.Add(".jpg");
|
||||
list.Add(".jpeg");
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item == FiletExtension)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断文件类型是否是图片
|
||||
/// </summary>
|
||||
/// <param name="FiletExtension"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsImage(string FiletExtension)
|
||||
{
|
||||
bool result = false;
|
||||
List<String> list = new List<string>();
|
||||
list.Add(".png");
|
||||
list.Add(".jpg");
|
||||
list.Add(".jpeg");
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item == FiletExtension)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
+15
-21
@@ -770,12 +770,16 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 默认用户密码
|
||||
/// </summary>
|
||||
public const string Password = "TCC.1234";
|
||||
public const string Password = "XJYJ.1234";
|
||||
|
||||
/// <summary>
|
||||
/// 入场培训类型ID
|
||||
/// 培训类型——入场培训类型ID
|
||||
/// </summary>
|
||||
public const string EntryTrainTypeId = "dfb6a37e-4412-4ba9-ad59-3bc505bc21f7";
|
||||
/// <summary>
|
||||
/// 培训类型——检查重修培训
|
||||
/// </summary>
|
||||
public const string RetakeCourseTrainTypeId = "2F687916-5E31-4DF3-97A3-E33E108C8070";
|
||||
|
||||
/// <summary>
|
||||
/// 微信订阅模板ID
|
||||
@@ -783,6 +787,11 @@ namespace BLL
|
||||
//public const string WX_TemplateID = "rG2tJ2ByE9I4SziW-zKglA56Ux1q0sZF0WCFLfK70Cs";
|
||||
public const string WX_TemplateID = "rG2tJ2ByE9I4SziW-zKglF9s6bk6eyV0WVrT5tqFq8I";
|
||||
|
||||
/// <summary>
|
||||
/// 培训级别——其它
|
||||
/// </summary>
|
||||
public const string OtherTrainLevelId = "de14948e-d3cb-436b-a962-80f1490ee9a9";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 按钮描述
|
||||
@@ -1779,29 +1788,14 @@ namespace BLL
|
||||
public const string MinusScoreSituationMenuId = "0BCE76EA-319F-47BF-913A-A32735641F5C";
|
||||
|
||||
/// <summary>
|
||||
/// 个人安全行动计划
|
||||
/// 自主管理加分项
|
||||
/// </summary>
|
||||
public const string PersonalSafetyActionPlanMenuId = "7DD00BEF-821D-4996-ADF8-695139F201B4";
|
||||
public const string BonusScoreSelfManagementMenuId = "9667D2CB-8AAE-4799-8C94-A051F9846ECE";
|
||||
|
||||
/// <summary>
|
||||
/// 安全经验分享
|
||||
/// 自主管理加分项类型
|
||||
/// </summary>
|
||||
public const string SharingOfSafetyExperienceMenuId = "D5FC7B12-0E81-482C-8B29-A9F43DF05D1F";
|
||||
|
||||
/// <summary>
|
||||
/// 领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
public const string LeadershipJoinHomeworkAnalysisMeetingMenuId = "05F4AC73-1BA2-4FF2-AAED-292DF5E44412";
|
||||
|
||||
/// <summary>
|
||||
/// 一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
public const string CoConstructionActivitiesMenuId = "D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E";
|
||||
|
||||
/// <summary>
|
||||
/// 行为安全观察与沟通
|
||||
/// </summary>
|
||||
public const string BehavioralSafetyObservationMenuId = "5049BB69-A75F-47D4-ABF3-DAA719D05C74";
|
||||
public const string BonusScoreTypeMenuId = "8526FC57-F2A8-483F-A7EF-724785B9B676";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class Enums
|
||||
{
|
||||
#region 培训考试
|
||||
|
||||
/// <summary>
|
||||
/// 培训效果
|
||||
/// </summary>
|
||||
public enum Outcome
|
||||
{
|
||||
掌握 = 0,
|
||||
熟悉 = 1,
|
||||
了解 = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 培训效果
|
||||
/// </summary>
|
||||
public static Dictionary<string, int> OutcomeMap = new Dictionary<string, int>
|
||||
{
|
||||
{ "掌握" ,(int)Outcome.掌握},
|
||||
{ "熟悉" ,(int)Outcome.熟悉},
|
||||
{ "了解" ,(int)Outcome.了解}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 培训效果下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitOutcomeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Key";
|
||||
dropName.DataSource = OutcomeMap;
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检查重修计划类型
|
||||
/// </summary>
|
||||
public enum RetakeCourseType
|
||||
{
|
||||
日常巡检 = 1,
|
||||
专项检查 = 2,
|
||||
领导带班检查 = 3,
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -140,6 +140,8 @@ namespace BLL
|
||||
IsHoldMeet = ProjectLeaderCheck.IsHoldMeet,
|
||||
Requirement = ProjectLeaderCheck.Requirement,
|
||||
LeaderNames = ProjectLeaderCheck.LeaderNames,
|
||||
ResponsibleMan = ProjectLeaderCheck.ResponsibleMan,
|
||||
CompanyTrainingItemId = ProjectLeaderCheck.CompanyTrainingItemId,
|
||||
CompileMan = ProjectLeaderCheck.CompileMan,
|
||||
CompileDate = ProjectLeaderCheck.CompileDate,
|
||||
};
|
||||
@@ -166,6 +168,8 @@ namespace BLL
|
||||
newProjectLeaderCheck.IsHoldMeet = ProjectLeaderCheck.IsHoldMeet;
|
||||
newProjectLeaderCheck.Requirement = ProjectLeaderCheck.Requirement;
|
||||
newProjectLeaderCheck.LeaderNames = ProjectLeaderCheck.LeaderNames;
|
||||
newProjectLeaderCheck.ResponsibleMan = ProjectLeaderCheck.ResponsibleMan;
|
||||
newProjectLeaderCheck.CompanyTrainingItemId = ProjectLeaderCheck.CompanyTrainingItemId;
|
||||
newProjectLeaderCheck.CompileMan = ProjectLeaderCheck.CompileMan;
|
||||
newProjectLeaderCheck.CompileDate = ProjectLeaderCheck.CompileDate;
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 公司培训明细表
|
||||
/// 公司培训明细表——教材库
|
||||
/// </summary>
|
||||
public class CompanyTrainingItemService
|
||||
{
|
||||
@@ -18,7 +19,7 @@ namespace BLL
|
||||
{
|
||||
return db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainingItemId);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加公司培训明细
|
||||
/// </summary>
|
||||
@@ -35,6 +36,9 @@ namespace BLL
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.WorkPostIds = model.WorkPostIds;
|
||||
newModel.WorkPostNames = model.WorkPostNames;
|
||||
newModel.Outcome = model.Outcome;
|
||||
newModel.LearningTime = model.LearningTime;
|
||||
newModel.TestTrainingIds = model.TestTrainingIds;
|
||||
db.Training_CompanyTrainingItem.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -55,6 +59,9 @@ namespace BLL
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.WorkPostIds = model.WorkPostIds;
|
||||
newModel.WorkPostNames = model.WorkPostNames;
|
||||
newModel.Outcome = model.Outcome;
|
||||
newModel.LearningTime = model.LearningTime;
|
||||
newModel.TestTrainingIds = model.TestTrainingIds;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -72,5 +79,40 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 教材库下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="workPostId">职务Id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitCompanyTrainingItemDownList(FineUIPro.DropDownList dropName, string workPostId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "CompanyTrainingItemId";
|
||||
dropName.DataTextField = "CompanyTrainingItemName";
|
||||
dropName.DataSource = GetCompanyTrainingItemList(workPostId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取教材库下拉项
|
||||
/// </summary>
|
||||
/// <param name="workPostId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Training_CompanyTrainingItem> GetCompanyTrainingItemList(string workPostId)
|
||||
{
|
||||
var lst = (from x in Funs.DB.Training_CompanyTrainingItem orderby x.CompanyTrainingItemCode select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(workPostId))
|
||||
{
|
||||
lst = lst.Where(x => x.WorkPostIds == null || x.WorkPostIds.Contains(workPostId)).ToList();
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -32,12 +32,33 @@ namespace BLL
|
||||
{
|
||||
PlanItemId = planItem.PlanItemId,
|
||||
PlanId = planItem.PlanId,
|
||||
TrainingEduId = planItem.TrainingEduId
|
||||
TrainingEduId = planItem.TrainingEduId,
|
||||
TrainingEduItemId = planItem.TrainingEduItemId,
|
||||
CompanyTrainingId = planItem.CompanyTrainingId,
|
||||
CompanyTrainingItemId = planItem.CompanyTrainingItemId
|
||||
};
|
||||
db.Training_PlanItem.InsertOnSubmit(newPlanItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改培训任务
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePlanItem(Model.Training_PlanItem model)
|
||||
{
|
||||
Model.Training_PlanItem newItem = db.Training_PlanItem.FirstOrDefault(e => e.PlanItemId == model.PlanItemId);
|
||||
if (newItem != null)
|
||||
{
|
||||
newItem.PlanId = model.PlanId;
|
||||
newItem.TrainingEduId = model.TrainingEduId;
|
||||
newItem.TrainingEduItemId = model.TrainingEduItemId;
|
||||
newItem.CompanyTrainingId = model.CompanyTrainingId;
|
||||
newItem.CompanyTrainingItemId = model.CompanyTrainingItemId;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据明细键删除培训计划明细
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -19,65 +22,81 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Training_Plan GetPlanById(string planId)
|
||||
{
|
||||
return Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == planId);
|
||||
return db.Training_Plan.FirstOrDefault(e => e.PlanId == planId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据检查Id获取培训计划
|
||||
/// </summary>
|
||||
/// <param name="checkId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Training_Plan GetPlanByCheckId(string checkId)
|
||||
{
|
||||
return db.Training_Plan.FirstOrDefault(e => e.CheckId == checkId && e.IsRetakeCourse == 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加培训计划
|
||||
/// </summary>
|
||||
/// <param name="plan"></param>
|
||||
public static void AddPlan(Model.Training_Plan trainingPlan)
|
||||
/// <param name="model"></param>
|
||||
public static void AddPlan(Model.Training_Plan model)
|
||||
{
|
||||
Model.Training_Plan newPlan = new Model.Training_Plan
|
||||
Model.Training_Plan newModel = new Model.Training_Plan
|
||||
{
|
||||
PlanId = trainingPlan.PlanId,
|
||||
PlanCode = trainingPlan.PlanCode,
|
||||
ProjectId = trainingPlan.ProjectId,
|
||||
DesignerId = trainingPlan.DesignerId,
|
||||
PlanName = trainingPlan.PlanName,
|
||||
TrainContent = trainingPlan.TrainContent,
|
||||
TrainStartDate = trainingPlan.TrainStartDate,
|
||||
TeachHour = trainingPlan.TeachHour,
|
||||
TeachMan = trainingPlan.TeachMan,
|
||||
TeachAddress = trainingPlan.TeachAddress,
|
||||
TrainTypeId = trainingPlan.TrainTypeId,
|
||||
TrainLevelId = trainingPlan.TrainLevelId,
|
||||
DesignerDate =trainingPlan.DesignerDate,
|
||||
UnitIds = trainingPlan.UnitIds,
|
||||
WorkPostId = trainingPlan.WorkPostId,
|
||||
States = trainingPlan.States,
|
||||
Cycle=trainingPlan.Cycle
|
||||
PlanId = model.PlanId,
|
||||
PlanCode = model.PlanCode,
|
||||
ProjectId = model.ProjectId,
|
||||
DesignerId = model.DesignerId,
|
||||
PlanName = model.PlanName,
|
||||
TrainContent = model.TrainContent,
|
||||
TrainStartDate = model.TrainStartDate,
|
||||
TeachHour = model.TeachHour,
|
||||
TeachMan = model.TeachMan,
|
||||
TeachAddress = model.TeachAddress,
|
||||
TrainTypeId = model.TrainTypeId,
|
||||
TrainLevelId = model.TrainLevelId,
|
||||
DesignerDate = model.DesignerDate,
|
||||
UnitIds = model.UnitIds,
|
||||
WorkPostId = model.WorkPostId,
|
||||
States = model.States,
|
||||
Cycle = model.Cycle,
|
||||
IsRetakeCourse = model.IsRetakeCourse,
|
||||
CheckType = model.CheckType,
|
||||
CheckId = model.CheckId
|
||||
};
|
||||
db.Training_Plan.InsertOnSubmit(newPlan);
|
||||
db.Training_Plan.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改培训计划
|
||||
/// </summary>
|
||||
/// <param name="plan"></param>
|
||||
public static void UpdatePlan(Model.Training_Plan newTrainingPlan)
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePlan(Model.Training_Plan model)
|
||||
{
|
||||
Model.Training_Plan isUpdate = Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == newTrainingPlan.PlanId);
|
||||
Model.Training_Plan isUpdate = Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == model.PlanId);
|
||||
if (isUpdate != null)
|
||||
{
|
||||
isUpdate.PlanName = newTrainingPlan.PlanName;
|
||||
isUpdate.TrainContent = newTrainingPlan.TrainContent;
|
||||
isUpdate.TrainStartDate = newTrainingPlan.TrainStartDate;
|
||||
isUpdate.TeachHour = newTrainingPlan.TeachHour;
|
||||
isUpdate.TrainEndDate = newTrainingPlan.TrainEndDate;
|
||||
isUpdate.TeachMan = newTrainingPlan.TeachMan;
|
||||
isUpdate.TeachAddress = newTrainingPlan.TeachAddress;
|
||||
isUpdate.TrainTypeId = newTrainingPlan.TrainTypeId;
|
||||
isUpdate.TrainLevelId = newTrainingPlan.TrainLevelId;
|
||||
isUpdate.DesignerDate = newTrainingPlan.DesignerDate;
|
||||
isUpdate.UnitIds = newTrainingPlan.UnitIds;
|
||||
isUpdate.WorkPostId = newTrainingPlan.WorkPostId;
|
||||
isUpdate.States = newTrainingPlan.States;
|
||||
isUpdate.Cycle = newTrainingPlan.Cycle;
|
||||
Funs.DB.SubmitChanges();
|
||||
isUpdate.PlanName = model.PlanName;
|
||||
isUpdate.TrainContent = model.TrainContent;
|
||||
isUpdate.TrainStartDate = model.TrainStartDate;
|
||||
isUpdate.TeachHour = model.TeachHour;
|
||||
isUpdate.TrainEndDate = model.TrainEndDate;
|
||||
isUpdate.TeachMan = model.TeachMan;
|
||||
isUpdate.TeachAddress = model.TeachAddress;
|
||||
isUpdate.TrainTypeId = model.TrainTypeId;
|
||||
isUpdate.TrainLevelId = model.TrainLevelId;
|
||||
isUpdate.DesignerDate = model.DesignerDate;
|
||||
isUpdate.UnitIds = model.UnitIds;
|
||||
isUpdate.WorkPostId = model.WorkPostId;
|
||||
isUpdate.States = model.States;
|
||||
isUpdate.Cycle = model.Cycle;
|
||||
isUpdate.IsRetakeCourse = model.IsRetakeCourse;
|
||||
isUpdate.CheckType = model.CheckType;
|
||||
isUpdate.CheckId = model.CheckId;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,11 +106,11 @@ namespace BLL
|
||||
/// <param name="planId"></param>
|
||||
public static void DeletePlanById(string planId)
|
||||
{
|
||||
Model.Training_Plan plan = Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == planId);
|
||||
Model.Training_Plan plan = db.Training_Plan.FirstOrDefault(e => e.PlanId == planId);
|
||||
if (plan != null)
|
||||
{
|
||||
Funs.DB.Training_Plan.DeleteOnSubmit(plan);
|
||||
Funs.DB.SubmitChanges();
|
||||
db.Training_Plan.DeleteOnSubmit(plan);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,5 +122,122 @@ namespace BLL
|
||||
{
|
||||
return (from x in db.Training_Plan orderby x.PlanCode select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检查重修,并生成培训计划、任务
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
public static void RetakeCourseProducePlan(RetakeCourseProducePlanInfo info)
|
||||
{
|
||||
var plan = GetPlanByCheckId(info.CheckId);
|
||||
var person = PersonService.GetPersonById(info.PersonId);
|
||||
var companyTrainingItem = CompanyTrainingItemService.GetCompanyTrainingItemById(info.CompanyTrainingItemId);
|
||||
var teachHour = companyTrainingItem.LearningTime / 3600;
|
||||
|
||||
string planId = string.Empty;
|
||||
if (plan != null)
|
||||
{//编辑培训计划
|
||||
planId = plan.PlanId;
|
||||
Model.Training_Plan planModel = new Model.Training_Plan
|
||||
{
|
||||
ProjectId = info.CurrProjectId,
|
||||
PlanName = info.CheckTypeName,
|
||||
TrainContent = info.CheckTypeName,
|
||||
TeachHour = teachHour,
|
||||
UnitIds = person.UnitId,
|
||||
WorkPostId = person.WorkPostId,
|
||||
TrainStartDate = plan.TrainStartDate,
|
||||
TrainEndDate = info.TrainEndDate,
|
||||
TeachMan = plan.TeachMan,
|
||||
TeachAddress = plan.TeachAddress,
|
||||
TrainTypeId = Const.RetakeCourseTrainTypeId,
|
||||
TrainLevelId = Const.OtherTrainLevelId,
|
||||
States = "1",
|
||||
Cycle = "",
|
||||
IsRetakeCourse = 1,
|
||||
CheckType = plan.CheckType,
|
||||
CheckId = plan.CheckId
|
||||
};
|
||||
UpdatePlan(planModel);
|
||||
}
|
||||
else
|
||||
{//生成培训计划
|
||||
planId = SQLHelper.GetNewID();
|
||||
string code = ProjectService.GetProjectByProjectId(info.CurrProjectId).ProjectCode + "-";
|
||||
string planCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", info.CurrProjectId, code);
|
||||
|
||||
Model.Training_Plan planModel = new Model.Training_Plan
|
||||
{
|
||||
PlanId = planId,
|
||||
PlanCode = planCode,
|
||||
ProjectId = info.CurrProjectId,
|
||||
DesignerId = info.CurrUserId,
|
||||
DesignerDate = DateTime.Now,
|
||||
PlanName = info.CheckTypeName,
|
||||
TrainContent = info.CheckTypeName,
|
||||
TrainStartDate = DateTime.Now,
|
||||
TrainEndDate = info.TrainEndDate,
|
||||
TeachHour = teachHour,
|
||||
//TeachMan = model.TeachMan,
|
||||
//TeachAddress = model.TeachAddress,
|
||||
TrainTypeId = Const.RetakeCourseTrainTypeId,
|
||||
TrainLevelId = Const.OtherTrainLevelId,
|
||||
UnitIds = person.UnitId,
|
||||
WorkPostId = person.WorkPostId,
|
||||
States = "1",
|
||||
Cycle = "",
|
||||
IsRetakeCourse = 1,
|
||||
CheckType = info.CheckType.ToString(),
|
||||
CheckId = info.CheckId
|
||||
};
|
||||
AddPlan(planModel);
|
||||
}
|
||||
|
||||
//删除培训明细
|
||||
TrainingPlanItemService.DeletePlanItemByPlanId(planId);
|
||||
//删除任务
|
||||
TrainingTaskService.DeleteTaskByPlanId(planId);
|
||||
|
||||
string taskId = SQLHelper.GetNewID();
|
||||
//新增培训任务
|
||||
Model.Training_Task newTrainDetail = new Model.Training_Task
|
||||
{
|
||||
TaskId = taskId,
|
||||
ProjectId = info.CurrProjectId,
|
||||
PlanId = planId,
|
||||
UserId = info.PersonId,
|
||||
TaskDate = DateTime.Now,
|
||||
States = Const.State_1,
|
||||
};
|
||||
TrainingTaskService.AddTask(newTrainDetail);
|
||||
|
||||
//新增培训任务明细
|
||||
Model.Training_TaskItem newTaskItem = new Model.Training_TaskItem
|
||||
{
|
||||
TaskItemId = SQLHelper.GetNewID(),
|
||||
TaskId = taskId,
|
||||
PlanId = planId,
|
||||
PersonId = info.PersonId,
|
||||
TrainingItemCode = companyTrainingItem.CompanyTrainingItemCode,
|
||||
TrainingItemName = companyTrainingItem.CompanyTrainingItemName,
|
||||
AttachUrl = companyTrainingItem.AttachUrl,
|
||||
CompanyTrainingItemId = info.CompanyTrainingItemId,
|
||||
//LearnTime = trainingItem.LearningTime,
|
||||
//VideoProgress = 0,
|
||||
};
|
||||
db.Training_TaskItem.InsertOnSubmit(newTaskItem);
|
||||
db.SubmitChanges();
|
||||
|
||||
//新增培训明细
|
||||
Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem
|
||||
{
|
||||
PlanItemId = SQLHelper.GetNewID(),
|
||||
PlanId = planId,
|
||||
CompanyTrainingItemId = info.CompanyTrainingItemId,
|
||||
CompanyTrainingId = companyTrainingItem.CompanyTrainingId
|
||||
};
|
||||
TrainingPlanItemService.AddPlanItem(newPlanItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -41,6 +42,7 @@ namespace BLL
|
||||
Model.Training_Task newTask = new Model.Training_Task
|
||||
{
|
||||
TaskId = task.TaskId,
|
||||
ProjectId = task.ProjectId,
|
||||
PlanId = task.PlanId,
|
||||
UserId = task.UserId,
|
||||
TaskDate = task.TaskDate,
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 行为安全观察与沟通
|
||||
/// </summary>
|
||||
public static class BehavioralSafetyObservationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取行为安全观察与沟通信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BehavioralSafetyObservation GetBehavioralSafetyObservationById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加行为安全观察与沟通
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = new Model.Examine_BehavioralSafetyObservation
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_BehavioralSafetyObservation.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBehavioralSafetyObservationById(string Id)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation model = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BehavioralSafetyObservation.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 自主管理加分项
|
||||
/// </summary>
|
||||
public static class BonusScoreSelfManagementService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取自主管理加分项信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BonusScoreSelfManagement GetBonusScoreSelfManagementById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加自主管理加分项
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBonusScoreSelfManagement(Model.Examine_BonusScoreSelfManagement model)
|
||||
{
|
||||
Model.Examine_BonusScoreSelfManagement newModel = new Model.Examine_BonusScoreSelfManagement
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
BonusScoreTypeId = model.BonusScoreTypeId,
|
||||
BonusScoreTypeName = model.BonusScoreTypeName,
|
||||
Score = model.Score,
|
||||
PersonId = model.PersonId,
|
||||
//DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_BonusScoreSelfManagement.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBonusScoreSelfManagement(Model.Examine_BonusScoreSelfManagement model)
|
||||
{
|
||||
Model.Examine_BonusScoreSelfManagement newModel = Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
//newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.BonusScoreTypeId = model.BonusScoreTypeId;
|
||||
newModel.BonusScoreTypeName = model.BonusScoreTypeName;
|
||||
newModel.Score = model.Score;
|
||||
newModel.PersonId = model.PersonId;
|
||||
//newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBonusScoreSelfManagementById(string Id)
|
||||
{
|
||||
Model.Examine_BonusScoreSelfManagement model = Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BonusScoreSelfManagement.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Examine_BonusScoreSelfManagement> GetBonusScoreSelfManagementList(string projectId, string personId, string typeId)
|
||||
{
|
||||
var list = (from x in Funs.DB.Examine_BonusScoreSelfManagement orderby x.Code descending select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(projectId))
|
||||
{
|
||||
list = list.Where(x => x.ProjectId == projectId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(personId))
|
||||
{
|
||||
list = list.Where(x => x.PersonId == personId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(typeId))
|
||||
{
|
||||
list = list.Where(x => x.BonusScoreTypeId == typeId).ToList();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 自主管理加分项类型
|
||||
/// </summary>
|
||||
public static class BonusScoreTypeService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取自主管理加分项类型信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BonusScoreType GetBonusScoreTypeById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取自主管理加分项类型信息
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_BonusScoreType GetBonusScoreTypeByName(string Name)
|
||||
{
|
||||
return Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Name == Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加自主管理加分项类型
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddBonusScoreType(Model.Examine_BonusScoreType model)
|
||||
{
|
||||
Model.Examine_BonusScoreType newModel = new Model.Examine_BonusScoreType
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
Score = model.Score,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark
|
||||
};
|
||||
Funs.DB.Examine_BonusScoreType.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateBonusScoreType(Model.Examine_BonusScoreType model)
|
||||
{
|
||||
Model.Examine_BonusScoreType newModel = Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.Score = model.Score;
|
||||
newModel.Remark = model.Remark;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteBonusScoreTypeById(string Id)
|
||||
{
|
||||
Model.Examine_BonusScoreType model = Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_BonusScoreType.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有类型List
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Examine_BonusScoreType> GetBonusScoreTypeList()
|
||||
{
|
||||
return (from x in Funs.DB.Examine_BonusScoreType orderby x.Code select x).ToList();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitBonusScoreTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Id";
|
||||
dropName.DataTextField = "Name";
|
||||
dropName.DataSource = GetBonusScoreTypeList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
public static class CoConstructionActivitiesService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取一线党员联系班组共建活动信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_CoConstructionActivities GetCoConstructionActivitiesById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一线党员联系班组共建活动
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddCoConstructionActivities(Model.Examine_CoConstructionActivities model)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = new Model.Examine_CoConstructionActivities
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_CoConstructionActivities.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCoConstructionActivities(Model.Examine_CoConstructionActivities model)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteCoConstructionActivitiesById(string Id)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities model = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_CoConstructionActivities.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
public static class LeadershipJoinHomeworkAnalysisMeetingService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取领导人员参加班组作业分析会信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_LeadershipJoinHomeworkAnalysisMeeting GetLeadershipJoinHomeworkAnalysisMeetingById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加领导人员参加班组作业分析会
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = new Model.Examine_LeadershipJoinHomeworkAnalysisMeeting
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteLeadershipJoinHomeworkAnalysisMeetingById(string Id)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 个人安全行动计划
|
||||
/// </summary>
|
||||
public static class PersonalSafetyActionPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取个人安全行动计划信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_PersonalSafetyActionPlan GetPersonalSafetyActionPlanById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加个人安全行动计划
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddPersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = new Model.Examine_PersonalSafetyActionPlan
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_PersonalSafetyActionPlan.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdatePersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeletePersonalSafetyActionPlanById(string Id)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan model = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_PersonalSafetyActionPlan.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全经验分享
|
||||
/// </summary>
|
||||
public static class SharingOfSafetyExperienceService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取安全经验分享信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Examine_SharingOfSafetyExperience GetSharingOfSafetyExperienceById(string Id)
|
||||
{
|
||||
return Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安全经验分享
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = new Model.Examine_SharingOfSafetyExperience
|
||||
{
|
||||
Id = model.Id,
|
||||
ProjectId = model.ProjectId,
|
||||
Code = model.Code,
|
||||
Name = model.Name,
|
||||
UserId = model.UserId,
|
||||
DateTime = model.DateTime,
|
||||
CompileDate = model.CompileDate,
|
||||
CompileMan = model.CompileMan,
|
||||
Remark = model.Remark,
|
||||
Content = model.Content
|
||||
};
|
||||
Funs.DB.Examine_SharingOfSafetyExperience.InsertOnSubmit(newModel);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.Name = model.Name;
|
||||
newModel.UserId = model.UserId;
|
||||
newModel.DateTime = model.DateTime;
|
||||
newModel.Content = model.Content;
|
||||
newModel.Remark = model.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void DeleteSharingOfSafetyExperienceById(string Id)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience model = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Id);
|
||||
Funs.DB.Examine_SharingOfSafetyExperience.DeleteOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,98 +37,100 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 增加危险观察登记信息
|
||||
/// </summary>
|
||||
/// <param name="hazardRegister">危险观察登记实体</param>
|
||||
public static void AddHazardRegister(Model.HSSE_Hazard_HazardRegister hazardRegister)
|
||||
/// <param name="model">危险观察登记实体</param>
|
||||
public static void AddHazardRegister(Model.HSSE_Hazard_HazardRegister model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegister newHazardRegister = new Model.HSSE_Hazard_HazardRegister();
|
||||
newHazardRegister.HazardRegisterId = hazardRegister.HazardRegisterId;
|
||||
newHazardRegister.HazardCode = hazardRegister.HazardCode;
|
||||
newHazardRegister.RegisterDate = DateTime.Now;
|
||||
newHazardRegister.RegisterDef = hazardRegister.RegisterDef;
|
||||
newHazardRegister.RegisterTypesId = hazardRegister.RegisterTypesId;
|
||||
newHazardRegister.CheckCycle = hazardRegister.CheckCycle;
|
||||
newHazardRegister.Rectification = hazardRegister.Rectification;
|
||||
newHazardRegister.Place = hazardRegister.Place;
|
||||
newHazardRegister.ResponsibleUnit = hazardRegister.ResponsibleUnit;
|
||||
newHazardRegister.Observer = hazardRegister.Observer;
|
||||
newHazardRegister.RectifiedDate = hazardRegister.RectifiedDate;
|
||||
newHazardRegister.AttachUrl = hazardRegister.AttachUrl;
|
||||
newHazardRegister.ProjectId = hazardRegister.ProjectId;
|
||||
newHazardRegister.States = hazardRegister.States;
|
||||
newHazardRegister.IsEffective = hazardRegister.IsEffective;
|
||||
newHazardRegister.ResponsibleMan = hazardRegister.ResponsibleMan;
|
||||
newHazardRegister.CheckSpecialId = hazardRegister.CheckSpecialId;
|
||||
newHazardRegister.CheckManId = hazardRegister.CheckManId;
|
||||
newHazardRegister.CheckTime = hazardRegister.CheckTime;
|
||||
newHazardRegister.RectificationPeriod = hazardRegister.RectificationPeriod;
|
||||
newHazardRegister.ImageUrl = hazardRegister.ImageUrl;
|
||||
newHazardRegister.RectificationImageUrl = hazardRegister.RectificationImageUrl;
|
||||
newHazardRegister.RectificationTime = hazardRegister.RectificationTime;
|
||||
newHazardRegister.ConfirmMan = hazardRegister.ConfirmMan;
|
||||
newHazardRegister.ConfirmDate = hazardRegister.ConfirmDate;
|
||||
newHazardRegister.HandleIdea = hazardRegister.HandleIdea;
|
||||
newHazardRegister.CutPayment = hazardRegister.CutPayment;
|
||||
newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes;
|
||||
newHazardRegister.DIC_ID = hazardRegister.DIC_ID;
|
||||
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
|
||||
newHazardRegister.Requirements = hazardRegister.Requirements;
|
||||
newHazardRegister.ControlId = hazardRegister.ControlId;
|
||||
Model.HSSE_Hazard_HazardRegister newModel = new Model.HSSE_Hazard_HazardRegister();
|
||||
newModel.HazardRegisterId = model.HazardRegisterId;
|
||||
newModel.HazardCode = model.HazardCode;
|
||||
newModel.RegisterDate = DateTime.Now;
|
||||
newModel.RegisterDef = model.RegisterDef;
|
||||
newModel.RegisterTypesId = model.RegisterTypesId;
|
||||
newModel.CheckCycle = model.CheckCycle;
|
||||
newModel.Rectification = model.Rectification;
|
||||
newModel.Place = model.Place;
|
||||
newModel.ResponsibleUnit = model.ResponsibleUnit;
|
||||
newModel.Observer = model.Observer;
|
||||
newModel.RectifiedDate = model.RectifiedDate;
|
||||
newModel.AttachUrl = model.AttachUrl;
|
||||
newModel.ProjectId = model.ProjectId;
|
||||
newModel.States = model.States;
|
||||
newModel.IsEffective = model.IsEffective;
|
||||
newModel.ResponsibleMan = model.ResponsibleMan;
|
||||
newModel.CheckSpecialId = model.CheckSpecialId;
|
||||
newModel.CheckManId = model.CheckManId;
|
||||
newModel.CheckTime = model.CheckTime;
|
||||
newModel.RectificationPeriod = model.RectificationPeriod;
|
||||
newModel.ImageUrl = model.ImageUrl;
|
||||
newModel.RectificationImageUrl = model.RectificationImageUrl;
|
||||
newModel.RectificationTime = model.RectificationTime;
|
||||
newModel.ConfirmMan = model.ConfirmMan;
|
||||
newModel.ConfirmDate = model.ConfirmDate;
|
||||
newModel.HandleIdea = model.HandleIdea;
|
||||
newModel.CutPayment = model.CutPayment;
|
||||
newModel.ProblemTypes = model.ProblemTypes;
|
||||
newModel.DIC_ID = model.DIC_ID;
|
||||
newModel.Risk_Level = model.Risk_Level;
|
||||
newModel.Requirements = model.Requirements;
|
||||
newModel.ControlId = model.ControlId;
|
||||
newModel.CheckItemDetailId = model.CheckItemDetailId;
|
||||
newModel.CompanyTrainingItemId = model.CompanyTrainingItemId;
|
||||
|
||||
newHazardRegister.CheckItemDetailId = hazardRegister.CheckItemDetailId;
|
||||
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister);
|
||||
db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改危险观察登记信息
|
||||
/// </summary>
|
||||
/// <param name="hazardRegister">危险观察登记实体</param>
|
||||
public static void UpdateHazardRegister(Model.HSSE_Hazard_HazardRegister hazardRegister)
|
||||
/// <param name="model">危险观察登记实体</param>
|
||||
public static void UpdateHazardRegister(Model.HSSE_Hazard_HazardRegister model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegister newHazardRegister = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegister.HazardRegisterId);
|
||||
if (newHazardRegister != null)
|
||||
Model.HSSE_Hazard_HazardRegister newModel = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == model.HazardRegisterId);
|
||||
if (newModel != null)
|
||||
{
|
||||
newHazardRegister.HazardCode = hazardRegister.HazardCode;
|
||||
newHazardRegister.RegisterDef = hazardRegister.RegisterDef;
|
||||
newHazardRegister.Rectification = hazardRegister.Rectification;
|
||||
newHazardRegister.Place = hazardRegister.Place;
|
||||
newHazardRegister.ResponsibleUnit = hazardRegister.ResponsibleUnit;
|
||||
newHazardRegister.Observer = hazardRegister.Observer;
|
||||
newHazardRegister.RectifiedDate = hazardRegister.RectifiedDate;
|
||||
newHazardRegister.AttachUrl = hazardRegister.AttachUrl;
|
||||
newHazardRegister.ProjectId = hazardRegister.ProjectId;
|
||||
newHazardRegister.States = hazardRegister.States;
|
||||
newHazardRegister.IsEffective = hazardRegister.IsEffective;
|
||||
newHazardRegister.ResponsibleMan = hazardRegister.ResponsibleMan;
|
||||
newHazardRegister.CheckManId = hazardRegister.CheckManId;
|
||||
//newHazardRegister.CheckTime = hazardRegister.CheckTime;
|
||||
newHazardRegister.RectificationPeriod = hazardRegister.RectificationPeriod;
|
||||
newHazardRegister.ImageUrl = hazardRegister.ImageUrl;
|
||||
newHazardRegister.RectificationImageUrl = hazardRegister.RectificationImageUrl;
|
||||
newHazardRegister.RectificationTime = hazardRegister.RectificationTime;
|
||||
newHazardRegister.ConfirmMan = hazardRegister.ConfirmMan;
|
||||
newHazardRegister.ConfirmDate = hazardRegister.ConfirmDate;
|
||||
newHazardRegister.HandleIdea = hazardRegister.HandleIdea;
|
||||
newHazardRegister.CutPayment = hazardRegister.CutPayment;
|
||||
newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes;
|
||||
newHazardRegister.DIC_ID = hazardRegister.DIC_ID;
|
||||
newHazardRegister.CheckItemDetailId = hazardRegister.CheckItemDetailId;
|
||||
newHazardRegister.RegisterTypesId = hazardRegister.RegisterTypesId;
|
||||
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
|
||||
newHazardRegister.Requirements = hazardRegister.Requirements;
|
||||
newModel.HazardCode = model.HazardCode;
|
||||
newModel.RegisterDef = model.RegisterDef;
|
||||
newModel.Rectification = model.Rectification;
|
||||
newModel.Place = model.Place;
|
||||
newModel.ResponsibleUnit = model.ResponsibleUnit;
|
||||
newModel.Observer = model.Observer;
|
||||
newModel.RectifiedDate = model.RectifiedDate;
|
||||
newModel.AttachUrl = model.AttachUrl;
|
||||
newModel.ProjectId = model.ProjectId;
|
||||
newModel.States = model.States;
|
||||
newModel.IsEffective = model.IsEffective;
|
||||
newModel.ResponsibleMan = model.ResponsibleMan;
|
||||
newModel.CheckManId = model.CheckManId;
|
||||
//newModel.CheckTime = model.CheckTime;
|
||||
newModel.RectificationPeriod = model.RectificationPeriod;
|
||||
newModel.ImageUrl = model.ImageUrl;
|
||||
newModel.RectificationImageUrl = model.RectificationImageUrl;
|
||||
newModel.RectificationTime = model.RectificationTime;
|
||||
newModel.ConfirmMan = model.ConfirmMan;
|
||||
newModel.ConfirmDate = model.ConfirmDate;
|
||||
newModel.HandleIdea = model.HandleIdea;
|
||||
newModel.CutPayment = model.CutPayment;
|
||||
newModel.ProblemTypes = model.ProblemTypes;
|
||||
newModel.DIC_ID = model.DIC_ID;
|
||||
newModel.CheckItemDetailId = model.CheckItemDetailId;
|
||||
newModel.RegisterTypesId = model.RegisterTypesId;
|
||||
newModel.Risk_Level = model.Risk_Level;
|
||||
newModel.Requirements = model.Requirements;
|
||||
newModel.CompanyTrainingItemId = model.CompanyTrainingItemId;
|
||||
|
||||
//把附件表的路径复制过来
|
||||
Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId);
|
||||
Model.AttachFile file = BLL.AttachFileService.GetAttachFile(model.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId);
|
||||
if (file != null)
|
||||
{
|
||||
newHazardRegister.ImageUrl = file.AttachUrl;
|
||||
newModel.ImageUrl = file.AttachUrl;
|
||||
}
|
||||
Model.AttachFile fileR = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId + "-R", Const.HSSE_HiddenRectificationListMenuId);
|
||||
Model.AttachFile fileR = BLL.AttachFileService.GetAttachFile(model.HazardRegisterId + "-R", Const.HSSE_HiddenRectificationListMenuId);
|
||||
if (fileR != null)
|
||||
{
|
||||
newHazardRegister.RectificationImageUrl = fileR.AttachUrl;
|
||||
newModel.RectificationImageUrl = fileR.AttachUrl;
|
||||
}
|
||||
|
||||
db.SubmitChanges();
|
||||
@@ -142,18 +144,18 @@ namespace BLL
|
||||
public static void DeleteHazardRegisterByHazardRegisterId(string hazardRegisterId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegister hazardRegister = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegisterId);
|
||||
if (hazardRegister != null)
|
||||
Model.HSSE_Hazard_HazardRegister model = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegisterId);
|
||||
if (model != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, hazardRegister.ImageUrl);//删除整改前图片
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, hazardRegister.RectificationImageUrl);//删除整改后图片
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, model.ImageUrl);//删除整改前图片
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, model.RectificationImageUrl);//删除整改后图片
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
db.HSSE_Hazard_HazardRegister.DeleteOnSubmit(hazardRegister);
|
||||
db.HSSE_Hazard_HazardRegister.DeleteOnSubmit(model);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -441,7 +441,7 @@ namespace BLL
|
||||
newPerson.DepartId = person.DepartId;
|
||||
newPerson.QRCodeAttachUrl = person.QRCodeAttachUrl;
|
||||
newPerson.Password = GetPersonPassWord(person.IdentityCard);
|
||||
newPerson.ExchangeTime = null;
|
||||
newPerson.ExchangeTime = null;
|
||||
newPerson.ExchangeTime2 = null;
|
||||
newPerson.RealNameUpdateTime = null;
|
||||
if (!string.IsNullOrEmpty(person.AuditorId))
|
||||
@@ -654,6 +654,35 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitPersonByMultiProjectUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitIds, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "PersonId";
|
||||
dropName.DataTextField = "PersonName";
|
||||
var list = new List<Model.SitePerson_Person>();
|
||||
var lstUnitId = unitIds.Split(',');
|
||||
foreach (var item in lstUnitId)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(item))
|
||||
{
|
||||
var lst = GetPersonLitsByprojectIdUnitId(projectId, item);
|
||||
list.AddRange(lst);
|
||||
}
|
||||
}
|
||||
dropName.DataSource = list;
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
/// </summary>
|
||||
|
||||
@@ -1599,7 +1599,7 @@ namespace BLL
|
||||
|
||||
public static string getInitialPassword(string unitId, string idCard)
|
||||
{
|
||||
string prefixValue = "TCC";
|
||||
string prefixValue = "XJYJ";
|
||||
string suffixValue = "1234";
|
||||
var getUnit = UnitService.GetUnitByUnitId(unitId);
|
||||
if (getUnit != null)
|
||||
|
||||
@@ -381,6 +381,10 @@ namespace FineUIPro.Web.AttachFile
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
|
||||
}
|
||||
else if(AttachFileService.IsImage(FiletExtension))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", url, "查看 -")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("不支持预览", MessageBoxIcon.Warning);
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); ;
|
||||
|
||||
QuestionImg = 0;
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-XJYJ-XJ-";
|
||||
txtDocCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.Check_CheckFine", "DocCode", code);
|
||||
if (!string.IsNullOrEmpty(CheckControlCode))
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
//FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-XJYJ-XJ-";
|
||||
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
GetButtonPower();
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
lblAttach.Enabled = false;
|
||||
QuestionImg = 0;
|
||||
CheckControlService.Init(drpHandleType, State, false);
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-XJYJ-XJ-";
|
||||
txtDocCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode", this.CurrUser.LoginProjectId, code);
|
||||
var mainUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, Const.ProjectUnitType_1)[0];
|
||||
if (mainUnit != null)
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
//FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-XJYJ-XJ-";
|
||||
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
GetButtonPower();
|
||||
|
||||
@@ -1927,23 +1927,17 @@
|
||||
<Content Include="HSSE\Epidemic\VaccinAdd.aspx" />
|
||||
<Content Include="HSSE\Epidemic\PersonList.aspx" />
|
||||
<Content Include="HSSE\Epidemic\PersonListEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\BonusScoreSelfManagement.aspx" />
|
||||
<Content Include="HSSE\Examine\BonusScoreType.aspx" />
|
||||
<Content Include="HSSE\Examine\BonusScoreTypeEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\MinusScoreSituation.aspx" />
|
||||
<Content Include="HSSE\Examine\BonusScoreSituation.aspx" />
|
||||
<Content Include="HSSE\Examine\BonusScoreSelfManagementEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\MinusScoreSituationEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\BonusScoreSituationEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeeting.aspx" />
|
||||
<Content Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeetingEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\CoConstructionActivities.aspx" />
|
||||
<Content Include="HSSE\Examine\CoConstructionActivitiesEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\BehavioralSafetyObservation.aspx" />
|
||||
<Content Include="HSSE\Examine\BehavioralSafetyObservationEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\OnePersonPerFile.aspx" />
|
||||
<Content Include="HSSE\Examine\StaffHSEInfoArchivesOld.aspx" />
|
||||
<Content Include="HSSE\Examine\StaffHSEInfoArchives.aspx" />
|
||||
<Content Include="HSSE\Examine\SharingOfSafetyExperience.aspx" />
|
||||
<Content Include="HSSE\Examine\PersonalSafetyActionPlan.aspx" />
|
||||
<Content Include="HSSE\Examine\SharingOfSafetyExperienceEdit.aspx" />
|
||||
<Content Include="HSSE\Examine\PersonalSafetyActionPlanEdit.aspx" />
|
||||
<Content Include="HSSE\FinalFileManage\FinalFileList.aspx" />
|
||||
<Content Include="HSSE\FinalFileManage\FinalFileListEdit.aspx" />
|
||||
<Content Include="HSSE\FinalFileManage\FinalFileListView.aspx" />
|
||||
@@ -13223,6 +13217,27 @@
|
||||
<Compile Include="HSSE\Epidemic\PersonListEdit.aspx.designer.cs">
|
||||
<DependentUpon>PersonListEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BonusScoreSelfManagement.aspx.cs">
|
||||
<DependentUpon>BonusScoreSelfManagement.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BonusScoreSelfManagement.aspx.designer.cs">
|
||||
<DependentUpon>BonusScoreSelfManagement.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BonusScoreType.aspx.cs">
|
||||
<DependentUpon>BonusScoreType.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BonusScoreType.aspx.designer.cs">
|
||||
<DependentUpon>BonusScoreType.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BonusScoreTypeEdit.aspx.cs">
|
||||
<DependentUpon>BonusScoreTypeEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BonusScoreTypeEdit.aspx.designer.cs">
|
||||
<DependentUpon>BonusScoreTypeEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\MinusScoreSituation.aspx.cs">
|
||||
<DependentUpon>MinusScoreSituation.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -13237,6 +13252,13 @@
|
||||
<Compile Include="HSSE\Examine\BonusScoreSituation.aspx.designer.cs">
|
||||
<DependentUpon>BonusScoreSituation.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BonusScoreSelfManagementEdit.aspx.cs">
|
||||
<DependentUpon>BonusScoreSelfManagementEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BonusScoreSelfManagementEdit.aspx.designer.cs">
|
||||
<DependentUpon>BonusScoreSelfManagementEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\MinusScoreSituationEdit.aspx.cs">
|
||||
<DependentUpon>MinusScoreSituationEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -13251,48 +13273,6 @@
|
||||
<Compile Include="HSSE\Examine\BonusScoreSituationEdit.aspx.designer.cs">
|
||||
<DependentUpon>BonusScoreSituationEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeeting.aspx.cs">
|
||||
<DependentUpon>LeadershipJoinHomeworkAnalysisMeeting.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeeting.aspx.designer.cs">
|
||||
<DependentUpon>LeadershipJoinHomeworkAnalysisMeeting.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.cs">
|
||||
<DependentUpon>LeadershipJoinHomeworkAnalysisMeetingEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.designer.cs">
|
||||
<DependentUpon>LeadershipJoinHomeworkAnalysisMeetingEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\CoConstructionActivities.aspx.cs">
|
||||
<DependentUpon>CoConstructionActivities.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\CoConstructionActivities.aspx.designer.cs">
|
||||
<DependentUpon>CoConstructionActivities.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\CoConstructionActivitiesEdit.aspx.cs">
|
||||
<DependentUpon>CoConstructionActivitiesEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\CoConstructionActivitiesEdit.aspx.designer.cs">
|
||||
<DependentUpon>CoConstructionActivitiesEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BehavioralSafetyObservation.aspx.cs">
|
||||
<DependentUpon>BehavioralSafetyObservation.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BehavioralSafetyObservation.aspx.designer.cs">
|
||||
<DependentUpon>BehavioralSafetyObservation.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BehavioralSafetyObservationEdit.aspx.cs">
|
||||
<DependentUpon>BehavioralSafetyObservationEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\BehavioralSafetyObservationEdit.aspx.designer.cs">
|
||||
<DependentUpon>BehavioralSafetyObservationEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\OnePersonPerFile.aspx.cs">
|
||||
<DependentUpon>OnePersonPerFile.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -13314,34 +13294,6 @@
|
||||
<Compile Include="HSSE\Examine\StaffHSEInfoArchives.aspx.designer.cs">
|
||||
<DependentUpon>StaffHSEInfoArchives.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\SharingOfSafetyExperience.aspx.cs">
|
||||
<DependentUpon>SharingOfSafetyExperience.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\SharingOfSafetyExperience.aspx.designer.cs">
|
||||
<DependentUpon>SharingOfSafetyExperience.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\PersonalSafetyActionPlan.aspx.cs">
|
||||
<DependentUpon>PersonalSafetyActionPlan.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\PersonalSafetyActionPlan.aspx.designer.cs">
|
||||
<DependentUpon>PersonalSafetyActionPlan.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\SharingOfSafetyExperienceEdit.aspx.cs">
|
||||
<DependentUpon>SharingOfSafetyExperienceEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\SharingOfSafetyExperienceEdit.aspx.designer.cs">
|
||||
<DependentUpon>SharingOfSafetyExperienceEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\PersonalSafetyActionPlanEdit.aspx.cs">
|
||||
<DependentUpon>PersonalSafetyActionPlanEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\PersonalSafetyActionPlanEdit.aspx.designer.cs">
|
||||
<DependentUpon>PersonalSafetyActionPlanEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\FinalFileManage\FinalFileList.aspx.cs">
|
||||
<DependentUpon>FinalFileList.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
|
||||
this.drpEquipment.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpEquipment);
|
||||
this.drpEquipment.SelectedIndex = 0;
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-HJ-TCC-LL-";
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-HJ-XJYJ-LL-";
|
||||
txtCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.HJGL_ElectrodeRecovery", "RecoveryCode", this.CurrUser.LoginProjectId, code);
|
||||
|
||||
|
||||
|
||||
@@ -847,7 +847,7 @@ namespace FineUIPro.Web.HJGL.RepairManage
|
||||
{
|
||||
|
||||
|
||||
string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code) + "K";
|
||||
}
|
||||
}
|
||||
@@ -2410,7 +2410,7 @@ namespace FineUIPro.Web.HJGL.RepairManage
|
||||
}
|
||||
else
|
||||
{
|
||||
string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code) + "K";
|
||||
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
{
|
||||
|
||||
|
||||
string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code);
|
||||
}
|
||||
|
||||
@@ -814,7 +814,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
}
|
||||
else
|
||||
{
|
||||
string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
{
|
||||
|
||||
|
||||
string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code);
|
||||
}
|
||||
}
|
||||
@@ -361,7 +361,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
}
|
||||
else
|
||||
{
|
||||
string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-";
|
||||
this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewTrustCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,14 @@
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="责任人" ID="drpResponsibleMan" Required="True" ShowRedStar="true" AutoSelectFirstItem="false" AutoPostBack="true" OnSelectedIndexChanged="drpResponsibleMan_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="重修教材" ID="drpTrainingItem" EnableEdit="true" ForceSelection="false" Required="True" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpLeaderIds" runat="server" Label="带班领导" EnableEdit="true" MaxLength="500"
|
||||
@@ -39,12 +47,12 @@
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<%-- <f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtLeaderName" runat="server" MaxLength="2000" Label=" ">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</f:FormRow>--%>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox ID="ckIsHoldMeet" runat="server" Label="召开专题讲评会" >
|
||||
|
||||
@@ -5,6 +5,8 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
using static BLL.TrainingPlanService;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
@@ -66,47 +68,42 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
List<Model.SpSysUserItem> list = new List<Model.SpSysUserItem>();
|
||||
List<Model.SpSysUserItem> newList = new List<Model.SpSysUserItem>();
|
||||
list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(this.CurrUser.LoginProjectId, null));
|
||||
list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(null, null));
|
||||
foreach (var item in list)
|
||||
{
|
||||
var user = newList.FirstOrDefault(x => x.UserId == item.UserId);
|
||||
if (user == null)
|
||||
{
|
||||
newList.Add(item);
|
||||
}
|
||||
}
|
||||
drpLeaderIds.DataValueField = "UserId";
|
||||
drpLeaderIds.DataTextField = "UserName";
|
||||
drpLeaderIds.DataSource = newList;
|
||||
drpLeaderIds.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpLeaderIds);
|
||||
//UserService.InitFlowOperateControlUserDropDownList(this.drpLeaderIds, this.CurrUser.LoginProjectId, null, true);
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnits, this.CurrUser.LoginProjectId, null, true);
|
||||
this.InitDropDownList();
|
||||
|
||||
this.ProjectLeaderCheckId = Request.Params["ProjectLeaderCheckId"];
|
||||
this.UnitId = Request.Params["UnitId"];
|
||||
this.MenuId = Const.ProjectLeaderCheckMenuId;
|
||||
if (!string.IsNullOrEmpty(this.ProjectLeaderCheckId))
|
||||
{
|
||||
var getProjectLeaderCheck = BLL.Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(this.ProjectLeaderCheckId);
|
||||
if (getProjectLeaderCheck != null)
|
||||
var model = BLL.Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(this.ProjectLeaderCheckId);
|
||||
if (model != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(getProjectLeaderCheck.UnitIds))
|
||||
if (!string.IsNullOrEmpty(model.UnitIds))
|
||||
{
|
||||
this.drpUnits.SelectedValueArray = getProjectLeaderCheck.UnitIds.Split(',');
|
||||
this.drpUnits.SelectedValueArray = model.UnitIds.Split(',');
|
||||
PersonService.InitPersonByMultiProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, model.UnitIds, false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(getProjectLeaderCheck.LeaderIds))
|
||||
if (!string.IsNullOrEmpty(model.LeaderIds))
|
||||
{
|
||||
this.drpLeaderIds.SelectedValueArray = getProjectLeaderCheck.LeaderIds.Split(',');
|
||||
this.drpLeaderIds.SelectedValueArray = model.LeaderIds.Split(',');
|
||||
}
|
||||
this.txtCheckCode.Text = getProjectLeaderCheck.CheckCode;
|
||||
this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", getProjectLeaderCheck.CheckDate);
|
||||
this.ckIsHoldMeet.Checked = getProjectLeaderCheck.IsHoldMeet.Value;
|
||||
this.txtQuestionDef.Text = getProjectLeaderCheck.QuestionDef;
|
||||
this.txtRequirement.Text = getProjectLeaderCheck.Requirement;
|
||||
this.txtLeaderName.Text = getProjectLeaderCheck.LeaderNames;
|
||||
if (!string.IsNullOrEmpty(model.ResponsibleMan))
|
||||
{
|
||||
this.drpResponsibleMan.SelectedValue = model.ResponsibleMan;
|
||||
//根据人员Id获取职务Id
|
||||
var user = PersonService.GetPersonById(model.ResponsibleMan);
|
||||
CompanyTrainingItemService.InitCompanyTrainingItemDownList(this.drpTrainingItem, user.WorkPostId, false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.CompanyTrainingItemId))
|
||||
{
|
||||
this.drpTrainingItem.SelectedValue = model.CompanyTrainingItemId;
|
||||
}
|
||||
this.txtCheckCode.Text = model.CheckCode;
|
||||
this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", model.CheckDate);
|
||||
this.ckIsHoldMeet.Checked = model.IsHoldMeet.Value;
|
||||
this.txtQuestionDef.Text = model.QuestionDef;
|
||||
this.txtRequirement.Text = model.Requirement;
|
||||
//this.txtLeaderName.Text = model.LeaderNames;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -117,6 +114,55 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下拉框加载
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
List<Model.SpSysUserItem> list = new List<Model.SpSysUserItem>();
|
||||
List<Model.SpSysUserItem> newList = new List<Model.SpSysUserItem>();
|
||||
list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(this.CurrUser.LoginProjectId, null));
|
||||
list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(null, null));
|
||||
foreach (var item in list)
|
||||
{
|
||||
var user = newList.FirstOrDefault(x => x.UserId == item.UserId);
|
||||
if (user == null)
|
||||
{
|
||||
newList.Add(item);
|
||||
}
|
||||
}
|
||||
drpLeaderIds.DataValueField = "UserId";
|
||||
drpLeaderIds.DataTextField = "UserName";
|
||||
drpLeaderIds.DataSource = newList;
|
||||
drpLeaderIds.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpLeaderIds);
|
||||
//UserService.InitFlowOperateControlUserDropDownList(this.drpLeaderIds, this.CurrUser.LoginProjectId, null, true);
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnits, this.CurrUser.LoginProjectId, null, true);
|
||||
|
||||
PersonService.InitPersonByProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 责任人下拉加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpResponsibleMan_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//责任人Id
|
||||
var responsibleManId = this.drpResponsibleMan.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(responsibleManId))
|
||||
{
|
||||
//根据人员Id获取职务Id
|
||||
var user = PersonService.GetPersonById(responsibleManId);
|
||||
if (user != null && !string.IsNullOrWhiteSpace(user.WorkPostId))
|
||||
{
|
||||
CompanyTrainingItemService.InitCompanyTrainingItemDownList(this.drpTrainingItem, user.WorkPostId, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
@@ -145,7 +191,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
return;
|
||||
}
|
||||
|
||||
Model.Check_ProjectLeaderCheck newProjectLeaderCheck = new Model.Check_ProjectLeaderCheck
|
||||
Model.Check_ProjectLeaderCheck model = new Model.Check_ProjectLeaderCheck
|
||||
{
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
CheckCode = this.txtCheckCode.Text.Trim(),
|
||||
@@ -155,23 +201,53 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
IsHoldMeet = this.ckIsHoldMeet.Checked,
|
||||
QuestionDef = this.txtQuestionDef.Text.Trim(),
|
||||
Requirement = this.txtRequirement.Text.Trim(),
|
||||
LeaderNames = this.txtLeaderName.Text.Trim(),
|
||||
//LeaderNames = this.txtLeaderName.Text.Trim(),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.UserId
|
||||
};
|
||||
if (this.drpResponsibleMan.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
model.ResponsibleMan = this.drpResponsibleMan.SelectedValue;
|
||||
}
|
||||
model.CompanyTrainingItemId = drpTrainingItem.SelectedValue;
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectLeaderCheckId))
|
||||
{
|
||||
newProjectLeaderCheck.ProjectLeaderCheckId = this.ProjectLeaderCheckId;
|
||||
BLL.Check_ProjectLeaderCheckService.UpdateProjectLeaderCheck(newProjectLeaderCheck);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newProjectLeaderCheck.CheckCode, newProjectLeaderCheck.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnModify);
|
||||
model.ProjectLeaderCheckId = this.ProjectLeaderCheckId;
|
||||
BLL.Check_ProjectLeaderCheckService.UpdateProjectLeaderCheck(model);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, model.CheckCode, model.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ProjectLeaderCheckId = SQLHelper.GetNewID();
|
||||
newProjectLeaderCheck.ProjectLeaderCheckId = this.ProjectLeaderCheckId;
|
||||
BLL.Check_ProjectLeaderCheckService.AddProjectLeaderCheck(newProjectLeaderCheck);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newProjectLeaderCheck.CheckCode, newProjectLeaderCheck.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnAdd);
|
||||
model.ProjectLeaderCheckId = this.ProjectLeaderCheckId;
|
||||
BLL.Check_ProjectLeaderCheckService.AddProjectLeaderCheck(model);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, model.CheckCode, model.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
|
||||
Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SupervisionAndInspection);
|
||||
|
||||
#region 责任人和重修教材非空,生成培训计划
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(model.ResponsibleMan) && !string.IsNullOrWhiteSpace(model.CompanyTrainingItemId))
|
||||
{//责任人和重修教材非空,生成培训计划
|
||||
var CheckTypeName = Enums.RetakeCourseType.领导带班检查.ToString();
|
||||
Model.RetakeCourseProducePlanInfo info = new Model.RetakeCourseProducePlanInfo
|
||||
{
|
||||
CurrProjectId = this.CurrUser.LoginProjectId,
|
||||
CurrUserId = this.CurrUser.UserId,
|
||||
CheckId = this.ProjectLeaderCheckId,
|
||||
CheckType = (int)Enums.RetakeCourseType.领导带班检查,
|
||||
CheckTypeName = "领导带班检查",
|
||||
PersonId = model.ResponsibleMan,
|
||||
CompanyTrainingItemId = model.CompanyTrainingItemId,
|
||||
//TrainEndDate = model.RectificationPeriod
|
||||
};
|
||||
TrainingPlanService.RetakeCourseProducePlan(info);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -193,6 +269,11 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
|
||||
protected void drpUnits_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string unitIds = Funs.GetStringByArray(this.drpUnits.SelectedValueArray);
|
||||
if (!string.IsNullOrWhiteSpace(unitIds))
|
||||
{
|
||||
PersonService.InitPersonByMultiProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, unitIds, false);
|
||||
}
|
||||
this.drpUnits.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpUnits.SelectedValueArray);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Check {
|
||||
|
||||
|
||||
public partial class ProjectLeaderCheckEdit {
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectLeaderCheckEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckCode 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckDate 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCheckDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnits 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,25 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnits;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpResponsibleMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpResponsibleMan;
|
||||
|
||||
/// <summary>
|
||||
/// drpTrainingItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTrainingItem;
|
||||
|
||||
/// <summary>
|
||||
/// drpLeaderIds 控件。
|
||||
/// </summary>
|
||||
@@ -74,16 +94,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpLeaderIds;
|
||||
|
||||
/// <summary>
|
||||
/// txtLeaderName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtLeaderName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ckIsHoldMeet 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckIsHoldMeet;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtQuestionDef 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtQuestionDef;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtRequirement 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRequirement;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -62,6 +62,12 @@
|
||||
<f:NumberBox ID="txtLearningTime" Label="时长(分钟)" runat="server" DecimalPrecision="0" NoDecimal="true" NoNegative="true" LabelWidth="120px"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpOutcome" Label="掌握程度" AutoSelectFirstItem="false" AutoPostBack="false" EnableSimulateTree="true" Required="true" ShowRedStar="true" runat="server" LabelWidth="120px">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompileMan" runat="server" Label="整理人" Readonly="true" MaxLength="50" LabelWidth="120px">
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
txtCompanyTrainingItemName.Text = model.CompanyTrainingItemName;
|
||||
txtCompileMan.Text = model.CompileMan;
|
||||
hdCompileMan.Text = model.CompileMan;
|
||||
if (model.Outcome!=null)
|
||||
drpOutcome.SelectedValue = model.Outcome.ToString();
|
||||
if (!string.IsNullOrEmpty(model.TestTrainingIds))
|
||||
{
|
||||
ddTestTraining.Values = model.TestTrainingIds.Split(',');
|
||||
@@ -104,8 +106,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +116,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
RadioButtonList1.DataValueField = "WorkPostId";
|
||||
RadioButtonList1.DataSource = workPostList;
|
||||
RadioButtonList1.DataBind();
|
||||
|
||||
Enums.InitOutcomeDropDownList(drpOutcome, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -169,6 +171,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
CompanyTrainingItemName = this.txtCompanyTrainingItemName.Text.Trim(),
|
||||
CompileMan = hdCompileMan.Text.Trim()
|
||||
};
|
||||
|
||||
newModel.Outcome = int.Parse(drpOutcome.SelectedValue);
|
||||
if (!string.IsNullOrEmpty(DropDownBox1.Text))
|
||||
{
|
||||
newModel.WorkPostIds = String.Join(",", DropDownBox1.Values);
|
||||
|
||||
@@ -122,6 +122,15 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtLearningTime;
|
||||
|
||||
/// <summary>
|
||||
/// drpOutcome 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpOutcome;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileMan 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -60,30 +60,30 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
|
||||
if (!string.IsNullOrEmpty(PlanId))
|
||||
{
|
||||
var trainingPlan = TrainingPlanService.GetPlanById(PlanId);
|
||||
var trainingPlan = TrainingPlanService.GetPlanById(PlanId);
|
||||
if (trainingPlan != null)
|
||||
{
|
||||
|
||||
this.txtPlanCode.Text = trainingPlan.PlanCode;
|
||||
this.txtPlanName.Text = trainingPlan.PlanName;
|
||||
this.txtTrainContent.Text = trainingPlan.TrainContent;
|
||||
this.txtPlanCode.Text = trainingPlan.PlanCode;
|
||||
this.txtPlanName.Text = trainingPlan.PlanName;
|
||||
this.txtTrainContent.Text = trainingPlan.TrainContent;
|
||||
this.txtTeachMan.Text = trainingPlan.TeachMan;
|
||||
if (trainingPlan.TeachHour.HasValue)
|
||||
this.txtTeachHour.Text = trainingPlan.TeachHour.Value.ToString("0.##");
|
||||
if(trainingPlan.TrainStartDate.HasValue)
|
||||
this.dpTrainStartDate.SelectedDate = trainingPlan.TrainStartDate ;
|
||||
if (trainingPlan.TrainStartDate.HasValue)
|
||||
this.dpTrainStartDate.SelectedDate = trainingPlan.TrainStartDate;
|
||||
if (trainingPlan.TrainEndDate.HasValue)
|
||||
this.dpTrainEndDate.SelectedDate = trainingPlan.TrainEndDate;
|
||||
this.dpTrainEndDate.SelectedDate = trainingPlan.TrainEndDate;
|
||||
this.txtTeachAddress.Text = trainingPlan.TeachAddress;
|
||||
if (!string.IsNullOrEmpty(trainingPlan.UnitIds))
|
||||
dpUnit.SelectedValueArray = trainingPlan.UnitIds.Split(',');
|
||||
dpUnit.SelectedValueArray = trainingPlan.UnitIds.Split(',');
|
||||
if (!string.IsNullOrEmpty(trainingPlan.WorkPostId))
|
||||
dpWorkPost.SelectedValueArray = trainingPlan.WorkPostId.Split(',');
|
||||
if (!string.IsNullOrEmpty(trainingPlan.TrainLevelId))
|
||||
drpTrainLevel.SelectedValue = trainingPlan.TrainLevelId;
|
||||
if (!string.IsNullOrEmpty(trainingPlan.TrainTypeId))
|
||||
drpTrainType.SelectedValue = trainingPlan.TrainTypeId;
|
||||
if(!string.IsNullOrEmpty(trainingPlan.Cycle))
|
||||
if (!string.IsNullOrEmpty(trainingPlan.Cycle))
|
||||
drpCycle.SelectedValue = trainingPlan.Cycle;
|
||||
|
||||
var planItem = (from x in Funs.DB.Training_PlanItem where x.PlanId == trainingPlan.PlanId select x.CompanyTrainingItemId).ToArray();
|
||||
@@ -91,27 +91,26 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
dpCompanyTraining.SelectedValueArray = planItem;
|
||||
}
|
||||
var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(this.CurrUser.LoginProjectId, trainingPlan.UnitIds, trainingPlan.WorkPostId,"", trainingPlan.TrainTypeId,"","").OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList();
|
||||
var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(this.CurrUser.LoginProjectId, trainingPlan.UnitIds, trainingPlan.WorkPostId, "", trainingPlan.TrainTypeId, "", "").OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList();
|
||||
dpSysUser.DataTextField = "PersonName";
|
||||
dpSysUser.DataValueField = "PersonId";
|
||||
dpSysUser.DataSource = getDataList;
|
||||
dpSysUser.DataBind();
|
||||
|
||||
var userids =( from x in Funs.DB.Training_Task where x.PlanId == trainingPlan.PlanId select x.UserId).ToArray();
|
||||
var userids = (from x in Funs.DB.Training_Task where x.PlanId == trainingPlan.PlanId select x.UserId).ToArray();
|
||||
if (userids != null && userids.Length > 0)
|
||||
{
|
||||
dpSysUser.SelectedValueArray = userids;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-";
|
||||
txtPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-";
|
||||
txtPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
@@ -142,6 +141,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
|
||||
|
||||
}
|
||||
|
||||
#region JQueryFeature
|
||||
|
||||
public class JQueryFeature
|
||||
@@ -190,13 +190,20 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
return String.Format("Name:{0}+Id:{1}", Name, Id);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 加载培训教材
|
||||
/// </summary>
|
||||
/// <param name="myList"></param>
|
||||
/// <param name="menuId"></param>
|
||||
/// <param name="depth"></param>
|
||||
private void BoundTree(List<JQueryFeature> myList, string menuId, int depth)
|
||||
{
|
||||
var dt = GetNewTraining(menuId);
|
||||
if (dt.Count() > 0)
|
||||
{
|
||||
|
||||
foreach (var dr in dt)
|
||||
{
|
||||
myList.Add(new JQueryFeature(dr.CompanyTrainingId, dr.CompanyTrainingName, depth, false));
|
||||
@@ -205,10 +212,9 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
else
|
||||
{
|
||||
var item = Funs.DB.Training_CompanyTrainingItem.Where(x => x.CompanyTrainingId == menuId);
|
||||
var item = Funs.DB.Training_CompanyTrainingItem.Where(x => x.CompanyTrainingId == menuId).OrderBy(x => x.CompanyTrainingItemCode);
|
||||
if (item.Count() > 0)
|
||||
{
|
||||
|
||||
foreach (var dr in item)
|
||||
{
|
||||
myList.Add(new JQueryFeature(dr.CompanyTrainingItemId, dr.CompanyTrainingItemName, depth, true));
|
||||
@@ -216,6 +222,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 得到菜单方法
|
||||
/// </summary>
|
||||
@@ -227,6 +234,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 提交按钮
|
||||
/// <summary>
|
||||
@@ -235,11 +244,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
this.SaveData(Const.BtnSubmit);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 保存按钮
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
@@ -248,7 +257,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.SaveData(Const.BtnSave);
|
||||
}
|
||||
#endregion
|
||||
@@ -260,20 +268,19 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
{
|
||||
|
||||
var db = Funs.DB;
|
||||
|
||||
Model.Training_Plan trainingPlan = new Model.Training_Plan();
|
||||
trainingPlan.ProjectId = this.CurrUser.LoginProjectId;
|
||||
trainingPlan.PlanName = this.txtPlanName.Text;
|
||||
trainingPlan.PlanCode = this.txtPlanCode.Text;
|
||||
trainingPlan.TrainContent = this.txtTrainContent.Text;
|
||||
trainingPlan.PlanName = this.txtPlanName.Text;
|
||||
trainingPlan.PlanCode = this.txtPlanCode.Text;
|
||||
trainingPlan.TrainContent = this.txtTrainContent.Text;
|
||||
trainingPlan.TeachMan = this.txtTeachMan.Text;
|
||||
trainingPlan.TeachHour =decimal.Parse( this.txtTeachHour.Text);
|
||||
trainingPlan.TeachHour = decimal.Parse(this.txtTeachHour.Text);
|
||||
trainingPlan.TrainStartDate = this.dpTrainStartDate.SelectedDate;
|
||||
trainingPlan.TrainEndDate = this.dpTrainEndDate.SelectedDate;
|
||||
trainingPlan.TeachAddress = this.txtTeachAddress.Text;
|
||||
trainingPlan.UnitIds = string.Join(",", dpUnit.SelectedValueArray);
|
||||
trainingPlan.UnitIds = string.Join(",", dpUnit.SelectedValueArray);
|
||||
trainingPlan.WorkPostId = string.Join(",", dpWorkPost.SelectedValueArray);
|
||||
trainingPlan.DesignerId = CurrUser.UserId;
|
||||
trainingPlan.DesignerDate = DateTime.Now;
|
||||
@@ -287,10 +294,10 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
if (string.IsNullOrEmpty(PlanId))
|
||||
{
|
||||
//string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-";
|
||||
//trainingPlan.PlanCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code);
|
||||
//string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-";
|
||||
//trainingPlan.PlanCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code);
|
||||
|
||||
//trainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, CurrUser.LoginProjectId, CurrUser.UnitId);
|
||||
//trainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, CurrUser.LoginProjectId, CurrUser.UnitId);
|
||||
trainingPlan.PlanId = SQLHelper.GetNewID();
|
||||
TrainingPlanService.AddPlan(trainingPlan);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainingPlanMenuId, trainingPlan.ProjectId, null, trainingPlan.PlanId, trainingPlan.DesignerDate);
|
||||
@@ -300,6 +307,14 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
trainingPlan.PlanId = PlanId;
|
||||
TrainingPlanService.UpdatePlan(trainingPlan);
|
||||
|
||||
////删除培训教材类型
|
||||
var planItem = (from x in db.Training_PlanItem where x.PlanId == trainingPlan.PlanId select x).ToList();
|
||||
if (planItem.Count() > 0)
|
||||
{
|
||||
db.Training_PlanItem.DeleteAllOnSubmit(planItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
////删除培训任务
|
||||
var tasks = from x in db.Training_Task where x.PlanId == trainingPlan.PlanId select x;
|
||||
if (tasks.Count() > 0)
|
||||
@@ -313,42 +328,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
db.Training_Task.DeleteAllOnSubmit(tasks);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
////删除培训教材类型
|
||||
var planItem = (from x in db.Training_PlanItem where x.PlanId == trainingPlan.PlanId select x).ToList();
|
||||
if (planItem.Count() > 0)
|
||||
{
|
||||
db.Training_PlanItem.DeleteAllOnSubmit(planItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
if (dpSysUser.SelectedValueArray!=null&&dpSysUser.SelectedValueArray.Count() > 0)
|
||||
if (dpCompanyTraining.SelectedValueArray != null && dpCompanyTraining.SelectedValueArray.Count() > 0)
|
||||
{
|
||||
////新增培训人员明细
|
||||
foreach (var PersonId in dpSysUser.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(PersonId))
|
||||
{
|
||||
Model.Training_Task newTrainDetail = new Model.Training_Task
|
||||
{
|
||||
TaskId = SQLHelper.GetNewID(),
|
||||
ProjectId = trainingPlan.ProjectId,
|
||||
PlanId = trainingPlan.PlanId,
|
||||
UserId = PersonId,
|
||||
TaskDate = DateTime.Now,
|
||||
States = Const.State_0, ////未生成培训教材明细
|
||||
};
|
||||
db.Training_Task.InsertOnSubmit(newTrainDetail);
|
||||
db.SubmitChanges();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dpCompanyTraining.SelectedValueArray!=null)
|
||||
{
|
||||
////新增培训教材类型明细
|
||||
////新增培训计划明细
|
||||
foreach (var CompanyTrainingItemId in dpCompanyTraining.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(CompanyTrainingItemId))
|
||||
@@ -357,13 +341,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
PlanItemId = SQLHelper.GetNewID(),
|
||||
PlanId = trainingPlan.PlanId,
|
||||
|
||||
};
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(CompanyTrainingItemId))
|
||||
{
|
||||
newPlanItem.CompanyTrainingItemId = CompanyTrainingItemId;
|
||||
|
||||
newPlanItem.CompanyTrainingItemId = CompanyTrainingItemId;
|
||||
var trainingItem = Funs.DB.Training_CompanyTrainingItem.FirstOrDefault(x => x.CompanyTrainingItemId == CompanyTrainingItemId);
|
||||
if (trainingItem != null)
|
||||
{
|
||||
@@ -376,15 +358,64 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
}
|
||||
|
||||
if (dpSysUser.SelectedValueArray != null && dpSysUser.SelectedValueArray.Count() > 0)
|
||||
{
|
||||
////新增培训任务
|
||||
foreach (var PersonId in dpSysUser.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(PersonId))
|
||||
{
|
||||
string taskId = SQLHelper.GetNewID();
|
||||
Model.Training_Task newTrainDetail = new Model.Training_Task
|
||||
{
|
||||
TaskId = taskId,
|
||||
ProjectId = trainingPlan.ProjectId,
|
||||
PlanId = trainingPlan.PlanId,
|
||||
UserId = PersonId,
|
||||
TaskDate = DateTime.Now,
|
||||
States = Const.State_0, ////未生成培训教材明细
|
||||
};
|
||||
db.Training_Task.InsertOnSubmit(newTrainDetail);
|
||||
db.SubmitChanges();
|
||||
|
||||
if (dpCompanyTraining.SelectedValueArray != null && dpCompanyTraining.SelectedValueArray.Count() > 0)
|
||||
{
|
||||
foreach (var CompanyTrainingItemId in dpCompanyTraining.SelectedValueArray)
|
||||
{
|
||||
var trainingItem = db.Training_CompanyTrainingItem.FirstOrDefault(x => x.CompanyTrainingItemId == CompanyTrainingItemId);
|
||||
Model.Training_TaskItem newTaskItem = new Model.Training_TaskItem
|
||||
{
|
||||
TaskItemId = SQLHelper.GetNewID(),
|
||||
TaskId = taskId,
|
||||
PlanId = trainingPlan.PlanId,
|
||||
PersonId = PersonId,
|
||||
TrainingItemCode = trainingItem.CompanyTrainingItemCode,
|
||||
TrainingItemName = trainingItem.CompanyTrainingItemName,
|
||||
AttachUrl = trainingItem.AttachUrl,
|
||||
CompanyTrainingItemId = trainingItem.CompanyTrainingItemId,
|
||||
//LearnTime = trainingItem.LearningTime,
|
||||
//VideoProgress = 0,
|
||||
};
|
||||
db.Training_TaskItem.InsertOnSubmit(newTaskItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
var taskItem = db.Training_Task.FirstOrDefault(x => x.TaskId == taskId);
|
||||
////更新培训任务
|
||||
taskItem.States = Const.State_1;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -398,26 +429,26 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
protected void drpWorkUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
string unitName = ((DropDownList)sender).SelectedValue;
|
||||
string id = "";
|
||||
if(unitName != BLL.Const._Null)
|
||||
if (unitName != BLL.Const._Null)
|
||||
{
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(x=>x.UnitName == unitName);
|
||||
if(unit != null)
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == unitName);
|
||||
if (unit != null)
|
||||
{
|
||||
id = unit.UnitId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var sysUser = BLL.ProjectUserService.GetProjectUserByUnitidAndProjectId(CurrUser.LoginProjectId, id, Const.HSSEManager);
|
||||
List<ListItem> lists = new List<ListItem>();
|
||||
foreach(var item in sysUser)
|
||||
foreach (var item in sysUser)
|
||||
{
|
||||
lists.Add(new ListItem(item.UserName, item.UserName));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void dpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
@@ -428,7 +459,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
protected void dpWorkPost_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
initdpSysUser();
|
||||
}
|
||||
}
|
||||
protected void drpTrainType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
initdpSysUser();
|
||||
@@ -439,16 +470,16 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
if (dpUnit.SelectedValueArray != null && dpWorkPost.SelectedValueArray != null)
|
||||
{
|
||||
dpSysUser.Items.Clear();
|
||||
string unitIds=string.Join(",",dpUnit.SelectedValue);
|
||||
string unitIds = string.Join(",", dpUnit.SelectedValue);
|
||||
string workPostIds = string.Join(",", dpWorkPost.SelectedValue);
|
||||
var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(this.CurrUser.LoginProjectId, unitIds, workPostIds,"", drpTrainType.SelectedValue,"","").OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList();
|
||||
var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(this.CurrUser.LoginProjectId, unitIds, workPostIds, "", drpTrainType.SelectedValue, "", "").OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList();
|
||||
dpSysUser.DataTextField = "PersonName";
|
||||
dpSysUser.DataValueField = "PersonId";
|
||||
dpSysUser.DataSource = getDataList;
|
||||
dpSysUser.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,306 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BLL;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class BehavioralSafetyObservation : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("BehavioralSafetyObservationEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var db = Funs.DB;
|
||||
var queryData = from x in db.Examine_BehavioralSafetyObservation
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.Sys_User on x.CompileMan equals z.UserId
|
||||
where x.ProjectId == this.ProjectId
|
||||
&& (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtUserName.Text.Trim()) || y.UserName.Contains(txtUserName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtContent.Text.Trim()) || x.Content.Contains(txtContent.Text.Trim()))
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.Code,
|
||||
x.Name,
|
||||
x.Content,
|
||||
x.Remark,
|
||||
x.DateTime,
|
||||
x.CompileDate,
|
||||
UserName = y.UserName,
|
||||
CompileManName = z.UserName
|
||||
};
|
||||
Grid1.RecordCount = queryData.Count();
|
||||
Grid1.DataSource = queryData;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#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 = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#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="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 (this.btnMenuEdit.Hidden)
|
||||
{
|
||||
Alert.ShowInTop("抱歉!您没有编辑权限!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var model = BLL.BehavioralSafetyObservationService.GetBehavioralSafetyObservationById(id);
|
||||
if (model != null)
|
||||
{
|
||||
if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BehavioralSafetyObservationView.aspx?Id={0}", id, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BehavioralSafetyObservationEdit.aspx?Id={0}", id, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var newModel = BLL.BehavioralSafetyObservationService.GetBehavioralSafetyObservationById(rowID);
|
||||
if (newModel != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BehavioralSafetyObservationMenuId, BLL.Const.BtnDelete);
|
||||
BLL.BehavioralSafetyObservationService.DeleteBehavioralSafetyObservationById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BehavioralSafetyObservationMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("行为安全观察与沟通" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 5000;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||
}
|
||||
sb.Append("</tr>");
|
||||
foreach (GridRow row in grid.Rows)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
string html = row.Values[column.ColumnIndex].ToString();
|
||||
if (column.ColumnID == "tfNumber")
|
||||
{
|
||||
html = (row.FindControl("lblNumber") as AspNet.Label).Text;
|
||||
}
|
||||
sb.AppendFormat("<td style=\"vnd.ms-excel.numberformat:@\">{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
-197
@@ -1,197 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class BehavioralSafetyObservation
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// txtUserName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUserName;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <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>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BehavioralSafetyObservationEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BehavioralSafetyObservationEdit" ValidateRequest="false" %>
|
||||
|
||||
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑行为安全观察与沟通</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="行为安全观察与沟通" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCode" runat="server" Label="编号" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtName" runat="server" Label="名称" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUser" runat="server" Label="人员" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtDateTime" runat="server" Label="时间" LabelAlign="Right" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtContent" runat="server" Label="内容" MaxLength="800">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="1000">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,165 +0,0 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class BehavioralSafetyObservationEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Id"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Id"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.InitDropDownList();
|
||||
|
||||
this.Id = Request.Params["Id"];
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation model = BLL.BehavioralSafetyObservationService.GetBehavioralSafetyObservationById(this.Id);
|
||||
if (model != null)
|
||||
{
|
||||
this.ProjectId = model.ProjectId;
|
||||
if (this.ProjectId != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.InitDropDownList();
|
||||
}
|
||||
this.txtCode.Text = model.Code;
|
||||
this.txtName.Text = model.Name;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime);
|
||||
if (!string.IsNullOrEmpty(model.UserId))
|
||||
{
|
||||
this.drpUser.SelectedValue = model.UserId;
|
||||
}
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtContent.Text = model.Content;
|
||||
//this.txtContent.Text = HttpUtility.HtmlDecode(model.Content);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////自动生成编码
|
||||
this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_BehavioralSafetyObservation", "Code", CurrUser.LoginProjectId);
|
||||
//////自动生成编码
|
||||
//this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.BehavioralSafetyObservationMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
this.drpUser.SelectedValue = this.CurrUser.UserId;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
{
|
||||
Model.Examine_BehavioralSafetyObservation newModel = new Model.Examine_BehavioralSafetyObservation
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
Code = this.txtCode.Text.Trim(),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.UserId
|
||||
};
|
||||
if (this.drpUser.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newModel.UserId = this.drpUser.SelectedValue;
|
||||
}
|
||||
|
||||
newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim());
|
||||
newModel.Remark = this.txtRemark.Text.Trim();
|
||||
newModel.Name = this.txtName.Text.Trim();
|
||||
newModel.Content = this.txtContent.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
newModel.Id = this.Id;
|
||||
BLL.BehavioralSafetyObservationService.UpdateBehavioralSafetyObservation(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BehavioralSafetyObservationMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Id = SQLHelper.GetNewID(typeof(Model.Examine_BehavioralSafetyObservation));
|
||||
newModel.Id = this.Id;
|
||||
BLL.BehavioralSafetyObservationService.AddBehavioralSafetyObservation(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BehavioralSafetyObservationMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
SaveData(BLL.Const.BtnSave);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/BehavioralSafetyObservation&menuId={1}", Id, BLL.Const.BehavioralSafetyObservationMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
-143
@@ -1,143 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class BehavioralSafetyObservationEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUser 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtDateTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtDateTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
+30
-24
@@ -1,11 +1,11 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BehavioralSafetyObservation.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BehavioralSafetyObservation" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BonusScoreSelfManagement.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BonusScoreSelfManagement" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>行为安全观察与沟通</title>
|
||||
<title>自主管理加分项</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
@@ -20,7 +20,7 @@
|
||||
<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"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="自主管理加分项" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="Id"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true"
|
||||
SortField="Code" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
@@ -37,7 +37,7 @@
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="姓名" ID="txtUserName" EmptyText="输入查询条件"
|
||||
<f:TextBox runat="server" Label="姓名" ID="txtPersonName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
@@ -45,6 +45,8 @@
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:DropDownList runat="server" Label="加分类型" ID="drpBonusScoreType" EnableSimulateTree="True" AutoSelectFirstItem="True" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true"
|
||||
@@ -63,40 +65,44 @@
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="Code" DataField="Code"
|
||||
<f:RenderField Width="80px" ColumnID="Code" DataField="Code"
|
||||
SortField="Code" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="500px" ColumnID="Name" DataField="Name"
|
||||
SortField="Name" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="UserName" DataField="UserName"
|
||||
SortField="UserName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="DateTime" DataField="DateTime"
|
||||
SortField="DateTime" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="日期" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<f:RenderField Width="120px" ColumnID="PersonName" DataField="PersonName"
|
||||
SortField="PersonName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="280px" ColumnID="Content" DataField="Content"
|
||||
<f:RenderField MinWidth="280px" ColumnID="Name" DataField="Name"
|
||||
SortField="Name" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="280px" ColumnID="BonusScoreTypeName" DataField="BonusScoreTypeName"
|
||||
SortField="BonusScoreTypeName" FieldType="String" HeaderText="加分类型" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="Score" DataField="Score"
|
||||
SortField="Score" FieldType="String" HeaderText="分值" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="220px" ColumnID="Content" DataField="Content"
|
||||
SortField="Content" FieldType="String" HeaderText="内容" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="220px" ColumnID="Remark" DataField="Remark"
|
||||
SortField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CompileManName" DataField="CompileManName"
|
||||
SortField="CompileManName" FieldType="String" HeaderText="编制人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField Width="100px" ColumnID="CompileManName" DataField="CompileManName"
|
||||
SortField="CompileManName" FieldType="String" HeaderText="编制人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="120px" ColumnID="CompileDate" DataField="CompileDate"
|
||||
SortField="CompileDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="编制时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="Id" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/BehavioralSafetyObservation&menuId=5049BB69-A75F-47D4-ABF3-DAA719D05C74"
|
||||
DataIFrameUrlFields="Id" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/BonusScoreSelfManagement&menuId=9667D2CB-8AAE-4799-8C94-A051F9846ECE"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
@@ -119,7 +125,7 @@
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="行为安全观察与沟通" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
<f:Window ID="Window1" Title="自主管理加分项" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
+22
-17
@@ -7,7 +7,7 @@ using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class PersonalSafetyActionPlan : PageBase
|
||||
public partial class BonusScoreSelfManagement : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
@@ -42,9 +42,10 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
BonusScoreTypeService.InitBonusScoreTypeDropDownList(this.drpBonusScoreType, true);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("PersonalSafetyActionPlanEdit.aspx") + "return false;";
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("BonusScoreSelfManagementEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
@@ -65,25 +66,29 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
return;
|
||||
}
|
||||
var db = Funs.DB;
|
||||
var queryData = from x in db.Examine_PersonalSafetyActionPlan
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.Sys_User on x.CompileMan equals z.UserId
|
||||
var queryData = from x in db.Examine_BonusScoreSelfManagement
|
||||
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
//join z in db.Sys_User on x.CompileMan equals z.UserId
|
||||
where x.ProjectId == this.ProjectId
|
||||
&& (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtUserName.Text.Trim()) || y.UserName.Contains(txtUserName.Text.Trim()))
|
||||
&& (drpBonusScoreType.SelectedValue == Const._Null || x.BonusScoreTypeId == drpBonusScoreType.SelectedValue)
|
||||
&& (string.IsNullOrEmpty(txtPersonName.Text.Trim()) || y.PersonName.Contains(txtPersonName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtContent.Text.Trim()) || x.Content.Contains(txtContent.Text.Trim()))
|
||||
orderby x.Code descending
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.Code,
|
||||
x.Name,
|
||||
x.BonusScoreTypeName,
|
||||
x.Score,
|
||||
x.Content,
|
||||
x.Remark,
|
||||
x.DateTime,
|
||||
//x.DateTime,
|
||||
x.CompileDate,
|
||||
UserName = y.UserName,
|
||||
CompileManName = z.UserName
|
||||
y.PersonName,
|
||||
//CompileManName = z.UserName
|
||||
};
|
||||
Grid1.RecordCount = queryData.Count();
|
||||
Grid1.DataSource = queryData;
|
||||
@@ -173,16 +178,16 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var model = BLL.PersonalSafetyActionPlanService.GetPersonalSafetyActionPlanById(id);
|
||||
var model = BLL.BonusScoreSelfManagementService.GetBonusScoreSelfManagementById(id);
|
||||
if (model != null)
|
||||
{
|
||||
if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonalSafetyActionPlanView.aspx?Id={0}", id, "查看 - ")));
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BonusScoreSelfManagementView.aspx?Id={0}", id, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonalSafetyActionPlanEdit.aspx?Id={0}", id, "编辑 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BonusScoreSelfManagementEdit.aspx?Id={0}", id, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -202,11 +207,11 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var newModel = BLL.PersonalSafetyActionPlanService.GetPersonalSafetyActionPlanById(rowID);
|
||||
var newModel = BLL.BonusScoreSelfManagementService.GetBonusScoreSelfManagementById(rowID);
|
||||
if (newModel != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.PersonalSafetyActionPlanMenuId, BLL.Const.BtnDelete);
|
||||
BLL.PersonalSafetyActionPlanService.DeletePersonalSafetyActionPlanById(rowID);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BonusScoreSelfManagementMenuId, BLL.Const.BtnDelete);
|
||||
BLL.BonusScoreSelfManagementService.DeleteBonusScoreSelfManagementById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +233,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PersonalSafetyActionPlanMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BonusScoreSelfManagementMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
@@ -256,7 +261,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("个人安全行动计划" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("自主管理加分项" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 5000;
|
||||
+12
-3
@@ -11,7 +11,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class LeadershipJoinHomeworkAnalysisMeeting
|
||||
public partial class BonusScoreSelfManagement
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -78,13 +78,13 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// txtUserName 控件。
|
||||
/// txtPersonName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUserName;
|
||||
protected global::FineUIPro.TextBox txtPersonName;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
@@ -95,6 +95,15 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// drpBonusScoreType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpBonusScoreType;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
+8
-7
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CoConstructionActivitiesEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.CoConstructionActivitiesEdit" ValidateRequest="false" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BonusScoreSelfManagementEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BonusScoreSelfManagementEdit" ValidateRequest="false" %>
|
||||
|
||||
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
@@ -6,13 +6,13 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑一线党员联系班组共建活动</title>
|
||||
<title>编辑自主管理加分项</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="一线党员联系班组共建活动" AutoScroll="true"
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="自主管理加分项" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
@@ -27,11 +27,12 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUser" runat="server" Label="人员" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
<f:DropDownList ID="drpPerson" runat="server" Label="人员" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtDateTime" runat="server" Label="时间" LabelAlign="Right" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
<f:DropDownList runat="server" ID="drpBonusScoreType" Label="加分类型" EnableSimulateTree="True" AutoSelectFirstItem="false" AutoPostBack="true" OnSelectedIndexChanged="drpBonusScoreType_SelectedIndexChanged" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:NumberBox ID="txtScore" runat="server" Label="分值" Readonly="true" Required="true" ShowRedStar="true">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
+50
-20
@@ -3,7 +3,7 @@ using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class PersonalSafetyActionPlanEdit : PageBase
|
||||
public partial class BonusScoreSelfManagementEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
@@ -53,7 +53,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
this.Id = Request.Params["Id"];
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan model = BLL.PersonalSafetyActionPlanService.GetPersonalSafetyActionPlanById(this.Id);
|
||||
Model.Examine_BonusScoreSelfManagement model = BLL.BonusScoreSelfManagementService.GetBonusScoreSelfManagementById(this.Id);
|
||||
if (model != null)
|
||||
{
|
||||
this.ProjectId = model.ProjectId;
|
||||
@@ -63,11 +63,17 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
}
|
||||
this.txtCode.Text = model.Code;
|
||||
this.txtName.Text = model.Name;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime);
|
||||
if (!string.IsNullOrEmpty(model.UserId))
|
||||
this.txtScore.Text = model.Score.ToString();
|
||||
//this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime);
|
||||
if (!string.IsNullOrEmpty(model.PersonId))
|
||||
{
|
||||
this.drpUser.SelectedValue = model.UserId;
|
||||
this.drpPerson.SelectedValue = model.PersonId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.BonusScoreTypeId))
|
||||
{
|
||||
this.drpBonusScoreType.SelectedValue = model.BonusScoreTypeId;
|
||||
}
|
||||
this.txtScore.Text = model.Score.ToString();
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtContent.Text = model.Content;
|
||||
//this.txtContent.Text = HttpUtility.HtmlDecode(model.Content);
|
||||
@@ -76,11 +82,11 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
else
|
||||
{
|
||||
////自动生成编码
|
||||
this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_PersonalSafetyActionPlan", "Code", CurrUser.LoginProjectId);
|
||||
this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_BonusScoreSelfManagement", "Code", CurrUser.LoginProjectId);
|
||||
//////自动生成编码
|
||||
//this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.PersonalSafetyActionPlanMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
this.drpUser.SelectedValue = this.CurrUser.UserId;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
//this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.BonusScoreSelfManagementMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
//this.drpPerson.SelectedValue = this.CurrUser.UserId;
|
||||
//this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,7 +96,25 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false);
|
||||
BonusScoreTypeService.InitBonusScoreTypeDropDownList(this.drpBonusScoreType, false);
|
||||
PersonService.InitPersonByProjectUnitDropDownList(this.drpPerson, this.CurrUser.LoginProjectId, "", false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加分类型下拉加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpBonusScoreType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int score = 0;
|
||||
string typeId = drpBonusScoreType.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(typeId))
|
||||
{
|
||||
var bonusScoreType = BLL.BonusScoreTypeService.GetBonusScoreTypeById(typeId);
|
||||
score = bonusScoreType.Score;
|
||||
}
|
||||
this.txtScore.Text = score.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -113,35 +137,41 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
{
|
||||
Model.Examine_PersonalSafetyActionPlan newModel = new Model.Examine_PersonalSafetyActionPlan
|
||||
Model.Examine_BonusScoreSelfManagement newModel = new Model.Examine_BonusScoreSelfManagement
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
Code = this.txtCode.Text.Trim(),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.UserId
|
||||
};
|
||||
if (this.drpUser.SelectedValue != BLL.Const._Null)
|
||||
if (this.drpPerson.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newModel.UserId = this.drpUser.SelectedValue;
|
||||
newModel.PersonId = this.drpPerson.SelectedValue;
|
||||
}
|
||||
if (this.drpBonusScoreType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newModel.BonusScoreTypeId = this.drpBonusScoreType.SelectedValue;
|
||||
newModel.BonusScoreTypeName = this.drpBonusScoreType.SelectedText;
|
||||
}
|
||||
|
||||
newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim());
|
||||
//newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim());
|
||||
newModel.Name = this.txtName.Text.Trim();
|
||||
newModel.Score = int.Parse(this.txtScore.Text.Trim());
|
||||
newModel.Remark = this.txtRemark.Text.Trim();
|
||||
newModel.Content = this.txtContent.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
newModel.Id = this.Id;
|
||||
BLL.PersonalSafetyActionPlanService.UpdatePersonalSafetyActionPlan(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.PersonalSafetyActionPlanMenuId, BLL.Const.BtnModify);
|
||||
BLL.BonusScoreSelfManagementService.UpdateBonusScoreSelfManagement(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BonusScoreSelfManagementMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Id = SQLHelper.GetNewID(typeof(Model.Examine_PersonalSafetyActionPlan));
|
||||
this.Id = SQLHelper.GetNewID(typeof(Model.Examine_BonusScoreSelfManagement));
|
||||
newModel.Id = this.Id;
|
||||
BLL.PersonalSafetyActionPlanService.AddPersonalSafetyActionPlan(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.PersonalSafetyActionPlanMenuId, BLL.Const.BtnAdd);
|
||||
BLL.BonusScoreSelfManagementService.AddBonusScoreSelfManagement(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BonusScoreSelfManagementMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -158,7 +188,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
SaveData(BLL.Const.BtnSave);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/PersonalSafetyActionPlan&menuId={1}", Id, BLL.Const.PersonalSafetyActionPlanMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/BonusScoreSelfManagement&menuId={1}", Id, BLL.Const.BonusScoreSelfManagementMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
+14
-5
@@ -11,7 +11,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class LeadershipJoinHomeworkAnalysisMeetingEdit
|
||||
public partial class BonusScoreSelfManagementEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -60,22 +60,31 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUser 控件。
|
||||
/// drpPerson 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUser;
|
||||
protected global::FineUIPro.DropDownList drpPerson;
|
||||
|
||||
/// <summary>
|
||||
/// txtDateTime 控件。
|
||||
/// drpBonusScoreType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtDateTime;
|
||||
protected global::FineUIPro.DropDownList drpBonusScoreType;
|
||||
|
||||
/// <summary>
|
||||
/// txtScore 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtScore;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
+16
-35
@@ -1,11 +1,11 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SharingOfSafetyExperience.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.SharingOfSafetyExperience" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BonusScoreType.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BonusScoreType" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>安全经验分享</title>
|
||||
<title>自主管理加分项类型</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
@@ -20,11 +20,11 @@
|
||||
<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"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="自主管理加分项类型" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="Id"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true"
|
||||
SortField="Code" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
SortField="Code" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="false"
|
||||
IsDatabasePaging="false" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
@@ -33,15 +33,11 @@
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="名称" ID="txtName" EmptyText="输入查询条件"
|
||||
<f:TextBox runat="server" Label="类型" ID="txtName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="姓名" ID="txtUserName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="内容" ID="txtContent" EmptyText="输入查询条件"
|
||||
<f:TextBox runat="server" Label="备注" ID="txtRemark" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
@@ -65,29 +61,21 @@
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="Code" DataField="Code"
|
||||
SortField="Code" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="500px" ColumnID="Name" DataField="Name"
|
||||
SortField="Name" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="UserName" DataField="UserName"
|
||||
SortField="UserName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="DateTime" DataField="DateTime"
|
||||
SortField="DateTime" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="日期" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="280px" ColumnID="Content" DataField="Content"
|
||||
SortField="Content" FieldType="String" HeaderText="内容" HeaderTextAlign="Center"
|
||||
<f:RenderField MinWidth="300px" ColumnID="Name" DataField="Name"
|
||||
SortField="Name" FieldType="String" HeaderText="加分类型" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="220px" ColumnID="Remark" DataField="Remark"
|
||||
<f:RenderField MinWidth="80px" ColumnID="Score" DataField="Score"
|
||||
SortField="Score" FieldType="String" HeaderText="分值" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="320px" ColumnID="Remark" DataField="Remark"
|
||||
SortField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CompileManName" DataField="CompileManName"
|
||||
<f:RenderField Width="120px" ColumnID="CompileManName" DataField="CompileManName"
|
||||
SortField="CompileManName" FieldType="String" HeaderText="编制人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
@@ -95,9 +83,6 @@
|
||||
SortField="CompileDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="编制时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="Id" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/SharingOfSafetyExperience&menuId=D5FC7B12-0E81-482C-8B29-A9F43DF05D1F"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
@@ -119,14 +104,10 @@
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="安全经验分享" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
<f:Window ID="Window1" Title="自主管理加分项类型" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="附件页面" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="TableEdit" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑">
|
||||
+15
-19
@@ -7,7 +7,7 @@ using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class CoConstructionActivities : PageBase
|
||||
public partial class BonusScoreType : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
@@ -44,7 +44,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("CoConstructionActivitiesEdit.aspx") + "return false;";
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("BonusScoreTypeEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
@@ -65,24 +65,20 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
return;
|
||||
}
|
||||
var db = Funs.DB;
|
||||
var queryData = from x in db.Examine_CoConstructionActivities
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
var queryData = from x in db.Examine_BonusScoreType
|
||||
join z in db.Sys_User on x.CompileMan equals z.UserId
|
||||
where x.ProjectId == this.ProjectId
|
||||
&& (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
|
||||
where (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtUserName.Text.Trim()) || y.UserName.Contains(txtUserName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtContent.Text.Trim()) || x.Content.Contains(txtContent.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtRemark.Text.Trim()) || x.Remark.Contains(txtRemark.Text.Trim()))
|
||||
orderby x.Code
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.Code,
|
||||
x.Name,
|
||||
x.Content,
|
||||
x.Score,
|
||||
x.Remark,
|
||||
x.DateTime,
|
||||
x.CompileDate,
|
||||
UserName = y.UserName,
|
||||
CompileManName = z.UserName
|
||||
};
|
||||
Grid1.RecordCount = queryData.Count();
|
||||
@@ -173,16 +169,16 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var model = BLL.CoConstructionActivitiesService.GetCoConstructionActivitiesById(id);
|
||||
var model = BLL.BonusScoreTypeService.GetBonusScoreTypeById(id);
|
||||
if (model != null)
|
||||
{
|
||||
if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CoConstructionActivitiesView.aspx?Id={0}", id, "查看 - ")));
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BonusScoreTypeView.aspx?Id={0}", id, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CoConstructionActivitiesEdit.aspx?Id={0}", id, "编辑 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BonusScoreTypeEdit.aspx?Id={0}", id, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -202,11 +198,11 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var newModel = BLL.CoConstructionActivitiesService.GetCoConstructionActivitiesById(rowID);
|
||||
var newModel = BLL.BonusScoreTypeService.GetBonusScoreTypeById(rowID);
|
||||
if (newModel != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.CoConstructionActivitiesMenuId, BLL.Const.BtnDelete);
|
||||
BLL.CoConstructionActivitiesService.DeleteCoConstructionActivitiesById(rowID);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BonusScoreTypeMenuId, BLL.Const.BtnDelete);
|
||||
BLL.BonusScoreTypeService.DeleteBonusScoreTypeById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +224,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CoConstructionActivitiesMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BonusScoreTypeMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
@@ -256,7 +252,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("个人安全行动计划" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("自主管理加分项类型" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 5000;
|
||||
+3
-21
@@ -11,7 +11,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class CoConstructionActivities
|
||||
public partial class BonusScoreType
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -78,22 +78,13 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// txtUserName 控件。
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUserName;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContent;
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
@@ -158,15 +149,6 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
+10
-24
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SharingOfSafetyExperienceEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.SharingOfSafetyExperienceEdit" ValidateRequest="false" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BonusScoreTypeEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BonusScoreTypeEdit" ValidateRequest="false" %>
|
||||
|
||||
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
@@ -6,13 +6,13 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑安全经验分享</title>
|
||||
<title>编辑自主管理加分项类型</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="安全经验分享" AutoScroll="true"
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="自主管理加分项类型" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
@@ -20,24 +20,19 @@
|
||||
<f:TextBox ID="txtCode" runat="server" Label="编号" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtName" runat="server" Label="名称" Required="true" ShowRedStar="true"
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Label="类型" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUser" runat="server" Label="人员" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtDateTime" runat="server" Label="时间" LabelAlign="Right" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtContent" runat="server" Label="内容" MaxLength="800">
|
||||
</f:TextArea>
|
||||
<f:NumberBox ID="txtScore" Label="分值" NoDecimal="true" NoNegative="true" MinValue="1" runat="server" Required="true" ShowRedStar="true">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
@@ -50,11 +45,6 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
@@ -64,10 +54,6 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,137 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class BonusScoreTypeEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Id"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Id"] = value;
|
||||
}
|
||||
}
|
||||
///// <summary>
|
||||
///// 项目主键
|
||||
///// </summary>
|
||||
//public string ProjectId
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return (string)ViewState["ProjectId"];
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// ViewState["ProjectId"] = value;
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
//this.InitDropDownList();
|
||||
|
||||
this.Id = Request.Params["Id"];
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
Model.Examine_BonusScoreType model = BLL.BonusScoreTypeService.GetBonusScoreTypeById(this.Id);
|
||||
if (model != null)
|
||||
{
|
||||
this.txtCode.Text = model.Code;
|
||||
this.txtName.Text = model.Name;
|
||||
this.txtScore.Text = model.Score.ToString();
|
||||
this.txtRemark.Text = model.Remark;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////自动生成编码
|
||||
//this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_BonusScoreType", "Code", CurrUser.LoginProjectId);
|
||||
this.txtCode.Text = SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.Examine_BonusScoreType", "Code", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
{
|
||||
Model.Examine_BonusScoreType newModel = new Model.Examine_BonusScoreType
|
||||
{
|
||||
//ProjectId = this.ProjectId,
|
||||
Code = this.txtCode.Text.Trim(),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.UserId
|
||||
};
|
||||
newModel.Name = this.txtName.Text.Trim();
|
||||
newModel.Score = int.Parse(this.txtScore.Text.Trim());
|
||||
newModel.Remark = this.txtRemark.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
newModel.Id = this.Id;
|
||||
BLL.BonusScoreTypeService.UpdateBonusScoreType(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BonusScoreTypeMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Id = SQLHelper.GetNewID(typeof(Model.Examine_BonusScoreType));
|
||||
newModel.Id = this.Id;
|
||||
BLL.BonusScoreTypeService.AddBonusScoreType(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BonusScoreTypeMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
///// <summary>
|
||||
///// 上传附件
|
||||
///// </summary>
|
||||
///// <param name="sender"></param>
|
||||
///// <param name="e"></param>
|
||||
//protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (string.IsNullOrEmpty(this.Id))
|
||||
// {
|
||||
// SaveData(BLL.Const.BtnSave);
|
||||
// }
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/BonusScoreType&menuId={1}", Id, BLL.Const.BonusScoreTypeMenuId)));
|
||||
//}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+3
-39
@@ -11,7 +11,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class CoConstructionActivitiesEdit
|
||||
public partial class BonusScoreTypeEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -60,31 +60,13 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUser 控件。
|
||||
/// txtScore 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtDateTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtDateTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtContent;
|
||||
protected global::FineUIPro.NumberBox txtScore;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
@@ -104,15 +86,6 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
@@ -130,14 +103,5 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CoConstructionActivities.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.CoConstructionActivities" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>一线党员联系班组共建活动</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</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" EnableColumnLines="true" DataKeyNames="Id"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true"
|
||||
SortField="Code" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" Label="编号" ID="txtCode" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="名称" ID="txtName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="姓名" ID="txtUserName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="内容" ID="txtContent" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="Code" DataField="Code"
|
||||
SortField="Code" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="500px" ColumnID="Name" DataField="Name"
|
||||
SortField="Name" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="UserName" DataField="UserName"
|
||||
SortField="UserName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="DateTime" DataField="DateTime"
|
||||
SortField="DateTime" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="日期" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="280px" ColumnID="Content" DataField="Content"
|
||||
SortField="Content" FieldType="String" HeaderText="内容" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="220px" ColumnID="Remark" DataField="Remark"
|
||||
SortField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CompileManName" DataField="CompileManName"
|
||||
SortField="CompileManName" FieldType="String" HeaderText="编制人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CompileDate" DataField="CompileDate"
|
||||
SortField="CompileDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="编制时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="Id" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/CoConstructionActivities&menuId=D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E"
|
||||
HeaderTextAlign="Center" />
|
||||
</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:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="100000" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="一线党员联系班组共建活动" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="附件页面" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="TableEdit" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server"
|
||||
Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
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>
|
||||
@@ -1,165 +0,0 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class CoConstructionActivitiesEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Id"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Id"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.InitDropDownList();
|
||||
|
||||
this.Id = Request.Params["Id"];
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
Model.Examine_CoConstructionActivities model = BLL.CoConstructionActivitiesService.GetCoConstructionActivitiesById(this.Id);
|
||||
if (model != null)
|
||||
{
|
||||
this.ProjectId = model.ProjectId;
|
||||
if (this.ProjectId != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.InitDropDownList();
|
||||
}
|
||||
this.txtCode.Text = model.Code;
|
||||
this.txtName.Text = model.Name;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime);
|
||||
if (!string.IsNullOrEmpty(model.UserId))
|
||||
{
|
||||
this.drpUser.SelectedValue = model.UserId;
|
||||
}
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtContent.Text = model.Content;
|
||||
//this.txtContent.Text = HttpUtility.HtmlDecode(model.Content);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////自动生成编码
|
||||
this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_CoConstructionActivities", "Code", CurrUser.LoginProjectId);
|
||||
//////自动生成编码
|
||||
//this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.CoConstructionActivitiesMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
this.drpUser.SelectedValue = this.CurrUser.UserId;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
{
|
||||
Model.Examine_CoConstructionActivities newModel = new Model.Examine_CoConstructionActivities
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
Code = this.txtCode.Text.Trim(),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.UserId
|
||||
};
|
||||
if (this.drpUser.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newModel.UserId = this.drpUser.SelectedValue;
|
||||
}
|
||||
|
||||
newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim());
|
||||
newModel.Name = this.txtName.Text.Trim();
|
||||
newModel.Remark = this.txtRemark.Text.Trim();
|
||||
newModel.Content = this.txtContent.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
newModel.Id = this.Id;
|
||||
BLL.CoConstructionActivitiesService.UpdateCoConstructionActivities(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.CoConstructionActivitiesMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Id = SQLHelper.GetNewID(typeof(Model.Examine_CoConstructionActivities));
|
||||
newModel.Id = this.Id;
|
||||
BLL.CoConstructionActivitiesService.AddCoConstructionActivities(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.CoConstructionActivitiesMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
SaveData(BLL.Const.BtnSave);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/CoConstructionActivities&menuId={1}", Id, BLL.Const.CoConstructionActivitiesMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeadershipJoinHomeworkAnalysisMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.LeadershipJoinHomeworkAnalysisMeeting" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>领导人员参加班组作业分析会</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</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" EnableColumnLines="true" DataKeyNames="Id"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true"
|
||||
SortField="Code" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" Label="编号" ID="txtCode" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="名称" ID="txtName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="姓名" ID="txtUserName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="内容" ID="txtContent" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="Code" DataField="Code"
|
||||
SortField="Code" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="500px" ColumnID="Name" DataField="Name"
|
||||
SortField="Name" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="UserName" DataField="UserName"
|
||||
SortField="UserName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="DateTime" DataField="DateTime"
|
||||
SortField="DateTime" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="日期" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="280px" ColumnID="Content" DataField="Content"
|
||||
SortField="Content" FieldType="String" HeaderText="内容" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="220px" ColumnID="Remark" DataField="Remark"
|
||||
SortField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CompileManName" DataField="CompileManName"
|
||||
SortField="CompileManName" FieldType="String" HeaderText="编制人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CompileDate" DataField="CompileDate"
|
||||
SortField="CompileDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="编制时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="Id" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/LeadershipJoinHomeworkAnalysisMeeting&menuId=05F4AC73-1BA2-4FF2-AAED-292DF5E44412"
|
||||
HeaderTextAlign="Center" />
|
||||
</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:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="100000" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="领导人员参加班组作业分析会" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="附件页面" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="TableEdit" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server"
|
||||
Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
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>
|
||||
@@ -1,306 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BLL;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class LeadershipJoinHomeworkAnalysisMeeting : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("LeadershipJoinHomeworkAnalysisMeetingEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var db = Funs.DB;
|
||||
var queryData = from x in db.Examine_LeadershipJoinHomeworkAnalysisMeeting
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.Sys_User on x.CompileMan equals z.UserId
|
||||
where x.ProjectId == this.ProjectId
|
||||
&& (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtUserName.Text.Trim()) || y.UserName.Contains(txtUserName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtContent.Text.Trim()) || x.Content.Contains(txtContent.Text.Trim()))
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.Code,
|
||||
x.Name,
|
||||
x.Content,
|
||||
x.Remark,
|
||||
x.DateTime,
|
||||
x.CompileDate,
|
||||
UserName = y.UserName,
|
||||
CompileManName = z.UserName
|
||||
};
|
||||
Grid1.RecordCount = queryData.Count();
|
||||
Grid1.DataSource = queryData;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#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 = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#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="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 (this.btnMenuEdit.Hidden)
|
||||
{
|
||||
Alert.ShowInTop("抱歉!您没有编辑权限!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var model = BLL.LeadershipJoinHomeworkAnalysisMeetingService.GetLeadershipJoinHomeworkAnalysisMeetingById(id);
|
||||
if (model != null)
|
||||
{
|
||||
if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LeadershipJoinHomeworkAnalysisMeetingView.aspx?Id={0}", id, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LeadershipJoinHomeworkAnalysisMeetingEdit.aspx?Id={0}", id, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var newModel = BLL.LeadershipJoinHomeworkAnalysisMeetingService.GetLeadershipJoinHomeworkAnalysisMeetingById(rowID);
|
||||
if (newModel != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId, BLL.Const.BtnDelete);
|
||||
BLL.LeadershipJoinHomeworkAnalysisMeetingService.DeleteLeadershipJoinHomeworkAnalysisMeetingById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("领导人员参加班组作业分析会" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 5000;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||
}
|
||||
sb.Append("</tr>");
|
||||
foreach (GridRow row in grid.Rows)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
string html = row.Values[column.ColumnIndex].ToString();
|
||||
if (column.ColumnID == "tfNumber")
|
||||
{
|
||||
html = (row.FindControl("lblNumber") as AspNet.Label).Text;
|
||||
}
|
||||
sb.AppendFormat("<td style=\"vnd.ms-excel.numberformat:@\">{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.LeadershipJoinHomeworkAnalysisMeetingEdit" ValidateRequest="false" %>
|
||||
|
||||
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑领导人员参加班组作业分析会</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="领导人员参加班组作业分析会" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCode" runat="server" Label="编号" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtName" runat="server" Label="名称" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUser" runat="server" Label="人员" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtDateTime" runat="server" Label="时间" LabelAlign="Right" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtContent" runat="server" Label="内容" MaxLength="800">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="1000">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,165 +0,0 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class LeadershipJoinHomeworkAnalysisMeetingEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Id"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Id"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.InitDropDownList();
|
||||
|
||||
this.Id = Request.Params["Id"];
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model = BLL.LeadershipJoinHomeworkAnalysisMeetingService.GetLeadershipJoinHomeworkAnalysisMeetingById(this.Id);
|
||||
if (model != null)
|
||||
{
|
||||
this.ProjectId = model.ProjectId;
|
||||
if (this.ProjectId != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.InitDropDownList();
|
||||
}
|
||||
this.txtCode.Text = model.Code;
|
||||
this.txtName.Text = model.Name;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime);
|
||||
if (!string.IsNullOrEmpty(model.UserId))
|
||||
{
|
||||
this.drpUser.SelectedValue = model.UserId;
|
||||
}
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtContent.Text = model.Content;
|
||||
//this.txtContent.Text = HttpUtility.HtmlDecode(model.Content);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////自动生成编码
|
||||
this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_LeadershipJoinHomeworkAnalysisMeeting", "Code", CurrUser.LoginProjectId);
|
||||
//////自动生成编码
|
||||
//this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
this.drpUser.SelectedValue = this.CurrUser.UserId;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
{
|
||||
Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = new Model.Examine_LeadershipJoinHomeworkAnalysisMeeting
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
Code = this.txtCode.Text.Trim(),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.UserId
|
||||
};
|
||||
if (this.drpUser.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newModel.UserId = this.drpUser.SelectedValue;
|
||||
}
|
||||
|
||||
newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim());
|
||||
newModel.Name = this.txtName.Text.Trim();
|
||||
newModel.Remark = this.txtRemark.Text.Trim();
|
||||
newModel.Content = this.txtContent.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
newModel.Id = this.Id;
|
||||
BLL.LeadershipJoinHomeworkAnalysisMeetingService.UpdateLeadershipJoinHomeworkAnalysisMeeting(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Id = SQLHelper.GetNewID(typeof(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting));
|
||||
newModel.Id = this.Id;
|
||||
BLL.LeadershipJoinHomeworkAnalysisMeetingService.AddLeadershipJoinHomeworkAnalysisMeeting(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
SaveData(BLL.Const.BtnSave);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/LeadershipJoinHomeworkAnalysisMeeting&menuId={1}", Id, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
panelCenterRegion.IFrameUrl = $"./StaffHSEInfoArchives.aspx?UserId={this.UserId}&&PersonId={this.PersonId}";
|
||||
panelCenterRegion.IFrameUrl = $"./StaffHSEInfoArchivesOld.aspx?UserId={this.UserId}&&PersonId={this.PersonId}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalSafetyActionPlan.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.PersonalSafetyActionPlan" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>个人安全行动计划</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</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" EnableColumnLines="true" DataKeyNames="Id"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="Id" AllowSorting="true"
|
||||
SortField="Code" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" Label="编号" ID="txtCode" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="名称" ID="txtName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="姓名" ID="txtUserName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="内容" ID="txtContent" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="80px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" Hidden="true"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="Code" DataField="Code"
|
||||
SortField="Code" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="500px" ColumnID="Name" DataField="Name"
|
||||
SortField="Name" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="UserName" DataField="UserName"
|
||||
SortField="UserName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="DateTime" DataField="DateTime"
|
||||
SortField="DateTime" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="日期" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="280px" ColumnID="Content" DataField="Content"
|
||||
SortField="Content" FieldType="String" HeaderText="内容" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="220px" ColumnID="Remark" DataField="Remark"
|
||||
SortField="Remark" FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CompileManName" DataField="CompileManName"
|
||||
SortField="CompileManName" FieldType="String" HeaderText="编制人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CompileDate" DataField="CompileDate"
|
||||
SortField="CompileDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="编制时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="Id" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/PersonalSafetyActionPlan&menuId=7DD00BEF-821D-4996-ADF8-695139F201B4"
|
||||
HeaderTextAlign="Center" />
|
||||
</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:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="100000" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="个人安全行动计划" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="附件页面" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="TableEdit" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server"
|
||||
Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
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>
|
||||
@@ -1,197 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class PersonalSafetyActionPlan
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// txtUserName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUserName;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <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>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalSafetyActionPlanEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.PersonalSafetyActionPlanEdit" ValidateRequest="false" %>
|
||||
|
||||
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑个人安全行动计划</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" Title="个人安全行动计划" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCode" runat="server" Label="编号" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtName" runat="server" Label="名称" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUser" runat="server" Label="人员" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtDateTime" runat="server" Label="时间" LabelAlign="Right" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtContent" runat="server" Label="内容" MaxLength="800">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="1000">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
-143
@@ -1,143 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class PersonalSafetyActionPlanEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUser 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtDateTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtDateTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
@@ -1,307 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BLL;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class SharingOfSafetyExperience : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("SharingOfSafetyExperienceEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var db = Funs.DB;
|
||||
var queryData = from x in db.Examine_SharingOfSafetyExperience
|
||||
join y in db.Sys_User on x.UserId equals y.UserId
|
||||
join z in db.Sys_User on x.CompileMan equals z.UserId
|
||||
where x.ProjectId == this.ProjectId
|
||||
&& (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtUserName.Text.Trim()) || y.UserName.Contains(txtUserName.Text.Trim()))
|
||||
&& (string.IsNullOrEmpty(txtContent.Text.Trim()) || x.Content.Contains(txtContent.Text.Trim()))
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.Code,
|
||||
x.Name,
|
||||
x.Content,
|
||||
x.Remark,
|
||||
x.DateTime,
|
||||
x.CompileDate,
|
||||
UserName = y.UserName,
|
||||
CompileManName = z.UserName
|
||||
};
|
||||
Grid1.RecordCount = queryData.Count();
|
||||
Grid1.DataSource = queryData;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#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 = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#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="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 (this.btnMenuEdit.Hidden)
|
||||
{
|
||||
Alert.ShowInTop("抱歉!您没有编辑权限!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var model = BLL.SharingOfSafetyExperienceService.GetSharingOfSafetyExperienceById(id);
|
||||
if (model != null)
|
||||
{
|
||||
if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SharingOfSafetyExperienceView.aspx?Id={0}", id, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SharingOfSafetyExperienceEdit.aspx?Id={0}", id, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var newModel = BLL.SharingOfSafetyExperienceService.GetSharingOfSafetyExperienceById(rowID);
|
||||
if (newModel != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.SharingOfSafetyExperienceMenuId, BLL.Const.BtnDelete);
|
||||
BLL.SharingOfSafetyExperienceService.DeleteSharingOfSafetyExperienceById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SharingOfSafetyExperienceMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("安全经验分享" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 5000;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||
}
|
||||
sb.Append("</tr>");
|
||||
foreach (GridRow row in grid.Rows)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
string html = row.Values[column.ColumnIndex].ToString();
|
||||
if (column.ColumnID == "tfNumber")
|
||||
{
|
||||
html = (row.FindControl("lblNumber") as AspNet.Label).Text;
|
||||
}
|
||||
sb.AppendFormat("<td style=\"vnd.ms-excel.numberformat:@\">{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,197 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class SharingOfSafetyExperience
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// txtUserName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUserName;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <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>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class SharingOfSafetyExperienceEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Id"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Id"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.InitDropDownList();
|
||||
|
||||
this.Id = Request.Params["Id"];
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience model = BLL.SharingOfSafetyExperienceService.GetSharingOfSafetyExperienceById(this.Id);
|
||||
if (model != null)
|
||||
{
|
||||
this.ProjectId = model.ProjectId;
|
||||
if (this.ProjectId != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.InitDropDownList();
|
||||
}
|
||||
this.txtCode.Text = model.Code;
|
||||
this.txtName.Text = model.Name;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime);
|
||||
if (!string.IsNullOrEmpty(model.UserId))
|
||||
{
|
||||
this.drpUser.SelectedValue = model.UserId;
|
||||
}
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtContent.Text = model.Content;
|
||||
//this.txtContent.Text = HttpUtility.HtmlDecode(model.Content);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
////自动生成编码
|
||||
this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_SharingOfSafetyExperience", "Code", CurrUser.LoginProjectId);
|
||||
//////自动生成编码
|
||||
//this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.SharingOfSafetyExperienceMenuId, this.ProjectId, this.CurrUser.UnitId);
|
||||
this.drpUser.SelectedValue = this.CurrUser.UserId;
|
||||
this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
{
|
||||
Model.Examine_SharingOfSafetyExperience newModel = new Model.Examine_SharingOfSafetyExperience
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
Code = this.txtCode.Text.Trim(),
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.UserId
|
||||
};
|
||||
if (this.drpUser.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newModel.UserId = this.drpUser.SelectedValue;
|
||||
}
|
||||
|
||||
newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim());
|
||||
newModel.Name = this.txtName.Text.Trim();
|
||||
newModel.Remark = this.txtRemark.Text.Trim();
|
||||
newModel.Content = this.txtContent.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
newModel.Id = this.Id;
|
||||
BLL.SharingOfSafetyExperienceService.UpdateSharingOfSafetyExperience(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.SharingOfSafetyExperienceMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Id = SQLHelper.GetNewID(typeof(Model.Examine_SharingOfSafetyExperience));
|
||||
newModel.Id = this.Id;
|
||||
BLL.SharingOfSafetyExperienceService.AddSharingOfSafetyExperience(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.SharingOfSafetyExperienceMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
SaveData(BLL.Const.BtnSave);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/SharingOfSafetyExperience&menuId={1}", Id, BLL.Const.SharingOfSafetyExperienceMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
-143
@@ -1,143 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class SharingOfSafetyExperienceEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUser 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUser;
|
||||
|
||||
/// <summary>
|
||||
/// txtDateTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtDateTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
@@ -9,100 +9,104 @@
|
||||
</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 runat="server" EnableSimulateTree="True" Label="检查项" ID="drpRegisterTypes" >
|
||||
</f:DropDownList>
|
||||
<f:RadioButtonList ID="ckType" runat="server" Label="巡检周期"
|
||||
Width="330px" Hidden="true">
|
||||
<f:RadioItem Value="D" Selected="True" Text="日检" />
|
||||
<f:RadioItem Value="W" Text="周检" />
|
||||
<f:RadioItem Value="M" Text="月检" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="责任单位" ID="drpUnit"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpUnit_OnSelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="单位工程" ID="drpWorkArea">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="级别" ID="dpRiskLevel" >
|
||||
<f:ListItem Text="轻微" Value="轻微"/>
|
||||
<f:ListItem Text="一般" Value="一般"/>
|
||||
<f:ListItem Text="较大" Value="较大"/>
|
||||
<f:ListItem Text="严重" Value="严重"/>
|
||||
</f:DropDownList>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="检查项" ID="DropDownList1" Hidden="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRegisterDef" runat="server" Label="问题描述" ShowRedStar="true" Required="true">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtHandleIdea" Label="复检问题描述" Hidden="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="责任人" ID="drpResponsibleMan"
|
||||
>
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtRectificationPeriod" runat="server" Label="整改期限" LabelAlign="Right" Required="True" ShowRedStar="true"
|
||||
>
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCheckManName" runat="server" Label="检查人" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCheckTime" runat="server" Label="检查时间" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:LinkButton ID="UploadAttach" runat="server" Label="整改前照片" Text="上传和查看" OnClick="btnAttachUrl_Click" LabelAlign="Right">
|
||||
</f:LinkButton>
|
||||
<f:NumberBox ID="txtCutPayment" runat="server" Label="罚款金额" LabelAlign="Right" Text="0" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:HiddenField ID="hdCheckManId" runat="server"></f:HiddenField>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="文件上传" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="680px"
|
||||
Height="480px">
|
||||
</f:Window>
|
||||
<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 runat="server" EnableSimulateTree="True" Label="检查项" ID="drpRegisterTypes">
|
||||
</f:DropDownList>
|
||||
<f:RadioButtonList ID="ckType" runat="server" Label="巡检周期"
|
||||
Width="330px" Hidden="true">
|
||||
<f:RadioItem Value="D" Selected="True" Text="日检" />
|
||||
<f:RadioItem Value="W" Text="周检" />
|
||||
<f:RadioItem Value="M" Text="月检" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="责任单位" ID="drpUnit"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpUnit_OnSelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="单位工程" ID="drpWorkArea">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="级别" ID="dpRiskLevel">
|
||||
<f:ListItem Text="轻微" Value="轻微" />
|
||||
<f:ListItem Text="一般" Value="一般" />
|
||||
<f:ListItem Text="较大" Value="较大" />
|
||||
<f:ListItem Text="严重" Value="严重" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="检查项" ID="DropDownList1" Hidden="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRegisterDef" runat="server" Label="问题描述" ShowRedStar="true" Required="true">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtHandleIdea" Label="复检问题描述" Hidden="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="责任人" ID="drpResponsibleMan" Required="True" ShowRedStar="true" AutoSelectFirstItem="false" AutoPostBack="true" OnSelectedIndexChanged="drpResponsibleMan_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtRectificationPeriod" runat="server" Label="整改期限" LabelAlign="Right" Required="True" ShowRedStar="true">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="重修教材" ID="drpTrainingItem" EnableEdit="true" ForceSelection="false" Required="True" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtCheckTime" runat="server" Label="检查时间" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCheckManName" runat="server" Label="检查人" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:NumberBox ID="txtCutPayment" runat="server" Label="罚款金额" LabelAlign="Right" Text="0" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:LinkButton ID="UploadAttach" runat="server" Label="整改前照片" Text="上传和查看" OnClick="btnAttachUrl_Click" LabelAlign="Right">
|
||||
</f:LinkButton>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:HiddenField ID="hdCheckManId" runat="server"></f:HiddenField>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="文件上传" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="680px"
|
||||
Height="480px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using static BLL.TrainingPlanService;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
{
|
||||
@@ -78,10 +80,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);
|
||||
UnitWorkService.InitUnitWorkDownList(this.drpWorkArea, this.CurrUser.LoginProjectId, true);
|
||||
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);
|
||||
this.InitDropDownList();
|
||||
|
||||
this.drpRegisterTypes.DataTextField = "RegisterTypesName";
|
||||
this.drpRegisterTypes.DataValueField = "RegisterTypesId";
|
||||
@@ -102,11 +101,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
this.drpUnit.SelectedValue = registration.ResponsibleUnit;
|
||||
this.drpWorkArea.DataSource = UnitWorkService.GetUnitWorkList(this.CurrUser.LoginProjectId);
|
||||
this.drpWorkArea.DataBind();
|
||||
this.drpResponsibleMan.DataSource = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue
|
||||
select x;
|
||||
//this.drpResponsibleMan.DataSource = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUser
|
||||
// on x.UserId equals y.UserId
|
||||
// where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue
|
||||
// select x;
|
||||
|
||||
PersonService.InitPersonByProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, registration.ResponsibleUnit, false);
|
||||
this.drpResponsibleMan.DataBind();
|
||||
this.drpWorkArea.SelectedValue = BLL.Const._Null;
|
||||
this.drpResponsibleMan.SelectedValue = BLL.Const._Null;
|
||||
@@ -126,6 +127,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
if (!string.IsNullOrEmpty(registration.ResponsibleMan))
|
||||
{
|
||||
this.drpResponsibleMan.SelectedValue = registration.ResponsibleMan;
|
||||
//根据人员Id获取职务Id
|
||||
var user = PersonService.GetPersonById(registration.ResponsibleMan);
|
||||
CompanyTrainingItemService.InitCompanyTrainingItemDownList(this.drpTrainingItem, user.WorkPostId, false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(registration.CompanyTrainingItemId))
|
||||
{
|
||||
this.drpTrainingItem.SelectedValue = registration.CompanyTrainingItemId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(registration.Risk_Level))
|
||||
{
|
||||
@@ -169,6 +177,39 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下拉框加载
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);
|
||||
UnitWorkService.InitUnitWorkDownList(this.drpWorkArea, this.CurrUser.LoginProjectId, true);
|
||||
//UserService.InitUserProjectIdUnitTypeDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);
|
||||
PersonService.InitPersonByProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 责任人下拉加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpResponsibleMan_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//责任人Id
|
||||
var responsibleManId = this.drpResponsibleMan.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(responsibleManId))
|
||||
{
|
||||
//根据人员Id获取职务Id
|
||||
var user = PersonService.GetPersonById(responsibleManId);
|
||||
if (user != null && !string.IsNullOrWhiteSpace(user.WorkPostId))
|
||||
{
|
||||
CompanyTrainingItemService.InitCompanyTrainingItemDownList(this.drpTrainingItem, user.WorkPostId, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
@@ -186,12 +227,14 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
{
|
||||
this.drpWorkArea.DataSource = UnitWorkService.GetUnitWorkList(this.CurrUser.LoginProjectId);
|
||||
this.drpWorkArea.DataBind();
|
||||
this.drpResponsibleMan.DataSource = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue
|
||||
select x;
|
||||
this.drpResponsibleMan.DataBind();
|
||||
|
||||
PersonService.InitPersonByProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, false);
|
||||
//this.drpResponsibleMan.DataSource = from x in db.Sys_User
|
||||
// join y in db.Project_ProjectUser
|
||||
// on x.UserId equals y.UserId
|
||||
// where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue
|
||||
// select x;
|
||||
//this.drpResponsibleMan.DataBind();
|
||||
}
|
||||
Funs.FineUIPleaseSelect(this.drpWorkArea);
|
||||
Funs.FineUIPleaseSelect(this.drpResponsibleMan);
|
||||
@@ -215,16 +258,21 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
ShowNotify("请选择责任单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpWorkArea.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择单位工程!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpWorkArea.SelectedValue == BLL.Const._Null)
|
||||
//if (this.drpWorkArea.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// ShowNotify("请选择单位工程!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
if (this.drpResponsibleMan.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择责任人!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpTrainingItem.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择重修教材!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
SaveData(true);
|
||||
}
|
||||
else
|
||||
@@ -240,45 +288,67 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// <param name="p"></param>
|
||||
private void SaveData(bool isClosed)
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister register = new Model.HSSE_Hazard_HazardRegister();
|
||||
register.ProjectId = this.CurrUser.LoginProjectId;
|
||||
register.ProblemTypes = "1"; //安全隐患问题
|
||||
register.RegisterTypesId = this.drpRegisterTypes.SelectedValue;
|
||||
register.CheckCycle = this.ckType.SelectedValue;
|
||||
register.IsEffective = "1";
|
||||
register.Risk_Level = this.dpRiskLevel.SelectedText;
|
||||
Model.HSSE_Hazard_HazardRegister model = new Model.HSSE_Hazard_HazardRegister();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
model.ProblemTypes = "1"; //安全隐患问题
|
||||
model.RegisterTypesId = this.drpRegisterTypes.SelectedValue;
|
||||
model.CheckCycle = this.ckType.SelectedValue;
|
||||
model.IsEffective = "1";
|
||||
model.Risk_Level = this.dpRiskLevel.SelectedText;
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
register.ResponsibleUnit = this.drpUnit.SelectedValue;
|
||||
model.ResponsibleUnit = this.drpUnit.SelectedValue;
|
||||
}
|
||||
if (this.drpWorkArea.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
register.Place = this.drpWorkArea.SelectedValue;
|
||||
model.Place = this.drpWorkArea.SelectedValue;
|
||||
}
|
||||
register.RegisterDef = this.txtRegisterDef.Text.Trim();
|
||||
model.RegisterDef = this.txtRegisterDef.Text.Trim();
|
||||
if (this.drpResponsibleMan.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
register.ResponsibleMan = this.drpResponsibleMan.SelectedValue;
|
||||
model.ResponsibleMan = this.drpResponsibleMan.SelectedValue;
|
||||
}
|
||||
register.RectificationPeriod = Funs.GetNewDateTime(this.txtRectificationPeriod.Text.Trim() + " 18:00:00");
|
||||
register.CheckManId = this.hdCheckManId.Text;
|
||||
register.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim());
|
||||
register.States = "1"; //待整改
|
||||
model.RectificationPeriod = Funs.GetNewDateTime(this.txtRectificationPeriod.Text.Trim() + " 18:00:00");
|
||||
model.CheckManId = this.hdCheckManId.Text;
|
||||
model.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim());
|
||||
model.States = "1";//待整改
|
||||
model.CompanyTrainingItemId = drpTrainingItem.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(HazardRegisterId))
|
||||
{
|
||||
register.HazardRegisterId = HazardRegisterId;
|
||||
BLL.HSSE_Hazard_HazardRegisterService.UpdateHazardRegister(register);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, register.HazardCode, register.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnModify);
|
||||
model.HazardRegisterId = HazardRegisterId;
|
||||
BLL.HSSE_Hazard_HazardRegisterService.UpdateHazardRegister(model);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, model.HazardCode, model.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
register.HazardRegisterId = SQLHelper.GetNewID(typeof(Model.HSSE_Hazard_HazardRegister));
|
||||
HazardRegisterId = register.HazardRegisterId;
|
||||
register.CheckTime = DateTime.Now;
|
||||
register.ControlId = Request.Params["ControlId"];
|
||||
BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(register);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, register.HazardCode, register.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnAdd);
|
||||
model.HazardRegisterId = SQLHelper.GetNewID(typeof(Model.HSSE_Hazard_HazardRegister));
|
||||
HazardRegisterId = model.HazardRegisterId;
|
||||
model.CheckTime = DateTime.Now;
|
||||
model.ControlId = Request.Params["ControlId"];
|
||||
BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(model);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, model.HazardCode, model.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
|
||||
#region 责任人和重修教材非空,生成培训计划
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(model.ResponsibleMan) && !string.IsNullOrWhiteSpace(model.CompanyTrainingItemId))
|
||||
{//责任人和重修教材非空,生成培训计划
|
||||
Model.RetakeCourseProducePlanInfo info = new Model.RetakeCourseProducePlanInfo
|
||||
{
|
||||
CurrProjectId = this.CurrUser.LoginProjectId,
|
||||
CurrUserId = this.CurrUser.UserId,
|
||||
CheckId = model.HazardRegisterId,
|
||||
CheckType = (int)Enums.RetakeCourseType.日常巡检,
|
||||
CheckTypeName = "日常巡检重修",
|
||||
PersonId = model.ResponsibleMan,
|
||||
CompanyTrainingItemId = model.CompanyTrainingItemId,
|
||||
TrainEndDate = model.RectificationPeriod
|
||||
};
|
||||
TrainingPlanService.RetakeCourseProducePlan(info);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (isClosed)
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
@@ -302,8 +372,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnAdd))
|
||||
{
|
||||
edit = "1";
|
||||
Model.HSSE_Hazard_HazardRegister register = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(this.HazardRegisterId);
|
||||
DateTime date = Convert.ToDateTime(register.CheckTime);
|
||||
Model.HSSE_Hazard_HazardRegister model = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(this.HazardRegisterId);
|
||||
DateTime date = Convert.ToDateTime(model.CheckTime);
|
||||
string dateStr = date.Year.ToString() + date.Month.ToString();
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Registration/" + dateStr + "&menuId={1}&edit={2}", this.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId, edit)));
|
||||
}
|
||||
|
||||
+13
-4
@@ -132,13 +132,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
protected global::FineUIPro.DatePicker txtRectificationPeriod;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckManName 控件。
|
||||
/// drpTrainingItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckManName;
|
||||
protected global::FineUIPro.DropDownList drpTrainingItem;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckTime 控件。
|
||||
@@ -150,13 +150,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
protected global::FineUIPro.TextBox txtCheckTime;
|
||||
|
||||
/// <summary>
|
||||
/// UploadAttach 控件。
|
||||
/// txtCheckManName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.LinkButton UploadAttach;
|
||||
protected global::FineUIPro.TextBox txtCheckManName;
|
||||
|
||||
/// <summary>
|
||||
/// txtCutPayment 控件。
|
||||
@@ -167,6 +167,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtCutPayment;
|
||||
|
||||
/// <summary>
|
||||
/// UploadAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.LinkButton UploadAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!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>查看管理月报TCC</title>
|
||||
<title>查看管理月报XJYJ</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
||||
@@ -644,7 +644,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write("<meta http-equiv=Content-Type content=text/html;charset=UTF-8>");
|
||||
|
||||
Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("管理月报TCC" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("管理月报XJYJ" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/ms-excel";
|
||||
this.EnableViewState = false;
|
||||
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="60px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
@@ -52,7 +52,7 @@
|
||||
SortField="UnitWorkCode" FieldType="String" HeaderText="单位工程编号" TextAlign="center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="UnitWorkName" DataField="UnitWorkName"
|
||||
<f:RenderField Width="220px" ColumnID="UnitWorkName" DataField="UnitWorkName"
|
||||
SortField="UnitWorkName" FieldType="String" HeaderText="单位工程名称" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class BonusScoreSelfManagementItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
public string Id
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员Id
|
||||
/// </summary>
|
||||
public string PersonId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
///// <summary>
|
||||
///// 编号
|
||||
///// </summary>
|
||||
//public string Code
|
||||
//{
|
||||
// get;
|
||||
// set;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 加分项Id
|
||||
/// </summary>
|
||||
public string BonusScoreTypeId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
///// <summary>
|
||||
///// 加分项名称
|
||||
///// </summary>
|
||||
//public string BonusScoreTypeName
|
||||
//{
|
||||
// get;
|
||||
// set;
|
||||
//}
|
||||
///// <summary>
|
||||
///// 分值
|
||||
///// </summary>
|
||||
//public int Score
|
||||
//{
|
||||
// get;
|
||||
// set;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 内容
|
||||
/// </summary>
|
||||
public string Content
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 附件
|
||||
/// </summary>
|
||||
public string AttachFile
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 附件地址
|
||||
/// </summary>
|
||||
public string AttachUrl
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class RetakeCourseProducePlanInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
public string CurrProjectId { get; set; }
|
||||
/// <summary>
|
||||
/// 当前人员
|
||||
/// </summary>
|
||||
public string CurrUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 检查Id
|
||||
/// </summary>
|
||||
public string CheckId { get; set; }
|
||||
/// <summary>
|
||||
/// 检查类别
|
||||
/// </summary>
|
||||
public int CheckType { get; set; }
|
||||
public string CheckTypeName { get; set; }
|
||||
/// <summary>
|
||||
/// 责任人Id
|
||||
/// </summary>
|
||||
public string PersonId { get; set; }
|
||||
/// <summary>
|
||||
/// 重修教材Id
|
||||
/// </summary>
|
||||
public string CompanyTrainingItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训结束时间
|
||||
/// </summary>
|
||||
public DateTime? TrainEndDate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class PostTrainingStandardInfo
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -131,6 +131,7 @@
|
||||
<Compile Include="APIItem\HSSE\ReEvaluator.cs" />
|
||||
<Compile Include="APIItem\HSSE\RoutingInspectionItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\SeDinMonthReport4OtherItem.cs" />
|
||||
<Compile Include="APIItem\HSSE\BonusScoreSelfManagementItem.cs" />
|
||||
<Compile Include="APIItem\OperationReportDto.cs" />
|
||||
<Compile Include="APIItem\ProjectGpsPointItem.cs" />
|
||||
<Compile Include="APIItem\ProjectItem.cs" />
|
||||
@@ -229,6 +230,7 @@
|
||||
<Compile Include="HJGL\SpRpNDTWeekReport.cs" />
|
||||
<Compile Include="HJGL\SpWeldingDailyItem.cs" />
|
||||
<Compile Include="HJGL\WelderEntrance.cs" />
|
||||
<Compile Include="HSSE\EduTrain\RetakeCourseProducePlanInfo.cs" />
|
||||
<Compile Include="HSSE\MonthReportCHSEDay.cs" />
|
||||
<Compile Include="HSSE\PageDataPersonInOutItem.cs" />
|
||||
<Compile Include="HSSE\PostTraining\PostTrainingStandardInfo.cs" />
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Mvc.Controllers
|
||||
{
|
||||
if (string.IsNullOrEmpty(CheckControl.DocCode))
|
||||
{
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(CheckControl.ProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(CheckControl.ProjectId).ProjectCode + "-QC-XJYJ-XJ-";
|
||||
CheckControl.DocCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode",CheckControl.ProjectId, prefix);
|
||||
}
|
||||
CheckControl.CheckControlCode = Guid.NewGuid().ToString();
|
||||
|
||||
@@ -426,7 +426,7 @@ namespace Mvc.Controllers
|
||||
{
|
||||
case "checkList":
|
||||
{
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-XJYJ-XJ-";
|
||||
//res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.Check_CheckControl", "DocCode", prefix);
|
||||
res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode", projectId, prefix);
|
||||
|
||||
@@ -434,7 +434,7 @@ namespace Mvc.Controllers
|
||||
break;
|
||||
case "jointCheck":
|
||||
{
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-XJYJ-XJ-";
|
||||
res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.Check_JointCheck", "JointCheckCode", prefix);
|
||||
}
|
||||
break;
|
||||
@@ -455,7 +455,7 @@ namespace Mvc.Controllers
|
||||
break;
|
||||
case "spotCheck":
|
||||
{
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-XJYJ-XJ-";
|
||||
//res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.Check_SpotCheck", "DocCode", prefix);
|
||||
res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode", projectId, prefix);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace WebAPI.Controllers.HJGL
|
||||
{
|
||||
if (string.IsNullOrEmpty(ElectrodeRecovery.RecoveryCode))
|
||||
{
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(ElectrodeRecovery.ProjectId).ProjectCode + "-HJ-TCC-LL-";
|
||||
string prefix = BLL.ProjectService.GetProjectByProjectId(ElectrodeRecovery.ProjectId).ProjectCode + "-HJ-XJYJ-LL-";
|
||||
ElectrodeRecovery.RecoveryCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.HJGL_ElectrodeRecovery", "RecoveryCode", ElectrodeRecovery.ProjectId, prefix);
|
||||
}
|
||||
ElectrodeRecovery.RecoveryId = Guid.NewGuid().ToString();
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using Model;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 自主管理加分项
|
||||
/// </summary>
|
||||
public class BonusScoreSelfManagementController : ApiController
|
||||
{
|
||||
#region 获取自主管理加分项类型
|
||||
|
||||
/// <summary>
|
||||
/// 获取自主管理加分项类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getBonusScoreTypeList()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = BonusScoreTypeService.GetBonusScoreTypeList();
|
||||
responeData.data = getDataList.Select(x => new { TypeId = x.Id, TypeName = x.Name });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 获取自主管理加分项列表
|
||||
|
||||
/// <summary>
|
||||
/// 获取自主管理加分项列表、明细
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getBonusScoreSelfManagementList(string projectId, string personId, string typeId, int pageIndex)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = BonusScoreSelfManagementService.GetBonusScoreSelfManagementList(projectId, personId, typeId);
|
||||
int pageCount = getDataList.Count;
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
var getdata = from x in getDataList.Skip(BLL.Funs.PageSize * (pageIndex - 1)).Take(BLL.Funs.PageSize)
|
||||
select new
|
||||
{
|
||||
x.Id,
|
||||
x.Code,
|
||||
x.Name,
|
||||
x.BonusScoreTypeName,
|
||||
x.Score,
|
||||
x.CompileDate,
|
||||
};
|
||||
responeData.data = new { pageCount, getdata };
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据ID获取自主管理加分项详细
|
||||
/// </summary>
|
||||
/// <param name="Id">自主管理加分项ID</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getBonusScoreSelfManagementById(string Id)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var model = BonusScoreSelfManagementService.GetBonusScoreSelfManagementById(Id);
|
||||
if (model != null)
|
||||
{
|
||||
var file = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == Id);
|
||||
responeData.data = new
|
||||
{
|
||||
model.Id,
|
||||
model.Code,
|
||||
model.Name,
|
||||
model.BonusScoreTypeId,
|
||||
model.BonusScoreTypeName,
|
||||
model.Content,
|
||||
model.Remark,
|
||||
model.CompileDate,
|
||||
AttachUrl = file != null ? file.AttachUrl : string.Empty
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "自主管理加分项不存在";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 新增、编辑、删除自主管理加分项
|
||||
|
||||
/// <summary>
|
||||
/// 新增、编辑自主管理加分项
|
||||
/// </summary>
|
||||
/// <param name="item">自主管理加分项</param>
|
||||
[HttpPost]
|
||||
public Model.ResponeData saveBonusScoreSelfManagement([FromBody] Model.BonusScoreSelfManagementItem item)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
Model.Examine_BonusScoreSelfManagement newModel = new Model.Examine_BonusScoreSelfManagement();
|
||||
newModel.Name = item.Name;
|
||||
newModel.PersonId = item.PersonId;
|
||||
newModel.BonusScoreTypeId = item.BonusScoreTypeId;
|
||||
newModel.Remark = item.Remark;
|
||||
newModel.Content = item.Content;
|
||||
|
||||
var bonusScoreType = BLL.BonusScoreTypeService.GetBonusScoreTypeById(item.BonusScoreTypeId);
|
||||
if (bonusScoreType != null)
|
||||
{
|
||||
newModel.BonusScoreTypeName = bonusScoreType.Name;
|
||||
newModel.Score = bonusScoreType.Score;
|
||||
if (!string.IsNullOrWhiteSpace(item.Id))
|
||||
{
|
||||
newModel.Id = item.Id;
|
||||
BLL.BonusScoreSelfManagementService.UpdateBonusScoreSelfManagement(newModel);
|
||||
}
|
||||
else
|
||||
{
|
||||
newModel.Id = SQLHelper.GetNewID(typeof(Model.Examine_BonusScoreSelfManagement));
|
||||
newModel.Code = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_BonusScoreSelfManagement", "Code", item.ProjectId);
|
||||
newModel.CompileDate = DateTime.Now;
|
||||
//newModel.CompileMan = item.PersonId;
|
||||
//newModel.CompileMan = Const.hfnbdId;
|
||||
newModel.ProjectId = item.ProjectId;
|
||||
BLL.BonusScoreSelfManagementService.AddBonusScoreSelfManagement(newModel);
|
||||
}
|
||||
//保存附件
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl))
|
||||
{
|
||||
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(item.AttachUrl, 1024, null), item.AttachUrl, Const.BonusScoreSelfManagementMenuId, newModel.Id);
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(item.Id))
|
||||
{//编辑时,附件地址传空时,删除附件信息
|
||||
CommonService.DeleteAttachFileById(Const.BonusScoreSelfManagementMenuId, newModel.Id);
|
||||
}
|
||||
responeData.message = "操作成功";
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "自主管理加分项类型不存在";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除自主管理加分项
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData deleteBonusScoreSelfManagementById(string Id)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
BLL.BonusScoreSelfManagementService.DeleteBonusScoreSelfManagementById(Id);
|
||||
responeData.message = "操作成功";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace WebAPI.Controllers
|
||||
/// </summary>
|
||||
public class UserController : ApiController
|
||||
{
|
||||
#region 根据账号或手机号码登录方法
|
||||
#region 根据账号或手机号码、身份证号登录方法
|
||||
/// <summary>
|
||||
/// 登录方法
|
||||
/// </summary>
|
||||
@@ -21,6 +21,50 @@ namespace WebAPI.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData postLoginOn([FromBody] Model.UserItem userInfo)
|
||||
{
|
||||
//登录方法 Model.UserItem
|
||||
var responeData = new Model.ResponeData
|
||||
{
|
||||
message = "账号密码不匹配!"
|
||||
};
|
||||
try
|
||||
{
|
||||
var user = APIUserService.UserLogOn(userInfo);
|
||||
if (user != null)
|
||||
{
|
||||
|
||||
responeData.message = "登录成功!";
|
||||
responeData.data = user;
|
||||
}
|
||||
else
|
||||
{
|
||||
var user1 = APIPersonService.PersonLogOn(userInfo);
|
||||
if (user1 != null)
|
||||
{
|
||||
responeData.message = "登录成功!";
|
||||
responeData.code = 2;
|
||||
responeData.data = user1;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据账号或手机号码登录方法
|
||||
/// <summary>
|
||||
/// 登录方法
|
||||
/// </summary>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData postLoginOn2([FromBody] Model.UserItem userInfo)
|
||||
{
|
||||
//登录方法 Model.UserItem
|
||||
var responeData = new Model.ResponeData
|
||||
|
||||
@@ -30,10 +30,10 @@ namespace WebAPI.Filter
|
||||
if (lists.FirstOrDefault(x => x == strValues) != null)
|
||||
{
|
||||
isOk = true;
|
||||
isWithOut=true;
|
||||
isWithOut = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!isOk && token != null)
|
||||
{
|
||||
var getUser = BLL.UserService.GetUserByUserId(token.FirstOrDefault());
|
||||
@@ -50,6 +50,10 @@ namespace WebAPI.Filter
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (token == null)
|
||||
{
|
||||
isOk = false;
|
||||
}
|
||||
//FormsAuthenticationTicket authTicket = null;
|
||||
//if (lists.FirstOrDefault(x => x == strValues) == null && auth!=null&&auth.Count()>0 && !string.IsNullOrEmpty(auth.FirstOrDefault()))
|
||||
//{
|
||||
@@ -69,7 +73,9 @@ namespace WebAPI.Filter
|
||||
//{
|
||||
// isOk = false;
|
||||
//}
|
||||
if (lists.FirstOrDefault(x => x == strValues) == null && actionContext.ActionDescriptor.ControllerDescriptor.ControllerName != "FileUpload" && !System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
|
||||
|
||||
//&& !System.Web.HttpContext.Current.User.Identity.IsAuthenticated
|
||||
if (isOk && lists.FirstOrDefault(x => x == strValues) == null && actionContext.ActionDescriptor.ControllerDescriptor.ControllerName != "FileUpload")
|
||||
{
|
||||
isOk = false;
|
||||
actionContext.Response = actionContext.Request.CreateResponse(System.Net.HttpStatusCode.OK,
|
||||
@@ -86,7 +92,7 @@ namespace WebAPI.Filter
|
||||
IDictionary<string, object> arguments = actionContext.ActionArguments; // 获取参数
|
||||
foreach (KeyValuePair<string, object> item in arguments)
|
||||
{
|
||||
if (item.Key == "projectid" || item.Key == "ProjectId" || item.Key == "projectId" || item.Key == "Projectid")
|
||||
if (item.Key.ToLower() == "projectid")
|
||||
{
|
||||
var ProjectItems = APIProjectService.geProjectsByUserId(token.FirstOrDefault());
|
||||
List<string> projects = new List<string>();
|
||||
@@ -116,27 +122,27 @@ namespace WebAPI.Filter
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static List<string> lists = new List<string>
|
||||
{
|
||||
public static List<string> lists = new List<string>
|
||||
{
|
||||
"SY*SaveRisk",
|
||||
"SY*SaveEnvironmentProtection",
|
||||
"SY*SaveEnvironmentProtection",
|
||||
"SY*SaveLicence",
|
||||
"SY*SavePromise",
|
||||
"SY*SaveDataBase",
|
||||
"SY*SaveMajorHazard",
|
||||
"SY*SaveDataBase",
|
||||
"SY*SaveMajorHazard",
|
||||
"SY*SaveHiddenDangers",
|
||||
"HazardRealTime*SaveHazardRealTime",
|
||||
"upload*attendance",
|
||||
"upload*person",
|
||||
"User*postLoginOn",
|
||||
"HazardRealTime*SaveHazardRealTime",
|
||||
"upload*attendance",
|
||||
"upload*person",
|
||||
"User*postLoginOn",
|
||||
"Person*getPersonInOut",
|
||||
"Person*getUpdatePersonExchangeTime",
|
||||
"Person*getPersonDataExchange",
|
||||
"Person*getPersonByProjectIdIdentityCard",
|
||||
"Person*getAllPersonDataExchange",
|
||||
"Person*SaveSitePerson",
|
||||
"DoorService*getAttendance",
|
||||
"CommenInfo*FileUpload" ,
|
||||
"DoorService*getAttendance",
|
||||
"CommenInfo*FileUpload" ,
|
||||
"CNCECServer*PostGetCQMSData",
|
||||
"CNCECServer*PostGetCQMSData_CallBalk",
|
||||
"CNCECServer*PostGetHJGLData",
|
||||
@@ -145,23 +151,28 @@ namespace WebAPI.Filter
|
||||
"CNCECServer*PostGetHSSEData_CallBalk",
|
||||
"CNCECServer*PostGetSYHSEData",
|
||||
"CNCECServer*PostGetSYHSEData_CallBalk",
|
||||
"BaseInfo*getProjectPersonAndSafeHour",
|
||||
"BaseInfo*getProjectPersonAndSafeHour",
|
||||
"BaseInfo*getSafeHourFromLastAccident",
|
||||
"Unit*AddUnit",
|
||||
"BaseInfo*getSafeHourFromLastAccident",
|
||||
"BaseInfo*getSafeHourFromLastAccident",
|
||||
"HazardRegister*getHazardRegisterTotalCount",
|
||||
"Person*SaveAndUpdateSitePerson",
|
||||
"Person*addToBlack",
|
||||
"Person*addToBlack",
|
||||
"Person*getPersonData", "Person*getPersonInOutList",
|
||||
"Person*getPersonAllData",
|
||||
"HazardRegister*getHazardRegisterByProjectIdStates",
|
||||
"Person*getPersonPresenceData",
|
||||
"Vehicle*getVehicleDataExchange",
|
||||
"Vehicle*getUpdateVehicleExchangeTime",
|
||||
"Vehicle*getVehicleInOut",
|
||||
"Vehicle*getVehicleInOut",
|
||||
"Person*getPersonPresenceData",
|
||||
"User*getUserByProjectIdUnitIdQuery",
|
||||
"Environmental*AddMonitoring"
|
||||
"Environmental*AddMonitoring",
|
||||
"BonusScoreSelfManagement*getBonusScoreTypeList",
|
||||
"BonusScoreSelfManagement*getBonusScoreSelfManagementList",
|
||||
"BonusScoreSelfManagement*getBonusScoreSelfManagementById",
|
||||
"BonusScoreSelfManagement*saveBonusScoreSelfManagement",
|
||||
"BonusScoreSelfManagement*deleteBonusScoreSelfManagementById"
|
||||
|
||||
};
|
||||
|
||||
@@ -178,9 +189,9 @@ namespace WebAPI.Filter
|
||||
isOk = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!isOk)
|
||||
{
|
||||
if (BLL.Funs.DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId))
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
<Compile Include="Controllers\HSSE\GoodsManageController.cs" />
|
||||
<Compile Include="Controllers\HSSE\HazardRealTimeController.cs" />
|
||||
<Compile Include="Controllers\HSSE\MaterialController.cs" />
|
||||
<Compile Include="Controllers\HSSE\BonusScoreSelfManagementController.cs" />
|
||||
<Compile Include="Controllers\HSSE\TrainTestRecordController.cs" />
|
||||
<Compile Include="Controllers\Person\PersonCheckController.cs" />
|
||||
<Compile Include="Controllers\CQMS\CheckEquipmentController.cs" />
|
||||
|
||||
Reference in New Issue
Block a user