项目人员信息档案新增、导入补充:机构划分、组织单元、人员分类、员工子组、备注信息

This commit is contained in:
2025-08-08 17:54:10 +08:00
parent fd849d42e1
commit 8e4dec9037
212 changed files with 2489 additions and 617 deletions
@@ -106,8 +106,20 @@
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="入场时间"
HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="PositionName" DataField="PositionName" FieldType="String"
HeaderText="所属职务" HeaderTextAlign="Center" TextAlign="Center">
<f:RenderField Width="90px" ColumnID="InstitutionalDivisionName" DataField="InstitutionalDivisionName" FieldType="String"
HeaderText="机构划分" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="DepartName" DataField="DepartName" FieldType="String"
HeaderText="组织单元" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="EmployeeCategoryName" DataField="EmployeeCategoryName" FieldType="String"
HeaderText="人员分类" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="WorkAreaName" DataField="WorkAreaName" FieldType="String"
HeaderText="人员分类" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="EmployeeSubgroupName" DataField="EmployeeSubgroupName" FieldType="String"
HeaderText="员工子组" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="PostTitleName" DataField="PostTitleName" FieldType="String"
HeaderText="所属职称" HeaderTextAlign="Center" TextAlign="Center">
@@ -182,6 +194,9 @@
<f:RenderField Width="90px" ColumnID="IsCardUsedName" DataField="IsCardUsedName"
FieldType="String" HeaderText="考勤卡启用" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="Remarks" DataField="Remarks" FieldType="String"
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
@@ -1,4 +1,5 @@
using BLL;
using FineUIPro.Web.SysManage;
using System;
using System.Collections.Generic;
using System.Data;
@@ -155,7 +156,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 38);
AddDatasetToSQL(ds.Tables[0], 43);
}
catch (Exception ex)
{
@@ -201,6 +202,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
select x;
var positions = from x in Funs.DB.Base_Position select x;
var postTitles = from x in Funs.DB.Base_PostTitle select x;
var institutionalDivisions = from x in Funs.DB.Base_InstitutionalDivision select x;
var departs = from x in Funs.DB.Base_Depart select x;
var employeeCategorys = from x in Funs.DB.Base_EmployeeCategory select x;
var employeeSubgroups = from x in Funs.DB.Base_EmployeeSubgroup select x;
for (int i = 0; i < ir; i++)
{
string col1 = pds.Rows[i][1].ToString().Trim();
@@ -394,97 +399,137 @@ namespace FineUIPro.Web.HSSE.SitePerson
string col14 = pds.Rows[i][14].ToString().Trim();
if (!string.IsNullOrEmpty(col14))
{
var position = positions.FirstOrDefault(e => e.PositionName == col14);
if (position == null)
var institutionalDivision = institutionalDivisions.FirstOrDefault(e => e.Name == col14);
if (institutionalDivision == null)
{
result += "第" + (i + 2).ToString() + "行," + "所属职务" + "," + "[" + col14 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "机构划分" + "," + "[" + col14 + "]错误!" + "|";
}
}
string col15 = pds.Rows[i][15].ToString().Trim();
if (!string.IsNullOrEmpty(col15))
{
var postTitle = postTitles.FirstOrDefault(e => e.PostTitleName == col15);
if (postTitle == null)
var depart = departs.FirstOrDefault(e => e.DepartName == col15);
if (depart == null)
{
result += "第" + (i + 2).ToString() + "行," + "所属职称" + "," + "[" + col15 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "组织单元" + "," + "[" + col15 + "]错误!" + "|";
}
}
string col16 = pds.Rows[i][16].ToString().Trim();
if (!string.IsNullOrEmpty(col16))
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col16);
if (basicData == null)
var employeeCategory = employeeCategorys.FirstOrDefault(e => e.CategoryName == col16);
if (employeeCategory == null)
{
result += "第" + (i + 2).ToString() + "行," + "文化程度" + "," + "[" + col16 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "人员分类" + "," + "[" + col16 + "]错误!" + "|";
}
}
string col17 = pds.Rows[i][17].ToString().Trim();
if (!string.IsNullOrEmpty(col17))
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col17);
if (basicData == null)
var employeeSubgroup = employeeSubgroups.FirstOrDefault(e => e.SubgroupName == col17);
if (employeeSubgroup == null)
{
result += "第" + (i + 2).ToString() + "行," + "婚姻状况" + "," + "[" + col17 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "员工子组" + "," + "[" + col17 + "]错误!" + "|";
}
}
string col18 = pds.Rows[i][18].ToString().Trim();
if (!string.IsNullOrEmpty(col18))
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col18);
if (basicData == null)
var position = positions.FirstOrDefault(e => e.PositionName == col18);
if (position == null)
{
result += "第" + (i + 2).ToString() + "行," + "政治面貌" + "," + "[" + col18 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "所属职务" + "," + "[" + col18 + "]错误!" + "|";
}
}
string col19 = pds.Rows[i][19].ToString().Trim();
if (!string.IsNullOrEmpty(col19))
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col19);
if (basicData == null)
var postTitle = postTitles.FirstOrDefault(e => e.PostTitleName == col19);
if (postTitle == null)
{
result += "第" + (i + 2).ToString() + "行," + "民族" + "," + "[" + col19 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "所属职称" + "," + "[" + col19 + "]错误!" + "|";
}
}
string col20 = pds.Rows[i][20].ToString().Trim();
if (!string.IsNullOrEmpty(col20))
{
var country = countrys.FirstOrDefault(e => e.Cname == col20);
if (country == null)
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col20);
if (basicData == null)
{
result += "第" + (i + 2).ToString() + "行," + "国家" + "," + "[" + col20 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "文化程度" + "," + "[" + col20 + "]错误!" + "|";
}
}
string col21 = pds.Rows[i][21].ToString().Trim();
if (!string.IsNullOrEmpty(col21))
{
var city = citys.FirstOrDefault(e => e.Cname == col21);
if (city == null)
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col21);
if (basicData == null)
{
result += "第" + (i + 2).ToString() + "行," + "省或地区" + "," + "[" + col21 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "婚姻状况" + "," + "[" + col21 + "]错误!" + "|";
}
}
string col22 = pds.Rows[i][22].ToString().Trim();
if (!string.IsNullOrEmpty(col22))
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == col22);
if (cnProfessional == null)
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col22);
if (basicData == null)
{
result += "第" + (i + 2).ToString() + "行," + "主专业" + "," + "[" + col22 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "政治面貌" + "," + "[" + col22 + "]错误!" + "|";
}
}
string col23 = pds.Rows[i][23].ToString().Trim();
if (!string.IsNullOrEmpty(col23))
{
string[] strs = col23.Split('');
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col23);
if (basicData == null)
{
result += "第" + (i + 2).ToString() + "行," + "民族" + "," + "[" + col23 + "]错误!" + "|";
}
}
string col24 = pds.Rows[i][24].ToString().Trim();
if (!string.IsNullOrEmpty(col24))
{
var country = countrys.FirstOrDefault(e => e.Cname == col24);
if (country == null)
{
result += "第" + (i + 2).ToString() + "行," + "国家" + "," + "[" + col24 + "]错误!" + "|";
}
}
string col25 = pds.Rows[i][25].ToString().Trim();
if (!string.IsNullOrEmpty(col25))
{
var city = citys.FirstOrDefault(e => e.Cname == col25);
if (city == null)
{
result += "第" + (i + 2).ToString() + "行," + "省或地区" + "," + "[" + col25 + "]错误!" + "|";
}
}
string col26 = pds.Rows[i][26].ToString().Trim();
if (!string.IsNullOrEmpty(col26))
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == col26);
if (cnProfessional == null)
{
result += "第" + (i + 2).ToString() + "行," + "主专业" + "," + "[" + col26 + "]错误!" + "|";
}
}
string col27 = pds.Rows[i][27].ToString().Trim();
if (!string.IsNullOrEmpty(col27))
{
string[] strs = col27.Split('');
foreach (var item in strs)
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == item);
@@ -495,54 +540,28 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
}
string col24 = pds.Rows[i][24].ToString().Trim();
if (!string.IsNullOrEmpty(col24))
{
var certificate = certificates.FirstOrDefault(e => e.CertificateName == col24);
if (certificate == null)
{
result += "第" + (i + 2).ToString() + "行," + "特岗证书" + "," + "[" + col24 + "]错误!" + "|";
}
}
string col27 = pds.Rows[i][27].ToString().Trim();
if (!string.IsNullOrEmpty(col27))
{
try
{
DateTime date = Convert.ToDateTime(col27);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "发证日期" + "," + "[" + col27 + "]错误!" + "|";
}
}
string col28 = pds.Rows[i][28].ToString().Trim();
if (!string.IsNullOrEmpty(col28))
{
try
var certificate = certificates.FirstOrDefault(e => e.CertificateName == col28);
if (certificate == null)
{
DateTime date = Convert.ToDateTime(col28);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "证书有效期" + "," + "[" + col28 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "特岗证书" + "," + "[" + col28 + "]错误!" + "|";
}
}
string col29 = pds.Rows[i][29].ToString().Trim();
if (!string.IsNullOrEmpty(col29))
string col31 = pds.Rows[i][31].ToString().Trim();
if (!string.IsNullOrEmpty(col31))
{
try
{
DateTime date = Convert.ToDateTime(col29);
DateTime date = Convert.ToDateTime(col31);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "出生日期" + "," + "[" + col29 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "发证日期" + "," + "[" + col31 + "]错误!" + "|";
}
}
string col32 = pds.Rows[i][32].ToString().Trim();
if (!string.IsNullOrEmpty(col32))
{
@@ -552,34 +571,60 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "出场时间" + "," + "[" + col32 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "证书有效期" + "," + "[" + col32 + "]错误!" + "|";
}
}
string col34 = pds.Rows[i][34].ToString().Trim();
if (!string.IsNullOrEmpty(col34))
string col33 = pds.Rows[i][33].ToString().Trim();
if (!string.IsNullOrEmpty(col33))
{
if (col34 != "是" && col34 != "否")
try
{
result += "第" + (i + 2).ToString() + "行," + "外籍" + "," + "[" + col34 + "]错误!" + "|";
DateTime date = Convert.ToDateTime(col33);
}
}
string col35 = pds.Rows[i][35].ToString().Trim();
if (!string.IsNullOrEmpty(col35))
{
if (col35 != "是" && col35 != "否")
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "外聘" + "," + "[" + col35 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "出生日期" + "," + "[" + col33 + "]错误!" + "|";
}
}
string col36 = pds.Rows[i][36].ToString().Trim();
if (!string.IsNullOrEmpty(col36))
{
if (col36 != "是" && col36 != "否")
try
{
result += "第" + (i + 2).ToString() + "行," + "人员是否在场" + "," + "[" + col36 + "]错误!" + "|";
DateTime date = Convert.ToDateTime(col36);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "出场时间" + "," + "[" + col36 + "]错误!" + "|";
}
}
string col38 = pds.Rows[i][38].ToString().Trim();
if (!string.IsNullOrEmpty(col38))
{
if (col38 != "是" && col38 != "否")
{
result += "第" + (i + 2).ToString() + "行," + "外籍" + "," + "[" + col38 + "]错误!" + "|";
}
}
string col39 = pds.Rows[i][39].ToString().Trim();
if (!string.IsNullOrEmpty(col39))
{
if (col39 != "是" && col39 != "否")
{
result += "第" + (i + 2).ToString() + "行," + "外聘" + "," + "[" + col39 + "]错误!" + "|";
}
}
string col40 = pds.Rows[i][40].ToString().Trim();
if (!string.IsNullOrEmpty(col40))
{
if (col40 != "是" && col40 != "否")
{
result += "第" + (i + 2).ToString() + "行," + "人员是否在场" + "," + "[" + col40 + "]错误!" + "|";
}
}
else
@@ -587,12 +632,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
result += "第" + (i + 2).ToString() + "行," + "人员是否在场" + "," + "此项为必填项!" + "|";
}
string col37 = pds.Rows[i][37].ToString().Trim();
if (!string.IsNullOrEmpty(col37))
string col41 = pds.Rows[i][41].ToString().Trim();
if (!string.IsNullOrEmpty(col41))
{
if (col37 != "是" && col37 != "否")
if (col41 != "是" && col41 != "否")
{
result += "第" + (i + 2).ToString() + "行," + "考勤卡是否启用" + "," + "[" + col37 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "考勤卡是否启用" + "," + "[" + col41 + "]错误!" + "|";
}
}
//else
@@ -694,7 +739,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 38);
AddDatasetToSQL2(ds.Tables[0], 43);
}
catch (Exception ex)
{
@@ -741,6 +786,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
select x;
var positions = from x in Funs.DB.Base_Position select x;
var postTitles = from x in Funs.DB.Base_PostTitle select x;
var institutionalDivisions = from x in Funs.DB.Base_InstitutionalDivision select x;
var departs = from x in Funs.DB.Base_Depart select x;
var employeeCategorys = from x in Funs.DB.Base_EmployeeCategory select x;
var employeeSubgroups = from x in Funs.DB.Base_EmployeeSubgroup select x;
for (int i = 0; i < ir; i++)
{
string col1 = pds.Rows[i][1].ToString().Trim();
@@ -786,6 +835,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
string col35 = pds.Rows[i][35].ToString().Trim();
string col36 = pds.Rows[i][36].ToString().Trim();
string col37 = pds.Rows[i][37].ToString().Trim();
string col38 = pds.Rows[i][38].ToString().Trim();
string col39 = pds.Rows[i][39].ToString().Trim();
string col40 = pds.Rows[i][40].ToString().Trim();
string col41 = pds.Rows[i][41].ToString().Trim();
string col42 = pds.Rows[i][42].ToString().Trim();
if (!string.IsNullOrEmpty(col0))//卡号
{
@@ -878,92 +932,129 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
person.InTime = Funs.GetNewDateTime(col13);
}
if (!string.IsNullOrEmpty(col14))//所属职务
if (!string.IsNullOrEmpty(col14))//机构划分
{
var position = positions.FirstOrDefault(e => e.PositionName == col14);
var institutionalDivision = institutionalDivisions.FirstOrDefault(e => e.Name == col14);
if (institutionalDivision != null)
{
person.InstitutionalDivisionId = institutionalDivision.Id;
person.InstitutionalDivisionName = institutionalDivision.Name;
}
}
if (!string.IsNullOrEmpty(col15))//组织单元
{
var depart = departs.FirstOrDefault(e => e.DepartName == col15);
if (depart != null)
{
person.DepartId = depart.DepartId;
person.DepartName = depart.DepartName;
}
}
if (!string.IsNullOrEmpty(col16))//人员分类
{
var employeeCategory = employeeCategorys.FirstOrDefault(e => e.CategoryName == col16);
if (employeeCategory != null)
{
person.EmployeeCategoryId = employeeCategory.CategoryId;
person.EmployeeCategoryName = employeeCategory.CategoryName;
}
}
if (!string.IsNullOrEmpty(col17))//员工子组
{
var employeeSubgroup = employeeSubgroups.FirstOrDefault(e => e.SubgroupName == col17);
if (employeeSubgroup != null)
{
person.EmployeeSubgroupId = employeeSubgroup.SubgroupId;
person.EmployeeSubgroupName = employeeSubgroup.SubgroupName;
}
}
if (!string.IsNullOrEmpty(col18))//所属职务
{
var position = positions.FirstOrDefault(e => e.PositionName == col18);
if (position != null)
{
person.PositionId = position.PositionId;
person.PositionName = position.PositionName;
}
}
if (!string.IsNullOrEmpty(col15))//所属职称
if (!string.IsNullOrEmpty(col19))//所属职称
{
var postTitle = postTitles.FirstOrDefault(e => e.PostTitleName == col15);
var postTitle = postTitles.FirstOrDefault(e => e.PostTitleName == col19);
if (postTitle != null)
{
person.PostTitleId = postTitle.PostTitleId;
person.PostTitleName = postTitle.PostTitleName;
}
}
if (!string.IsNullOrEmpty(col16))//文化程度
if (!string.IsNullOrEmpty(col20))//文化程度
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col16);
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col20);
if (basicData != null)
{
person.EduLevel = basicData.DictCode;
person.EduLevelName = basicData.DictName;
}
}
if (!string.IsNullOrEmpty(col17))//婚姻状况
if (!string.IsNullOrEmpty(col21))//婚姻状况
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col17);
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col21);
if (basicData != null)
{
person.MaritalStatus = basicData.DictCode;
person.MaritalStatusName = basicData.DictName;
}
}
if (!string.IsNullOrEmpty(col18))//政治面貌
if (!string.IsNullOrEmpty(col22))//政治面貌
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col18);
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col22);
if (basicData != null)
{
person.PoliticsStatus = basicData.DictCode;
person.PoliticsStatusName = basicData.DictName;
}
}
if (!string.IsNullOrEmpty(col19))//民族
if (!string.IsNullOrEmpty(col23))//民族
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col19);
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col23);
if (basicData != null)
{
person.Nation = basicData.DictCode;
person.NationName = basicData.DictName;
}
}
if (!string.IsNullOrEmpty(col20))//国家
if (!string.IsNullOrEmpty(col24))//国家
{
var country = countrys.FirstOrDefault(e => e.Cname == col20);
var country = countrys.FirstOrDefault(e => e.Cname == col24);
if (country != null)
{
person.CountryCode = country.CountryId;
person.CountryName = country.Cname;
}
}
if (!string.IsNullOrEmpty(col21))//省或地区
if (!string.IsNullOrEmpty(col25))//省或地区
{
var city = citys.FirstOrDefault(e => e.Cname == col21);
var city = citys.FirstOrDefault(e => e.Cname == col25);
if (city != null)
{
person.ProvinceCode = city.ProvinceCode;
person.ProvinceName = city.Cname;
}
}
if (!string.IsNullOrEmpty(col22))//主专业
if (!string.IsNullOrEmpty(col26))//主专业
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == col22);
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == col26);
if (cnProfessional != null)
{
person.MainCNProfessionalId = cnProfessional.CNProfessionalId;
person.MainCNProfessionalName = cnProfessional.ProfessionalName;
}
}
if (!string.IsNullOrEmpty(col23))//副专业
if (!string.IsNullOrEmpty(col27))//副专业
{
person.ViceCNProfessionalName = col23;
person.ViceCNProfessionalName = col27;
string ids = string.Empty;
string[] strs = col23.Split('');
string[] strs = col27.Split('');
foreach (var item in strs)
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == item);
@@ -978,63 +1069,67 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
person.ViceCNProfessionalId = ids;
}
if (!string.IsNullOrEmpty(col24))//特岗证书
if (!string.IsNullOrEmpty(col28))//特岗证书
{
personQuality.CertificateName = col24;
personQuality.CertificateName = col28;
}
if (!string.IsNullOrEmpty(col25))//证书编号
if (!string.IsNullOrEmpty(col29))//证书编号
{
personQuality.CertificateNo = col25;
personQuality.CertificateNo = col29;
}
if (!string.IsNullOrEmpty(col26))//发证单位
if (!string.IsNullOrEmpty(col30))//发证单位
{
personQuality.SendUnit = col26;
personQuality.SendUnit = col30;
}
if (!string.IsNullOrEmpty(col27))//发证日期
if (!string.IsNullOrEmpty(col31))//发证日期
{
personQuality.SendDate = Funs.GetNewDateTime(col27);
personQuality.SendDate = Funs.GetNewDateTime(col31);
}
if (!string.IsNullOrEmpty(col28))//证书有效期
if (!string.IsNullOrEmpty(col32))//证书有效期
{
personQuality.LimitDate = Funs.GetNewDateTime(col28);
personQuality.LimitDate = Funs.GetNewDateTime(col32);
}
if (!string.IsNullOrEmpty(col29))//出生日期
if (!string.IsNullOrEmpty(col33))//出生日期
{
person.Birthday = Funs.GetNewDateTime(col29);
person.Birthday = Funs.GetNewDateTime(col33);
}
if (!string.IsNullOrEmpty(col30))//电话
if (!string.IsNullOrEmpty(col34))//电话
{
person.Telephone = col30;
person.Telephone = col34;
}
if (!string.IsNullOrEmpty(col31))//家庭地址
if (!string.IsNullOrEmpty(col35))//家庭地址
{
person.Address = col31;
person.Address = col35;
}
if (!string.IsNullOrEmpty(col32))//出场时间
if (!string.IsNullOrEmpty(col36))//出场时间
{
person.OutTime = Funs.GetNewDateTime(col32);
person.OutTime = Funs.GetNewDateTime(col36);
}
if (!string.IsNullOrEmpty(col33))//出场原因
if (!string.IsNullOrEmpty(col37))//出场原因
{
person.OutResult = col33;
person.OutResult = col37;
}
if (!string.IsNullOrEmpty(col34))//外籍
if (!string.IsNullOrEmpty(col38))//外籍
{
person.IsForeignStr = col34;
person.IsForeign = col34 == "是" ? true : false;
person.IsForeignStr = col38;
person.IsForeign = col38 == "是" ? true : false;
}
if (!string.IsNullOrEmpty(col35))//外聘
if (!string.IsNullOrEmpty(col39))//外聘
{
person.IsOutsideStr = col35;
person.IsOutside = col35 == "是" ? true : false;
person.IsOutsideStr = col39;
person.IsOutside = col39 == "是" ? true : false;
}
if (!string.IsNullOrEmpty(col36))//人员是否在场
if (!string.IsNullOrEmpty(col40))//人员是否在场
{
person.IsUsedName = col36;
person.IsUsedName = col40;
}
if (!string.IsNullOrEmpty(col37))//考勤卡是否启用
if (!string.IsNullOrEmpty(col41))//考勤卡是否启用
{
person.IsCardUsedName = col37;
person.IsCardUsedName = col41;
}
if (!string.IsNullOrEmpty(col42))//备注
{
person.Remarks = col42;
}
person.PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person));
persons.Add(person);
@@ -1095,9 +1190,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
newPerson.WorkPostId = persons[i].WorkPostId;
newPerson.TeamGroupId = persons[i].TeamGroupId;
newPerson.WorkAreaId = persons[i].WorkAreaId;
newPerson.InTime = persons[i].InTime;
newPerson.InTime = persons[i].InTime;
newPerson.PositionId = persons[i].PositionId;
newPerson.PostTitleId = persons[i].PostTitleId;
newPerson.DepartId = persons[i].DepartId;
newPerson.EmployeeCategoryId = persons[i].EmployeeCategoryId;
newPerson.EmployeeSubgroupId = persons[i].EmployeeSubgroupId;
newPerson.InstitutionalDivisionId = persons[i].InstitutionalDivisionId;
newPerson.DepartName = persons[i].DepartName;
newPerson.EmployeeCategoryName = persons[i].EmployeeCategoryName;
newPerson.EmployeeSubgroupName = persons[i].EmployeeSubgroupName;
newPerson.InstitutionalDivisionName = persons[i].InstitutionalDivisionName;
newPerson.EduLevel = persons[i].EduLevel;
newPerson.MaritalStatus = persons[i].MaritalStatus;
newPerson.PoliticsStatus = persons[i].PoliticsStatus;
@@ -1,7 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonListEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.PersonListEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>编辑人员信息</title>
@@ -74,15 +73,15 @@
<f:TextBox ID="txtIdentityCard" runat="server" Label="证件号码" MaxLength="50" LabelAlign="Right" LabelWidth="110px"
Required="true" ShowRedStar="true" OnBlur="txtIdentityCard_TextChanged" EnableBlurEvent="true">
</f:TextBox>
<f:DatePicker ID="txtIdcardStartDate" runat="server" Label="证件开始日期" LabelAlign="Right" LabelWidth="110px">
<f:DatePicker ID="txtIdcardStartDate" runat="server" Label="证件开始日期" LabelAlign="Right" LabelWidth="110px">
</f:DatePicker>
<f:DatePicker ID="txtIdcardEndDate" runat="server" Label="证件有效日期" LabelAlign="Right" LabelWidth="110px">
<f:DatePicker ID="txtIdcardEndDate" runat="server" Label="证件有效日期" LabelAlign="Right" LabelWidth="110px">
</f:DatePicker>
<%--<f:TextBox ID="txtUnitName" runat="server" Label="所属单位" LabelAlign="Right"
Readonly="true" LabelWidth="110px"></f:TextBox>--%>
<f:DropDownList ID="drpUnit" runat="server" Label="所属单位" LabelWidth="110px" LabelAlign="Right" Required="True" ShowRedStar="True" EnableEdit="true">
</f:DropDownList>
<f:DropDownBox runat="server" Label="单位工程" ShowRedStar="true" LabelAlign="Right" LabelWidth="110px"
<f:DropDownBox runat="server" Label="单位工程" LabelAlign="Right" LabelWidth="110px"
Required="true" ID="txtWorkArea" EmptyText="--请选择--" EnableMultiSelect="true" MatchFieldWidth="true">
<PopPanel>
<f:Grid ID="gvWorkArea" DataIDField="UnitWorkId"
@@ -96,11 +95,12 @@
</f:Grid>
</PopPanel>
</f:DropDownBox>
<f:DropDownList ID="drpInstitutionalDivision" runat="server" Label="机构划分" EnableEdit="true" LabelAlign="Right" LabelWidth="110px">
</f:DropDownList>
<f:DropDownList ID="drpDepart" runat="server" Label="组织单元" EnableEdit="true" LabelAlign="Right" LabelWidth="110px">
</f:DropDownList>
<f:DropDownList ID="drpMainCNProfessional" runat="server" Label="主专业" EnableEdit="true" LabelAlign="Right" LabelWidth="110px">
</f:DropDownList>
<f:DropDownList ID="drpAuditor" runat="server" Label="审核人" LabelAlign="Right" EnableEdit="true" LabelWidth="110px">
</f:DropDownList>
<f:CheckBox runat="server" ID="ckIsForeign" Label="外籍" LabelAlign="Right" LabelWidth="110px"></f:CheckBox>
<f:DatePicker ID="txtBirthday" runat="server" Label="出生日期" LabelAlign="Right" LabelWidth="110px">
</f:DatePicker>
<f:DatePicker ID="txtInTime" runat="server" Label="入场时间" LabelAlign="Right" LabelWidth="110px" ShowRedStar="true" Required="true">
@@ -122,22 +122,22 @@
<f:RadioItem Value="2" Text="女" />
</f:RadioButtonList>
<f:RadioButtonList ID="rblIdcardForever" runat="server" Label="证件是否永久有效" LabelWidth="145px" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="rblIdcardForever_SelectedIndexChanged">
<f:RadioItem Value="Y" Text="是" />
<f:RadioItem Value="N" Text="否" Selected="true"/>
<f:RadioItem Value="Y" Text="是" />
<f:RadioItem Value="N" Text="否" Selected="true" />
</f:RadioButtonList>
<f:TextBox ID="txtIdcardAddress" runat="server" Label="发证机关" MaxLength="50" LabelAlign="Right" >
<f:TextBox ID="txtIdcardAddress" runat="server" Label="发证机关" MaxLength="50" LabelAlign="Right">
</f:TextBox>
<f:DropDownList ID="drpPost" runat="server" Label="所属岗位" LabelAlign="Right" Required="True" ShowRedStar="True" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpTeamGroup" runat="server" Label="所属班组" LabelAlign="Right" ShowRedStar="true" Required="true">
</f:DropDownList>
<f:DropDownList ID="drpViceCNProfessional" runat="server" Label="副专业" EnableEdit="true" LabelAlign="Right"
<f:DropDownList ID="drpEmployeeCategory" runat="server" Label="人员分类" EnableEdit="true" LabelAlign="Right">
</f:DropDownList>
<f:DropDownList ID="drpEmployeeSubgroup" runat="server" Label="员工子组" EnableEdit="true" LabelAlign="Right">
</f:DropDownList>
<f:DropDownList ID="drpViceCNProfessional" runat="server" Label="副专业" EnableEdit="true" LabelAlign="Right"
EnableMultiSelect="true" MaxLength="500" EnableCheckBoxSelect="true">
</f:DropDownList>
<f:DatePicker ID="txtAuditorDate" runat="server" Label="审核时间" LabelAlign="Right" >
</f:DatePicker>
<f:CheckBox runat="server" ID="ckIsOutside" Label="外聘" LabelAlign="Right"></f:CheckBox>
<f:TextBox ID="txtTelephone" runat="server" Label="电话" LabelAlign="Right" MaxLength="50">
</f:TextBox>
<f:RadioButtonList ID="rblIsUsed" runat="server" Label="人员在场" LabelAlign="Right" Required="True" ShowRedStar="True">
@@ -146,7 +146,6 @@
</f:RadioButtonList>
<%--<f:DropDownList ID="drpRole" runat="server" Label="培训岗位" LabelAlign="Right" Required="True" ShowRedStar="True" EnableEdit="true">
</f:DropDownList>--%>
</Items>
</f:Panel>
<f:Panel ID="Panel5" Title="面板1" BoxFlex="2" runat="server" ShowBorder="false" ShowHeader="false"
@@ -171,25 +170,25 @@
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpPosition" runat="server" Label="所属职务" LabelAlign="Right" EnableEdit="true" >
<f:DropDownList ID="drpPosition" runat="server" Label="所属职务" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpTitle" runat="server" Label="所属职称" LabelAlign="Right" EnableEdit="true" >
<f:DropDownList ID="drpTitle" runat="server" Label="所属职称" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpEduLevel" runat="server" Label="文化程度" EnableEdit="true" LabelAlign="Right" >
<f:DropDownList ID="drpEduLevel" runat="server" Label="文化程度" EnableEdit="true" LabelAlign="Right">
</f:DropDownList>
<f:DropDownList ID="drpMaritalStatus" runat="server" Label="婚姻状况" EnableEdit="true" LabelAlign="Right" >
<f:DropDownList ID="drpMaritalStatus" runat="server" Label="婚姻状况" EnableEdit="true" LabelAlign="Right">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpPoliticsStatus" runat="server" Label="政治面貌" EnableEdit="true" LabelAlign="Right" >
<f:DropDownList ID="drpPoliticsStatus" runat="server" Label="政治面貌" EnableEdit="true" LabelAlign="Right">
</f:DropDownList>
<f:DropDownList ID="drpNation" runat="server" Label="民族" EnableEdit="true" LabelAlign="Right" >
<f:DropDownList ID="drpNation" runat="server" Label="民族" EnableEdit="true" LabelAlign="Right">
</f:DropDownList>
</Items>
</f:FormRow>
@@ -197,13 +196,13 @@
<Items>
<f:DropDownList ID="drpCountryCode" runat="server" Label="国家" EnableEdit="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpCountryCode_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpProvinceCode" runat="server" Label="省或地区" EnableEdit="true" LabelAlign="Right" >
<f:DropDownList ID="drpProvinceCode" runat="server" Label="省或地区" EnableEdit="true" LabelAlign="Right">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpCertificate" runat="server" Label="特岗证书" LabelAlign="Right" EnableEdit="true">
<f:DropDownList ID="drpCertificate" runat="server" Label="特岗证书" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:TextBox ID="txtCertificateCode" runat="server" Label="证书编号" LabelAlign="Right" MaxLength="20">
</f:TextBox>
@@ -211,9 +210,9 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtCertificateLimitTime" runat="server" Label="证书有效期" LabelAlign="Right" >
<f:DatePicker ID="txtCertificateLimitTime" runat="server" Label="证书有效期" LabelAlign="Right">
</f:DatePicker>
<f:RadioButtonList ID="rblIsCardUsed" runat="server" Label="考勤卡启用"
<f:RadioButtonList ID="rblIsCardUsed" runat="server" Label="考勤卡启用"
LabelAlign="Right" Required="True">
<f:RadioItem Value="True" Text="是" />
<f:RadioItem Value="False" Text="否" />
@@ -222,11 +221,25 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtAddress" runat="server" Label="家庭地址" MaxLength="500" LabelAlign="Right" >
</f:TextBox>
<f:DatePicker ID="txtOutTime" runat="server" Label="出场时间" LabelAlign="Right">
<f:DropDownList ID="drpAuditor" runat="server" Label="审核人" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DatePicker ID="txtAuditorDate" runat="server" Label="审核时间" LabelAlign="Right">
</f:DatePicker>
</Items>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:CheckBox runat="server" ID="ckIsForeign" Label="外籍" LabelAlign="Right"></f:CheckBox>
<f:CheckBox runat="server" ID="ckIsOutside" Label="外聘" LabelAlign="Right"></f:CheckBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtAddress" runat="server" Label="家庭地址" MaxLength="500" LabelAlign="Right">
</f:TextBox>
<f:DatePicker ID="txtOutTime" runat="server" Label="出场时间" LabelAlign="Right">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="100%">
<Items>
@@ -234,6 +247,11 @@
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="100%">
<Items>
<f:TextArea ID="txtRemarks" runat="server" Label="备注" LabelAlign="Right" MaxLength="500" Height="100px"></f:TextArea>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
@@ -137,6 +137,22 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
this.drpMainCNProfessional.SelectedValue = person.MainCNProfessionalId;
}
if (!string.IsNullOrEmpty(person.InstitutionalDivisionId))
{
this.drpInstitutionalDivision.SelectedValue = person.InstitutionalDivisionId;
}
if (!string.IsNullOrEmpty(person.DepartId))
{
this.drpDepart.SelectedValue = person.DepartId;
}
if (!string.IsNullOrEmpty(person.EmployeeCategoryId))
{
this.drpEmployeeCategory.SelectedValue = person.EmployeeCategoryId;
}
if (!string.IsNullOrEmpty(person.EmployeeSubgroupId))
{
this.drpEmployeeSubgroup.SelectedValue = person.EmployeeSubgroupId;
}
if (!string.IsNullOrEmpty(person.ViceCNProfessionalId))
{
this.drpViceCNProfessional.SelectedValueArray = person.ViceCNProfessionalId.Split(',');
@@ -162,6 +178,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.txtAddress.Text = person.Address;
this.txtTelephone.Text = person.Telephone;
this.txtOutResult.Text = person.OutResult;
this.txtRemarks.Text = person.Remarks;
if (person.IsForeign.HasValue)
{
this.ckIsForeign.Checked = person.IsForeign.Value;
@@ -276,7 +293,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
PostTitleService.InitPostTitleDropDownList(this.drpTitle, true);
TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, this.ProjectId, this.UnitId, true);
CertificateService.InitCertificateDropDownList(this.drpCertificate, true);
UserService.InitFlowOperateControlUserDropDownList(this.drpAuditor, this.ProjectId, Const.UnitId_TCC, true);
UserService.InitFlowOperateControlUserDropDownList(this.drpAuditor, this.ProjectId, Const.UnitId_XJYJ, true);
EmployeeCategoryService.InitCategoryDropDownList(this.drpEmployeeCategory, true);//人员分类
EmployeeSubgroupService.InitSubgroupDropDownList(this.drpEmployeeSubgroup, true);//人员子组
DepartService.InitDepartDropDownList(this.drpDepart, true);//组织单元、部门
InstitutionalDivisionService.InitInstitutionalDivisionDropDownList(this.drpInstitutionalDivision, true);//机构划分
CNProfessionalService.InitCNProfessionalDownList(this.drpMainCNProfessional, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpViceCNProfessional, true);
BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpEduLevel, "EDU_LEVEL", true);
@@ -463,6 +484,22 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
person.MaritalStatus = this.drpMaritalStatus.SelectedValue;
}
if (this.drpInstitutionalDivision.SelectedValue != Const._Null)
{
person.InstitutionalDivisionId = this.drpInstitutionalDivision.SelectedValue;
}
if (this.drpDepart.SelectedValue != Const._Null)
{
person.DepartId = this.drpDepart.SelectedValue;
}
if (this.drpEmployeeCategory.SelectedValue != Const._Null)
{
person.EmployeeCategoryId = this.drpEmployeeCategory.SelectedValue;
}
if (this.drpEmployeeSubgroup.SelectedValue != Const._Null)
{
person.EmployeeSubgroupId = this.drpEmployeeSubgroup.SelectedValue;
}
if (this.drpMainCNProfessional.SelectedValue != Const._Null)
{
person.MainCNProfessionalId = this.drpMainCNProfessional.SelectedValue;
@@ -487,6 +524,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
person.Address = this.txtAddress.Text.Trim();
person.Telephone = this.txtTelephone.Text.Trim();
person.OutResult = this.txtOutResult.Text.Trim();
person.Remarks = this.txtRemarks.Text.Trim();
if (!string.IsNullOrEmpty(this.txtInTime.Text.Trim()))
{
person.InTime = Convert.ToDateTime(this.txtInTime.Text.Trim());
@@ -230,6 +230,24 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.Grid gvWorkArea;
/// <summary>
/// drpInstitutionalDivision 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpInstitutionalDivision;
/// <summary>
/// drpDepart 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpDepart;
/// <summary>
/// drpMainCNProfessional 控件。
/// </summary>
@@ -239,24 +257,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.DropDownList drpMainCNProfessional;
/// <summary>
/// drpAuditor 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAuditor;
/// <summary>
/// ckIsForeign 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIsForeign;
/// <summary>
/// txtBirthday 控件。
/// </summary>
@@ -356,6 +356,24 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.DropDownList drpTeamGroup;
/// <summary>
/// drpEmployeeCategory 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpEmployeeCategory;
/// <summary>
/// drpEmployeeSubgroup 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpEmployeeSubgroup;
/// <summary>
/// drpViceCNProfessional 控件。
/// </summary>
@@ -365,24 +383,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.DropDownList drpViceCNProfessional;
/// <summary>
/// txtAuditorDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtAuditorDate;
/// <summary>
/// ckIsOutside 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIsOutside;
/// <summary>
/// txtTelephone 控件。
/// </summary>
@@ -554,6 +554,42 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsCardUsed;
/// <summary>
/// drpAuditor 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAuditor;
/// <summary>
/// txtAuditorDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtAuditorDate;
/// <summary>
/// ckIsForeign 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIsForeign;
/// <summary>
/// ckIsOutside 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIsOutside;
/// <summary>
/// txtAddress 控件。
/// </summary>
@@ -581,6 +617,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
/// </remarks>
protected global::FineUIPro.TextBox txtOutResult;
/// <summary>
/// txtRemarks 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemarks;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -45,7 +45,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && this.CurrUser.UnitId != Const.UnitId_TCC)
if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && this.CurrUser.UnitId != Const.UnitId_XJYJ)
{
strSql += " AND UnitId = @UnitId";
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue));
@@ -52,7 +52,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
else
{
this.drpUnit.SelectedValue = Const.UnitId_TCC;
this.drpUnit.SelectedValue = Const.UnitId_XJYJ;
}
// 绑定表格
BindGrid();
@@ -24,7 +24,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
if (!IsPostBack)
{
this.lbThisUnit.Text = UnitService.GetUnitNameByUnitId(Const.UnitId_TCC);
this.lbThisUnit.Text = UnitService.GetUnitNameByUnitId(Const.UnitId_XJYJ);
this.lbProject.Text = ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
this.PersonId = Request.Params["PersonId"];
@@ -36,7 +36,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.ProjectId = Request.Params["projectId"];
}
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
this.drpUnit.SelectedValue = string.IsNullOrEmpty(this.CurrUser.UnitId) ? Const.UnitId_TCC : this.CurrUser.UnitId;
this.drpUnit.SelectedValue = string.IsNullOrEmpty(this.CurrUser.UnitId) ? Const.UnitId_XJYJ : this.CurrUser.UnitId;
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
{
this.drpUnit.Enabled = false;