Ejemplo n.º 1
0
        public AttendanceMiniVm GetAttendanceForDay(DateTime date)
        {
            var rv = new AttendanceMiniVm();

            rv.Date   = date;
            rv.Status = AttendanceStatus.OnTime;
            var attendanceRow = _studentRow.GetAttendanceRows().SingleOrDefault(a => a.StudentKey == _studentRow.Key && a.Date == date);

            if (attendanceRow != null)
            {
                rv.Status = (AttendanceStatus)Enum.Parse(typeof(AttendanceStatus), attendanceRow.State);
            }
            return(rv);
        }
 public AttendanceMiniVm GetAttendanceForDay(DateTime date)
 {
     var rv = new AttendanceMiniVm();
     rv.Date = date;
     rv.Status = AttendanceStatus.OnTime;
     var attendanceRow = _studentRow.GetAttendanceRows().SingleOrDefault(a => a.StudentKey == _studentRow.Key && a.Date == date);
     if (attendanceRow != null)
         rv.Status = (AttendanceStatus) Enum.Parse(typeof(AttendanceStatus), attendanceRow.State);
     return rv;
 }