/// <summary> /// Retrieve the attendance records of family for Today /// </summary> /// <param name="person"></param> /// <returns></returns> public List <CACCCheckInDb.AttendanceWithDetail> GetAttendanceRecordsForFamilyToday(CACCCheckInDb.PeopleWithDepartmentAndClassView person) { List <CACCCheckInDb.AttendanceWithDetail> records = null; try { logger.Debug("Retrieving attendance records for family for today."); using (CACCCheckInServiceProxy proxy = new CACCCheckInServiceProxy()) { proxy.Open(); logger.Debug("Calling GetAttendanceByFamilyIdAndDate on CACCCheckInService."); records = proxy.GetAttendanceByFamilyIdAndDate(person.FamilyId.GetValueOrDefault(), DateTime.Today); } } catch (Exception ex) { Debug.Assert(View != null); View.ViewDispatcher.BeginInvoke(DispatcherPriority.DataBind, new DispatcherOperationCallback( delegate(object arg) { View.DisplayExceptionDetail(ex); return(null); }), null); } return(records); }