/// <summary> /// 创建违规信息记录 /// </summary> /// <param name="violation"></param> void IUserData.CreateViolation(InfoEmployeeViolation violation) { using (MicroERPContext db = new MicroERPContext()) { db.EmployeeViolations.Add(violation); db.SaveChanges(); } }
/// <summary> /// 创建违规记录 /// </summary> /// <param name="violation"></param> /// <returns></returns> public bool CreateNewViolation(InfoEmployeeViolation violation) { bool isSuccess = false; userData.CreateViolation(violation); isSuccess = true; return(isSuccess); }
void IFundsData.UpdateVielationRecord(InfoEmployeeViolation employeeViolationInfo) { var before = db.EmployeeViolations.Find(employeeViolationInfo.RecordID); before.RecordDate = employeeViolationInfo.RecordDate; before.ViolateFor = employeeViolationInfo.ViolateFor; before.FundsPunish = employeeViolationInfo.FundsPunish; before.ReferID = employeeViolationInfo.ReferID; db.SaveChanges(); }
void IFundsData.CreateViolationRecord(InfoEmployeeViolation employeeViolationInfo) { db.EmployeeViolations.Add(employeeViolationInfo); db.SaveChanges(); }