Example #1
0
 public static ClassSummaryViewData Create(ClassDetails classDetails, Room currentRoom)
 {
     return(new ClassSummaryViewData(classDetails)
     {
         Room = RoomViewData.Create(currentRoom)
     });
 }
Example #2
0
 public static ClassSummaryViewData Create(ClassDetails classDetails, Room currentRoom, IList <Period> periods, IList <DayType> dayTypes)
 {
     return(new ClassSummaryViewData(classDetails)
     {
         Room = currentRoom != null?RoomViewData.Create(currentRoom) : null,
                    Periods = periods?.Select(x => x.Name).ToList(),
                    DayTypes = dayTypes?.Select(x => x.Name).ToList()
     });
 }
Example #3
0
 protected ClassInfoViewData(ClassDetails cClass, Room room, ChalkableDepartment department)
     : base(cClass)
 {
     if (room != null)
     {
         Room = RoomViewData.Create(room);
     }
     if (department != null)
     {
         Department = ChalkableDepartmentViewData.Create(department);
     }
 }