20220804考勤月记录校正数据方法优化

This commit is contained in:
2022-08-04 16:57:44 +08:00
parent 019e2fc83e
commit 03b773e8e4
8 changed files with 114 additions and 54 deletions
@@ -684,5 +684,23 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
this.drpPost.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpPost.SelectedValueArray);
}
protected void btnPersonStates_Click(object sender, EventArgs e)
{
var getPersons = from x in Funs.DB.SitePerson_Person
where x.ProjectId == this.CurrUser.LoginProjectId && x.ExchangeTime.HasValue
select x;
int pcount = getPersons.Count();
if (pcount > 0)
{
foreach (var item in getPersons)
{
item.ExchangeTime = null;
item.ExchangeTime2 = null;
Funs.DB.SubmitChanges();
}
}
Alert.ShowInTop("操作完成,重置人员" + pcount.ToString() + "条", MessageBoxIcon.Success);
}
}
}