检查关联培训
This commit is contained in:
@@ -12,7 +12,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class PersonService
|
||||
{
|
||||
|
||||
|
||||
|
||||
#region 劳务人员列表
|
||||
/// <summary>
|
||||
@@ -186,25 +186,39 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 根据项目单位获取人员信息
|
||||
/// </summary>
|
||||
/// <param name="personId"></param>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.SitePerson_Person> GetPersonLitsByprojectIdUnitId(string projectId, string unitId)
|
||||
public static List<Model.SitePerson_Person> GetPersonLitsByProjectIdUnitId(string projectId, string unitId)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
if (!string.IsNullOrEmpty(projectId) && !string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
return (from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == projectId && x.UnitId == unitId
|
||||
//where x.ProjectId == projectId && x.UnitId == unitId
|
||||
where x.ProjectId == projectId
|
||||
orderby x.PersonName
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
else if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
return (from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == projectId
|
||||
orderby x.PersonName
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
else if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
return (from x in Funs.DB.SitePerson_Person
|
||||
where x.UnitId == unitId
|
||||
orderby x.PersonName
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
return (from x in Funs.DB.SitePerson_Person
|
||||
orderby x.PersonName
|
||||
select x).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -214,7 +228,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.SitePerson_Person> GetPersonLitsByprojectIdUnitIdTeamGroupId(string projectId, string unitId, string teamGroupId)
|
||||
{
|
||||
var getPersons = GetPersonLitsByprojectIdUnitId(projectId, unitId);
|
||||
var getPersons = GetPersonLitsByProjectIdUnitId(projectId, unitId);
|
||||
if (!string.IsNullOrEmpty(teamGroupId))
|
||||
{
|
||||
getPersons = getPersons.Where(x => x.TeamGroupId == teamGroupId).OrderBy(x => x.PersonName).ToList();
|
||||
@@ -695,7 +709,7 @@ namespace BLL
|
||||
{
|
||||
dropName.DataValueField = "PersonId";
|
||||
dropName.DataTextField = "PersonName";
|
||||
dropName.DataSource = GetPersonLitsByprojectIdUnitId(projectId, unitId);
|
||||
dropName.DataSource = GetPersonLitsByProjectIdUnitId(projectId, unitId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
@@ -720,7 +734,7 @@ namespace BLL
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(item))
|
||||
{
|
||||
var lst = GetPersonLitsByprojectIdUnitId(projectId, item);
|
||||
var lst = GetPersonLitsByProjectIdUnitId(projectId, item);
|
||||
list.AddRange(lst);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user