/// <summary> /// SetInfo using model /// </summary> /// <param name="model"></param> /// <returns></returns> private static AbsenceReporting SetInfo(BE.AbsenceReporting model) { var dbAbsence = new AbsenceReporting(); dbAbsence.ID = model.ID; dbAbsence.ReportingDate = model.ReportingDate; dbAbsence.ReasonDetails = model.ReasonDetails; //dbAbsence.ScannedDocument = model.ScannedDocument; dbAbsence.AbsenceReason = model.AbsenceReason; return(dbAbsence); }
public bool CreateAbsenceReporting(Trinity.BE.AbsenceReporting model, bool isLocal) { try { var absenceRepo = _localUnitOfWork.GetRepository <AbsenceReporting>(); AbsenceReporting dbAbsence = SetInfo(model); absenceRepo.Add(dbAbsence); _localUnitOfWork.Save(); return(true); } catch (Exception ex) { return(false); } }
public int SaveAbsendReporing(AbsenceReporting absenceReporting) { _localUnitOfWork.GetRepository <AbsenceReporting>().Update(absenceReporting); return(_localUnitOfWork.Save()); }