Exemple #1
0
 protected StaffViewData(Staff staff)
 {
     Id          = staff.Id;
     DisplayName = staff.DisplayName();
     FullName    = staff.DisplayName();
     FirstName   = staff.FirstName;
     LastName    = staff.LastName;
     Gender      = staff.Gender;
     Role        = RoleViewData.Create(CoreRoles.TEACHER_ROLE);
 }
 protected ShortPersonViewData(Student student)
 {
     Id          = student.Id;
     DisplayName = student.DisplayName();
     FullName    = student.FullName();
     FirstName   = student.FirstName;
     LastName    = student.LastName;
     Gender      = student.Gender;
     Role        = RoleViewData.Create(CoreRoles.STUDENT_ROLE);
 }
 protected ShortPersonViewData(Person person)
 {
     Id          = person.Id;
     DisplayName = person.DisplayName();
     FullName    = person.FullName();
     FirstName   = person.FirstName;
     LastName    = person.LastName;
     Gender      = person.Gender;
     SchoolId    = person.SchoolRef;
     if (person.RoleRef > 0)
     {
         Role = RoleViewData.Create(CoreRoles.GetById(person.RoleRef));
     }
 }
Exemple #4
0
 protected StudentViewData(Student student)
 {
     Id                  = student.Id;
     DisplayName         = student.DisplayName();
     FullName            = student.FullName();
     FirstName           = student.FirstName;
     LastName            = student.LastName;
     Gender              = student.Gender;
     HasMedicalAlert     = student.HasMedicalAlert;
     IsAllowedInetAccess = student.IsAllowedInetAccess;
     SpecialInstructions = student.SpecialInstructions;
     SpEdStatus          = student.SpEdStatus;
     Role                = RoleViewData.Create(CoreRoles.STUDENT_ROLE);
     IsWithDrawn         = student.IsWithdrawn;
     IsIEPActive         = student.IsIEPActive;
 }
Exemple #5
0
 public static StudentDetailsViewData Create(StudentDetailsInfo student, decimal?gradeAvg, ShortStudentAbsenceInfo absences, int?infractions)
 {
     return(new StudentDetailsViewData
     {
         Id = student.Id,
         DisplayName = student.DisplayName(),
         FullName = student.FullName(),
         FirstName = student.FirstName,
         LastName = student.LastName,
         Gender = student.Gender,
         Role = RoleViewData.Create(CoreRoles.STUDENT_ROLE),
         IsHispanic = student.IsHispanic,
         Ethnicity = student.Ethnicity != null?EthnicityViewData.Create(student.Ethnicity) : null,
                         Absences = absences != null?decimal.Round(absences.NumberOfAbsences) : (decimal?)null,
                                        Discipline = infractions ?? 0,
                                        GradeAvg = gradeAvg.HasValue ? decimal.Round(gradeAvg.Value, 2) : (decimal?)null,
                                        IsIEPActive = student.IsIEPActive,
                                        IsRetainedFromPrevSchoolYear = false,
                                        TotalOfDaysEnrolled = absences?.NumberOfDaysEnrolled
     });
 }