20221008 人员当前项目刷新信息按钮事件修改
This commit is contained in:
@@ -270,7 +270,7 @@ namespace FineUIPro.Web.Person
|
||||
|
||||
var getPPersons = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Person_Persons on x.PersonId equals y.PersonId
|
||||
where x.States == Const.ProjectPersonStates_1 && y.CurrentProjectId == null
|
||||
where x.States == Const.ProjectPersonStates_1 && y.CurrentProjectId == null
|
||||
select x).Take(1000);
|
||||
foreach (var pitem in getPPersons)
|
||||
{
|
||||
@@ -278,7 +278,28 @@ namespace FineUIPro.Web.Person
|
||||
pCountRecod++;
|
||||
}
|
||||
|
||||
info+= "共处理人员所在当前项目取值" + pCountRecod.ToString() + "条。";
|
||||
if (pCountRecod == 0)
|
||||
{
|
||||
var getPPersons2 = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Person_Persons on x.PersonId equals y.PersonId
|
||||
where x.States == Const.ProjectPersonStates_0 && y.CurrentProjectId == null
|
||||
select x).Take(1000);
|
||||
foreach (var pitem2 in getPPersons2)
|
||||
{
|
||||
var getPersons = Funs.DB.Person_Persons.FirstOrDefault(x => x.PersonId == pitem2.PersonId);
|
||||
if (getPersons != null)
|
||||
{
|
||||
getPersons.CurrentProjectId = pitem2.ProjectId;
|
||||
getPersons.CurrentProjectRoleId = pitem2.RoleIds;
|
||||
getPersons.CurrentProjectWorkPostId = pitem2.WorkPostId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
pCountRecod++;
|
||||
}
|
||||
}
|
||||
|
||||
info += "共处理人员所在当前项目取值" + pCountRecod.ToString() + "条。";
|
||||
Alert.ShowInParent(info, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user