20210817人员批量离场修改
This commit is contained in:
parent
9b4b36afdd
commit
33835b762e
|
@ -503,6 +503,27 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 人员离岗
|
||||
/// </summary>
|
||||
/// <param name="person"></param>
|
||||
public static void PersonOut(string personId, DateTime date)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var person = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == personId);
|
||||
if (person != null)
|
||||
{
|
||||
person.OutTime = date;
|
||||
person.IsUsed = true;
|
||||
person.ExchangeTime = null;
|
||||
person.ExchangeTime2 = null;
|
||||
person.RealNameUpdateTime = null;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据人员Id删除一个人员信息
|
||||
/// </summary>
|
||||
|
|
|
@ -3,6 +3,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
|
@ -85,17 +86,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||
{
|
||||
foreach (var item in this.drpPerson.Values)
|
||||
{
|
||||
var person = BLL.PersonService.GetPersonById(item);
|
||||
if (person != null)
|
||||
{
|
||||
person.OutTime = Funs.GetNewDateTime(this.txtChangeTime.Text);
|
||||
person.IsUsed = true;
|
||||
person.OutTime = null;
|
||||
person.ExchangeTime = null;
|
||||
person.ExchangeTime2 = null;
|
||||
person.RealNameUpdateTime = null;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
DateTime date = Funs.GetNewDateTimeOrNow(this.txtChangeTime.Text);
|
||||
PersonService.PersonOut(item, date);
|
||||
}
|
||||
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, "人员批量出场", null, BLL.Const.PersonListMenuId, BLL.Const.BtnModify);
|
||||
|
|
Loading…
Reference in New Issue