public Object SaveAttendance(List <AttendanceHistoryDTO> history) { //Check this //List<AttendanceHistoryDTO> attHis = JsonConvert.DeserializeObject<List<AttendanceHistoryDTO>>(history); for (int i = 0; i < history.Count; i++) { AttendanceHistoryDTO ahd = history.ElementAt(i); AttendanceHistoryDAL.Save(ahd); AttendanceDTO atndnc = AttendanceDAO.GetAttendanceById(ahd.AttId); if (ahd.HisIsPresent) { atndnc.AttPresents++; } else { atndnc.AttAbsents++; } AttendanceDAO.Save(atndnc); } var IsSaved = true; return(IsSaved); }
public AttendanceDTO Save(AttendanceDTO dto) { AttendanceDAO b = new AttendanceDAO(); dto = b.Save(dto); return(dto); }