Example #1
0
        private void AddNewAttendanceEvents(IEnumerable <StudentSectionAttendanceEvent> newAttendanceEvents)
        {
            var studentSectionAttendanceEventList = newAttendanceEvents as IList <StudentSectionAttendanceEvent> ??
                                                    newAttendanceEvents.ToList();

            foreach (var attendanceEvent in studentSectionAttendanceEventList.Where(attendanceEvent => IsTardyOrUnexcused
                                                                                        (attendanceEvent.AttendanceEventCategoryDescriptorId)))
            {
                IncrementFlagCount(attendanceEvent.Student);
            }

            _attendanceRepository.AddAttendanceEvents(studentSectionAttendanceEventList);
        }