培训
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
|
||||
--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
|
||||
|
||||
--岗位培训
|
||||
|
||||
/*******************************岗位培训菜单******************************************************************************************/
|
||||
@@ -27,9 +35,9 @@ BEGIN
|
||||
--岗位培训标准
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('7BCA5AD9-D0FB-4850-A9D1-88364008984D','岗位培训标准','HSSE/PostTraining/Standard.aspx',120,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
--岗位培训角色
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','岗位培训角色','HSSE/PostTraining/Role.aspx',130,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
----岗位培训角色
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
--VALUES('50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','岗位培训角色','HSSE/PostTraining/Role.aspx',130,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
--岗位培训方式
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed)
|
||||
VALUES('919853EB-A8FA-4BE5-9964-70F43E000961','岗位培训方式','HSSE/PostTraining/Method.aspx',140,'BEA50D7C-60FE-488B-8D7D-255020EEB4C2','Menu_HSSE',1,1)
|
||||
@@ -90,19 +98,19 @@ BEGIN
|
||||
VALUES('CC75D488-288C-4883-9452-617818AD5A84','7BCA5AD9-D0FB-4850-A9D1-88364008984D','保存',4)
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '50F80CAF-08BA-4A16-9EF8-76DF0A8078CF')
|
||||
BEGIN
|
||||
--岗位培训角色
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('93D2A0CB-1388-4059-9C28-8DEDCAD56093','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E3A54064-7D8B-49D8-AE32-89EF002A6D0E','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('BF0EA069-3B5A-4685-92AC-0AD13AF81010','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('7C57B206-FC52-4622-A276-50FA49691532','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','保存',4)
|
||||
END
|
||||
GO
|
||||
--IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '50F80CAF-08BA-4A16-9EF8-76DF0A8078CF')
|
||||
--BEGIN
|
||||
-- --岗位培训角色
|
||||
-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
-- VALUES('93D2A0CB-1388-4059-9C28-8DEDCAD56093','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','增加',1)
|
||||
-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
-- VALUES('E3A54064-7D8B-49D8-AE32-89EF002A6D0E','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','修改',2)
|
||||
-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
-- VALUES('BF0EA069-3B5A-4685-92AC-0AD13AF81010','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','删除',3)
|
||||
-- INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
-- VALUES('7C57B206-FC52-4622-A276-50FA49691532','50F80CAF-08BA-4A16-9EF8-76DF0A8078CF','保存',4)
|
||||
--END
|
||||
--GO
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '919853EB-A8FA-4BE5-9964-70F43E000961')
|
||||
BEGIN
|
||||
--岗位培训方式
|
||||
@@ -130,12 +138,13 @@ BEGIN
|
||||
END
|
||||
GO
|
||||
|
||||
--1、用户补充培训岗位Id
|
||||
IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'SitePerson_Person' AND COLUMN_NAME = 'PostTrainingRoleId')
|
||||
BEGIN
|
||||
ALTER TABLE SitePerson_Person ADD PostTrainingRoleId nvarchar(50);
|
||||
END
|
||||
GO
|
||||
----1、用户补充培训岗位Id
|
||||
--IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'SitePerson_Person' AND COLUMN_NAME = 'PostTrainingRoleId')
|
||||
--BEGIN
|
||||
-- ALTER TABLE SitePerson_Person ADD PostTrainingRoleId nvarchar(50);
|
||||
--END
|
||||
--GO
|
||||
|
||||
|
||||
|
||||
/*******************************岗位培训数据表******************************************************************************************/
|
||||
@@ -158,7 +167,7 @@ CREATE TABLE [dbo].[PostTraining_Record](
|
||||
[Method] [nvarchar](200) NULL,
|
||||
[Lecturer] [nvarchar](200) NULL,
|
||||
[UnitIds] [nvarchar](max) NULL,
|
||||
[RoleIds] [nvarchar](max) NULL,
|
||||
[WorkPostIds] [nvarchar](max) NULL,
|
||||
[PersonNum] [int] NOT NULL,
|
||||
[TrainingTime] [datetime] NOT NULL,
|
||||
[Duration] [decimal](10, 2) NOT NULL,
|
||||
@@ -276,33 +285,34 @@ BEGIN
|
||||
END
|
||||
GO
|
||||
|
||||
--岗位培训角色
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Role') AND type = N'U')
|
||||
BEGIN
|
||||
--drop table PostTraining_Role
|
||||
----岗位培训角色
|
||||
--IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'PostTraining_Role') AND type = N'U')
|
||||
--BEGIN
|
||||
|
||||
CREATE TABLE [dbo].[PostTraining_Role](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[Name] [nvarchar](200) NULL,
|
||||
[Remark] [nvarchar](1000) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_PostTraining_Role] 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].[PostTraining_Role] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Role_Sys_User] FOREIGN KEY([CompileMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
ALTER TABLE [dbo].[PostTraining_Role] CHECK CONSTRAINT [FK_PostTraining_Role_Sys_User]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role'
|
||||
END
|
||||
--CREATE TABLE [dbo].[PostTraining_Role](
|
||||
-- [Id] [nvarchar](50) NOT NULL,
|
||||
-- [Code] [nvarchar](50) NULL,
|
||||
-- [Name] [nvarchar](200) NULL,
|
||||
-- [Remark] [nvarchar](1000) NULL,
|
||||
-- [CompileDate] [datetime] NULL,
|
||||
-- [CompileMan] [nvarchar](50) NULL,
|
||||
-- CONSTRAINT [PK_PostTraining_Role] 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].[PostTraining_Role] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Role_Sys_User] FOREIGN KEY([CompileMan])
|
||||
--REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
--ALTER TABLE [dbo].[PostTraining_Role] CHECK CONSTRAINT [FK_PostTraining_Role_Sys_User]
|
||||
--EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role', @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'PostTraining_Role'
|
||||
--END
|
||||
|
||||
GO
|
||||
|
||||
@@ -359,7 +369,7 @@ BEGIN
|
||||
CREATE TABLE [dbo].[PostTraining_Standard](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[RoleId] [nvarchar](50) NOT NULL,
|
||||
[WorkPostId] [nvarchar](50) NOT NULL,
|
||||
[CourseId] [nvarchar](50) NOT NULL,
|
||||
[ClassHour] [decimal](10, 2) NOT NULL,
|
||||
[Cycle] [decimal](10, 2) NOT NULL,
|
||||
@@ -374,9 +384,9 @@ CREATE TABLE [dbo].[PostTraining_Standard](
|
||||
[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].[PostTraining_Standard] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Standard_PostTraining_Role] FOREIGN KEY([RoleId])
|
||||
REFERENCES [dbo].[PostTraining_Role] ([Id])
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] CHECK CONSTRAINT [FK_PostTraining_Standard_PostTraining_Role]
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Standard_Base_WorkPost] FOREIGN KEY([WorkPostId])
|
||||
REFERENCES [dbo].[FK_PostTraining_Standard_Base_WorkPost] ([WorkPostId])
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] CHECK CONSTRAINT [FK_PostTraining_Standard_Base_WorkPost]
|
||||
|
||||
ALTER TABLE [dbo].[PostTraining_Standard] WITH CHECK ADD CONSTRAINT [FK_PostTraining_Standard_PostTraining_Course] FOREIGN KEY([CourseId])
|
||||
REFERENCES [dbo].[PostTraining_Course] ([Id])
|
||||
@@ -507,11 +517,11 @@ SELECT recordDetail.Id AS DetailId,
|
||||
person.UnitId,
|
||||
unit.UnitName,
|
||||
person.PersonName,
|
||||
pRole.Name AS RoleName
|
||||
workPost.WorkPostName AS WorkPostName
|
||||
FROM dbo.PostTraining_Record_Detail AS recordDetail
|
||||
LEFT JOIN dbo.SitePerson_Person AS person ON person.PersonId = recordDetail.PersonId
|
||||
LEFT JOIN dbo.Base_Unit AS unit ON unit.UnitId=person.UnitId
|
||||
LEFT JOIN dbo.PostTraining_Role AS pRole ON pRole.Id=person.PostTrainingRoleId
|
||||
LEFT JOIN dbo.Base_WorkPost AS workPost ON workPost.WorkPostId=person.WorkPostId
|
||||
|
||||
GO
|
||||
|
||||
@@ -530,6 +540,7 @@ SELECT Person.PersonId,
|
||||
Person.TeamGroupId,
|
||||
Person.WorkAreaId,
|
||||
Person.WorkPostId,
|
||||
Post.WorkPostName,
|
||||
Person.InTime,
|
||||
Person.OutTime,
|
||||
Person.OutResult,
|
||||
@@ -551,7 +562,6 @@ SELECT Person.PersonId,
|
||||
WorkAreaCode= STUFF((SELECT ',' + UnitWorkCode FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||
--WorkArea.UnitWorkName AS WorkAreaName
|
||||
WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||
Post.WorkPostName,
|
||||
Position.PositionName,
|
||||
Title.PostTitleName,
|
||||
Depart.DepartName,
|
||||
@@ -594,9 +604,9 @@ SELECT Person.PersonId,
|
||||
Person.States,
|
||||
sysUser.StarLevelId,
|
||||
StarLevel.StarMark,
|
||||
StarLevel.LevelValue,
|
||||
Person.PostTrainingRoleId,
|
||||
PostRole.Name AS PostTrainingRoleName
|
||||
StarLevel.LevelValue
|
||||
--,Person.PostTrainingRoleId,
|
||||
--PostRole.Name AS PostTrainingRoleName
|
||||
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId
|
||||
@@ -617,7 +627,7 @@ Left JOIN RealName_Country AS Country ON Country.CountryId = Person.CountryCode
|
||||
Left JOIN RealName_City AS City ON City.provinceCode = Person.ProvinceCode
|
||||
Left JOIN Base_CNProfessional AS CNProfessional ON CNProfessional.CNProfessionalId = Person.MainCNProfessionalId
|
||||
Left JOIN Base_StarLevel AS StarLevel ON sysUser.StarLevelId = StarLevel.StarLevelId
|
||||
Left JOIN PostTraining_Role AS PostRole ON PostRole.Id = Person.PostTrainingRoleId
|
||||
--Left JOIN PostTraining_Role AS PostRole ON PostRole.Id = Person.PostTrainingRoleId
|
||||
|
||||
GO
|
||||
|
||||
@@ -635,7 +645,6 @@ SELECT
|
||||
Person.PersonName,
|
||||
Person.UnitId,
|
||||
Unit.UnitName,
|
||||
Post.WorkPostName,
|
||||
WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +Person.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||
TeamGroup.TeamGroupName,
|
||||
Person.InTime,
|
||||
@@ -644,19 +653,20 @@ SELECT
|
||||
Person.IdentityCard,
|
||||
Person.TeamGroupId,
|
||||
Person.WorkPostId,
|
||||
Post.WorkPostName,
|
||||
Person.IdcardType,
|
||||
Person.PhotoUrl,
|
||||
edu.TrainCount,
|
||||
PoliticsStatus.dictName AS PoliticsStatusName,
|
||||
Person.PostTrainingRoleId,
|
||||
PostRole.Name AS PostTrainingRoleName
|
||||
PoliticsStatus.dictName AS PoliticsStatusName
|
||||
--,Person.PostTrainingRoleId,
|
||||
--PostRole.Name AS PostTrainingRoleName
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId
|
||||
LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=Person.TeamGroupId
|
||||
LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = Person.WorkPostId
|
||||
LEFT JOIN RealName_BasicData AS PoliticsStatus ON PoliticsStatus.dictCode = Person.PoliticsStatus AND PoliticsStatus.DictTypeCode='POLITICAL_LANDSCAPE'
|
||||
LEFT JOIN (select PersonId,count(PersonId)as TrainCount from EduTrain_TrainRecordDetail group by PersonId) as edu on edu.PersonId= Person.PersonId
|
||||
LEFT JOIN PostTraining_Role AS PostRole ON PostRole.Id = Person.PostTrainingRoleId
|
||||
--LEFT JOIN PostTraining_Role AS PostRole ON PostRole.Id = Person.PostTrainingRoleId
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -468,6 +468,171 @@ namespace BLL
|
||||
#endregion
|
||||
|
||||
#region 根据培训类型获取项目培训人员信息
|
||||
/// <summary>
|
||||
/// 根据培训类型获取项目培训人员信息
|
||||
/// </summary>
|
||||
/// <param name="projectId">项目ID</param>
|
||||
/// <param name="unitIds">培训单位ID</param>
|
||||
/// <param name="workPostIds">培训岗位ID</param>
|
||||
/// <param name="trainTypeId">培训类型ID</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.PersonItem> getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string departIds, string trainTypeId, string InTime, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
DateTime inDateTime = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(InTime) && !"null".Equals(InTime))
|
||||
{
|
||||
inDateTime = DateTime.Parse(InTime);
|
||||
}
|
||||
|
||||
List<string> unitIdList = Funs.GetStrListByStr(unitIds, ',');
|
||||
var getPersons = (from x in db.View_SitePerson_Person
|
||||
where x.ProjectId == projectId && unitIdList.Contains(x.UnitId) && x.IsUsed == true && (string.IsNullOrEmpty(strParam) || x.PersonName.Contains(strParam)) && (string.IsNullOrEmpty(InTime) || x.InTime < inDateTime)
|
||||
&& x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime >= DateTime.Now)
|
||||
select new Model.PersonItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
CardNo = x.CardNo,
|
||||
PersonName = x.PersonName,
|
||||
SexName = x.SexName,
|
||||
IdentityCard = x.IdentityCard,
|
||||
Address = x.Address,
|
||||
ProjectId = x.ProjectId,
|
||||
ProjectCode = x.ProjectCode,
|
||||
ProjectName = x.ProjectName,
|
||||
UnitId = x.UnitId,
|
||||
UnitCode = x.UnitCode,
|
||||
UnitName = x.UnitName,
|
||||
TeamGroupId = x.TeamGroupId,
|
||||
TeamGroupName = x.TeamGroupName,
|
||||
WorkPostId = x.WorkPostId,
|
||||
WorkPostName = x.WorkPostName,
|
||||
InTime = string.Format("{0:yyyy-MM-dd}", x.InTime),
|
||||
OutTime = string.Format("{0:yyyy-MM-dd}", x.OutTime),
|
||||
OutResult = x.OutResult,
|
||||
Telephone = x.Telephone,
|
||||
PhotoUrl = x.PhotoUrl,
|
||||
DepartName = x.DepartName,
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(workPostIds))
|
||||
{
|
||||
List<string> workPostIdList = Funs.GetStrListByStr(workPostIds, ',');
|
||||
getPersons = getPersons.Where(x => workPostIdList.Contains(x.WorkPostId)).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trainTypeId) && trainTypeId == Const.SpecialSafeTrainId)//专项安全培训
|
||||
{
|
||||
var ids = db.Base_WorkPost.Where(x => x.PostType == "2").Select(x => x.WorkPostId).ToList();
|
||||
getPersons = getPersons.Where(x => ids.Contains(x.WorkPostId)).ToList();
|
||||
}
|
||||
List<Model.PersonItem> getTrainPersonList = new List<Model.PersonItem>();
|
||||
var getTrainType = TrainTypeService.GetTrainTypeById(trainTypeId);
|
||||
if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat.Value == false))
|
||||
{
|
||||
int score = 80;
|
||||
var sysTestRule = db.Sys_TestRule.FirstOrDefault();
|
||||
if (sysTestRule != null)
|
||||
{
|
||||
if (sysTestRule.PassingScore > 0)
|
||||
{
|
||||
score = sysTestRule.PassingScore;
|
||||
}
|
||||
}
|
||||
foreach (var item in getPersons)
|
||||
{
|
||||
var getTrainPersonIdList3 = (from x in db.Training_TestRecord
|
||||
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && y.States != "3" && x.TestManId == item.PersonId
|
||||
where x.TestScores > score
|
||||
select x).FirstOrDefault();
|
||||
if (getTrainPersonIdList3 != null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var getTrainPersonIdList1 = (from x in db.EduTrain_TrainRecordDetail
|
||||
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
|
||||
where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && x.CheckResult == true && x.PersonId == item.PersonId
|
||||
select x).FirstOrDefault();
|
||||
if (getTrainPersonIdList1 == null)
|
||||
{
|
||||
var getTrainPersonIdList2 = (from x in db.Training_Task
|
||||
join y in db.Training_Plan on x.PlanId equals y.PlanId
|
||||
where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && y.States != "3" && x.UserId == item.PersonId
|
||||
|
||||
select x).FirstOrDefault();
|
||||
if (getTrainPersonIdList2 == null)
|
||||
{
|
||||
getTrainPersonList.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
return getTrainPersonList;
|
||||
}
|
||||
else if (getTrainType != null && getTrainType.IsRepeat.HasValue && getTrainType.IsRepeat.Value == true)//重复的 过滤人员
|
||||
{
|
||||
foreach (var item in getPersons)
|
||||
{
|
||||
//int score = 80;
|
||||
//var sysTestRule = db.Sys_TestRule.FirstOrDefault();
|
||||
//if (sysTestRule != null)
|
||||
//{
|
||||
// if (sysTestRule.PassingScore > 0)
|
||||
// {
|
||||
// score = sysTestRule.PassingScore;
|
||||
// }
|
||||
//}
|
||||
//var getTrainPersonIdList2 = (from x in db.Training_TestRecord
|
||||
// join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
// where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && y.States != "3" && x.TestManId == item.PersonId
|
||||
// where x.TestScores > score
|
||||
// select x).FirstOrDefault();
|
||||
//if (getTrainPersonIdList2 != null)
|
||||
//{
|
||||
// continue;
|
||||
//}
|
||||
getTrainPersonList.Add(item);
|
||||
}
|
||||
return getTrainPersonList;
|
||||
}
|
||||
//else if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == false))//重复的 过滤人员
|
||||
//{
|
||||
// int score = 80;
|
||||
// var sysTestRule = db.Sys_TestRule.FirstOrDefault();
|
||||
// if (sysTestRule != null)
|
||||
// {
|
||||
// if (sysTestRule.PassingScore > 0)
|
||||
// {
|
||||
// score = sysTestRule.PassingScore;
|
||||
// }
|
||||
// }
|
||||
// foreach (var item in getPersons)
|
||||
// {
|
||||
|
||||
// var getTrainPersonIdList2 = (from x in db.Training_TestRecord
|
||||
// join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
// where y.ProjectId == projectId && y.TrainTypeId == trainTypeId && y.States != "3" && x.TestManId == item.PersonId
|
||||
// where x.TestScores > score
|
||||
// select x).FirstOrDefault();
|
||||
// if (getTrainPersonIdList2 != null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// getTrainPersonList.Add(item);
|
||||
// }
|
||||
// return getTrainPersonList;
|
||||
//}
|
||||
else
|
||||
{
|
||||
return getPersons.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据培训类型获取项目培训人员信息
|
||||
/// </summary>
|
||||
|
||||
@@ -260,5 +260,6 @@ namespace BLL
|
||||
return workPostName;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -907,7 +907,7 @@ namespace BLL
|
||||
|
||||
#region 定义常量
|
||||
/// <summary>
|
||||
/// 天辰单位id
|
||||
/// 新疆油建单位id
|
||||
/// </summary>
|
||||
public const string UnitId_TCC = "b4f3d912-ca6d-440c-a8d7-bc6a5d5a1f84";
|
||||
/// <summary>
|
||||
@@ -3630,6 +3630,10 @@ namespace BLL
|
||||
/// 岗位培训标准
|
||||
/// </summary>
|
||||
public const string PostTrainingStandardTemplateUrl = "File\\Excel\\DataIn\\岗位培训标准导入模板.xlsx";
|
||||
/// <summary>
|
||||
/// 岗位培训人员导入模板
|
||||
/// </summary>
|
||||
public const string PostTrainingRecordTemplateUrl = "File\\Excel\\DataIn\\岗位培训人员导入模板.xls";
|
||||
|
||||
/// <summary>
|
||||
/// 数据导入模版文件原始的虚拟路径
|
||||
@@ -6327,6 +6331,10 @@ namespace BLL
|
||||
/// 实业数据
|
||||
/// </summary>
|
||||
public const string Project_SYHSEData_SYHSEMenuId = "";
|
||||
/// <summary>
|
||||
/// 专项安全培训 id
|
||||
/// </summary>
|
||||
public static string SpecialSafeTrainId = "0e7fdf78-eaa0-4d00-a60b-490040bbea18";
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -22,35 +22,39 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 添加公司培训明细
|
||||
/// </summary>
|
||||
/// <param name="companyTrainingItem"></param>
|
||||
public static void AddCompanyTrainingItem(Model.Training_CompanyTrainingItem companyTrainingItem)
|
||||
/// <param name="model"></param>
|
||||
public static void AddCompanyTrainingItem(Model.Training_CompanyTrainingItem model)
|
||||
{
|
||||
Model.Training_CompanyTrainingItem newCompanyTrainingItem = new Model.Training_CompanyTrainingItem();
|
||||
newCompanyTrainingItem.CompanyTrainingItemId = companyTrainingItem.CompanyTrainingItemId;
|
||||
newCompanyTrainingItem.CompanyTrainingId = companyTrainingItem.CompanyTrainingId;
|
||||
newCompanyTrainingItem.CompanyTrainingItemCode = companyTrainingItem.CompanyTrainingItemCode;
|
||||
newCompanyTrainingItem.CompanyTrainingItemName = companyTrainingItem.CompanyTrainingItemName;
|
||||
newCompanyTrainingItem.AttachUrl = companyTrainingItem.AttachUrl;
|
||||
newCompanyTrainingItem.CompileMan = companyTrainingItem.CompileMan;
|
||||
newCompanyTrainingItem.CompileDate = companyTrainingItem.CompileDate;
|
||||
db.Training_CompanyTrainingItem.InsertOnSubmit(newCompanyTrainingItem);
|
||||
Model.Training_CompanyTrainingItem newModel = new Model.Training_CompanyTrainingItem();
|
||||
newModel.CompanyTrainingItemId = model.CompanyTrainingItemId;
|
||||
newModel.CompanyTrainingId = model.CompanyTrainingId;
|
||||
newModel.CompanyTrainingItemCode = model.CompanyTrainingItemCode;
|
||||
newModel.CompanyTrainingItemName = model.CompanyTrainingItemName;
|
||||
newModel.AttachUrl = model.AttachUrl;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.WorkPostIds = model.WorkPostIds;
|
||||
newModel.WorkPostNames = model.WorkPostNames;
|
||||
db.Training_CompanyTrainingItem.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改公司培训明细
|
||||
/// </summary>
|
||||
/// <param name="companyTrainingItem"></param>
|
||||
public static void UpdateCompanyTrainingItem(Model.Training_CompanyTrainingItem companyTrainingItem)
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateCompanyTrainingItem(Model.Training_CompanyTrainingItem model)
|
||||
{
|
||||
Model.Training_CompanyTrainingItem newCompanyTrainingItem = db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainingItem.CompanyTrainingItemId);
|
||||
if (newCompanyTrainingItem != null)
|
||||
Model.Training_CompanyTrainingItem newModel = db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == model.CompanyTrainingItemId);
|
||||
if (newModel != null)
|
||||
{
|
||||
newCompanyTrainingItem.CompanyTrainingItemCode = companyTrainingItem.CompanyTrainingItemCode;
|
||||
newCompanyTrainingItem.CompanyTrainingItemName = companyTrainingItem.CompanyTrainingItemName;
|
||||
newCompanyTrainingItem.AttachUrl = companyTrainingItem.AttachUrl;
|
||||
newCompanyTrainingItem.CompileMan = companyTrainingItem.CompileMan;
|
||||
newCompanyTrainingItem.CompileDate = companyTrainingItem.CompileDate;
|
||||
newModel.CompanyTrainingItemCode = model.CompanyTrainingItemCode;
|
||||
newModel.CompanyTrainingItemName = model.CompanyTrainingItemName;
|
||||
newModel.AttachUrl = model.AttachUrl;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
newModel.WorkPostIds = model.WorkPostIds;
|
||||
newModel.WorkPostNames = model.WorkPostNames;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -61,10 +65,10 @@ namespace BLL
|
||||
/// <param name="companyTrainItemId"></param>
|
||||
public static void DeleteCompanyTrainingItemById(string companyTrainItemId)
|
||||
{
|
||||
Model.Training_CompanyTrainingItem companyTrainingItem = db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainItemId);
|
||||
if (companyTrainingItem != null)
|
||||
Model.Training_CompanyTrainingItem model = db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainItemId);
|
||||
if (model != null)
|
||||
{
|
||||
db.Training_CompanyTrainingItem.DeleteOnSubmit(companyTrainingItem);
|
||||
db.Training_CompanyTrainingItem.DeleteOnSubmit(model);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,8 @@ namespace BLL
|
||||
Method = model.Method,
|
||||
Lecturer = model.Lecturer,
|
||||
UnitIds = model.UnitIds,
|
||||
RoleIds = model.RoleIds,
|
||||
//RoleIds = model.RoleIds,
|
||||
WorkPostIds = model.WorkPostIds,
|
||||
PersonNum = model.PersonNum,
|
||||
TrainingTime = model.TrainingTime,
|
||||
Duration = model.Duration,
|
||||
@@ -74,7 +75,8 @@ namespace BLL
|
||||
newModel.Method = model.Method;
|
||||
newModel.Lecturer = model.Lecturer;
|
||||
newModel.UnitIds = model.UnitIds;
|
||||
newModel.RoleIds = model.RoleIds;
|
||||
newModel.WorkPostIds = model.WorkPostIds;
|
||||
//newModel.RoleIds = model.RoleIds;
|
||||
newModel.PersonNum = model.PersonNum;
|
||||
newModel.TrainingTime = model.TrainingTime;
|
||||
newModel.Duration = model.Duration;
|
||||
|
||||
@@ -32,7 +32,8 @@ namespace BLL
|
||||
{
|
||||
Id = model.Id,
|
||||
Code = model.Code,
|
||||
RoleId = model.RoleId,
|
||||
//RoleId = model.RoleId,
|
||||
WorkPostId = model.WorkPostId,
|
||||
CourseId = model.CourseId,
|
||||
ClassHour = model.ClassHour,
|
||||
Cycle = model.Cycle,
|
||||
@@ -57,7 +58,8 @@ namespace BLL
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.Code = model.Code;
|
||||
newModel.RoleId = model.RoleId;
|
||||
//newModel.RoleId = model.RoleId;
|
||||
newModel.WorkPostId = model.WorkPostId;
|
||||
newModel.CourseId = model.CourseId;
|
||||
newModel.ClassHour = model.ClassHour;
|
||||
newModel.Cycle = model.Cycle;
|
||||
@@ -102,12 +104,15 @@ namespace BLL
|
||||
var db = Funs.DB;
|
||||
var lst = (from x in db.PostTraining_Standard
|
||||
join y in db.PostTraining_Course on x.CourseId equals y.Id
|
||||
join z in db.PostTraining_Role on x.RoleId equals z.Id
|
||||
join z in db.Base_WorkPost on x.WorkPostId equals z.WorkPostId
|
||||
//join z in db.PostTraining_Role on x.RoleId equals z.Id
|
||||
orderby x.Code
|
||||
select new PostTrainingStandardInfo
|
||||
{
|
||||
RoleId = x.RoleId,
|
||||
RoleName = z.Name,
|
||||
WorkPostId = x.WorkPostId,
|
||||
WorkPostName = z.WorkPostName,
|
||||
//RoleId = x.RoleId,
|
||||
//RoleName = z.RoleName,
|
||||
CourseId = x.CourseId,
|
||||
CourseName = y.Name,
|
||||
CategoryName = y.CategoryName,
|
||||
@@ -155,8 +160,9 @@ namespace BLL
|
||||
var lstStandard = GetStandardInfoList();
|
||||
//培训课程
|
||||
var lstCourse = PostTrainingCourseService.GetCourseList();
|
||||
//培训角色
|
||||
var lstRole = PostTrainingRoleService.GetRoleList();
|
||||
////培训角色
|
||||
//var lstRole = PostTrainingRoleService.GetRoleList();
|
||||
var lstWorkPost = WorkPostService.GetWorkPostList();
|
||||
//培训类别
|
||||
var lstCategory = PostTrainingCategoryService.GetCategoryList();
|
||||
//培训方式
|
||||
@@ -186,7 +192,7 @@ namespace BLL
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(roleName))
|
||||
{
|
||||
if (!lstRole.Where(x => x.Name == roleName).Any())
|
||||
if (!lstWorkPost.Where(x => x.WorkPostName == roleName).Any())
|
||||
{
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = rowIndex.ToString();
|
||||
@@ -392,7 +398,8 @@ namespace BLL
|
||||
CompileMan = creatUserId
|
||||
};
|
||||
newModel.CourseId = lstCourse.Where(x => x.Name == courseName).FirstOrDefault().Id;
|
||||
newModel.RoleId = lstRole.Where(x => x.Name == roleName).FirstOrDefault().Id;
|
||||
//newModel.RoleId = lstRole.Where(x => x.Name == roleName).FirstOrDefault().Id;
|
||||
newModel.WorkPostId = lstWorkPost.Where(x => x.WorkPostName == roleName).FirstOrDefault().WorkPostId;
|
||||
newModel.ClassHour = classHour;
|
||||
newModel.Cycle = cycle;
|
||||
newModel.Method = method;
|
||||
|
||||
@@ -344,7 +344,7 @@ namespace BLL
|
||||
TeamGroupId = person.TeamGroupId,
|
||||
WorkAreaId = person.WorkAreaId,
|
||||
WorkPostId = person.WorkPostId,
|
||||
PostTrainingRoleId = person.PostTrainingRoleId,
|
||||
//PostTrainingRoleId = person.PostTrainingRoleId,
|
||||
OutTime = person.OutTime,
|
||||
OutResult = person.OutResult,
|
||||
Telephone = person.Telephone,
|
||||
@@ -424,7 +424,7 @@ namespace BLL
|
||||
newPerson.TeamGroupId = person.TeamGroupId;
|
||||
newPerson.WorkAreaId = person.WorkAreaId;
|
||||
newPerson.WorkPostId = person.WorkPostId;
|
||||
newPerson.PostTrainingRoleId = person.PostTrainingRoleId;
|
||||
//newPerson.PostTrainingRoleId = person.PostTrainingRoleId;
|
||||
newPerson.InTime = person.InTime;
|
||||
newPerson.OutTime = person.OutTime;
|
||||
newPerson.IsSafetyMonitoring = person.IsSafetyMonitoring;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -12,7 +10,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <param name="departId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_Depart GetDepartById(string departId)
|
||||
{
|
||||
@@ -22,7 +20,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="?"></param>
|
||||
/// <param name="depart"></param>
|
||||
public static void AddDepart(Model.Base_Depart depart)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
@@ -41,7 +39,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="teamGroup"></param>
|
||||
/// <param name="depart"></param>
|
||||
public static void UpdateDepart(Model.Base_Depart depart)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
@@ -82,7 +80,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <param name="departId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getDepartNameById(string departId)
|
||||
{
|
||||
@@ -113,5 +111,64 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 根据多部门ID得到岗位名称字符串
|
||||
|
||||
/// <summary>
|
||||
/// 根据多部门ID得到岗位名称字符串
|
||||
/// </summary>
|
||||
/// <param name="departIdsIds"></param>
|
||||
/// <returns></returns>
|
||||
public static string getDepartNamesByIds(object departIdsIds)
|
||||
{
|
||||
string departName = string.Empty;
|
||||
if (departIdsIds != null)
|
||||
{
|
||||
string[] ids = departIdsIds.ToString().Split(',');
|
||||
foreach (string id in ids)
|
||||
{
|
||||
var q = GetDepartById(id);
|
||||
if (q != null)
|
||||
{
|
||||
departName += q.DepartName + ",";
|
||||
}
|
||||
}
|
||||
if (departName != string.Empty)
|
||||
{
|
||||
departName = departName.Substring(0, departName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
return departName;
|
||||
}
|
||||
public static string getDepartNamesByIdsForApi(object departIdsIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string departName = string.Empty;
|
||||
if (departIdsIds != null)
|
||||
{
|
||||
string[] ids = departIdsIds.ToString().Split(',');
|
||||
foreach (string id in ids)
|
||||
{
|
||||
var q = db.Base_Depart.FirstOrDefault(e => e.DepartId == id);
|
||||
if (q != null)
|
||||
{
|
||||
departName += q.DepartName + ",";
|
||||
}
|
||||
}
|
||||
if (departName != string.Empty)
|
||||
{
|
||||
departName = departName.Substring(0, departName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
return departName;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Title="岗位信息" ShowHeader="false" EnableCollapse="true" PageSize="20"
|
||||
EnableColumnLines="true" ShowBorder="true" AllowPaging="true" IsDatabasePaging="true"
|
||||
runat="server" Width="750px" DataKeyNames="WorkPostId" DataIDField="WorkPostId" AllowSorting="true"
|
||||
runat="server" Width="900px" DataKeyNames="WorkPostId" DataIDField="WorkPostId" AllowSorting="true"
|
||||
SortField="PostType,WorkPostCode" SortDirection="ASC"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange"
|
||||
EnableTextSelection="True">
|
||||
@@ -37,10 +37,10 @@
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:RenderField Width="150px" ColumnID="WorkPostCode" DataField="WorkPostCode" FieldType="String"
|
||||
<f:RenderField Width="180px" ColumnID="WorkPostCode" DataField="WorkPostCode" FieldType="String"
|
||||
HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="WorkPostName" DataField="WorkPostName" FieldType="String"
|
||||
<f:RenderField Width="160px" ColumnID="WorkPostName" DataField="WorkPostName" FieldType="String"
|
||||
HeaderText="名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="120px" HeaderText="类型" HeaderTextAlign="Center" TextAlign="Center">
|
||||
@@ -90,9 +90,13 @@
|
||||
<Items>
|
||||
<f:HiddenField ID="hfFormID" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:DropDownList ID="drpWorkPostCode" runat="server" Label="编号" LabelAlign="Right" Required="true"
|
||||
<f:TextBox ID="txtWorkPostCode" Label="编号" ShowRedStar="true" Required="true" runat="server"
|
||||
MaxLength="100" LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<%--<f:DropDownList ID="drpWorkPostCode" runat="server" Label="编号" LabelAlign="Right" Required="true"
|
||||
ShowRedStar="true" LabelWidth="80px">
|
||||
</f:DropDownList>
|
||||
</f:DropDownList>--%>
|
||||
<f:TextBox ID="txtWorkPostName" Label="名称" ShowRedStar="true" Required="true" runat="server"
|
||||
MaxLength="100" LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
LabelWidth="80px">
|
||||
@@ -180,7 +184,7 @@
|
||||
var btnSaveClientID = '<%= btnSave.ClientID %>';
|
||||
var formClientID = '<%= SimpleForm1.ClientID %>';
|
||||
var hfFormIDClientID = '<%= hfFormID.ClientID %>';
|
||||
var drpCodeClientID = '<%= drpWorkPostCode.ClientID %>';
|
||||
var txtCodeClientID = '<%= txtWorkPostCode.ClientID %>';
|
||||
var txtNameClientID = '<%= txtWorkPostName.ClientID %>';
|
||||
var drpPostTypeClientID = '<%= drpPostType.ClientID %>';
|
||||
var ckbIsHsseClientID = '<%= ckbIsHsse.ClientID %>';
|
||||
@@ -198,7 +202,7 @@
|
||||
|
||||
// 使用当前行数据填充表单字段
|
||||
F(hfFormIDClientID).setValue(rowId);
|
||||
F(drpCodeClientID).setValue(rowValue['WorkPostCode']);
|
||||
F(txtCodeClientID).setValue(rowValue['WorkPostCode']);
|
||||
F(txtNameClientID).setValue(rowValue['WorkPostName']);
|
||||
F(drpPostTypeClientID).setValue(rowValue['PostType']);
|
||||
F(ckbIsHsseClientID).setValue(rowValue['IsHsse']);
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
//岗位类型
|
||||
BasicDataService.InitBasicDataCodeAndNameDropDownList(this.drpWorkPostCode, "LAB_WORK_TYPE", true);
|
||||
////岗位类型
|
||||
//BasicDataService.InitBasicDataCodeAndNameDropDownList(this.drpWorkPostCode, "LAB_WORK_TYPE", true);
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpPostType, ConstValue.Group_PostType, true);
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
@@ -28,6 +28,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
gvCNCodes.DataSource = BLL.CNProfessionalService.GetList();
|
||||
gvCNCodes.DataBind();
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
////自动生成编码
|
||||
this.txtWorkPostCode.Text = SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.Base_WorkPost", "WorkPostCode", "");
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
@@ -45,7 +47,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtKey.Text.Trim()))
|
||||
{
|
||||
strSql += "where wp.WorkPostName like '%"+this.txtKey.Text.Trim()+"%' ";
|
||||
strSql += "where wp.WorkPostName like '%" + this.txtKey.Text.Trim() + "%' ";
|
||||
}
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//strSql += " AND HazardList.ProjectId = @ProjectId";
|
||||
@@ -108,7 +110,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, this.drpWorkPostCode.SelectedValue, hfFormID.Text, BLL.Const.WorkPostMenuId, BLL.Const.BtnDelete);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, this.txtWorkPostCode.Text.Trim(), hfFormID.Text, BLL.Const.WorkPostMenuId, BLL.Const.BtnDelete);
|
||||
BLL.WorkPostService.DeleteWorkPostById(hfFormID.Text);
|
||||
|
||||
// 重新绑定表格,并模拟点击[新增按钮]
|
||||
@@ -170,7 +172,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
var workPost = BLL.WorkPostService.GetWorkPostById(Id);
|
||||
if (workPost != null)
|
||||
{
|
||||
this.drpWorkPostCode.SelectedValue = workPost.WorkPostCode;
|
||||
//this.drpWorkPostCode.SelectedValue = workPost.WorkPostCode;
|
||||
this.txtWorkPostCode.Text = workPost.WorkPostCode;
|
||||
this.txtWorkPostName.Text = workPost.WorkPostName;
|
||||
if (!string.IsNullOrEmpty(workPost.PostType))
|
||||
{
|
||||
@@ -209,11 +212,11 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpWorkPostCode.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择编号!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (this.drpWorkPostCode.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// ShowNotify("请选择编号!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
if (this.drpPostType.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择类型!", MessageBoxIcon.Warning);
|
||||
@@ -222,7 +225,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
string strRowID = hfFormID.Text;
|
||||
Model.Base_WorkPost newWorkPost = new Model.Base_WorkPost
|
||||
{
|
||||
WorkPostCode = this.drpWorkPostCode.SelectedValue,
|
||||
//WorkPostCode = this.drpWorkPostCode.SelectedValue,
|
||||
WorkPostCode = this.txtWorkPostCode.Text.Trim(),
|
||||
WorkPostName = this.txtWorkPostName.Text.Trim(),
|
||||
PostType = this.drpPostType.SelectedValue,
|
||||
IsHsse = Convert.ToBoolean(this.ckbIsHsse.Checked),
|
||||
@@ -289,11 +293,11 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//var q = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostCode == this.txtWorkPostCode.Text.Trim() && (x.WorkPostId != hfFormID.Text || (hfFormID.Text == null && x.WorkPostId != null)));
|
||||
//if (q != null)
|
||||
//{
|
||||
// ShowNotify("输入的岗位编号已存在!", MessageBoxIcon.Warning);
|
||||
//}
|
||||
var q = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostCode == this.txtWorkPostCode.Text.Trim() && (x.WorkPostId != hfFormID.Text || (hfFormID.Text == null && x.WorkPostId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
ShowNotify("输入的岗位编号已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
var q2 = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostName == this.txtWorkPostName.Text.Trim() && (x.WorkPostId != hfFormID.Text || (hfFormID.Text == null && x.WorkPostId != null)));
|
||||
if (q2 != null)
|
||||
|
||||
+6
-4
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo {
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
|
||||
|
||||
public partial class WorkPost {
|
||||
public partial class WorkPost
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -148,13 +150,13 @@ namespace FineUIPro.Web.BaseInfo {
|
||||
protected global::FineUIPro.HiddenField hfFormID;
|
||||
|
||||
/// <summary>
|
||||
/// drpWorkPostCode 控件。
|
||||
/// txtWorkPostCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWorkPostCode;
|
||||
protected global::FineUIPro.TextBox txtWorkPostCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkPostName 控件。
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 7.9 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 7.9 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 7.9 KiB |
@@ -1851,6 +1851,8 @@
|
||||
<Content Include="HSSE\EduTrain\PlanEdit.aspx" />
|
||||
<Content Include="HSSE\EduTrain\TaskNotice.aspx" />
|
||||
<Content Include="HSSE\EduTrain\TaskNoticeEdit.aspx" />
|
||||
<Content Include="HSSE\EduTrain\TrainFindWorkPost.aspx" />
|
||||
<Content Include="HSSE\EduTrain\Trainingrecords.aspx" />
|
||||
<Content Include="HSSE\EduTrain\TrainTestRecordEdit.aspx" />
|
||||
<Content Include="HSSE\EduTrain\CompanyTraining.aspx" />
|
||||
<Content Include="HSSE\EduTrain\CompanyTrainingItemSave.aspx" />
|
||||
@@ -1936,6 +1938,7 @@
|
||||
<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" />
|
||||
@@ -2217,6 +2220,7 @@
|
||||
<Content Include="HSSE\PostTraining\CourseEdit.aspx" />
|
||||
<Content Include="HSSE\PostTraining\RoleEdit.aspx" />
|
||||
<Content Include="HSSE\PostTraining\CategoryEdit.aspx" />
|
||||
<Content Include="HSSE\PostTraining\RecordIn.aspx" />
|
||||
<Content Include="HSSE\QualityAudit\EquipmentPersonQuality.aspx" />
|
||||
<Content Include="HSSE\QualityAudit\EquipmentPersonQualityEdit.aspx" />
|
||||
<Content Include="HSSE\QualityAudit\EquipmentQuality.aspx" />
|
||||
@@ -2416,6 +2420,51 @@
|
||||
<Content Include="Personal\FileSearch.aspx" />
|
||||
<Content Include="Personal\PersonCheckInfo.aspx" />
|
||||
<Content Include="Personal\PersonDuty.aspx" />
|
||||
<Content Include="Person\EduTrain\AccidentCase.aspx" />
|
||||
<Content Include="Person\EduTrain\AccidentCaseItemSave.aspx" />
|
||||
<Content Include="Person\EduTrain\AccidentCaseItemSelectCloumn.aspx" />
|
||||
<Content Include="Person\EduTrain\AccidentCaseSave.aspx" />
|
||||
<Content Include="Person\EduTrain\CompanyTraining.aspx" />
|
||||
<Content Include="Person\EduTrain\CompanyTrainingItemSave.aspx" />
|
||||
<Content Include="Person\EduTrain\CompanyTrainingSave.aspx" />
|
||||
<Content Include="Person\EduTrain\Plan.aspx" />
|
||||
<Content Include="Person\EduTrain\PlanEdit.aspx" />
|
||||
<Content Include="Person\EduTrain\PlanView.aspx" />
|
||||
<Content Include="Person\EduTrain\ShowPerson.aspx" />
|
||||
<Content Include="Person\EduTrain\Task.aspx" />
|
||||
<Content Include="Person\EduTrain\TaskNotice.aspx" />
|
||||
<Content Include="Person\EduTrain\TaskNoticeEdit.aspx" />
|
||||
<Content Include="Person\EduTrain\TaskRecordView.aspx" />
|
||||
<Content Include="Person\EduTrain\TaskView.aspx" />
|
||||
<Content Include="Person\EduTrain\TestPlan.aspx" />
|
||||
<Content Include="Person\EduTrain\TestPlanView.aspx" />
|
||||
<Content Include="Person\EduTrain\TestRecord.aspx" />
|
||||
<Content Include="Person\EduTrain\TestRecordItem.aspx" />
|
||||
<Content Include="Person\EduTrain\TestRecordPrint.aspx" />
|
||||
<Content Include="Person\EduTrain\TestRecordView.aspx" />
|
||||
<Content Include="Person\EduTrain\TestStatistics.aspx" />
|
||||
<Content Include="Person\EduTrain\TestTraining.aspx" />
|
||||
<Content Include="Person\EduTrain\TestTrainingItemIn.aspx" />
|
||||
<Content Include="Person\EduTrain\TestTrainingItemSave.aspx" />
|
||||
<Content Include="Person\EduTrain\TestTrainingOut.aspx" />
|
||||
<Content Include="Person\EduTrain\TestTrainingSave.aspx" />
|
||||
<Content Include="Person\EduTrain\TestTrainRecord.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainDB.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainFind.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainingItemSave.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainingSave.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainRecord.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainRecordEdit.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainRecordIn.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainRecordView.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainTest.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainTestDB.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainTestDBEdit.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainTestDBSelectCloumn.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainTestItemEdit.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainTestRecord.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainTestRecordEdit.aspx" />
|
||||
<Content Include="Person\EduTrain\TrainTestView.aspx" />
|
||||
<Content Include="Person\PersonCheck.aspx" />
|
||||
<Content Include="Person\PersonChecking.aspx" />
|
||||
<Content Include="Person\PersonCheckingView.aspx" />
|
||||
@@ -12642,6 +12691,20 @@
|
||||
<Compile Include="HSSE\EduTrain\TaskNoticeEdit.aspx.designer.cs">
|
||||
<DependentUpon>TaskNoticeEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\EduTrain\TrainFindWorkPost.aspx.cs">
|
||||
<DependentUpon>TrainFindWorkPost.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\EduTrain\TrainFindWorkPost.aspx.designer.cs">
|
||||
<DependentUpon>TrainFindWorkPost.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\EduTrain\Trainingrecords.aspx.cs">
|
||||
<DependentUpon>Trainingrecords.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\EduTrain\Trainingrecords.aspx.designer.cs">
|
||||
<DependentUpon>Trainingrecords.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\EduTrain\TrainTestRecordEdit.aspx.cs">
|
||||
<DependentUpon>TrainTestRecordEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -13237,6 +13300,13 @@
|
||||
<Compile Include="HSSE\Examine\OnePersonPerFile.aspx.designer.cs">
|
||||
<DependentUpon>OnePersonPerFile.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\StaffHSEInfoArchivesOld.aspx.cs">
|
||||
<DependentUpon>StaffHSEInfoArchivesOld.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\StaffHSEInfoArchivesOld.aspx.designer.cs">
|
||||
<DependentUpon>StaffHSEInfoArchivesOld.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Examine\StaffHSEInfoArchives.aspx.cs">
|
||||
<DependentUpon>StaffHSEInfoArchives.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -15204,6 +15274,13 @@
|
||||
<Compile Include="HSSE\PostTraining\CategoryEdit.aspx.designer.cs">
|
||||
<DependentUpon>CategoryEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\PostTraining\RecordIn.aspx.cs">
|
||||
<DependentUpon>RecordIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\PostTraining\RecordIn.aspx.designer.cs">
|
||||
<DependentUpon>RecordIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\QualityAudit\EquipmentPersonQuality.aspx.cs">
|
||||
<DependentUpon>EquipmentPersonQuality.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -16296,6 +16373,321 @@
|
||||
<Compile Include="Personal\PersonDuty.aspx.designer.cs">
|
||||
<DependentUpon>PersonDuty.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\AccidentCase.aspx.cs">
|
||||
<DependentUpon>AccidentCase.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\AccidentCase.aspx.designer.cs">
|
||||
<DependentUpon>AccidentCase.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\AccidentCaseItemSave.aspx.cs">
|
||||
<DependentUpon>AccidentCaseItemSave.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\AccidentCaseItemSave.aspx.designer.cs">
|
||||
<DependentUpon>AccidentCaseItemSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\AccidentCaseItemSelectCloumn.aspx.cs">
|
||||
<DependentUpon>AccidentCaseItemSelectCloumn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\AccidentCaseItemSelectCloumn.aspx.designer.cs">
|
||||
<DependentUpon>AccidentCaseItemSelectCloumn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\AccidentCaseSave.aspx.cs">
|
||||
<DependentUpon>AccidentCaseSave.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\AccidentCaseSave.aspx.designer.cs">
|
||||
<DependentUpon>AccidentCaseSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\CompanyTraining.aspx.cs">
|
||||
<DependentUpon>CompanyTraining.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\CompanyTraining.aspx.designer.cs">
|
||||
<DependentUpon>CompanyTraining.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\CompanyTrainingItemSave.aspx.cs">
|
||||
<DependentUpon>CompanyTrainingItemSave.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\CompanyTrainingItemSave.aspx.designer.cs">
|
||||
<DependentUpon>CompanyTrainingItemSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\CompanyTrainingSave.aspx.cs">
|
||||
<DependentUpon>CompanyTrainingSave.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\CompanyTrainingSave.aspx.designer.cs">
|
||||
<DependentUpon>CompanyTrainingSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\Plan.aspx.cs">
|
||||
<DependentUpon>Plan.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\Plan.aspx.designer.cs">
|
||||
<DependentUpon>Plan.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\PlanEdit.aspx.cs">
|
||||
<DependentUpon>PlanEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\PlanEdit.aspx.designer.cs">
|
||||
<DependentUpon>PlanEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\PlanView.aspx.cs">
|
||||
<DependentUpon>PlanView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\PlanView.aspx.designer.cs">
|
||||
<DependentUpon>PlanView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\ShowPerson.aspx.cs">
|
||||
<DependentUpon>ShowPerson.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\ShowPerson.aspx.designer.cs">
|
||||
<DependentUpon>ShowPerson.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\Task.aspx.cs">
|
||||
<DependentUpon>Task.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\Task.aspx.designer.cs">
|
||||
<DependentUpon>Task.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TaskNotice.aspx.cs">
|
||||
<DependentUpon>TaskNotice.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TaskNotice.aspx.designer.cs">
|
||||
<DependentUpon>TaskNotice.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TaskNoticeEdit.aspx.cs">
|
||||
<DependentUpon>TaskNoticeEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TaskNoticeEdit.aspx.designer.cs">
|
||||
<DependentUpon>TaskNoticeEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TaskRecordView.aspx.cs">
|
||||
<DependentUpon>TaskRecordView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TaskRecordView.aspx.designer.cs">
|
||||
<DependentUpon>TaskRecordView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TaskView.aspx.cs">
|
||||
<DependentUpon>TaskView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TaskView.aspx.designer.cs">
|
||||
<DependentUpon>TaskView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestPlan.aspx.cs">
|
||||
<DependentUpon>TestPlan.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestPlan.aspx.designer.cs">
|
||||
<DependentUpon>TestPlan.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestPlanView.aspx.cs">
|
||||
<DependentUpon>TestPlanView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestPlanView.aspx.designer.cs">
|
||||
<DependentUpon>TestPlanView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestRecord.aspx.cs">
|
||||
<DependentUpon>TestRecord.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestRecord.aspx.designer.cs">
|
||||
<DependentUpon>TestRecord.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestRecordItem.aspx.cs">
|
||||
<DependentUpon>TestRecordItem.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestRecordItem.aspx.designer.cs">
|
||||
<DependentUpon>TestRecordItem.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestRecordPrint.aspx.cs">
|
||||
<DependentUpon>TestRecordPrint.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestRecordPrint.aspx.designer.cs">
|
||||
<DependentUpon>TestRecordPrint.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestRecordView.aspx.cs">
|
||||
<DependentUpon>TestRecordView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestRecordView.aspx.designer.cs">
|
||||
<DependentUpon>TestRecordView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestStatistics.aspx.cs">
|
||||
<DependentUpon>TestStatistics.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestStatistics.aspx.designer.cs">
|
||||
<DependentUpon>TestStatistics.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTraining.aspx.cs">
|
||||
<DependentUpon>TestTraining.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTraining.aspx.designer.cs">
|
||||
<DependentUpon>TestTraining.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainingItemIn.aspx.cs">
|
||||
<DependentUpon>TestTrainingItemIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainingItemIn.aspx.designer.cs">
|
||||
<DependentUpon>TestTrainingItemIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainingItemSave.aspx.cs">
|
||||
<DependentUpon>TestTrainingItemSave.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainingItemSave.aspx.designer.cs">
|
||||
<DependentUpon>TestTrainingItemSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainingOut.aspx.cs">
|
||||
<DependentUpon>TestTrainingOut.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainingOut.aspx.designer.cs">
|
||||
<DependentUpon>TestTrainingOut.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainingSave.aspx.cs">
|
||||
<DependentUpon>TestTrainingSave.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainingSave.aspx.designer.cs">
|
||||
<DependentUpon>TestTrainingSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainRecord.aspx.cs">
|
||||
<DependentUpon>TestTrainRecord.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TestTrainRecord.aspx.designer.cs">
|
||||
<DependentUpon>TestTrainRecord.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainDB.aspx.cs">
|
||||
<DependentUpon>TrainDB.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainDB.aspx.designer.cs">
|
||||
<DependentUpon>TrainDB.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainFind.aspx.cs">
|
||||
<DependentUpon>TrainFind.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainFind.aspx.designer.cs">
|
||||
<DependentUpon>TrainFind.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainingItemSave.aspx.cs">
|
||||
<DependentUpon>TrainingItemSave.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainingItemSave.aspx.designer.cs">
|
||||
<DependentUpon>TrainingItemSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainingSave.aspx.cs">
|
||||
<DependentUpon>TrainingSave.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainingSave.aspx.designer.cs">
|
||||
<DependentUpon>TrainingSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainRecord.aspx.cs">
|
||||
<DependentUpon>TrainRecord.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainRecord.aspx.designer.cs">
|
||||
<DependentUpon>TrainRecord.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainRecordEdit.aspx.cs">
|
||||
<DependentUpon>TrainRecordEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainRecordEdit.aspx.designer.cs">
|
||||
<DependentUpon>TrainRecordEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainRecordIn.aspx.cs">
|
||||
<DependentUpon>TrainRecordIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainRecordIn.aspx.designer.cs">
|
||||
<DependentUpon>TrainRecordIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainRecordView.aspx.cs">
|
||||
<DependentUpon>TrainRecordView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainRecordView.aspx.designer.cs">
|
||||
<DependentUpon>TrainRecordView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTest.aspx.cs">
|
||||
<DependentUpon>TrainTest.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTest.aspx.designer.cs">
|
||||
<DependentUpon>TrainTest.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestDB.aspx.cs">
|
||||
<DependentUpon>TrainTestDB.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestDB.aspx.designer.cs">
|
||||
<DependentUpon>TrainTestDB.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestDBEdit.aspx.cs">
|
||||
<DependentUpon>TrainTestDBEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestDBEdit.aspx.designer.cs">
|
||||
<DependentUpon>TrainTestDBEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestDBSelectCloumn.aspx.cs">
|
||||
<DependentUpon>TrainTestDBSelectCloumn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestDBSelectCloumn.aspx.designer.cs">
|
||||
<DependentUpon>TrainTestDBSelectCloumn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestItemEdit.aspx.cs">
|
||||
<DependentUpon>TrainTestItemEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestItemEdit.aspx.designer.cs">
|
||||
<DependentUpon>TrainTestItemEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestRecord.aspx.cs">
|
||||
<DependentUpon>TrainTestRecord.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestRecord.aspx.designer.cs">
|
||||
<DependentUpon>TrainTestRecord.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestRecordEdit.aspx.cs">
|
||||
<DependentUpon>TrainTestRecordEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestRecordEdit.aspx.designer.cs">
|
||||
<DependentUpon>TrainTestRecordEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestView.aspx.cs">
|
||||
<DependentUpon>TrainTestView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Person\EduTrain\TrainTestView.aspx.designer.cs">
|
||||
<DependentUpon>TrainTestView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Person\PersonCheck.aspx.cs">
|
||||
<DependentUpon>PersonCheck.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center"/>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:TemplateField Width="120px" HeaderText="作业活动" HeaderTextAlign="Center" TextAlign="Center"
|
||||
SortField="Activities">
|
||||
<ItemTemplate>
|
||||
@@ -99,6 +99,10 @@
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Bind("AccidentReview") %>' ToolTip='<%#Bind("AccidentReview") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="AccidentCaseItemId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/AccidentCase&menuId=D86917DB-D00A-4E18-9793-C290B5BBA84C"
|
||||
HeaderTextAlign="Center">
|
||||
</f:WindowField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
@@ -129,6 +133,9 @@
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window5_Close" IsModal="true"
|
||||
Width="450px" Height="250px" EnableAjax="false">
|
||||
</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" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Hidden="true" Icon="Pencil">
|
||||
|
||||
+13
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class AccidentCase {
|
||||
public partial class AccidentCase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -255,6 +257,15 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window5;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -49,6 +49,11 @@
|
||||
<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" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
@@ -60,6 +65,11 @@
|
||||
</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>
|
||||
|
||||
@@ -167,5 +167,21 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.AccidentCaseItemId))
|
||||
{
|
||||
SaveData();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/AccidentCase&menuId={1}", AccidentCaseItemId, BLL.Const.AccidentCaseMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class AccidentCaseItemSave {
|
||||
public partial class AccidentCaseItemSave
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -93,6 +95,15 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
@@ -119,5 +130,14 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCompileMan;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
ToolTip='<%#Bind("CompanyTrainingItemName") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField ColumnID="WorkPostNames" DataField="WorkPostNames" SortField="WorkPostNames"
|
||||
Width="300px" FieldType="String" HeaderText="适合岗位" HeaderTextAlign="Center" TextAlign="left">
|
||||
</f:RenderField>
|
||||
<%-- <f:TemplateField Width="120px" HeaderText="整理人" HeaderTextAlign="Center" TextAlign="Left" ColumnID="tfCompileMan"
|
||||
SortField="CompileMan">
|
||||
<ItemTemplate>
|
||||
@@ -124,11 +127,11 @@
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="类别" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="600px" Height="400px">
|
||||
Width="700px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="详情" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="true"
|
||||
Width="600px" Height="400px">
|
||||
Width="700px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
|
||||
@@ -184,7 +184,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
string strSql = @"SELECT item.CompanyTrainingItemId,(item.CompanyTrainingItemId+'_'+CAST(row_number() over(order by item.CompanyTrainingItemCode) AS nvarchar(10))) AS CompanyTrainingItemIdNum,"
|
||||
+ @" item.CompanyTrainingItemId,item.CompanyTrainingId,item.CompanyTrainingItemCode,item.CompanyTrainingItemName,A.AttachUrl,"
|
||||
+ @" item.CompileMan, item.CompileDate,dbo.GetFileName(A.AttachUrl) AS AttachUrlName "
|
||||
+ @" item.CompileMan, item.CompileDate,dbo.GetFileName(A.AttachUrl) AS AttachUrlName, "
|
||||
+ @" (CASE WHEN WorkPostNames IS NULL THEN '通用' ELSE WorkPostNames END) AS WorkPostNames "
|
||||
+ @" FROM dbo.Training_CompanyTrainingItem AS item"
|
||||
+ @" LEFT JOIN (SELECT ToKeyId ,F1 as AttachUrl"
|
||||
+ @" FROM AttachFile CROSS APPLY (SELECT * FROM dbo.f_splitstr(AttachUrl,',')) t"
|
||||
|
||||
@@ -16,26 +16,61 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompanyTrainingItemCode" runat="server" Label="编号" Required="true"
|
||||
ShowRedStar="true" FocusOnPageLoad="true" MaxLength="50">
|
||||
ShowRedStar="true" FocusOnPageLoad="true" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompanyTrainingItemName" runat="server" Label="名称" Required="true"
|
||||
<f:TextBox ID="txtCompanyTrainingItemName" runat="server" Label="名称" Required="true" LabelWidth="120px"
|
||||
ShowRedStar="true" MaxLength="50" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompileMan" runat="server" Label="整理人" Readonly="true" MaxLength="50">
|
||||
<f:DropDownBox runat="server" Label="适合岗位" ID="DropDownBox1" LabelWidth="120px"
|
||||
DataControlID="RadioButtonList1" EnableMultiSelect="true">
|
||||
<PopPanel>
|
||||
<f:SimpleForm ID="SimpleForm2" BodyPadding="10px" runat="server" AutoScroll="true"
|
||||
ShowBorder="True" ShowHeader="false" Hidden="true">
|
||||
<Items>
|
||||
<f:Label ID="Label1" runat="server" Text="请选择适合的岗位"></f:Label>
|
||||
<f:CheckBoxList ID="RadioButtonList1" ColumnNumber="3" runat="server">
|
||||
</f:CheckBoxList>
|
||||
</Items>
|
||||
</f:SimpleForm>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="ddTestTraining" Label="考试题库" EnableMultiSelect="true" CustomData="true" LabelWidth="120px">
|
||||
<PopPanel>
|
||||
<f:Tree ID="treeTestTraining" ShowHeader="false" Hidden="true" runat="server" EnableCheckBox="true" CascadeCheck="true">
|
||||
</f:Tree>
|
||||
</PopPanel>
|
||||
<Listeners>
|
||||
<f:Listener Event="poppanelshow" Handler="onPopPanelShow" />
|
||||
</Listeners>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtLearningTime" Label="时长(分钟)" runat="server" DecimalPrecision="0" NoDecimal="true" NoNegative="true" LabelWidth="120px"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCompileMan" runat="server" Label="整理人" Readonly="true" MaxLength="50" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker runat="server" Label="整理时间" ID="txtCompileDate">
|
||||
<f:DatePicker runat="server" Label="整理时间" ID="txtCompileDate" LabelWidth="120px">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
@@ -67,4 +102,46 @@
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
<script>
|
||||
var ddTestTraining = '<%= ddTestTraining.ClientID %>';
|
||||
var treeTestTraining = '<%= treeTestTraining.ClientID %>';
|
||||
|
||||
function onPopPanelShow(event) {
|
||||
var nodes = this.getValue();
|
||||
|
||||
F.noEvent(function () {
|
||||
// 第二个参数true:是否递归调用子节点
|
||||
F(treeTestTraining).checkNodes(nodes, true);
|
||||
|
||||
// 启用树控件的级联选择时,确保把树控件的选中值全部同步到下拉框
|
||||
syncToDropDownBox();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 将树控件的选中值同步到下拉框
|
||||
function syncToDropDownBox() {
|
||||
var values = [], texts = [];
|
||||
var checkedNodes = F(treeTestTraining).getCheckedNodes(true);
|
||||
$.each(checkedNodes, function (index, node) {
|
||||
debugger;
|
||||
values.push(node.id);
|
||||
texts.push(node.text);
|
||||
});
|
||||
|
||||
F(ddTestTraining).setValue(values, texts);
|
||||
}
|
||||
|
||||
F.ready(function () {
|
||||
|
||||
F(treeTestTraining).on('nodecheck', function (event, nodeId, checked) {
|
||||
// 加个延迟,等待复选框的级联选择完成
|
||||
window.setTimeout(function () {
|
||||
syncToDropDownBox();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using System.Linq;
|
||||
using Model;
|
||||
using BLL;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
@@ -46,22 +48,47 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
this.GetButtonPower();
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
BoundTree(treeTestTraining.Nodes, "0");
|
||||
BindEnumrableToDropDownList();
|
||||
this.CompanyTrainingItemId = Request.QueryString["CompanyTrainingItemId"];
|
||||
this.CompanyTrainingId = Request.QueryString["CompanyTrainingId"];
|
||||
if (!string.IsNullOrEmpty(this.CompanyTrainingItemId))
|
||||
{
|
||||
var q = CompanyTrainingItemService.GetCompanyTrainingItemById(this.CompanyTrainingItemId);
|
||||
if (q != null)
|
||||
var model = CompanyTrainingItemService.GetCompanyTrainingItemById(this.CompanyTrainingItemId);
|
||||
if (model != null)
|
||||
{
|
||||
this.CompanyTrainingId = q.CompanyTrainingId;
|
||||
txtCompanyTrainingItemCode.Text = q.CompanyTrainingItemCode;
|
||||
txtCompanyTrainingItemName.Text = q.CompanyTrainingItemName;
|
||||
txtCompileMan.Text = q.CompileMan;
|
||||
hdCompileMan.Text = q.CompileMan;
|
||||
if (q.CompileDate != null)
|
||||
this.CompanyTrainingId = model.CompanyTrainingId;
|
||||
txtCompanyTrainingItemCode.Text = model.CompanyTrainingItemCode;
|
||||
txtCompanyTrainingItemName.Text = model.CompanyTrainingItemName;
|
||||
txtCompileMan.Text = model.CompileMan;
|
||||
hdCompileMan.Text = model.CompileMan;
|
||||
if (!string.IsNullOrEmpty(model.TestTrainingIds))
|
||||
{
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", q.CompileDate);
|
||||
ddTestTraining.Values = model.TestTrainingIds.Split(',');
|
||||
string text = "";
|
||||
var trains = Funs.DB.Training_TestTraining.ToList();
|
||||
foreach (var ids in ddTestTraining.Values)
|
||||
{
|
||||
var t = trains.FirstOrDefault(x => x.TrainingId == ids);
|
||||
if (t != null)
|
||||
{
|
||||
text += "[" + t.TrainingCode + "]" + t.TrainingName + ",";
|
||||
}
|
||||
}
|
||||
ddTestTraining.Text = text.TrimEnd(new char[] { ',' });
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.WorkPostIds))
|
||||
{
|
||||
string[] ids1 = model.WorkPostIds.Split(',');
|
||||
DropDownBox1.Values = ids1;
|
||||
}
|
||||
if (model.LearningTime.HasValue)
|
||||
{
|
||||
txtLearningTime.Text = (model.LearningTime.Value/60).ToString();
|
||||
}
|
||||
if (model.CompileDate != null)
|
||||
{
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", model.CompileDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,39 +104,101 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void BindEnumrableToDropDownList()
|
||||
{
|
||||
List<Model.Base_WorkPost> workPostList = BLL.WorkPostService.GetWorkPostList();
|
||||
RadioButtonList1.DataTextField = "WorkPostName";
|
||||
RadioButtonList1.DataValueField = "WorkPostId";
|
||||
RadioButtonList1.DataSource = workPostList;
|
||||
RadioButtonList1.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
private List<Model.Training_TestTraining> GetNewTraining(string parentId)
|
||||
{
|
||||
return (from x in Funs.DB.Training_TestTraining
|
||||
where x.SupTrainingId == parentId
|
||||
orderby x.TrainingCode
|
||||
select x).ToList();
|
||||
}
|
||||
private void BoundTree(TreeNodeCollection nodes, string parentId)
|
||||
{
|
||||
var dt = GetNewTraining(parentId);
|
||||
if (dt.Count() > 0)
|
||||
{
|
||||
TreeNode tn = null;
|
||||
foreach (var dr in dt)
|
||||
{
|
||||
string name = dr.TrainingName;
|
||||
if (!string.IsNullOrEmpty(dr.TrainingCode))
|
||||
{
|
||||
name = "[" + dr.TrainingCode + "]" + dr.TrainingName;
|
||||
}
|
||||
tn = new TreeNode
|
||||
{
|
||||
|
||||
Text = name,
|
||||
NodeID = dr.TrainingId,
|
||||
EnableClickEvent = true,
|
||||
ToolTip = dr.TrainingName
|
||||
};
|
||||
nodes.Add(tn);
|
||||
///是否存在下级节点
|
||||
var sup = Funs.DB.Training_TestTraining.FirstOrDefault(x => x.SupTrainingId == tn.NodeID);
|
||||
if (sup != null)
|
||||
{
|
||||
BoundTree(tn.Nodes, tn.NodeID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
private void SaveData(bool isClose)
|
||||
{
|
||||
Model.Training_CompanyTrainingItem newCompanyTrainItem = new Training_CompanyTrainingItem
|
||||
Model.Training_CompanyTrainingItem newModel = new Training_CompanyTrainingItem
|
||||
{
|
||||
CompanyTrainingItemCode = this.txtCompanyTrainingItemCode.Text.Trim(),
|
||||
CompanyTrainingItemName = this.txtCompanyTrainingItemName.Text.Trim(),
|
||||
CompileMan = hdCompileMan.Text.Trim()
|
||||
};
|
||||
if (!string.IsNullOrEmpty(DropDownBox1.Text))
|
||||
{
|
||||
newModel.WorkPostIds = String.Join(",", DropDownBox1.Values);
|
||||
newModel.WorkPostNames = String.Join(",", DropDownBox1.Texts);
|
||||
}
|
||||
if (ddTestTraining.Values != null && ddTestTraining.Values.Length > 0)
|
||||
{
|
||||
newModel.TestTrainingIds = string.Join(",", ddTestTraining.Values);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtLearningTime.Text))
|
||||
{
|
||||
newModel.LearningTime = int.Parse(txtLearningTime.Text)*60;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtCompileDate.Text.Trim()))
|
||||
{
|
||||
newCompanyTrainItem.CompileDate = Convert.ToDateTime(txtCompileDate.Text.Trim());
|
||||
newModel.CompileDate = Convert.ToDateTime(txtCompileDate.Text.Trim());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.CompanyTrainingItemId))
|
||||
{
|
||||
newCompanyTrainItem.CompanyTrainingItemId = this.CompanyTrainingItemId;
|
||||
BLL.CompanyTrainingItemService.UpdateCompanyTrainingItem(newCompanyTrainItem);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newCompanyTrainItem.CompanyTrainingItemCode, newCompanyTrainItem.CompanyTrainingItemId,BLL.Const.CompanyTrainingMenuId,BLL.Const.BtnModify);
|
||||
newModel.CompanyTrainingItemId = this.CompanyTrainingItemId;
|
||||
BLL.CompanyTrainingItemService.UpdateCompanyTrainingItem(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.CompanyTrainingItemCode, newModel.CompanyTrainingItemId,BLL.Const.CompanyTrainingMenuId,BLL.Const.BtnModify);
|
||||
}
|
||||
else
|
||||
{
|
||||
newCompanyTrainItem.CompanyTrainingId = this.CompanyTrainingId;
|
||||
newModel.CompanyTrainingId = this.CompanyTrainingId;
|
||||
this.CompanyTrainingItemId = SQLHelper.GetNewID(typeof(Model.Training_CompanyTrainingItem));
|
||||
newCompanyTrainItem.CompanyTrainingItemId = this.CompanyTrainingItemId;
|
||||
BLL.CompanyTrainingItemService.AddCompanyTrainingItem(newCompanyTrainItem);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newCompanyTrainItem.CompanyTrainingItemCode, newCompanyTrainItem.CompanyTrainingItemId, BLL.Const.CompanyTrainingMenuId, BLL.Const.BtnAdd);
|
||||
newModel.CompanyTrainingItemId = this.CompanyTrainingItemId;
|
||||
BLL.CompanyTrainingItemService.AddCompanyTrainingItem(newModel);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newModel.CompanyTrainingItemCode, newModel.CompanyTrainingItemId, BLL.Const.CompanyTrainingMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
if (isClose)
|
||||
{
|
||||
|
||||
+67
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class CompanyTrainingItemSave {
|
||||
public partial class CompanyTrainingItemSave
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -57,6 +59,69 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCompanyTrainingItemName;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownBox1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox DropDownBox1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.SimpleForm SimpleForm2;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// RadioButtonList1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBoxList RadioButtonList1;
|
||||
|
||||
/// <summary>
|
||||
/// ddTestTraining 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox ddTestTraining;
|
||||
|
||||
/// <summary>
|
||||
/// treeTestTraining 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree treeTestTraining;
|
||||
|
||||
/// <summary>
|
||||
/// txtLearningTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtLearningTime;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileMan 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -33,24 +33,33 @@
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtPlanCode" runat="server" Label="编号" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtPlanName" runat="server" Label="标题" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpTrainType" runat="server" Label="培训类型" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpTrainType_SelectedIndexChanged"
|
||||
EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpTrainLevel" runat="server" Label="培训级别" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpTrainLevel" runat="server" Label="培训级别" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
|
||||
<f:TextBox ID="txtTrainContent" runat="server" Label="培训内容" Required="true" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd HH:mm" Label="培训日期" ShowTime="true" Required="true" ShowRedStar="true" ID="dpTrainStartDate" EnableEdit="false">
|
||||
</f:DatePicker>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd HH:mm" Label="培训日期" ShowTime="true" Required="true" ShowRedStar="true" ID="dpTrainEndDate" EnableEdit="false">
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
if (trainingPlan != null)
|
||||
{
|
||||
|
||||
this.txtPlanCode.Text = trainingPlan.PlanCode;
|
||||
this.txtPlanName.Text = trainingPlan.PlanName;
|
||||
this.txtTrainContent.Text = trainingPlan.TrainContent;
|
||||
this.txtTeachMan.Text = trainingPlan.TeachMan;
|
||||
@@ -90,7 +91,7 @@ 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;
|
||||
@@ -103,6 +104,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-";
|
||||
txtPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -260,6 +266,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
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.TeachMan = this.txtTeachMan.Text;
|
||||
trainingPlan.TeachHour =decimal.Parse( this.txtTeachHour.Text);
|
||||
@@ -280,7 +287,10 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
if (string.IsNullOrEmpty(PlanId))
|
||||
{
|
||||
trainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, CurrUser.LoginProjectId, CurrUser.UnitId);
|
||||
//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.PlanId = SQLHelper.GetNewID();
|
||||
TrainingPlanService.AddPlan(trainingPlan);
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainingPlanMenuId, trainingPlan.ProjectId, null, trainingPlan.PlanId, trainingPlan.DesignerDate);
|
||||
@@ -431,7 +441,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
dpSysUser.Items.Clear();
|
||||
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;
|
||||
|
||||
@@ -41,6 +41,15 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPlanCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanName 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -39,11 +39,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT Task.TaskId,Task.PlanId,Task.UserId,Task.TaskDate,(CASE Task.States WHEN '0' THEN '未响应' WHEN '1' THEN '已响应' WHEN '2' THEN '已完成' ELSE '' END) AS States,Plans.PlanName,Person.PersonName"
|
||||
+ @" FROM dbo.Training_Task AS Task "
|
||||
+ @" LEFT JOIN dbo.Training_Plan AS Plans ON Plans.PlanId=Task.PlanId"
|
||||
+ @" LEFT JOIN dbo.SitePerson_Person AS Person ON Person.PersonId = Task.UserId "
|
||||
+ @" WHERE Task.ProjectId='" + this.CurrUser.LoginProjectId + "'";
|
||||
string strSql = @"SELECT Task.TaskId,Task.PlanId,Task.UserId,Task.TaskDate,(CASE Task.States WHEN '0' THEN '未响应' WHEN '1' THEN '已响应' WHEN '2' THEN '已完成' ELSE '' END) AS States,Plans.PlanName,Person.PersonName
|
||||
FROM dbo.Training_Task AS Task
|
||||
LEFT JOIN dbo.Training_Plan AS Plans ON Plans.PlanId=Task.PlanId
|
||||
LEFT JOIN dbo.SitePerson_Person AS Person ON Person.PersonId = Task.UserId
|
||||
WHERE Task.ProjectId='" + this.CurrUser.LoginProjectId + "'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtName.Text.Trim()))
|
||||
{
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
<Columns>
|
||||
<f:RowNumberField ColumnID="rbNumber" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:RenderField Width="120px" ColumnID="TrainingCode" DataField="TrainingCode"
|
||||
<f:RenderField Width="120px" ColumnID="TrainingCode" DataField="TrainingCode" Hidden="true"
|
||||
FieldType="String" HeaderText="类型编号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="TrainingName" DataField="TrainingName"
|
||||
<f:RenderField Width="120px" ColumnID="TrainingName" DataField="TrainingName" Hidden="true"
|
||||
FieldType="String" HeaderText="教材类型" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="TrainingItemCode" DataField="TrainingItemCode"
|
||||
@@ -38,6 +38,27 @@
|
||||
<%--<f:RenderField Width="350px" ColumnID="Summary" DataField="Summary" FieldType="String"
|
||||
HeaderText="教材内容" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>--%>
|
||||
<%-- <f:RenderField Width="200px" ColumnID="LearnTime" DataField="LearnTime" FieldType="String"
|
||||
HeaderText="教材时长(分钟)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>--%>
|
||||
<f:TemplateField ColumnID="tfLearnTime" Width="350px" HeaderText="教材时长(分钟)" HeaderTextAlign="Center"
|
||||
TextAlign="left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblLearnTime" runat="server" Text='<%# ConvertTime(Eval("LearnTime")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField ColumnID="tfVideoProgress" Width="200px" HeaderText="学习时长(分钟)" HeaderTextAlign="Center"
|
||||
TextAlign="left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVideoProgress" runat="server" Text='<%# ConvertTime(Eval("VideoProgress")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
|
||||
<%-- <f:RenderField Width="200px" ColumnID="VideoProgress" DataField="VideoProgress" FieldType="String"
|
||||
HeaderText="学习时长(分钟)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>--%>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
@@ -96,39 +96,16 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var task = BLL.TrainingTaskService.GetTaskById(this.TaskId);
|
||||
if (task != null)
|
||||
{
|
||||
string strSql = @"SELECT PlanItem.PlanItemId,PlanItem.PlanId,PlanItem.TrainingEduId,Training.TrainingCode,Training.TrainingId,Training.TrainingName
|
||||
,TrainingItem.TrainingItemId,TrainingItem.TrainingItemCode,TrainingItem.TrainingItemName
|
||||
FROM Training_PlanItem AS PlanItem
|
||||
LEFT JOIN Training_TrainingItem AS TrainingItem ON PlanItem.TrainingEduItemId =TrainingItem.TrainingItemId
|
||||
LEFT JOIN Training_Training AS Training ON TrainingItem.TrainingId =Training.TrainingId
|
||||
WHERE PlanItem.TrainingEduItemId is not null and PlanItem.PlanId=@PlanId
|
||||
union all
|
||||
SELECT PlanItem.PlanItemId,PlanItem.PlanId,PlanItem.TrainingEduId,Training.CompanyTrainingCode,Training.CompanyTrainingId,Training.CompanyTrainingName
|
||||
,TrainingItem.CompanyTrainingItemId,TrainingItem.CompanyTrainingItemCode,TrainingItem.CompanyTrainingItemName
|
||||
FROM Training_PlanItem AS PlanItem
|
||||
LEFT JOIN Training_CompanyTrainingItem AS TrainingItem ON PlanItem.CompanyTrainingId =TrainingItem.CompanyTrainingId
|
||||
LEFT JOIN Training_CompanyTraining AS Training ON TrainingItem.CompanyTrainingId =Training.CompanyTrainingId
|
||||
WHERE PlanItem.CompanyTrainingId is not null and PlanItem.PlanId=@PlanId";
|
||||
|
||||
string strSql = @"select TrainingItemId,d.TrainingCode,c.TrainingId,d.TrainingName, b.[TrainingItemCode],b.[TrainingItemName],b.LearnTime,b.VideoProgress,b.[AttachUrl], c.TrainingItemCode,c.TrainingItemName from
|
||||
[dbo].[Training_Task] a
|
||||
left join [dbo].[Training_TaskItem] b on a.[TaskId]=b.[TaskId]
|
||||
left join Training_TrainingItem c on b.TrainingItemCode=c.TrainingItemCode
|
||||
LEFT JOIN Training_Training AS d ON c.TrainingId =d.TrainingId
|
||||
where b.[TaskId] = @TaskId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@PlanId", task.PlanId));
|
||||
//var user = BLL.UserService.GetUserByUserId(task.UserId);
|
||||
//if (user != null && !string.IsNullOrEmpty(user.InstallationId))
|
||||
//{
|
||||
// List<string> installs = Funs.GetStrListByStr(user.InstallationId, ',');
|
||||
// if (installs.Count > 0)
|
||||
// {
|
||||
// int i = 0;
|
||||
// foreach (var item in installs)
|
||||
// {
|
||||
// strSql += " AND (TrainingEduItem.InstallationIds LIKE @InstallationId" + i.ToString() + " OR TrainingEduItem.InstallationIds IS NULL)";
|
||||
// listStr.Add(new SqlParameter("@InstallationId" + i.ToString(), item));
|
||||
// i++;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
listStr.Add(new SqlParameter("@TaskId", this.TaskId));
|
||||
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -136,7 +113,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -174,5 +151,30 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TaskRecordView.aspx?TrainingEduItemId={0}", Grid1.SelectedRowID, "编辑 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 格式化字符串
|
||||
/// <summary>
|
||||
/// 获取单位名称
|
||||
/// </summary>
|
||||
/// <param name="unitIds"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertTime(object time)
|
||||
{
|
||||
string hours = "0";
|
||||
if (time != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(time.ToString()))
|
||||
{
|
||||
return (Convert.ToInt32(time) / 60).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return hours;
|
||||
}
|
||||
|
||||
}
|
||||
return hours;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+22
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class TaskView {
|
||||
public partial class TaskView
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -48,6 +50,24 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// lblLearnTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblLearnTime;
|
||||
|
||||
/// <summary>
|
||||
/// lblVideoProgress 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblVideoProgress;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="考试记录" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="TestRecordId" EnableColumnLines="true" DataIDField="TestRecordId" AllowSorting="true"
|
||||
SortField="TestStartTime" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" ForceFit="true"
|
||||
IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Label="查询" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="180px" LabelWidth="60px" LabelAlign="Right">
|
||||
<f:TextBox ID="txtName" runat="server" Label="查询" EmptyText="输入姓名、公司名称、考试计划名称或培训名称" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="400px" LabelWidth="60px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:NumberBox runat="server" ID="txtMinScores" Label="分值范围" AutoPostBack="true" NoNegative="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="180px" LabelWidth="80px" LabelAlign="Right">
|
||||
@@ -55,7 +55,7 @@
|
||||
<f:CheckBox runat="server" Label="时间空" ID="ckIsNULL" AutoPostBack="true"
|
||||
OnCheckedChanged="IsTemp_CheckedChanged" LabelWidth="70px" Width="80px">
|
||||
</f:CheckBox>
|
||||
<f:Label runat="server" Text="红色表示分数低于80分。" CssClass="LabelColor"></f:Label>
|
||||
<f:Label runat="server" ID="lbPassScore" Text="红色表示分数低于80分。" CssClass="LabelColor"></f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnOut" OnClick="btnMenuOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
@@ -24,8 +25,25 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
GetButtonPower();
|
||||
|
||||
var sysTestRule = Funs.DB.Sys_TestRule.FirstOrDefault();
|
||||
if (sysTestRule != null)
|
||||
{
|
||||
if (sysTestRule.PassingScore > 0)
|
||||
{
|
||||
this.lbPassScore.Text = "红色表示分数低于" + sysTestRule.PassingScore.ToString() + "分。";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lbPassScore.Text = "红色表示分数低于80分。";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lbPassScore.Text = "红色表示分数低于80分。";
|
||||
|
||||
|
||||
}
|
||||
|
||||
///更新没有结束时间且超时的考试记录
|
||||
GetDataService.UpdateTestPlanStates();
|
||||
// 绑定表格
|
||||
@@ -56,11 +74,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
+ @" LEFT JOIN dbo.Training_TestTraining AS Training ON Training.TrainingId = TestRecord.TestType"
|
||||
+ @" LEFT JOIN dbo.SitePerson_Person AS Person ON Person.PersonId = TestRecord.TestManId "
|
||||
+ @" LEFT JOIN dbo.Base_Unit AS Unit ON Person.UnitId=Unit.UnitId"
|
||||
+ @" WHERE (isFiled IS NULL OR isFiled = 0) and TestRecord.ProjectId = '" + this.CurrUser.LoginProjectId+"'";
|
||||
+ @" WHERE TestRecord.TestStartTime is not null and (isFiled IS NULL OR isFiled = 0) and TestRecord.ProjectId = '" + this.CurrUser.LoginProjectId+"'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND (Person.PersonName LIKE @name OR TestPlan.PlanName LIKE @name OR Training.TrainingName LIKE @name)";
|
||||
strSql += " AND (Person.PersonName LIKE @name OR TestPlan.PlanName LIKE @name OR Training.TrainingName LIKE @name OR Unit.UnitName like @name)";
|
||||
listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtMinScores.Text.Trim()))
|
||||
|
||||
+13
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class TestRecord {
|
||||
public partial class TestRecord
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -120,6 +122,15 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckIsNULL;
|
||||
|
||||
/// <summary>
|
||||
/// lbPassScore 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbPassScore;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Label="查询" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="350px" LabelWidth="80px" LabelAlign="Right">
|
||||
|
||||
</f:TextBox>
|
||||
|
||||
<f:CheckBox ID="cbNoPass" Text="<70"></f:CheckBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
</Items>
|
||||
@@ -50,8 +53,8 @@
|
||||
<f:RenderField Width="120px" ColumnID="TestCount" DataField="TestCount" SortField="TestCount"
|
||||
HeaderText="参加次数" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="TestQualifyCount" DataField="TestQualifyCount" SortField="TestQualifyCount"
|
||||
HeaderText="60分以上" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<f:RenderField Width="120px" ID="TestQualifyCount" ColumnID="TestQualifyCount" DataField="TestQualifyCount" SortField="TestQualifyCount"
|
||||
HeaderText="70分以上" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
@@ -20,6 +22,13 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
var sysTestRule = Funs.DB.Sys_TestRule.FirstOrDefault();
|
||||
var passingScore = "60";
|
||||
if (sysTestRule != null)
|
||||
{
|
||||
passingScore = sysTestRule.PassingScore.ToString();
|
||||
}
|
||||
TestQualifyCount.HeaderText = passingScore + "分以上";
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
@@ -37,6 +46,12 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var sysTestRule = Funs.DB.Sys_TestRule.FirstOrDefault();
|
||||
var passingScore = "60";
|
||||
if (sysTestRule != null)
|
||||
{
|
||||
passingScore = sysTestRule.PassingScore.ToString();
|
||||
}
|
||||
string strSql = @"SELECT PersonId,CardNo,PersonName,person.UnitId,Unit.UnitCode,Unit.UnitName,person.DepartId,Depart.DepartCode,Depart.DepartName"
|
||||
+ @",WorkPostName,ISNULL(TestCount,0) AS TestCount,ISNULL(TestQualifyCount,0) AS TestQualifyCount "
|
||||
+ @" FROM SitePerson_Person AS person "
|
||||
@@ -45,7 +60,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
+ @" LEFT JOIN Base_Depart AS Depart ON person.DepartId=Depart.DepartId"
|
||||
+ @" LEFT JOIN (SELECT COUNT(TestRecordId) AS TestCount,TestManId FROM Training_TestRecord GROUP BY TestManId) AS TestCount"
|
||||
+ @" ON person.PersonId=TestCount.TestManId"
|
||||
+ @" LEFT JOIN (SELECT COUNT(TestRecordId) AS TestQualifyCount,TestManId FROM Training_TestRecord WHERE TestScores>= 60 GROUP BY TestManId) AS TestQualifyCount"
|
||||
+ @" LEFT JOIN (SELECT COUNT(TestRecordId) AS TestQualifyCount,TestManId FROM Training_TestRecord WHERE TestScores>= "+ passingScore + " GROUP BY TestManId) AS TestQualifyCount"
|
||||
+ @" ON person.PersonId=TestQualifyCount.TestManId"
|
||||
+ @" WHERE PersonId <> '" + BLL.Const.sysglyId + "' and person.projectid='" + this.CurrUser.LoginProjectId + "'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
@@ -54,7 +69,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
strSql += " AND (PersonName LIKE @name OR CardNo LIKE @name OR Unit.UnitName LIKE @name OR Depart.DepartName LIKE @name OR WorkPostName LIKE @name)";
|
||||
listStr.Add(new SqlParameter("@name", "%" + this.txtName.Text.Trim() + "%"));
|
||||
}
|
||||
if (cbNoPass.Checked)
|
||||
{
|
||||
strSql += " AND TestScores < "+ passingScore;
|
||||
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class TestStatistics {
|
||||
public partial class TestStatistics
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -66,6 +68,15 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// cbNoPass 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox cbNoPass;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -75,6 +86,15 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// TestQualifyCount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RenderField TestQualifyCount;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainFindWorkPost.aspx.cs" Inherits="FineUIPro.Web.HSSE.EduTrain.TrainFindWorkPost" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head id="Head1" 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" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
<f:Panel runat="server" ID="panel2" RegionPosition="Left" RegionSplit="true"
|
||||
Layout="HBox" EnableCollapse="true" Width="220" Title="培训岗位" TitleToolTip="培训岗位"
|
||||
ShowBorder="true" ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<Items>
|
||||
<f:Tree ID="trWorkPost" EnableCollapse="true" ShowHeader="false" ShowBorder="false"
|
||||
EnableIcons="true" Title="培训岗位" OnNodeCommand="trWorkPost_NodeCommand"
|
||||
AutoLeafIdentification="true" AutoScroll="true" runat="server" EnableTextSelection="True"
|
||||
EnableSingleClickExpand="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="人员培训查询"
|
||||
TitleToolTip="人员培训查询" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="人员培训查询" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true" SortField="CardNo" SortDirection="ASC"
|
||||
EnableColumnLines="true" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" ForceFit="true"
|
||||
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:CheckBoxList runat="server" ID="cbIssue" ShowLabel="false" Width="150px" LabelAlign="Right"
|
||||
OnSelectedIndexChanged="Text_OnTextChanged" AutoPostBack="true">
|
||||
<f:CheckItem Text="不合格" Value="0" />
|
||||
<f:CheckItem Text="合格" Value="1" Selected="true" />
|
||||
</f:CheckBoxList>
|
||||
<f:TextBox ID="txtPersonName" runat="server" Label="姓名"
|
||||
AutoPostBack="true" OnTextChanged="Text_OnTextChanged" LabelWidth="50px" Width="150px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="Text_OnTextChanged" LabelWidth="50px" Width="250px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtTeachMan" runat="server" Label="授课人" LabelAlign="right" AutoPostBack="true"
|
||||
OnTextChanged="Text_OnTextChanged" LabelWidth="70px" Width="140px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpTrainType" Label="类别" LabelAlign="right" EnableEdit="true"
|
||||
runat="server" AutoPostBack="true" OnSelectedIndexChanged="Text_OnTextChanged" LabelWidth="50px" Width="180px">
|
||||
</f:DropDownList>
|
||||
<f:NumberBox ID="txtDurations" runat="server" Label="时长" AutoPostBack="true" OnTextChanged="Text_OnTextChanged"
|
||||
LabelWidth="50px" Width="150px">
|
||||
</f:NumberBox>
|
||||
|
||||
<%-- <f:DropDownList ID="drpTrainLevel" runat="server" Label="级别" Width="150px" LabelWidth="50px" LabelAlign="Right"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="Text_OnTextChanged">
|
||||
</f:DropDownList>--%>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="labNumber" runat="server" Text=' <%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="90px" ColumnID="CardNo" DataField="CardNo" SortField="CardNo"
|
||||
FieldType="String" HeaderText="卡号" EnableFilter="true" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="PersonName" DataField="PersonName" SortField="PersonName"
|
||||
FieldType="String" HeaderText="姓名" EnableFilter="true" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="240px" ColumnID="tfUnitName" HeaderText="所属单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbUnitName" runat="server" Text='<%# Bind("UnitName") %>' ToolTip='<%#Bind("UnitName") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField Width="100px" ColumnID="tfWorkPostName" HeaderText="岗位名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbWorkPostName" runat="server" Text='<%# Bind("WorkPostName") %>' ToolTip='<%#Bind("WorkPostName") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField Width="130px" ColumnID="tfTrainTitle" HeaderText="培训标题" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbTrainTitle" runat="server" Text='<%# Bind("TrainTitle") %>' ToolTip='<%#Bind("TrainTitle") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField Width="120px" ColumnID="tfTrainTypeName" HeaderText="培训类别" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbTrainTypeName" runat="server" Text='<%# Bind("TrainTypeName") %>' ToolTip='<%#Bind("TrainTypeName") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<%-- <f:TemplateField Width="80px" ColumnID="tfTrainLevelName" HeaderText="培训级别" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbTrainLevelName" runat="server" Text='<%# Bind("TrainLevelName") %>' ToolTip='<%#Bind("TrainLevelName") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField> --%>
|
||||
<f:RenderField Width="100px" ColumnID="TrainStartDate" DataField="TrainStartDate"
|
||||
SortField="TrainStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="培训日期" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="70px" ColumnID="TeachHour" DataField="TeachHour" SortField="TeachHour"
|
||||
FieldType="Float" HeaderText="学时" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="TeachMan" DataField="TeachMan" SortField="TeachMan"
|
||||
FieldType="String" HeaderText="授课人" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="CheckScore" DataField="CheckScore" SortField="CheckScore"
|
||||
FieldType="String" HeaderText="分数" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
<f:TemplateField Width="80px" ColumnID="tfCheckResult" HeaderText="考核结果" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbCheckResult" runat="server" Text='<%# ConvertCheckResult(Eval("CheckResult")) %>'
|
||||
ToolTip='<%# ConvertCheckResult(Eval("CheckResult")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField Width="100px" ColumnID="tfSumDurations" HeaderText="总时长(分钟)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# getSumDurations(Eval("PlanId")) %>' ToolTip='<%#getSumDurations(Eval("PlanId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="Durations" DataField="Durations" SortField="Durations"
|
||||
FieldType="String" HeaderText="学习时长(分钟)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件"
|
||||
Text="附件" ToolTip="附件上传查看" DataIFrameUrlFields="TaskId" DataIFrameUrlFormatString="../..//AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafetyInstitutionAttachUrl"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
<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,449 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
public partial class TrainFindWorkPost : PageBase
|
||||
{
|
||||
#region 项目主键
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string UnitId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
|
||||
//单位
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnitId.Enabled = false;
|
||||
}
|
||||
//培训类型
|
||||
BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
|
||||
//培训级别;
|
||||
//BLL.TrainLevelService.InitTrainLevelDropDownList(this.drpTrainLevel, true);
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
InitTreeMenu();
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
// this.Grid1.Columns[0].Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
//新增UnitId
|
||||
this.UnitId = this.ucTree.UnitId;
|
||||
//判断 当有projectId的时候单位id为空
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.UnitId = "";
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.ProjectId) || !string.IsNullOrEmpty(this.UnitId)) //项目数据
|
||||
{
|
||||
string strSql = @"SELECT NEWID() AS ID, CardNo,PersonName,ProjectId,UnitId,UnitName,WorkPostName,TrainTitle ,TrainStartDate,TrainEndDate,TrainTypeId,TeachHour,TrainTypeName,CheckScore,CheckResult,TeachMan,UnitType,TrainLevelName" +
|
||||
@",(round(isnull(Durations,0)/60,2)) as Durations,PlanId,PersonId,TaskId" +
|
||||
@" FROM dbo.View_EduTrain_TrainFind" +
|
||||
@" WHERE 1=1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(ProjectId))
|
||||
{
|
||||
strSql += " AND ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", ProjectId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(UnitId))
|
||||
{
|
||||
strSql += " AND UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", UnitId));
|
||||
}
|
||||
if (trWorkPost.SelectedNode!=null)
|
||||
{
|
||||
strSql += " AND WorkPostName = @WorkPostName";
|
||||
listStr.Add(new SqlParameter("@WorkPostName", trWorkPost.SelectedNode.Text));
|
||||
}
|
||||
var ssss = trWorkPost.SelectedNode;
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND PersonName LIKE @PersonName";
|
||||
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
|
||||
}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND UnitId = @UnitIds";
|
||||
listStr.Add(new SqlParameter("@UnitIds", this.drpUnitId.SelectedValue.Trim()));
|
||||
}
|
||||
if (this.drpTrainType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND TrainTypeId = @TrainTypeId";
|
||||
listStr.Add(new SqlParameter("@TrainTypeId", this.drpTrainType.SelectedValue.Trim()));
|
||||
}
|
||||
//if (this.drpTrainLevel.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// strSql += " AND TrainLevelId = @TrainLevel";
|
||||
// listStr.Add(new SqlParameter("@TrainLevel", this.drpTrainLevel.SelectedValue));
|
||||
//}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtTeachMan.Text.Trim()))
|
||||
{
|
||||
strSql += " AND TeachMan LIKE @TeachMan";
|
||||
listStr.Add(new SqlParameter("@TeachMan", "%" + this.txtTeachMan.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
if (this.cbIssue.SelectedValueArray.Length == 1)
|
||||
{
|
||||
///是否通过
|
||||
string selectValue = String.Join(", ", this.cbIssue.SelectedValueArray);
|
||||
if (selectValue == "1")
|
||||
{
|
||||
strSql += " AND CheckResult = 1 ";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND (CheckResult = 0 OR CheckResult IS NULL) ";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtDurations.Text.Trim()))
|
||||
{
|
||||
strSql += " AND round(isnull(Durations,0)/60,2) = @Durations";
|
||||
listStr.Add(new SqlParameter("@Durations", this.txtDurations.Text.Trim()));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 加载树
|
||||
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.trWorkPost.Nodes.Clear();
|
||||
TreeNode rootNode = new TreeNode
|
||||
{
|
||||
Text = "培训岗位",
|
||||
NodeID = "0",
|
||||
Expanded = true
|
||||
};
|
||||
this.trWorkPost.Nodes.Add(rootNode);
|
||||
BoundTree(rootNode.Nodes);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
/// <param name="nodes"></param>
|
||||
/// <param name="menuId"></param>
|
||||
private void BoundTree(TreeNodeCollection nodes)
|
||||
{
|
||||
var postLists = BLL.WorkPostService.GetWorkPostList();
|
||||
if (postLists.Count() > 0)
|
||||
{
|
||||
|
||||
TreeNode tn = null;
|
||||
foreach (var dr in postLists)
|
||||
{
|
||||
tn = new TreeNode();
|
||||
tn.Text = dr.WorkPostName;
|
||||
tn.NodeID = dr.WorkPostId;
|
||||
tn.EnableClickEvent = true;
|
||||
tn.ToolTip = dr.WorkPostName;
|
||||
nodes.Add(tn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Tree点击事件
|
||||
|
||||
/// <summary>
|
||||
/// Tree点击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void trWorkPost_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 页索引改变事件
|
||||
/// <summary>
|
||||
/// 页索引改变事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 排序
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页选择下拉改变事件
|
||||
/// <summary>
|
||||
/// 分页选择下拉改变事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Text_OnTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 转换字符串
|
||||
/// <summary>
|
||||
/// 考核结果
|
||||
/// </summary>
|
||||
/// <param name="checkResult"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertCheckResult(object checkResult)
|
||||
{
|
||||
if (checkResult != null)
|
||||
{
|
||||
if (checkResult.ToString() == "True")
|
||||
{
|
||||
return "合格";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "不合格";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
#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 = 500;
|
||||
BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
#pragma warning disable CS0108 // “TrainFind.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
#pragma warning restore CS0108 // “TrainFind.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
{
|
||||
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("labNumber") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfUnitName")
|
||||
{
|
||||
html = (row.FindControl("lbUnitName") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfWorkPostName")
|
||||
{
|
||||
html = (row.FindControl("lbWorkPostName") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfTrainTypeName")
|
||||
{
|
||||
html = (row.FindControl("lbTrainTypeName") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfTrainLevelName")
|
||||
{
|
||||
html = (row.FindControl("lbTrainLevelName") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfTrainTitle")
|
||||
{
|
||||
html = (row.FindControl("lbTrainTitle") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfCheckResult")
|
||||
{
|
||||
html = (row.FindControl("lbCheckResult") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfI")
|
||||
{
|
||||
html = "'" + (row.FindControl("lbI") as AspNet.Label).Text;
|
||||
}
|
||||
sb.AppendFormat("<td>{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取任务id
|
||||
protected string getTaskId(object ProjectId, object PersonId, object PlanId)
|
||||
{
|
||||
var TaskId = "";
|
||||
if (ProjectId != null && PersonId != null && PlanId != null)
|
||||
{
|
||||
var model = Funs.DB.Training_Task.FirstOrDefault(x => x.PlanId == PlanId.ToString() &&
|
||||
x.UserId == PersonId.ToString() && x.ProjectId == ProjectId.ToString());
|
||||
if (model != null)
|
||||
{
|
||||
TaskId = model.TaskId;
|
||||
}
|
||||
}
|
||||
return TaskId;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取总时长
|
||||
protected string getSumDurations(object planId)
|
||||
{
|
||||
double? sumDurations = 0.0;
|
||||
if (planId != null)
|
||||
{
|
||||
var planItemList = Funs.DB.Training_PlanItem.Where(x => x.PlanId == planId.ToString()).ToList();
|
||||
if (planItemList.Count > 0)
|
||||
{
|
||||
foreach (var item in planItemList)
|
||||
{
|
||||
var CompanyTrainingItemModel = Funs.DB.Training_CompanyTrainingItem.FirstOrDefault(x => x.CompanyTrainingItemId == item.CompanyTrainingItemId);
|
||||
if (CompanyTrainingItemModel.Durations != null)
|
||||
{
|
||||
sumDurations += CompanyTrainingItemModel.Durations;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return sumDurations.ToString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,296 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainFindWorkPost
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Head1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||
|
||||
/// <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>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panel2;
|
||||
|
||||
/// <summary>
|
||||
/// trWorkPost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree trWorkPost;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// cbIssue 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBoxList cbIssue;
|
||||
|
||||
/// <summary>
|
||||
/// txtPersonName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPersonName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitId;
|
||||
|
||||
/// <summary>
|
||||
/// txtTeachMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTeachMan;
|
||||
|
||||
/// <summary>
|
||||
/// drpTrainType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTrainType;
|
||||
|
||||
/// <summary>
|
||||
/// txtDurations 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtDurations;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// labNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||
|
||||
/// <summary>
|
||||
/// lbUnitName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbUnitName;
|
||||
|
||||
/// <summary>
|
||||
/// lbWorkPostName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbWorkPostName;
|
||||
|
||||
/// <summary>
|
||||
/// lbTrainTitle 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbTrainTitle;
|
||||
|
||||
/// <summary>
|
||||
/// lbTrainTypeName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbTrainTypeName;
|
||||
|
||||
/// <summary>
|
||||
/// lbCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <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>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainRecord.aspx.cs" Inherits="FineUIPro.Web.HSSE.EduTrain.TrainRecord" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
@@ -9,8 +10,20 @@
|
||||
<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">
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训记录" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="TrainingId" EnableColumnLines="true" DataIDField="TrainingId" AllowSorting="true"
|
||||
@@ -21,6 +34,10 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Label="查询" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="Text_TextChanged" Width="180px" LabelWidth="60px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="Text_TextChanged"
|
||||
LabelAlign="Right" LabelWidth="50px" Width="260px">
|
||||
</f:DropDownList>
|
||||
@@ -39,12 +56,12 @@
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click">
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click" Text="新增">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:Button ID="btnRefresh" ToolTip="刷明细" Icon="ArrowRefresh" runat="server" Hidden="true" OnClick="btnRefresh_Click">
|
||||
<f:Button ID="btnRefresh" ToolTip="刷明细" Icon="ArrowRefresh" runat="server" Hidden="true" OnClick="btnRefresh_Click" Text="刷新明细">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -90,18 +107,10 @@
|
||||
<f:RenderField Width="90px" ColumnID="TeachMan" DataField="TeachMan" SortField="TeachMan"
|
||||
FieldType="String" HeaderText="授课人" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="80px" ColumnID="TeachMan" DataField="TeachMan"
|
||||
SortField="TeachMan" FieldType="String" HeaderText="授课人" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="TrainPersonNum" DataField="TrainPersonNum"
|
||||
SortField="TrainPersonNum" FieldType="String" HeaderText="人数" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="FlowOperateName" DataField="FlowOperateName"
|
||||
SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
@@ -116,6 +125,9 @@
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="编制培训记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
public partial class TrainRecord : PageBase
|
||||
{
|
||||
private static string trainType;
|
||||
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 培训记录主键
|
||||
@@ -27,6 +29,29 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
ViewState["TrainingId"] = value;
|
||||
}
|
||||
}
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string UnitId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
@@ -39,6 +64,15 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
@@ -48,6 +82,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||
//培训类型
|
||||
BLL.TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
|
||||
trainType = Request.Params["trainType"];
|
||||
if (!string.IsNullOrEmpty(trainType))
|
||||
{
|
||||
this.drpTrainType.Items.FindByText(trainType).Selected = true;
|
||||
}
|
||||
//培训级别;
|
||||
BLL.TrainLevelService.InitTrainLevelDropDownList(this.drpTrainLevel, true);
|
||||
|
||||
@@ -58,21 +97,44 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
this.btnRefresh.Hidden = false;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
// this.Grid1.Columns[0].Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
//新增UnitId
|
||||
this.UnitId = this.ucTree.UnitId;
|
||||
//判断 当有projectId的时候单位id为空
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.UnitId = "";
|
||||
}
|
||||
this.BindGrid();
|
||||
this.GetButtonPower();
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string projectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
projectId = Request.Params["projectId"];
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
if (!string.IsNullOrEmpty(this.ProjectId) || !string.IsNullOrEmpty(this.UnitId)) //项目数据
|
||||
{
|
||||
|
||||
string strSql = "select TrainRecord.TrainingId"
|
||||
+ @",TrainRecord.TrainTitle"
|
||||
+ @",TrainType.TrainTypeName,TrainLevel.TrainLevelName"
|
||||
@@ -92,8 +154,25 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
+ @" LEFT JOIN Base_TrainLevel AS TrainLevel ON TrainRecord.TrainLevelId=TrainLevel.TrainLevelId "
|
||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON TrainRecord.TrainingId=CodeRecords.DataId WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(txtName.Text))
|
||||
{
|
||||
strSql += " AND TrainRecord.TrainTitle LIKE @TrainTitle";
|
||||
listStr.Add(new SqlParameter("@TrainTitle", "%" + this.txtName.Text + "%"));
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
strSql += " AND TrainRecord.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", projectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(UnitId))
|
||||
{
|
||||
strSql += " AND TrainRecord.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", UnitId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
strSql += " AND TrainRecord.States = @States"; ///状态为已完成
|
||||
@@ -119,16 +198,18 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
strSql += " AND TrainRecord.TrainStartDate <= @EndDate ";
|
||||
listStr.Add(new SqlParameter("@EndDate", this.txtEndDate.Text.Trim()));
|
||||
}
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId))
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
strSql += " AND TrainRecord.UnitIds LIKE @UnitId1";
|
||||
listStr.Add(new SqlParameter("@UnitId1", "%" + this.CurrUser.UnitId + "%"));
|
||||
}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND TrainRecord.UnitIds LIKE @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", "%" + this.drpUnitId.SelectedValue.Trim() + "%"));
|
||||
strSql += " AND TrainRecord.UnitIds LIKE @UnitIds";
|
||||
listStr.Add(new SqlParameter("@UnitIds", "%" + this.drpUnitId.SelectedValue.Trim() + "%"));
|
||||
}
|
||||
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
@@ -150,6 +231,95 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
};
|
||||
|
||||
Grid1.SummaryData = summary;
|
||||
|
||||
|
||||
}
|
||||
#region 2023-6-27 15:03:28修改废弃代码
|
||||
//else //公司级数据
|
||||
//{
|
||||
|
||||
// string strSql = "select TrainRecord.TrainingId"
|
||||
// + @",TrainRecord.TrainTitle"
|
||||
// + @",TrainType.TrainTypeName,TrainLevel.TrainLevelName"
|
||||
// + @",TrainRecord.TrainStartDate"
|
||||
// + @",TrainRecord.TrainEndDate"
|
||||
// + @",TrainRecord.TeachHour"
|
||||
// + @",TrainRecord.TeachMan"
|
||||
// + @",TrainRecord.TrainPersonNum"
|
||||
// + @",TrainingCode"
|
||||
// // + @",CodeRecords.Code AS TrainingCode"
|
||||
// + @",(CASE WHEN TrainRecord.States = " + BLL.Const.State_0 + " OR TrainRecord.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN TrainRecord.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
// + @",TrainRecord.UnitIds"
|
||||
// + @" from EduTrain_TrainRecord AS TrainRecord "
|
||||
// + @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON TrainRecord.TrainingId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
||||
// + @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId "
|
||||
// + @" LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId "
|
||||
// + @" LEFT JOIN Base_TrainLevel AS TrainLevel ON TrainRecord.TrainLevelId=TrainLevel.TrainLevelId "
|
||||
// + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON TrainRecord.TrainingId=CodeRecords.DataId WHERE 1=1 ";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
// if (!string.IsNullOrEmpty(ProjectId))
|
||||
// {
|
||||
// strSql += " AND (TrainRecord.ProjectId = '' or TrainRecord.ProjectId is null) ";
|
||||
// //listStr.Add(new SqlParameter("@ProjectId", ProjectId));
|
||||
// }
|
||||
|
||||
|
||||
// if (this.drpTrainType.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// strSql += " AND TrainRecord.TrainTypeId = @TrainType";
|
||||
// listStr.Add(new SqlParameter("@TrainType", this.drpTrainType.SelectedValue));
|
||||
// }
|
||||
// if (this.drpTrainLevel.SelectedValue != BLL.Const._Null)
|
||||
// {
|
||||
// strSql += " AND TrainRecord.TrainLevelId = @TrainLevel";
|
||||
// listStr.Add(new SqlParameter("@TrainLevel", this.drpTrainLevel.SelectedValue));
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim()))
|
||||
// {
|
||||
// strSql += " AND TrainRecord.TrainStartDate >= @StartDate ";
|
||||
// listStr.Add(new SqlParameter("@StartDate", this.txtStartDate.Text.Trim()));
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
|
||||
// {
|
||||
// strSql += " AND TrainRecord.TrainStartDate <= @EndDate ";
|
||||
// listStr.Add(new SqlParameter("@EndDate", this.txtEndDate.Text.Trim()));
|
||||
// }
|
||||
// if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId))
|
||||
// {
|
||||
// strSql += " AND TrainRecord.UnitIds LIKE @UnitId1";
|
||||
// listStr.Add(new SqlParameter("@UnitId1", "%" + this.CurrUser.UnitId + "%"));
|
||||
// }
|
||||
// strSql += " AND TrainRecord.UnitIds LIKE @UnitId";
|
||||
// listStr.Add(new SqlParameter("@UnitId", "%" + this.ucTree.UnitId.Trim() + "%"));
|
||||
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// Grid1.RecordCount = tb.Rows.Count;
|
||||
// //tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
// var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
// Grid1.DataSource = table;
|
||||
// Grid1.DataBind();
|
||||
// int totalPersonNum = 0;
|
||||
// for (int i = 0; i < tb.Rows.Count; i++)
|
||||
// {
|
||||
// totalPersonNum += Funs.GetNewIntOrZero(tb.Rows[i][8].ToString());
|
||||
// }
|
||||
|
||||
// JObject summary = new JObject
|
||||
// {
|
||||
// { "TeachMan", "合计:" },
|
||||
// { "TrainPersonNum", totalPersonNum }
|
||||
// };
|
||||
|
||||
// Grid1.SummaryData = summary;
|
||||
//}
|
||||
#endregion
|
||||
string projectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
projectId = Request.Params["projectId"];
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -186,7 +356,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Funs.GetNewIntOrZero(this.ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
@@ -199,7 +368,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainRecordEdit.aspx", "编辑 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainRecordEdit.aspx?trainType={0}", trainType, "编辑 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -238,7 +407,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
var trainRecord = EduTrain_TrainRecordService.GetTrainingByTrainingId(TrainingId);
|
||||
if (trainRecord != null)
|
||||
{
|
||||
if (this.btnMenuEdit.Hidden || trainRecord.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TrainRecordView.aspx?TrainingId={0}", TrainingId, "查看 - ")));
|
||||
}
|
||||
@@ -288,6 +457,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
}
|
||||
}
|
||||
}
|
||||
// Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.EducationAndTraining);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,11 +506,15 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectTrainRecordMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectTrainRecordMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
@@ -506,8 +681,12 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
/// <param name="e"></param>
|
||||
protected void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var getTrainRecords = from x in Funs.DB.EduTrain_TrainRecord
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.PlanId != null
|
||||
where x.ProjectId == this.ProjectId && x.PlanId != null
|
||||
select x;
|
||||
if (getTrainRecords.Count() > 0)
|
||||
{
|
||||
@@ -602,7 +781,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
foreach (var item in getTestPlanStates)
|
||||
{
|
||||
////TODO 讲培训计划 考试记录 写入到培训记录
|
||||
BLL. APITrainRecordService.InsertTrainRecord(item);
|
||||
BLL.APITrainRecordService.InsertTrainRecord(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+49
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainRecord {
|
||||
public partial class TrainRecord
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -39,6 +41,42 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -57,6 +95,15 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitId 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -189,6 +189,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
//培训类型
|
||||
TrainTypeService.InitTrainTypeDropDownList(this.drpTrainType, true);
|
||||
string trainType = Request.Params["trainType"];
|
||||
if (!string.IsNullOrWhiteSpace(trainType))
|
||||
{
|
||||
this.drpTrainType.Items.FindByText(trainType).Selected = true;
|
||||
}
|
||||
//培训级别
|
||||
TrainLevelService.InitTrainLevelDropDownList(this.drpTrainLevel, true);
|
||||
//培训单位
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtLearningTime" Label="时长" runat="server" DecimalPrecision="0" NoDecimal="true" NoNegative="true" ></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
|
||||
@@ -58,6 +58,10 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
txtTrainingItemName.Text = q.TrainingItemName;
|
||||
txtCompileMan.Text = q.CompileMan;
|
||||
hdCompileMan.Text = q.CompileMan;
|
||||
if (q.LearningTime.HasValue)
|
||||
{
|
||||
txtLearningTime.Text = q.LearningTime.Value.ToString();
|
||||
}
|
||||
if (q.CompileDate != null)
|
||||
{
|
||||
txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", q.CompileDate);
|
||||
@@ -95,7 +99,12 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||
TrainingItemName = txtTrainingItemName.Text.Trim(),
|
||||
CompileMan = hdCompileMan.Text.Trim(),
|
||||
UnitId = this.CurrUser.UnitId
|
||||
|
||||
};
|
||||
if (!string.IsNullOrEmpty(this.txtLearningTime.Text))
|
||||
{
|
||||
trainingItem.LearningTime = int.Parse(this.txtLearningTime.Text);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtCompileDate.Text.Trim()))
|
||||
{
|
||||
trainingItem.CompileDate = Convert.ToDateTime(txtCompileDate.Text.Trim());
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainingItemSave {
|
||||
public partial class TrainingItemSave
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -75,6 +77,15 @@ namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtLearningTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtLearningTime;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain {
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class TrainingSave {
|
||||
public partial class TrainingSave
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Trainingrecords.aspx.cs" Inherits="FineUIPro.Web.HSSE.EduTrain.Trainingrecords" %>
|
||||
|
||||
<!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" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训记录" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="TaskItemId" EnableColumnLines="true" DataIDField="TaskItemId" AllowSorting="true"
|
||||
AllowPaging="true" ForceFit="true"
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true"
|
||||
EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Label="姓名" LabelAlign="Right" LabelWidth="80px" AutoPostBack="true" OnTextChanged="Text_TextChanged"></f:TextBox>
|
||||
|
||||
<f:DatePicker ID="txtStartDate" runat="server" Label="培训日期" Width="300px" LabelWidth="100px" LabelAlign="Right"
|
||||
AutoPostBack="true" OnTextChanged="Text_TextChanged">
|
||||
</f:DatePicker>
|
||||
<f:Label ID="lblTo" runat="server" Text="至" Width="20px">
|
||||
</f:Label>
|
||||
<f:DatePicker ID="txtEndDate" runat="server" Width="200px" AutoPostBack="true" OnTextChanged="Text_TextChanged">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
<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="55px" 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="200px" ColumnID="TrainContent" DataField="TrainContent"
|
||||
FieldType="String" HeaderText="培训内容" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="TrainStartDate" DataField="TrainStartDate"
|
||||
SortField="TrainStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="培训时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="200px" ColumnID="UnitName" DataField="UnitName"
|
||||
FieldType="String" HeaderText="单位" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="PersonName" DataField="PersonName"
|
||||
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="120px" ColumnID="TrainTypeName" DataField="TrainTypeName"
|
||||
FieldType="String" HeaderText="培训类型" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="120px" ColumnID="TrainLevelName" DataField="TrainLevelName"
|
||||
FieldType="String" HeaderText="培训级别" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="120px" ColumnID="TrainingItemName" DataField="TrainingItemName"
|
||||
FieldType="String" HeaderText="培训教材" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:TemplateField ColumnID="tfLearnTime" Width="120px" HeaderText="资源时长(分钟)" HeaderTextAlign="Center"
|
||||
TextAlign="left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblLearnTime" runat="server" Text='<%# ConvertTime(Eval("LearnTime")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField ColumnID="tfVideoProgress" Width="120px" HeaderText="学习时长(分钟)" HeaderTextAlign="Center"
|
||||
TextAlign="left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVideoProgress" runat="server" Text='<%# ConvertTime(Eval("VideoProgress")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:RenderField Width="80px" ColumnID="TeachHour" DataField="TeachHour"
|
||||
FieldType="String" HeaderText="学时" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
|
||||
</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;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,216 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
public partial class Trainingrecords : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string projectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
projectId = Request.Params["projectId"];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
string strSql = @"select tp.TrainContent,tp.TrainStartDate,u.UnitName,bt.TrainTypeName,btl.TrainLevelName,tp.TeachHour,tp.ProjectId,
|
||||
f.*,p.PersonName From Training_TaskItem f
|
||||
left join SitePerson_Person p on f.PersonId = p.PersonId
|
||||
left join Training_Plan tp on f.PlanId = tp.PlanId
|
||||
left join Base_TrainType bt on tp.TrainTypeId = bt.TrainTypeId
|
||||
left join Base_TrainLevel btl on tp.TrainLevelId = btl.TrainLevelId
|
||||
left join Base_Unit u on p.UnitId = u.UnitId WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND tp.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", projectId));
|
||||
|
||||
if (!string.IsNullOrEmpty(txtName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND p.PersonName like '%"+ txtName.Text.Trim() + "%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim()))
|
||||
{
|
||||
strSql += " AND tp.TrainStartDate >= @StartDate ";
|
||||
listStr.Add(new SqlParameter("@StartDate", this.txtStartDate.Text.Trim()));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
|
||||
{
|
||||
strSql += " AND tp.TrainStartDate <= @EndDate ";
|
||||
listStr.Add(new SqlParameter("@EndDate", this.txtEndDate.Text.Trim()));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
#region 查询事件
|
||||
/// <summary>
|
||||
/// 查询事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Text_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 页索引改变事件
|
||||
/// <summary>
|
||||
/// 页索引改变事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 排序
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页选择下拉改变事件
|
||||
/// <summary>
|
||||
/// 分页选择下拉改变事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#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 = this.Grid1.Rows.Count();
|
||||
BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
#pragma warning disable CS0108 // “TrainRecord.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
#pragma warning restore CS0108 // “TrainRecord.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
{
|
||||
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;
|
||||
}
|
||||
if (column.ColumnID == "tfLearnTime")
|
||||
{
|
||||
html = (row.FindControl("lblLearnTime") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID == "tfVideoProgress")
|
||||
{
|
||||
html = (row.FindControl("lblVideoProgress") as AspNet.Label).Text;
|
||||
}
|
||||
|
||||
//sb.AppendFormat("<td>{0}</td>", html);
|
||||
sb.AppendFormat("<td style='vnd.ms-excel.numberformat:@;width:140px;'>{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 格式化字符串
|
||||
/// <summary>
|
||||
/// 获取单位名称
|
||||
/// </summary>
|
||||
/// <param name="unitIds"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertTime(object time)
|
||||
{
|
||||
string hours = "0";
|
||||
if (time != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(time.ToString()))
|
||||
{
|
||||
return (Convert.ToInt32(time) / 60).ToString();
|
||||
}
|
||||
else {
|
||||
return hours;
|
||||
}
|
||||
|
||||
}
|
||||
return hours;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.EduTrain
|
||||
{
|
||||
|
||||
|
||||
public partial class Trainingrecords
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// txtStartDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtStartDate;
|
||||
|
||||
/// <summary>
|
||||
/// lblTo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblTo;
|
||||
|
||||
/// <summary>
|
||||
/// txtEndDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndDate;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <summary>
|
||||
/// lblLearnTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblLearnTime;
|
||||
|
||||
/// <summary>
|
||||
/// lblVideoProgress 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblVideoProgress;
|
||||
|
||||
/// <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>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
}
|
||||
}
|
||||
@@ -114,6 +114,7 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
this.txtPersonName.Text = personInfo.PersonName;
|
||||
this.txtIdentityCard.Text = personInfo.IdentityCard;
|
||||
this.txtUnitName.Text = personInfo.UnitName;
|
||||
//this.txtPostTrainingRoleName.Text = personInfo.PostTrainingRoleName;
|
||||
this.txtWorkPostName.Text = personInfo.WorkPostName;
|
||||
this.txtPoliticsStatusName.Text = personInfo.PoliticsStatusName;
|
||||
}
|
||||
@@ -139,245 +140,6 @@ namespace FineUIPro.Web.HSSE.Examine
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
FineUIPro.BoundField bf;
|
||||
FineUIPro.RenderField rf;
|
||||
FineUIPro.TextBox txTextBox;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "ScoreItems";
|
||||
bf.DataField = "ScoreItems";
|
||||
bf.HeaderText = "分值项目";
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
bf.Locked = true;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
#region 基本项(满分80分)
|
||||
|
||||
GroupField p1 = new GroupField();
|
||||
p1.HeaderText = "基本项(满分80分)";
|
||||
p1.TextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "年度培训";
|
||||
bf.DataField = "年度培训";
|
||||
bf.HeaderText = "年度培训";
|
||||
bf.HeaderToolTip = "完成应培训学时基础60分,超出1小时1分;满分80分";
|
||||
bf.Width = 80;
|
||||
//bf.HeaderStyle.CssClass = "multiline-header";
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "问责或出问题项培训";
|
||||
bf.DataField = "问责或出问题项培训";
|
||||
bf.HeaderText = "问责/问题项培训";
|
||||
bf.HeaderToolTip = "完成应培训学时基础60分,1学时1分;满分20分";
|
||||
bf.Width = 150;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "指标完成情况";
|
||||
bf.DataField = "指标完成情况";
|
||||
bf.HeaderText = "指标完成情况";
|
||||
bf.HeaderToolTip = "《质量、健康安全环保责任书》中目标指标完成情况;全部完成100分";
|
||||
bf.Width = 110;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "岗位HSE职责";
|
||||
bf.DataField = "岗位HSE职责";
|
||||
bf.HeaderText = "岗位HSE职责";
|
||||
bf.HeaderToolTip = "全部履职100分";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "个人安全行动计划";
|
||||
bf.DataField = "个人安全行动计划";
|
||||
bf.HeaderText = "个人安全行动计划";
|
||||
bf.HeaderToolTip = "1年4次";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "安全经验分享";
|
||||
bf.DataField = "安全经验分享";
|
||||
bf.HeaderText = "安全经验分享";
|
||||
bf.HeaderToolTip = "1月1次,1次10分,满分100";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "领导人员参加班组作业风险会分析会";
|
||||
bf.DataField = "领导人员参加班组作业风险会分析会";
|
||||
bf.HeaderText = "领导人员参加班组作业风险会分析会";
|
||||
bf.HeaderToolTip = "1季度1次,1季度25分";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "一线党员联系班组党建活动";
|
||||
bf.DataField = "一线党员联系班组党建活动";
|
||||
bf.HeaderText = "一线党员联系班组党建活动";
|
||||
bf.HeaderToolTip = "半年1次,1次50分";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "行为安全观察与活动";
|
||||
bf.DataField = "行为安全观察与活动";
|
||||
bf.HeaderText = "行为安全观察与活动";
|
||||
bf.HeaderToolTip = "1年4次";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(p1);
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扣分项(无封顶)
|
||||
|
||||
GroupField p2 = new GroupField();
|
||||
p2.HeaderText = "扣分项(无封顶)";
|
||||
p2.TextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "轻微问题";
|
||||
bf.DataField = "轻微问题";
|
||||
bf.HeaderText = "轻微问题";
|
||||
bf.HeaderToolTip = "1个1分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p2.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "一般问题";
|
||||
bf.DataField = "一般问题";
|
||||
bf.HeaderText = "一般问题";
|
||||
bf.HeaderToolTip = "1个2分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p2.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "较大问题";
|
||||
bf.DataField = "较大问题";
|
||||
bf.HeaderText = "较大问题";
|
||||
bf.HeaderToolTip = "1个3分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p2.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "严重问题";
|
||||
bf.DataField = "严重问题";
|
||||
bf.HeaderText = "严重问题";
|
||||
bf.HeaderToolTip = "1个4分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p2.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(p2);
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加分项(满分20分)
|
||||
|
||||
GroupField p3 = new GroupField();
|
||||
p3.HeaderText = "加分项(满分20分)";
|
||||
p3.TextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "集团级先进";
|
||||
bf.DataField = "集团级先进";
|
||||
bf.HeaderText = "集团级先进";
|
||||
bf.HeaderToolTip = "1个3分";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "CPECC级先进";
|
||||
bf.DataField = "CPECC级先进";
|
||||
bf.HeaderText = "CPECC级先进";
|
||||
bf.HeaderToolTip = "1个2分";
|
||||
bf.Width = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "公司级先进";
|
||||
bf.DataField = "公司级先进";
|
||||
bf.HeaderText = "公司级先进";
|
||||
bf.HeaderToolTip = "1个1分";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "全员查隐患";
|
||||
bf.DataField = "全员查隐患";
|
||||
bf.HeaderText = "全员查隐患";
|
||||
bf.HeaderToolTip = "100条1分,200条2分...1000条10分满分";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "五星计划";
|
||||
bf.DataField = "五星计划";
|
||||
bf.HeaderText = "五星计划";
|
||||
bf.HeaderToolTip = "2星1分,3星2分,4星3分,5星4分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "安全超市积分";
|
||||
bf.DataField = "安全超市积分";
|
||||
bf.HeaderText = "安全超市积分";
|
||||
bf.HeaderToolTip = "1次1分,满分10分";
|
||||
bf.Width = 110;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(p3);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StaffHSEInfoArchivesOld.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.StaffHSEInfoArchivesOld" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>员工HSE信息档案</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row.Red {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.LabelColor {
|
||||
color: Red;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.multiline-header {
|
||||
white-space: pre-line; /* 这会让换行符生效 */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="padding: 0px">
|
||||
<form id="form1" runat="server">
|
||||
<%--<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpYear" runat="server" LabelWidth="50px" Width="180px" Label="年度"
|
||||
EnableEdit="true" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server" />
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" Text="查询" ToolTip="查询">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Panel>--%>
|
||||
|
||||
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Panel ID="Panel5" runat="server" ShowBorder="true" EnableCollapse="false"
|
||||
Layout="VBox" AutoScroll="false"
|
||||
ShowHeader="true" Title="员工HSE信息档案" TitleAlign="Center"
|
||||
BoxConfigChildMargin="0 0 0 0" BodyPadding="0">
|
||||
<Items>
|
||||
<f:Panel ID="Panel1" Title="年度" Height="50px" runat="server" BodyPadding="1px" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpYear" runat="server" LabelWidth="100px" Width="220px" Label="年度"
|
||||
EnableEdit="true" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server" />
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" Text="查询" ToolTip="查询">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="Panel2" Title="员工HSE信息档案" BoxFlex="1" MinHeight="110px" Margin="0" runat="server" BodyPadding="0px" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" EnableTableStyle="true" MarginBottom="0px"
|
||||
BodyPadding="0px" runat="server" RedStarPosition="BeforeText" LabelAlign="Left" LabelWidth="100px">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtPersonName" Label="姓名" LabelAlign="Right" LabelWidth="100px"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtIdentityCard" Label="身份证" LabelAlign="Right" LabelWidth="100px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtUnitName" Label="单位" LabelAlign="Right" LabelWidth="100px"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtWorkPostName" Label="职务/工种" LabelAlign="Right" LabelWidth="100px"></f:TextBox>
|
||||
<%--<f:TextBox runat="server" ID="txtPostTrainingRoleName" Label="培训岗位" LabelAlign="Right" LabelWidth="100px"></f:TextBox>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtPoliticsStatusName" Label="政治面貌" LabelAlign="Right" LabelWidth="100px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="Panel3" Title="员工HSE信息档案" BoxFlex="1" MinHeight="580px" Margin="0" runat="server" BodyPadding="0px" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="HSE信息汇总表" EnableCollapse="false"
|
||||
runat="server" BoxFlex="1" DataKeyNames="UnitId" AllowCellEditing="true"
|
||||
ClicksToEdit="1" DataIDField="UnitId" AllowSorting="false" SortField="UnitId"
|
||||
SortDirection="DESC" EnableColumnLines="true" AllowColumnLocking="true"
|
||||
AllowPaging="false" IsDatabasePaging="false" PageSize="50"
|
||||
EnableRowDoubleClickEvent="true" EnableRowClickEvent="True">
|
||||
|
||||
<%-- <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>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
<%--<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" EnableTableStyle="true" MarginBottom="1px"
|
||||
BodyPadding="1px" runat="server" RedStarPosition="BeforeText" LabelAlign="Left" LabelWidth="100px">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpYear" runat="server" LabelWidth="100px" Width="220px" Label="年度"
|
||||
EnableEdit="true" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server" />
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" Text="查询" ToolTip="查询">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtUserName" Label="姓名" Text="张三" LabelWidth="100px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>--%>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,388 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
public partial class StaffHSEInfoArchivesOld : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 人员主键
|
||||
/// </summary>
|
||||
public string PersonId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["PersonId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["PersonId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员主键
|
||||
/// </summary>
|
||||
public string UserId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UserId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UserId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单位id
|
||||
/// </summary>
|
||||
public string UnitId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员身份证
|
||||
/// </summary>
|
||||
public string IdentityCard
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["IdentityCard"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["IdentityCard"] = 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.ProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
this.PersonId = Request.Params["PersonId"];
|
||||
|
||||
var lstYesr = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008);
|
||||
this.drpYear.DataTextField = "ConstText";
|
||||
this.drpYear.DataValueField = "ConstValue";
|
||||
this.drpYear.DataSource = lstYesr.OrderByDescending(x => x.SortIndex);
|
||||
this.drpYear.DataBind();
|
||||
this.drpYear.SelectedValue = DateTime.Now.Year.ToString();
|
||||
|
||||
|
||||
var personInfo = PersonService.GetPersonInfoById(this.PersonId);
|
||||
if (personInfo != null)
|
||||
{
|
||||
this.txtPersonName.Text = personInfo.PersonName;
|
||||
this.txtIdentityCard.Text = personInfo.IdentityCard;
|
||||
this.txtUnitName.Text = personInfo.UnitName;
|
||||
//this.txtPostTrainingRoleName.Text = personInfo.PostTrainingRoleName;
|
||||
this.txtWorkPostName.Text = personInfo.WorkPostName;
|
||||
this.txtPoliticsStatusName.Text = personInfo.PoliticsStatusName;
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
public DataTable GridTable = new DataTable();
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
FineUIPro.BoundField bf;
|
||||
FineUIPro.RenderField rf;
|
||||
FineUIPro.TextBox txTextBox;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "ScoreItems";
|
||||
bf.DataField = "ScoreItems";
|
||||
bf.HeaderText = "分值项目";
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
bf.Locked = true;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
#region 基本项(满分80分)
|
||||
|
||||
GroupField p1 = new GroupField();
|
||||
p1.HeaderText = "基本项(满分80分)";
|
||||
p1.TextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "年度培训";
|
||||
bf.DataField = "年度培训";
|
||||
bf.HeaderText = "年度培训";
|
||||
bf.HeaderToolTip = "完成应培训学时基础60分,超出1小时1分;满分80分";
|
||||
bf.Width = 80;
|
||||
//bf.HeaderStyle.CssClass = "multiline-header";
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "问责或出问题项培训";
|
||||
bf.DataField = "问责或出问题项培训";
|
||||
bf.HeaderText = "问责/问题项培训";
|
||||
bf.HeaderToolTip = "完成应培训学时基础60分,1学时1分;满分20分";
|
||||
bf.Width = 150;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "指标完成情况";
|
||||
bf.DataField = "指标完成情况";
|
||||
bf.HeaderText = "指标完成情况";
|
||||
bf.HeaderToolTip = "《质量、健康安全环保责任书》中目标指标完成情况;全部完成100分";
|
||||
bf.Width = 110;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "岗位HSE职责";
|
||||
bf.DataField = "岗位HSE职责";
|
||||
bf.HeaderText = "岗位HSE职责";
|
||||
bf.HeaderToolTip = "全部履职100分";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "个人安全行动计划";
|
||||
bf.DataField = "个人安全行动计划";
|
||||
bf.HeaderText = "个人安全行动计划";
|
||||
bf.HeaderToolTip = "1年4次";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "安全经验分享";
|
||||
bf.DataField = "安全经验分享";
|
||||
bf.HeaderText = "安全经验分享";
|
||||
bf.HeaderToolTip = "1月1次,1次10分,满分100";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "领导人员参加班组作业风险会分析会";
|
||||
bf.DataField = "领导人员参加班组作业风险会分析会";
|
||||
bf.HeaderText = "领导人员参加班组作业风险会分析会";
|
||||
bf.HeaderToolTip = "1季度1次,1季度25分";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "一线党员联系班组党建活动";
|
||||
bf.DataField = "一线党员联系班组党建活动";
|
||||
bf.HeaderText = "一线党员联系班组党建活动";
|
||||
bf.HeaderToolTip = "半年1次,1次50分";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "行为安全观察与活动";
|
||||
bf.DataField = "行为安全观察与活动";
|
||||
bf.HeaderText = "行为安全观察与活动";
|
||||
bf.HeaderToolTip = "1年4次";
|
||||
bf.MaxWidth = 150;
|
||||
bf.MinWidth = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p1.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(p1);
|
||||
|
||||
#endregion
|
||||
|
||||
#region 扣分项(无封顶)
|
||||
|
||||
GroupField p2 = new GroupField();
|
||||
p2.HeaderText = "扣分项(无封顶)";
|
||||
p2.TextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "轻微问题";
|
||||
bf.DataField = "轻微问题";
|
||||
bf.HeaderText = "轻微问题";
|
||||
bf.HeaderToolTip = "1个1分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p2.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "一般问题";
|
||||
bf.DataField = "一般问题";
|
||||
bf.HeaderText = "一般问题";
|
||||
bf.HeaderToolTip = "1个2分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p2.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "较大问题";
|
||||
bf.DataField = "较大问题";
|
||||
bf.HeaderText = "较大问题";
|
||||
bf.HeaderToolTip = "1个3分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p2.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "严重问题";
|
||||
bf.DataField = "严重问题";
|
||||
bf.HeaderText = "严重问题";
|
||||
bf.HeaderToolTip = "1个4分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p2.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(p2);
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加分项(满分20分)
|
||||
|
||||
GroupField p3 = new GroupField();
|
||||
p3.HeaderText = "加分项(满分20分)";
|
||||
p3.TextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "集团级先进";
|
||||
bf.DataField = "集团级先进";
|
||||
bf.HeaderText = "集团级先进";
|
||||
bf.HeaderToolTip = "1个3分";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "CPECC级先进";
|
||||
bf.DataField = "CPECC级先进";
|
||||
bf.HeaderText = "CPECC级先进";
|
||||
bf.HeaderToolTip = "1个2分";
|
||||
bf.Width = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "公司级先进";
|
||||
bf.DataField = "公司级先进";
|
||||
bf.HeaderText = "公司级先进";
|
||||
bf.HeaderToolTip = "1个1分";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "全员查隐患";
|
||||
bf.DataField = "全员查隐患";
|
||||
bf.HeaderText = "全员查隐患";
|
||||
bf.HeaderToolTip = "100条1分,200条2分...1000条10分满分";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "五星计划";
|
||||
bf.DataField = "五星计划";
|
||||
bf.HeaderText = "五星计划";
|
||||
bf.HeaderToolTip = "2星1分,3星2分,4星3分,5星4分";
|
||||
bf.Width = 80;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.ColumnID = "安全超市积分";
|
||||
bf.DataField = "安全超市积分";
|
||||
bf.HeaderText = "安全超市积分";
|
||||
bf.HeaderToolTip = "1次1分,满分10分";
|
||||
bf.Width = 110;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.TextAlign = TextAlign.Center;
|
||||
p3.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(p3);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Examine
|
||||
{
|
||||
|
||||
|
||||
public partial class StaffHSEInfoArchivesOld
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel5;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpYear 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpYear;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtPersonName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPersonName;
|
||||
|
||||
/// <summary>
|
||||
/// txtIdentityCard 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIdentityCard;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnitName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnitName;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkPostName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkPostName;
|
||||
|
||||
/// <summary>
|
||||
/// txtPoliticsStatusName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPoliticsStatusName;
|
||||
|
||||
/// <summary>
|
||||
/// Panel3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel3;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
}
|
||||
}
|
||||
@@ -37,8 +37,10 @@
|
||||
<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:ListItem Text="严重" Value="严重"/>
|
||||
</f:DropDownList>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" Label="检查项" ID="DropDownList1" Hidden="true">
|
||||
</f:DropDownList>
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
</f:DatePicker>
|
||||
<f:DropDownList ID="drpStates" runat="server" Label="状态" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
|
||||
LabelWidth="70px" LabelAlign="Right" Width="210px">
|
||||
|
||||
</f:DropDownList>
|
||||
|
||||
|
||||
@@ -72,9 +71,11 @@
|
||||
</f:DropDownList>
|
||||
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" LabelAlign="Right" Label="级别" ID="dpRiskLevel" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="-请选择-" Value=""/>
|
||||
<f:ListItem Text="一般" Value="一般"/>
|
||||
<f:ListItem Text="重大" Value="重大"/>
|
||||
<f:ListItem Text="-请选择-" Value="" />
|
||||
<f:ListItem Text="轻微" Value="轻微" />
|
||||
<f:ListItem Text="一般" Value="一般" />
|
||||
<f:ListItem Text="较大" Value="较大" />
|
||||
<f:ListItem Text="严重" Value="严重" />
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
@@ -33,24 +33,19 @@
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="180px" LabelWidth="60px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="人员" ID="txtPersonName" EmptyText="输入查询条件"
|
||||
<f:TextBox runat="server" Label="标题" ID="txtName" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="180px" LabelWidth="60px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>
|
||||
<%--<f:DropDownList ID="drpRole" runat="server" Label="适用岗位" AutoSelectFirstItem="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="220px" LabelWidth="80px">
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="单位" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
|
||||
LabelAlign="Right" LabelWidth="50px" Width="260px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCategory" runat="server" Label="培训类别" AutoSelectFirstItem="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="220px" LabelWidth="80px">
|
||||
<f:DropDownList ID="drpCategory" runat="server" Label="培训类别" AutoSelectFirstItem="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpCategory_SelectedIndexChanged" Width="220px" LabelWidth="80px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCourse" runat="server" Label="培训课程" AutoSelectFirstItem="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="220px" LabelWidth="80px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpMethod" runat="server" Label="培训方式" AutoSelectFirstItem="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="180px" LabelWidth="80px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpTeachers" runat="server" Label="培训师资" AutoSelectFirstItem="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="180px" LabelWidth="80px">
|
||||
</f:DropDownList>--%>
|
||||
<%--<f:DropDownList ID="drpOutcome" runat="server" Label="培训效果" AutoSelectFirstItem="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="160px" LabelWidth="80px">
|
||||
</f:DropDownList>--%>
|
||||
<%--<f:TextBox runat="server" Label="备注" ID="txtRemark" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="180px" LabelWidth="60px"
|
||||
LabelAlign="right">
|
||||
</f:TextBox>--%>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<%--<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
|
||||
@@ -75,14 +70,26 @@
|
||||
SortField="Code" FieldType="String" HeaderText="编号" HeaderTextAlign="Center" EnableLock="true" Locked="true"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PersonName" DataField="PersonName"
|
||||
SortField="PersonName" FieldType="String" HeaderText="人员" HeaderTextAlign="Center" EnableLock="true" Locked="true"
|
||||
<f:RenderField Width="220px" ColumnID="Name" DataField="Name"
|
||||
SortField="Name" FieldType="String" HeaderText="标题" HeaderTextAlign="Center" EnableLock="true" Locked="true"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="120px" ColumnID="RoleName" DataField="RoleName"
|
||||
<%--<f:RenderField MinWidth="120px" ColumnID="RoleName" DataField="RoleName"
|
||||
SortField="RoleName" FieldType="String" HeaderText="适用岗位" HeaderTextAlign="Center" EnableLock="true" Locked="true"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:TemplateField ColumnID="tfUnitIds" Width="220px" HeaderText="单位名称" HeaderTextAlign="Center"
|
||||
TextAlign="left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblUnitId" runat="server" Text='<%# ConvertUnitName(Eval("UnitIds")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="tfRoleIds" Width="220px" HeaderText="适用岗位" HeaderTextAlign="Center"
|
||||
TextAlign="left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblRoleId" runat="server" Text='<%# ConvertRoleName(Eval("RoleIds")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField MinWidth="180px" ColumnID="CategoryName" DataField="CategoryName"
|
||||
SortField="CategoryName" FieldType="String" HeaderText="类别" HeaderTextAlign="Center" EnableLock="true" Locked="true"
|
||||
TextAlign="Center">
|
||||
@@ -91,6 +98,18 @@
|
||||
SortField="CourseName" FieldType="String" HeaderText="培训课程" HeaderTextAlign="Center" EnableLock="true" Locked="true"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="TrainingTime" DataField="TrainingTime"
|
||||
SortField="TrainingTime" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="培训时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="120px" ColumnID="Location" DataField="Location"
|
||||
SortField="Location" FieldType="String" HeaderText="培训地点" HeaderTextAlign="Center" EnableLock="true" Locked="true"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="140px" ColumnID="Method" DataField="Method"
|
||||
SortField="Method" FieldType="String" HeaderText="培训方式" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<%-- <f:RenderField MinWidth="140px" ColumnID="ClassHour" DataField="ClassHour"
|
||||
SortField="ClassHour" FieldType="Double" HeaderText="培训课时(学时)" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
@@ -99,10 +118,6 @@
|
||||
SortField="Cycle" FieldType="Double" HeaderText="培训周期(年/次)" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="140px" ColumnID="Method" DataField="Method"
|
||||
SortField="Method" FieldType="String" HeaderText="培训方式" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="140px" ColumnID="Teachers" DataField="Teachers"
|
||||
SortField="Teachers" FieldType="String" HeaderText="培训教资" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
|
||||
@@ -63,28 +63,39 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
//单位
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||
////获取适用岗位下拉框
|
||||
//PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, true);
|
||||
////获取培训类别下拉框
|
||||
//PostTrainingCategoryService.InitPostTrainingCategoryDropDownList(this.drpCategory, true);
|
||||
////获取培训方式下拉框
|
||||
//PostTrainingMethodService.InitPostTrainingMethodDropDownList(this.drpMethod, null, true);
|
||||
//获取培训类别下拉框
|
||||
PostTrainingCategoryService.InitPostTrainingCategoryDropDownList(this.drpCategory, true);
|
||||
//获取培训方式下拉框
|
||||
PostTrainingMethodService.InitPostTrainingMethodDropDownList(this.drpMethod, null, true);
|
||||
////获取培训师资下拉框
|
||||
//PostTrainingTeachersService.InitPostTrainingTeachersDropDownList(this.drpTeachers, null, true);
|
||||
////获取培训效果下拉框
|
||||
//PostTrainingRecordService.InitPostTrainingOutcomeDropDownList(this.drpOutcome, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 培训类别下拉加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpCategory_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//培训课程
|
||||
PostTrainingCourseService.InitPostTrainingCourseDropDownList(this.drpCourse, this.drpCategory.SelectedValue, true);
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT Record.*,Person.PersonName,Role.Name AS RoleName
|
||||
FROM PostTraining_Record_Detail AS Detail
|
||||
LEFT JOIN PostTraining_Record AS Record ON Record.Id=Detail.RecordId
|
||||
LEFT JOIN SitePerson_Person AS Person ON Person.PersonId=Detail.PersonId
|
||||
LEFT JOIN PostTraining_Role AS Role ON Role.Id=Person.PostTrainingRoleId
|
||||
string strSql = @"SELECT Record.* ,SUser.UserName AS CompileManName
|
||||
FROM PostTraining_Record AS Record
|
||||
LEFT JOIN Sys_User AS SUser ON SUser.UserId=Record.CompileMan
|
||||
WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
@@ -93,26 +104,31 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
strSql += " AND Record.Code LIKE @Code";
|
||||
listStr.Add(new SqlParameter("@Code", "%" + this.txtCode.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
|
||||
if (!string.IsNullOrEmpty(this.txtName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Person.PersonName LIKE @PersonName";
|
||||
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
|
||||
strSql += " AND Record.Name LIKE @Name";
|
||||
listStr.Add(new SqlParameter("@Name", "%" + this.txtName.Text.Trim() + "%"));
|
||||
}
|
||||
//if (this.drpRole.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// strSql += " AND Record.RoleId = @RoleId";
|
||||
// listStr.Add(new SqlParameter("@RoleId", this.drpRole.SelectedValue));
|
||||
//}
|
||||
//if (this.drpCategory.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// strSql += " AND Course.CategoryId = @CategoryId";
|
||||
// listStr.Add(new SqlParameter("@CategoryId", this.drpCategory.SelectedValue));
|
||||
//}
|
||||
//if (this.drpMethod.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// strSql += " AND Record.Method = @Method";
|
||||
// listStr.Add(new SqlParameter("@Method", this.drpMethod.SelectedValue));
|
||||
//}
|
||||
if (this.drpCategory.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND Record.CategoryId = @CategoryId";
|
||||
listStr.Add(new SqlParameter("@CategoryId", this.drpCategory.SelectedValue));
|
||||
}
|
||||
if (this.drpCourse.SelectedValue != null && this.drpCourse.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND Record.CourseId = @CourseId";
|
||||
listStr.Add(new SqlParameter("@CourseId", this.drpCourse.SelectedValue));
|
||||
}
|
||||
if (this.drpMethod.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND Record.Method = @Method";
|
||||
listStr.Add(new SqlParameter("@Method", this.drpMethod.SelectedValue));
|
||||
}
|
||||
//if (this.drpTeachers.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// strSql += " AND Record.Teachers = @Teachers";
|
||||
@@ -168,6 +184,71 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 格式化字符串
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位名称
|
||||
/// </summary>
|
||||
/// <param name="unitIds"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertUnitName(object unitIds)
|
||||
{
|
||||
string unitName = string.Empty;
|
||||
if (unitIds != null)
|
||||
{
|
||||
List<string> infos = unitIds.ToString().Split(',').ToList();
|
||||
if (infos.Count() > 0)
|
||||
{
|
||||
foreach (var item in infos)
|
||||
{
|
||||
Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(item);
|
||||
if (unit != null)
|
||||
{
|
||||
unitName += unit.UnitName + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(unitName))
|
||||
{
|
||||
unitName = unitName.Substring(0, unitName.LastIndexOf(","));
|
||||
}
|
||||
}
|
||||
}
|
||||
return unitName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取适用岗位名称
|
||||
/// </summary>
|
||||
/// <param name="roleIds"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertRoleName(object roleIds)
|
||||
{
|
||||
string roleName = string.Empty;
|
||||
if (roleIds != null)
|
||||
{
|
||||
List<string> infos = roleIds.ToString().Split(',').ToList();
|
||||
if (infos.Count() > 0)
|
||||
{
|
||||
foreach (var item in infos)
|
||||
{
|
||||
Model.PostTraining_Role role = BLL.PostTrainingRoleService.GetRoleById(item);
|
||||
if (role != null)
|
||||
{
|
||||
roleName += role.Name + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(roleName))
|
||||
{
|
||||
roleName = roleName.Substring(0, roleName.LastIndexOf(","));
|
||||
}
|
||||
}
|
||||
}
|
||||
return roleName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
|
||||
+56
-2
@@ -69,13 +69,49 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtPersonName 控件。
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPersonName;
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitId;
|
||||
|
||||
/// <summary>
|
||||
/// drpCategory 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCategory;
|
||||
|
||||
/// <summary>
|
||||
/// drpCourse 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCourse;
|
||||
|
||||
/// <summary>
|
||||
/// drpMethod 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpMethod;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
@@ -104,6 +140,24 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <summary>
|
||||
/// lblUnitId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblUnitId;
|
||||
|
||||
/// <summary>
|
||||
/// lblRoleId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblRoleId;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -67,14 +67,16 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnits" runat="server" Label="培训单位" EnableCheckBoxSelect="true" EnableMultiSelect="true">
|
||||
<f:DropDownList ID="drpUnits" runat="server" Label="培训单位" AutoSelectFirstItem="false" EnableCheckBoxSelect="true" EnableMultiSelect="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server" ID="trRole">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpRole" runat="server" Label="培训岗位" EnableCheckBoxSelect="true" EnableMultiSelect="true" ShowRedStar="true" Required="true">
|
||||
<f:DropDownList ID="drpWorkPost" runat="server" Label="培训岗位" AutoSelectFirstItem="false" EnableCheckBoxSelect="true" EnableMultiSelect="true" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>
|
||||
<%-- <f:DropDownList ID="drpRole" runat="server" Label="培训岗位" AutoSelectFirstItem="false" EnableCheckBoxSelect="true" EnableMultiSelect="true" ShowRedStar="true" Required="true">
|
||||
</f:DropDownList>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
@@ -98,9 +100,9 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<%-- <f:Button ID="btnImport" ToolTip="导入" Icon="PageExcel" runat="server" ValidateForms="SimpleForm1"
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="PageExcel" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>--%>
|
||||
</f:Button>
|
||||
<f:Button ID="btnSelect" Icon="ShapeSquareSelect" runat="server" ToolTip="选择培训人员" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSelect_Click">
|
||||
</f:Button>
|
||||
|
||||
@@ -69,7 +69,25 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
if (model != null)
|
||||
{
|
||||
this.txtCode.Text = model.Code;
|
||||
this.txtName.Text = model.Name;
|
||||
this.txtContent.Text = model.Content;
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtPersonNum.Text = model.PersonNum.ToString();
|
||||
this.txtLocation.Text = model.Location;
|
||||
this.txtDuration.Text = model.Duration.ToString();
|
||||
this.txtLecturer.Text = model.Lecturer;
|
||||
if (!string.IsNullOrEmpty(model.UnitIds))
|
||||
{
|
||||
this.drpUnits.SelectedValueArray = model.UnitIds.Split(',');
|
||||
}
|
||||
if (!string.IsNullOrEmpty(model.WorkPostIds))
|
||||
{
|
||||
this.drpWorkPost.SelectedValueArray = model.WorkPostIds.Split(',');
|
||||
}
|
||||
if (model.TrainingTime != null)
|
||||
{
|
||||
this.txtTrainingTime.Text = string.Format("{0:yyyy-MM-dd}", model.TrainingTime);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(model.CourseId))
|
||||
{
|
||||
var course = BLL.PostTrainingCourseService.GetCourseById(model.CourseId);
|
||||
@@ -88,7 +106,10 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
{
|
||||
////自动生成编码
|
||||
this.txtCode.Text = SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.PostTraining_Record", "Code", "");
|
||||
this.txtLecturer.Text = this.CurrUser.UserName;
|
||||
this.txtTrainingTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
this.Grid1DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,8 +120,10 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
{
|
||||
//培训单位
|
||||
UnitService.InitUnitDropDownList(this.drpUnits, this.ProjectId, false);
|
||||
//获取适用岗位下拉框
|
||||
PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, false);
|
||||
//所属岗位
|
||||
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
|
||||
////获取适用岗位下拉框
|
||||
//PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, false);
|
||||
//获取培训类别下拉框
|
||||
PostTrainingCategoryService.InitPostTrainingCategoryDropDownList(this.drpCategory, false);
|
||||
//获取培训方式下拉框
|
||||
@@ -127,36 +150,10 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
{
|
||||
recordDetails = (from x in Funs.DB.View_PostTraining_RecordDetail
|
||||
where x.RecordId == this.Id
|
||||
orderby x.UnitName, x.RoleName, x.PersonName
|
||||
orderby x.UnitName, x.WorkPostName, x.PersonName
|
||||
select x).ToList();
|
||||
Grid1.DataSource = recordDetails;
|
||||
Grid1.DataBind();
|
||||
//for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
//{
|
||||
// bool isRed = true;
|
||||
// string trainDetailId = Grid1.Rows[i].DataKeys[0].ToString();
|
||||
// var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == trainDetailId);
|
||||
// if (getAtt != null)
|
||||
// {
|
||||
// isRed = false;
|
||||
// }
|
||||
// if (isRed)
|
||||
// {
|
||||
// var getRecordDetail = recordDetails.FirstOrDefault(x => x.DetailId == trainDetailId);
|
||||
// if (getRecordDetail != null && !string.IsNullOrEmpty(this.TestPlanId)) ////未参加过培训的人员
|
||||
// {
|
||||
// var getTestRecord = Funs.DB.Training_TestRecord.FirstOrDefault(x => x.TestManId == getRecordDetail.PersonId && x.TestPlanId == this.TestPlanId);
|
||||
// if (getTestRecord != null)
|
||||
// {
|
||||
// isRed = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (isRed)
|
||||
// {
|
||||
// Grid1.Rows[i].RowCssClass = "Red";
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -174,16 +171,16 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
}
|
||||
//培训岗位
|
||||
string roleIds = string.Empty;
|
||||
foreach (var item in this.drpRole.SelectedValueArray)
|
||||
string workPostIds = string.Empty;
|
||||
foreach (var item in this.drpWorkPost.SelectedValueArray)
|
||||
{
|
||||
roleIds += item + ",";
|
||||
workPostIds += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(roleIds))
|
||||
if (!string.IsNullOrEmpty(workPostIds))
|
||||
{
|
||||
roleIds = roleIds.Substring(0, roleIds.LastIndexOf(","));
|
||||
workPostIds = workPostIds.Substring(0, workPostIds.LastIndexOf(","));
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SelectPerson.aspx?RecordId={0}&RoleIds={1}", this.Id, roleIds, "编辑 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SelectPerson.aspx?RecordId={0}&WorkPostIds={1}", this.Id, workPostIds, "编辑 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -277,18 +274,18 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
}
|
||||
|
||||
//培训岗位
|
||||
string roleIds = string.Empty;
|
||||
foreach (var item in this.drpRole.SelectedValueArray)
|
||||
string workPostIds = string.Empty;
|
||||
foreach (var item in this.drpWorkPost.SelectedValueArray)
|
||||
{
|
||||
roleIds += item + ",";
|
||||
workPostIds += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(roleIds))
|
||||
if (!string.IsNullOrEmpty(workPostIds))
|
||||
{
|
||||
roleIds = roleIds.Substring(0, roleIds.LastIndexOf(","));
|
||||
workPostIds = workPostIds.Substring(0, workPostIds.LastIndexOf(","));
|
||||
}
|
||||
|
||||
newModel.UnitIds = unitIds;
|
||||
newModel.RoleIds = roleIds;
|
||||
newModel.WorkPostIds = workPostIds;
|
||||
if (!string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
newModel.Id = this.Id;
|
||||
@@ -326,6 +323,33 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpCategory.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择培训类别!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpCourse.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择培训课程!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.Id))
|
||||
{
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RecordIn.aspx?RecordId={0}", this.Id, "导入 - "), "导入", 900, 560));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
|
||||
@@ -150,13 +150,13 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
protected global::FineUIPro.FormRow trRole;
|
||||
|
||||
/// <summary>
|
||||
/// drpRole 控件。
|
||||
/// drpWorkPost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpRole;
|
||||
protected global::FineUIPro.DropDownList drpWorkPost;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
@@ -194,6 +194,15 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnSelect 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RecordIn.aspx.cs" Inherits="FineUIPro.Web.HSSE.PostTraining.RecordIn" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>导入</title>
|
||||
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="数据导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" runat="server" Icon="SystemClose" MarginRight="10px">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
EnableColumnLines="true" BoxFlex="1" DataKeyNames="DetailId" AllowCellEditing="true"
|
||||
ClicksToEdit="2" DataIDField="DetailId" AllowSorting="true" SortField="UnitName,PersonName"
|
||||
PageSize="50" Height="350px">
|
||||
<Columns>
|
||||
<f:TemplateField Width="55px" HeaderText="序号">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="180px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderText="单位" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="PersonName" DataField="PersonName" FieldType="String"
|
||||
HeaderText="培训人员" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<%-- <f:RenderField Width="150px" ColumnID="CheckResult" DataField="CheckResult" FieldType="Boolean"
|
||||
RendererFunction="renderCheckResult" HeaderText="考核结果" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CheckScore" DataField="CheckScore" FieldType="Double"
|
||||
HeaderText="成绩" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>--%>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lblBottom" runat="server" Text="说明:1 导入模板为.xls后缀的EXCEL文件,黑体字为必填项。2 对于导入信息中重复记录自动过滤插入一条记录。3 数据导入完成,成功后自动返回,如果有不成功数据页面弹出提示框,列表显示导入成功数据。">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="导入信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="false"
|
||||
CloseAction="HidePostBack" Width="900px" Height="600px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script>
|
||||
function renderCheckResult(value) {
|
||||
return value == true ? '合格' : '不合格';
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['UnitName']);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,360 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
namespace FineUIPro.Web.HSSE.PostTraining
|
||||
{
|
||||
|
||||
public partial class RecordIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
/// <summary>
|
||||
/// 导入集合
|
||||
/// </summary>
|
||||
public static List<Model.View_PostTraining_RecordDetail> viewRecordDetails = new List<Model.View_PostTraining_RecordDetail>();
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string RecordId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["RecordId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["RecordId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHidePostBackReference();
|
||||
this.hdFileName.Text = string.Empty;
|
||||
this.hdCheckResult.Text = string.Empty;
|
||||
this.RecordId = Request.Params["RecordId"];
|
||||
if (viewRecordDetails != null)
|
||||
{
|
||||
viewRecordDetails.Clear();
|
||||
}
|
||||
errorInfos = string.Empty;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据导入
|
||||
/// <summary>
|
||||
/// 数据导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.RecordId))
|
||||
{
|
||||
Alert.ShowInTop("先保存培训,再导入!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
Alert.ShowInTop("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls")
|
||||
{
|
||||
Alert.ShowInTop("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (viewRecordDetails != null)
|
||||
{
|
||||
viewRecordDetails.Clear();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
errorInfos = string.Empty;
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 读Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
viewRecordDetails.Clear();
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0]);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集行数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL(DataTable pds)
|
||||
{
|
||||
string results = string.Empty;
|
||||
int ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var record = BLL.PostTrainingRecordService.GetRecordById(this.RecordId);
|
||||
if (record != null)
|
||||
{
|
||||
var units = from x in Funs.DB.Base_Unit select x;
|
||||
var persons = from x in Funs.DB.SitePerson_Person where x.ProjectId == record.ProjectId select x;
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
string result = string.Empty;
|
||||
string col0 = pds.Rows[i][0].ToString().Trim();
|
||||
string col1 = pds.Rows[i][1].ToString().Trim();
|
||||
//string col2 = pds.Rows[i][2].ToString().Trim();
|
||||
//string col3 = pds.Rows[i][3].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(col0) || !string.IsNullOrEmpty(col1) )
|
||||
{
|
||||
if (string.IsNullOrEmpty(col0) || string.IsNullOrEmpty(col1))
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.View_PostTraining_RecordDetail newViewRecordDetail = new Model.View_PostTraining_RecordDetail
|
||||
{
|
||||
DetailId = SQLHelper.GetNewID(typeof(Model.View_PostTraining_RecordDetail)),
|
||||
RecordId = record.Id,
|
||||
UnitName = col0,
|
||||
PersonName = col1,
|
||||
//CheckResult = false,
|
||||
//CheckScore=Funs.GetNewDecimal(col3),
|
||||
};
|
||||
|
||||
//if (col2 == "合格")
|
||||
//{
|
||||
// newViewRecordDetail.CheckResult = true;
|
||||
//}
|
||||
var unit = units.FirstOrDefault(x => x.UnitName == col0);
|
||||
if (unit != null)
|
||||
{
|
||||
newViewRecordDetail.UnitId = unit.UnitId;
|
||||
var person = persons.FirstOrDefault(x => x.PersonName == col1 && x.UnitId == unit.UnitId);
|
||||
if (person != null)
|
||||
{
|
||||
newViewRecordDetail.PersonId = person.PersonId;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "在现场人员信息中不存在!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "在单位信息中不存在!" + "|";
|
||||
}
|
||||
|
||||
|
||||
///判断是否已存在
|
||||
var addItem = Funs.DB.PostTraining_Record_Detail.FirstOrDefault(x => x.Id == newViewRecordDetail.DetailId && x.PersonId == newViewRecordDetail.PersonId);
|
||||
if (addItem == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
Model.PostTraining_Record_Detail newRecordDetail = new Model.PostTraining_Record_Detail
|
||||
{
|
||||
Id = newViewRecordDetail.DetailId,
|
||||
RecordId = newViewRecordDetail.RecordId,
|
||||
PersonId = newViewRecordDetail.PersonId,
|
||||
};
|
||||
|
||||
BLL.PostTrainingRecordDetailService.AddRecordDetail(newRecordDetail);
|
||||
///加入
|
||||
viewRecordDetails.Add(newViewRecordDetail);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "导入数据重复" + "|";
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
results += result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (viewRecordDetails.Count > 0)
|
||||
{
|
||||
viewRecordDetails = viewRecordDetails.Distinct().ToList();
|
||||
this.Grid1.Hidden = false;
|
||||
this.Grid1.DataSource = viewRecordDetails;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(results))
|
||||
{
|
||||
viewRecordDetails.Clear();
|
||||
results = "数据导入完成,未成功数据:" + results.Substring(0, results.LastIndexOf("|"));
|
||||
errorInfos = results;
|
||||
Alert.ShowInParent(results, MessageBoxIcon.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("培训数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, initPath + this.hdFileName.Text);
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭导入弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
if (Session["trainRecordDetails"] != null)
|
||||
{
|
||||
viewRecordDetails = Session["trainRecordDetails"] as List<Model.View_PostTraining_RecordDetail>;
|
||||
}
|
||||
if (viewRecordDetails.Count > 0)
|
||||
{
|
||||
this.Grid1.Hidden = false;
|
||||
this.Grid1.DataSource = viewRecordDetails;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string filePath = Const.PostTrainingRecordTemplateUrl;
|
||||
string uploadfilepath = rootPath + filePath;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.PostTraining
|
||||
{
|
||||
|
||||
|
||||
public partial class RecordIn
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// lblBottom 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblBottom;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,9 @@
|
||||
<f:TextBox ID="txtCode" runat="server" Label="编号" Required="true" ShowRedStar="true"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpRole" runat="server" Label="适用岗位" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
<%--<f:DropDownList ID="drpRole" runat="server" Label="适用岗位" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>--%>
|
||||
<f:DropDownList ID="drpWorkPost" runat="server" Label="适用岗位" EnableEdit="true" ForceSelection="false" AutoSelectFirstItem="false" LabelAlign="Right" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -60,9 +60,13 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
this.txtClassHour.Text = model.ClassHour.ToString();
|
||||
this.txtCycle.Text = model.Cycle.ToString();
|
||||
this.txtRemark.Text = model.Remark;
|
||||
if (!string.IsNullOrWhiteSpace(model.RoleId))
|
||||
//if (!string.IsNullOrWhiteSpace(model.RoleId))
|
||||
//{
|
||||
// this.drpRole.SelectedValue = model.RoleId;
|
||||
//}
|
||||
if (!string.IsNullOrWhiteSpace(model.WorkPostId))
|
||||
{
|
||||
this.drpRole.SelectedValue = model.RoleId;
|
||||
this.drpWorkPost.SelectedValue = model.WorkPostId;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(model.CourseId))
|
||||
{
|
||||
@@ -100,8 +104,10 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
//获取适用岗位下拉框
|
||||
PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, false);
|
||||
//所属岗位
|
||||
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
|
||||
////获取适用岗位下拉框
|
||||
//PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, false);
|
||||
//获取培训类别下拉框
|
||||
PostTrainingCategoryService.InitPostTrainingCategoryDropDownList(this.drpCategory, false);
|
||||
//获取培训方式下拉框
|
||||
@@ -151,7 +157,8 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
CompileDate = DateTime.Now,
|
||||
CompileMan = this.CurrUser.UserId
|
||||
};
|
||||
newModel.RoleId = this.drpRole.SelectedValue;
|
||||
newModel.WorkPostId = this.drpWorkPost.SelectedValue;
|
||||
//newModel.RoleId = this.drpRole.SelectedValue;
|
||||
newModel.CourseId = this.drpCourse.SelectedValue;
|
||||
newModel.ClassHour = decimal.Parse(this.txtClassHour.Text.Trim());
|
||||
newModel.Cycle = decimal.Parse(this.txtCycle.Text.Trim());
|
||||
|
||||
@@ -51,13 +51,13 @@ namespace FineUIPro.Web.HSSE.PostTraining
|
||||
protected global::FineUIPro.TextBox txtCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpRole 控件。
|
||||
/// drpWorkPost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpRole;
|
||||
protected global::FineUIPro.DropDownList drpWorkPost;
|
||||
|
||||
/// <summary>
|
||||
/// drpCategory 控件。
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
<f:DropDownList ID="drpPost" runat="server" Label="岗位" EnableEdit="true" EnableMultiSelect="true"
|
||||
Width="200px" LabelWidth="50px" LabelAlign="right" ForceSelection="false" EnableCheckBoxSelect="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpRole" runat="server" Label="培训岗位" EnableEdit="true" EnableMultiSelect="true"
|
||||
<%--<f:DropDownList ID="drpRole" runat="server" Label="培训岗位" EnableEdit="true" EnableMultiSelect="true"
|
||||
Width="200px" LabelWidth="50px" LabelAlign="right" ForceSelection="false" EnableCheckBoxSelect="true">
|
||||
</f:DropDownList>
|
||||
</f:DropDownList>--%>
|
||||
<f:DropDownList ID="drpTreamGroup" runat="server" Label="班组" EnableEdit="true"
|
||||
Width="200px" LabelWidth="50px" LabelAlign="right" ForceSelection="false">
|
||||
</f:DropDownList>
|
||||
@@ -116,9 +116,9 @@
|
||||
<f:RenderField HeaderText="单位名称" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="培训岗位" ColumnID="PostTrainingRoleName" DataField="PostTrainingRoleName" SortField="PostTrainingRoleName"
|
||||
<%--<f:RenderField HeaderText="培训岗位" ColumnID="PostTrainingRoleName" DataField="PostTrainingRoleName" SortField="PostTrainingRoleName"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<%-- <f:RenderField HeaderText="部门名称" ColumnID="DepartName" DataField="DepartName" SortField="DepartName"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField> --%>
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的 <b><script>{0}</script></b> 行数据吗?", Grid1.GetSelectedCountReference());
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
BLL.WorkPostService.InitWorkPostDropDownList(this.drpPost, true);
|
||||
PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, true);
|
||||
//PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, true);
|
||||
this.InitTreeMenu();//加载树
|
||||
}
|
||||
}
|
||||
@@ -294,21 +294,21 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.drpRole.SelectedItemArray.Count() > 1 || (this.drpRole.SelectedValue != BLL.Const._Null && this.drpRole.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.drpRole.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += " OR PostTrainingRoleId = @PostTrainingRoleId" + i.ToString();
|
||||
listStr.Add(new SqlParameter("@PostTrainingRoleId" + i.ToString(), item));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
//if (this.drpRole.SelectedItemArray.Count() > 1 || (this.drpRole.SelectedValue != BLL.Const._Null && this.drpRole.SelectedItemArray.Count() == 1))
|
||||
//{
|
||||
// strSql += " AND (1=2 ";
|
||||
// int i = 0;
|
||||
// foreach (var item in this.drpRole.SelectedValueArray)
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
// {
|
||||
// strSql += " OR PostTrainingRoleId = @PostTrainingRoleId" + i.ToString();
|
||||
// listStr.Add(new SqlParameter("@PostTrainingRoleId" + i.ToString(), item));
|
||||
// }
|
||||
// i++;
|
||||
// }
|
||||
// strSql += ")";
|
||||
//}
|
||||
|
||||
if (this.ckTrain.Checked)
|
||||
{
|
||||
|
||||
@@ -131,15 +131,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPost;
|
||||
|
||||
/// <summary>
|
||||
/// drpRole 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpRole;
|
||||
|
||||
/// <summary>
|
||||
/// drpTreamGroup 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -144,8 +144,8 @@
|
||||
<f:RadioItem Value="True" Text="是" />
|
||||
<f:RadioItem Value="False" Text="否" />
|
||||
</f:RadioButtonList>
|
||||
<f:DropDownList ID="drpRole" runat="server" Label="培训岗位" LabelAlign="Right" Required="True" ShowRedStar="True" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<%--<f:DropDownList ID="drpRole" runat="server" Label="培训岗位" LabelAlign="Right" Required="True" ShowRedStar="True" EnableEdit="true">
|
||||
</f:DropDownList>--%>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
@@ -113,10 +113,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
this.drpPost.SelectedValue = person.WorkPostId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(person.PostTrainingRoleId))
|
||||
{
|
||||
this.drpRole.SelectedValue = person.PostTrainingRoleId;
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(person.PostTrainingRoleId))
|
||||
//{
|
||||
// this.drpRole.SelectedValue = person.PostTrainingRoleId;
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(person.PositionId))
|
||||
{
|
||||
this.drpPosition.SelectedValue = person.PositionId;
|
||||
@@ -270,8 +270,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
gvWorkArea.DataBind();//单位工程
|
||||
//所属岗位
|
||||
WorkPostService.InitWorkPostDropDownList(this.drpPost, true);
|
||||
//培训岗位
|
||||
PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, true);
|
||||
////培训岗位
|
||||
//PostTrainingRoleService.InitPostTrainingRoleDropDownList(this.drpRole, true);
|
||||
PositionService.InitPositionDropDownList(this.drpPosition, true);
|
||||
PostTitleService.InitPostTitleDropDownList(this.drpTitle, true);
|
||||
TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, this.ProjectId, this.UnitId, true);
|
||||
@@ -333,11 +333,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
ShowNotify("请选择所属岗位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpRole.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择培训岗位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (this.drpRole.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// ShowNotify("请选择培训岗位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
if (string.IsNullOrEmpty(this.txtInTime.Text))
|
||||
{
|
||||
ShowNotify("入场时间不能为空!", MessageBoxIcon.Warning);
|
||||
@@ -398,10 +398,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
person.WorkPostId = this.drpPost.SelectedValue;
|
||||
}
|
||||
if (this.drpRole.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
person.PostTrainingRoleId = this.drpRole.SelectedValue;
|
||||
}
|
||||
//if (this.drpRole.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// person.PostTrainingRoleId = this.drpRole.SelectedValue;
|
||||
//}
|
||||
if (this.drpPosition.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
person.PositionId = this.drpPosition.SelectedValue;
|
||||
|
||||
@@ -401,15 +401,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblIsUsed;
|
||||
|
||||
/// <summary>
|
||||
/// drpRole 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpRole;
|
||||
|
||||
/// <summary>
|
||||
/// Panel5 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace FineUIPro.Web.Person.EduTrain
|
||||
Users.UserName AS DesignerName,WorkPostNames"
|
||||
+ @" FROM dbo.Training_Plan AS Plans "
|
||||
+ @" LEFT JOIN Sys_User AS Users ON Users.UserId = Plans.DesignerId "
|
||||
+ @" WHERE (Plans.ProjectId is null or Plans.ProjectId='') ";
|
||||
+ @" WHERE Plans.ProjectId is null ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtName.Text.Trim()))
|
||||
@@ -239,7 +239,7 @@ namespace FineUIPro.Web.Person.EduTrain
|
||||
string name = string.Empty;
|
||||
if (workPostIds != null)
|
||||
{
|
||||
name = BLL.WorkPostService.getDepartNamesByIds(workPostIds);
|
||||
name = BLL.DepartService.getDepartNamesByIds(workPostIds);
|
||||
|
||||
}
|
||||
return name;
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<f:MenuButton ID="btnMenuView" OnClick="btnMenuView_Click" EnablePostBack="true"
|
||||
runat="server" Text="查看" Icon="Find">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnPrinter" EnablePostBack="true" runat="server" Hidden="true"
|
||||
<f:MenuButton ID="btnPrinter" EnablePostBack="true" runat="server"
|
||||
Text="导出" Icon="Printer" OnClick="btnPrint_Click" EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:MenuButton>
|
||||
<%--<f:MenuButton ID="btnFile" OnClick="btnMenuFile_Click" EnablePostBack="true"
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace FineUIPro.Web.Person.EduTrain
|
||||
LEFT JOIN dbo.Training_TestTraining AS Training ON Training.TrainingId = TestRecord.TestType
|
||||
LEFT JOIN dbo.Sys_User AS Person ON Person.UserId = TestRecord.TestManId
|
||||
LEFT JOIN dbo.Base_Unit AS Unit ON Person.UnitId=Unit.UnitId
|
||||
WHERE (isFiled IS NULL OR isFiled = 0) and (TestRecord.ProjectId is null or TestRecord.ProjectId='' ) ";
|
||||
WHERE (isFiled IS NULL OR isFiled = 0) and TestRecord.ProjectId is null ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtName.Text.Trim()))
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace FineUIPro.Web.Person.EduTrain
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.lbTitleName.Text = UnitService.GetUnitNameByUnitId(CommonService.GetThisUnitId()) + ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
this.lbTitleName.Text = UnitService.GetUnitNameByUnitId(Const.UnitId_TCC) + ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
this.lbTestType.Text = "培训试题";
|
||||
this.TestRecordId = Request.Params["TestRecordId"];
|
||||
this.Type = Request.Params["Type"];
|
||||
@@ -63,7 +63,7 @@ namespace FineUIPro.Web.Person.EduTrain
|
||||
{
|
||||
personInfo += "项目:" + ProjectService.GetProjectNameByProjectId(testRecord.ProjectId) + " ";
|
||||
}
|
||||
else if (testRecord.UnitId == CommonService.GetThisUnitId())
|
||||
else if (testRecord.UnitId == Const.UnitId_TCC)
|
||||
{
|
||||
personInfo += "部门:" + DepartService.getDepartNameById(testRecord.DepartId) + " ";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
using BLL;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -7,8 +7,10 @@ namespace Model
|
||||
/// <summary>
|
||||
/// 适用岗位角色
|
||||
/// </summary>
|
||||
public string RoleName { get; set; }
|
||||
public string RoleId { get; set; }
|
||||
public string WorkPostName { get; set; }
|
||||
public string WorkPostId { get; set; }
|
||||
//public string RoleName { get; set; }
|
||||
//public string RoleId { get; set; }
|
||||
/// <summary>
|
||||
/// 培训类别
|
||||
/// </summary>
|
||||
|
||||
+112
-229
@@ -288987,7 +288987,7 @@ namespace Model
|
||||
|
||||
private string _UnitIds;
|
||||
|
||||
private string _RoleIds;
|
||||
private string _WorkPostIds;
|
||||
|
||||
private int _PersonNum;
|
||||
|
||||
@@ -289041,8 +289041,8 @@ namespace Model
|
||||
partial void OnLecturerChanged();
|
||||
partial void OnUnitIdsChanging(string value);
|
||||
partial void OnUnitIdsChanged();
|
||||
partial void OnRoleIdsChanging(string value);
|
||||
partial void OnRoleIdsChanged();
|
||||
partial void OnWorkPostIdsChanging(string value);
|
||||
partial void OnWorkPostIdsChanged();
|
||||
partial void OnPersonNumChanging(int value);
|
||||
partial void OnPersonNumChanged();
|
||||
partial void OnTrainingTimeChanging(System.DateTime value);
|
||||
@@ -289339,22 +289339,22 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleIds", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string RoleIds
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostIds", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string WorkPostIds
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RoleIds;
|
||||
return this._WorkPostIds;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RoleIds != value))
|
||||
if ((this._WorkPostIds != value))
|
||||
{
|
||||
this.OnRoleIdsChanging(value);
|
||||
this.OnWorkPostIdsChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RoleIds = value;
|
||||
this.SendPropertyChanged("RoleIds");
|
||||
this.OnRoleIdsChanged();
|
||||
this._WorkPostIds = value;
|
||||
this.SendPropertyChanged("WorkPostIds");
|
||||
this.OnWorkPostIdsChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -289836,8 +289836,6 @@ namespace Model
|
||||
|
||||
private EntityRef<Sys_User> _Sys_User;
|
||||
|
||||
private EntitySet<PostTraining_Standard> _PostTraining_Standard;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
@@ -289859,7 +289857,6 @@ namespace Model
|
||||
public PostTraining_Role()
|
||||
{
|
||||
this._Sys_User = default(EntityRef<Sys_User>);
|
||||
this._PostTraining_Standard = new EntitySet<PostTraining_Standard>(new Action<PostTraining_Standard>(this.attach_PostTraining_Standard), new Action<PostTraining_Standard>(this.detach_PostTraining_Standard));
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
@@ -290021,19 +290018,6 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PostTraining_Standard_PostTraining_Role", Storage="_PostTraining_Standard", ThisKey="Id", OtherKey="RoleId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<PostTraining_Standard> PostTraining_Standard
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PostTraining_Standard;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._PostTraining_Standard.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
@@ -290053,18 +290037,6 @@ namespace Model
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
private void attach_PostTraining_Standard(PostTraining_Standard entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.PostTraining_Role = this;
|
||||
}
|
||||
|
||||
private void detach_PostTraining_Standard(PostTraining_Standard entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.PostTraining_Role = null;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PostTraining_Standard")]
|
||||
@@ -290077,7 +290049,7 @@ namespace Model
|
||||
|
||||
private string _Code;
|
||||
|
||||
private string _RoleId;
|
||||
private string _WorkPostId;
|
||||
|
||||
private string _CourseId;
|
||||
|
||||
@@ -290099,8 +290071,6 @@ namespace Model
|
||||
|
||||
private EntityRef<PostTraining_Course> _PostTraining_Course;
|
||||
|
||||
private EntityRef<PostTraining_Role> _PostTraining_Role;
|
||||
|
||||
private EntityRef<Sys_User> _Sys_User;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
@@ -290111,8 +290081,8 @@ namespace Model
|
||||
partial void OnIdChanged();
|
||||
partial void OnCodeChanging(string value);
|
||||
partial void OnCodeChanged();
|
||||
partial void OnRoleIdChanging(string value);
|
||||
partial void OnRoleIdChanged();
|
||||
partial void OnWorkPostIdChanging(string value);
|
||||
partial void OnWorkPostIdChanged();
|
||||
partial void OnCourseIdChanging(string value);
|
||||
partial void OnCourseIdChanged();
|
||||
partial void OnClassHourChanging(decimal value);
|
||||
@@ -290136,7 +290106,6 @@ namespace Model
|
||||
public PostTraining_Standard()
|
||||
{
|
||||
this._PostTraining_Course = default(EntityRef<PostTraining_Course>);
|
||||
this._PostTraining_Role = default(EntityRef<PostTraining_Role>);
|
||||
this._Sys_User = default(EntityRef<Sys_User>);
|
||||
OnCreated();
|
||||
}
|
||||
@@ -290181,26 +290150,22 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||
public string RoleId
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||
public string WorkPostId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RoleId;
|
||||
return this._WorkPostId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RoleId != value))
|
||||
if ((this._WorkPostId != value))
|
||||
{
|
||||
if (this._PostTraining_Role.HasLoadedOrAssignedValue)
|
||||
{
|
||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
||||
}
|
||||
this.OnRoleIdChanging(value);
|
||||
this.OnWorkPostIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RoleId = value;
|
||||
this.SendPropertyChanged("RoleId");
|
||||
this.OnRoleIdChanged();
|
||||
this._WorkPostId = value;
|
||||
this.SendPropertyChanged("WorkPostId");
|
||||
this.OnWorkPostIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290427,40 +290392,6 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PostTraining_Standard_PostTraining_Role", Storage="_PostTraining_Role", ThisKey="RoleId", OtherKey="Id", IsForeignKey=true)]
|
||||
public PostTraining_Role PostTraining_Role
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PostTraining_Role.Entity;
|
||||
}
|
||||
set
|
||||
{
|
||||
PostTraining_Role previousValue = this._PostTraining_Role.Entity;
|
||||
if (((previousValue != value)
|
||||
|| (this._PostTraining_Role.HasLoadedOrAssignedValue == false)))
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
if ((previousValue != null))
|
||||
{
|
||||
this._PostTraining_Role.Entity = null;
|
||||
previousValue.PostTraining_Standard.Remove(this);
|
||||
}
|
||||
this._PostTraining_Role.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.PostTraining_Standard.Add(this);
|
||||
this._RoleId = value.Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._RoleId = default(string);
|
||||
}
|
||||
this.SendPropertyChanged("PostTraining_Role");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PostTraining_Standard_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)]
|
||||
public Sys_User Sys_User
|
||||
{
|
||||
@@ -344940,8 +344871,6 @@ namespace Model
|
||||
|
||||
private string _States;
|
||||
|
||||
private string _PostTrainingRoleId;
|
||||
|
||||
private EntitySet<Accident_AccidentPersonRecord> _Accident_AccidentPersonRecord;
|
||||
|
||||
private EntitySet<Accident_AccidentReportOtherItem> _Accident_AccidentReportOtherItem;
|
||||
@@ -345128,8 +345057,6 @@ namespace Model
|
||||
partial void OnBlackReasonChanged();
|
||||
partial void OnStatesChanging(string value);
|
||||
partial void OnStatesChanged();
|
||||
partial void OnPostTrainingRoleIdChanging(string value);
|
||||
partial void OnPostTrainingRoleIdChanged();
|
||||
#endregion
|
||||
|
||||
public SitePerson_Person()
|
||||
@@ -346495,26 +346422,6 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostTrainingRoleId", DbType="NVarChar(50)")]
|
||||
public string PostTrainingRoleId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PostTrainingRoleId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PostTrainingRoleId != value))
|
||||
{
|
||||
this.OnPostTrainingRoleIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PostTrainingRoleId = value;
|
||||
this.SendPropertyChanged("PostTrainingRoleId");
|
||||
this.OnPostTrainingRoleIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentPersonRecord_SitePerson_Person", Storage="_Accident_AccidentPersonRecord", ThisKey="PersonId", OtherKey="PersonId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Accident_AccidentPersonRecord> Accident_AccidentPersonRecord
|
||||
{
|
||||
@@ -401163,6 +401070,10 @@ namespace Model
|
||||
|
||||
private string _TestTrainingIds;
|
||||
|
||||
private System.Nullable<double> _Durations;
|
||||
|
||||
private string _WorkPostNames;
|
||||
|
||||
private EntitySet<Person_TrainingTask> _Person_TrainingTask;
|
||||
|
||||
private EntityRef<Training_CompanyTraining> _Training_CompanyTraining;
|
||||
@@ -401191,6 +401102,10 @@ namespace Model
|
||||
partial void OnLearningTimeChanged();
|
||||
partial void OnTestTrainingIdsChanging(string value);
|
||||
partial void OnTestTrainingIdsChanged();
|
||||
partial void OnDurationsChanging(System.Nullable<double> value);
|
||||
partial void OnDurationsChanged();
|
||||
partial void OnWorkPostNamesChanging(string value);
|
||||
partial void OnWorkPostNamesChanged();
|
||||
#endregion
|
||||
|
||||
public Training_CompanyTrainingItem()
|
||||
@@ -401404,6 +401319,46 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Durations", DbType="Float")]
|
||||
public System.Nullable<double> Durations
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Durations;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Durations != value))
|
||||
{
|
||||
this.OnDurationsChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Durations = value;
|
||||
this.SendPropertyChanged("Durations");
|
||||
this.OnDurationsChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostNames", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string WorkPostNames
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._WorkPostNames;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._WorkPostNames != value))
|
||||
{
|
||||
this.OnWorkPostNamesChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._WorkPostNames = value;
|
||||
this.SendPropertyChanged("WorkPostNames");
|
||||
this.OnWorkPostNamesChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Person_TrainingTask_Training_CompanyTrainingItem", Storage="_Person_TrainingTask", ThisKey="CompanyTrainingItemId", OtherKey="CompanyTrainingItemId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Person_TrainingTask> Person_TrainingTask
|
||||
{
|
||||
@@ -453008,7 +452963,7 @@ namespace Model
|
||||
|
||||
private string _PersonName;
|
||||
|
||||
private string _RoleName;
|
||||
private string _WorkPostName;
|
||||
|
||||
public View_PostTraining_RecordDetail()
|
||||
{
|
||||
@@ -453110,18 +453065,18 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleName", DbType="NVarChar(200)")]
|
||||
public string RoleName
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostName", DbType="NVarChar(100)")]
|
||||
public string WorkPostName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RoleName;
|
||||
return this._WorkPostName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RoleName != value))
|
||||
if ((this._WorkPostName != value))
|
||||
{
|
||||
this._RoleName = value;
|
||||
this._WorkPostName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -457036,6 +456991,8 @@ namespace Model
|
||||
|
||||
private string _WorkPostId;
|
||||
|
||||
private string _WorkPostName;
|
||||
|
||||
private System.Nullable<System.DateTime> _InTime;
|
||||
|
||||
private System.Nullable<System.DateTime> _OutTime;
|
||||
@@ -457074,8 +457031,6 @@ namespace Model
|
||||
|
||||
private string _WorkAreaName;
|
||||
|
||||
private string _WorkPostName;
|
||||
|
||||
private string _PositionName;
|
||||
|
||||
private string _PostTitleName;
|
||||
@@ -457162,10 +457117,6 @@ namespace Model
|
||||
|
||||
private System.Nullable<int> _LevelValue;
|
||||
|
||||
private string _PostTrainingRoleId;
|
||||
|
||||
private string _PostTrainingRoleName;
|
||||
|
||||
public View_SitePerson_Person()
|
||||
{
|
||||
}
|
||||
@@ -457378,6 +457329,22 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostName", DbType="NVarChar(100)")]
|
||||
public string WorkPostName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._WorkPostName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._WorkPostName != value))
|
||||
{
|
||||
this._WorkPostName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InTime", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> InTime
|
||||
{
|
||||
@@ -457682,22 +457649,6 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostName", DbType="NVarChar(100)")]
|
||||
public string WorkPostName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._WorkPostName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._WorkPostName != value))
|
||||
{
|
||||
this._WorkPostName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PositionName", DbType="NVarChar(50)")]
|
||||
public string PositionName
|
||||
{
|
||||
@@ -458385,38 +458336,6 @@ namespace Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostTrainingRoleId", DbType="NVarChar(50)")]
|
||||
public string PostTrainingRoleId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PostTrainingRoleId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PostTrainingRoleId != value))
|
||||
{
|
||||
this._PostTrainingRoleId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostTrainingRoleName", DbType="NVarChar(200)")]
|
||||
public string PostTrainingRoleName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PostTrainingRoleName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PostTrainingRoleName != value))
|
||||
{
|
||||
this._PostTrainingRoleName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_SitePerson_PersonList")]
|
||||
@@ -458443,8 +458362,6 @@ namespace Model
|
||||
|
||||
private string _UnitName;
|
||||
|
||||
private string _WorkPostName;
|
||||
|
||||
private string _WorkAreaName;
|
||||
|
||||
private string _TeamGroupName;
|
||||
@@ -458461,6 +458378,8 @@ namespace Model
|
||||
|
||||
private string _WorkPostId;
|
||||
|
||||
private string _WorkPostName;
|
||||
|
||||
private string _IdcardType;
|
||||
|
||||
private string _PhotoUrl;
|
||||
@@ -458469,10 +458388,6 @@ namespace Model
|
||||
|
||||
private string _PoliticsStatusName;
|
||||
|
||||
private string _PostTrainingRoleId;
|
||||
|
||||
private string _PostTrainingRoleName;
|
||||
|
||||
public View_SitePerson_PersonList()
|
||||
{
|
||||
}
|
||||
@@ -458637,22 +458552,6 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostName", DbType="NVarChar(100)")]
|
||||
public string WorkPostName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._WorkPostName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._WorkPostName != value))
|
||||
{
|
||||
this._WorkPostName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string WorkAreaName
|
||||
{
|
||||
@@ -458781,6 +458680,22 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPostName", DbType="NVarChar(100)")]
|
||||
public string WorkPostName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._WorkPostName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._WorkPostName != value))
|
||||
{
|
||||
this._WorkPostName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IdcardType", DbType="NVarChar(50)")]
|
||||
public string IdcardType
|
||||
{
|
||||
@@ -458844,38 +458759,6 @@ namespace Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostTrainingRoleId", DbType="NVarChar(50)")]
|
||||
public string PostTrainingRoleId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PostTrainingRoleId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PostTrainingRoleId != value))
|
||||
{
|
||||
this._PostTrainingRoleId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostTrainingRoleName", DbType="NVarChar(200)")]
|
||||
public string PostTrainingRoleName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PostTrainingRoleName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PostTrainingRoleName != value))
|
||||
{
|
||||
this._PostTrainingRoleName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Solution_LargerHazardListItem")]
|
||||
|
||||
Reference in New Issue
Block a user