Exemple #1
0
        public static AttendanceSummaryExportModel Create(ReportCardAttendanceData attendance)
        {
            var res = new AttendanceSummaryExportModel
            {
                GradingPeriodId   = attendance.GradingPeriodId,
                UnexcusedAbsences = attendance.UnexcusedAbsences,
                ExcusedAbsences   = attendance.ExcusedAbsences,
                ExcusedTardies    = attendance.ExcusedTardies,
                UnexcusedTardies  = attendance.UnexcusedTardies,
                Enrolled          = attendance.DaysEnrolled,
                GradingPeriodName = attendance.GradingPeriodName,
                Absences          = attendance.UnexcusedAbsences + attendance.ExcusedAbsences,
                Tardies           = attendance.ExcusedTardies + attendance.UnexcusedTardies
            };

            res.Present = res.Enrolled - (res.Absences + res.Tardies);

            return(res);
        }
Exemple #2
0
 public static StudentReportCardsExportModel Create(GradingPeriod gradingPeriod, Student studentData, ReportCardAddressData recipient, bool onlyGradedStandard, bool includeNote)
 {
     return(new StudentReportCardsExportModel
     {
         Name = studentData.Name,
         AltStudentNumber = studentData.AltStudentNumber,
         GradeLevel = studentData.GradeLevel,
         StudentId = studentData.StudentId,
         Demerits = studentData.Demerits,
         Merits = studentData.Merits,
         Recipient = RecipientsReportCardsExportModel.Create(recipient),
         Classes = ClassReportCardsExportModel.Create(studentData.Sections, onlyGradedStandard, includeNote),
         Attendances = AttendanceSummaryExportModel.Create(studentData.Attendance),
         GradingPeriod = new GradingPeriodExportModel
         {
             Announcement = gradingPeriod.Announcement,
             StartDate = gradingPeriod.StartDate,
             EndDate = gradingPeriod.EndDate,
             Name = gradingPeriod.Name
         },
         HomeRoomTeacher = studentData.HomeroomTeacher,
         Promoted = studentData.Promoted
     });
 }