public static string GetEcfCode(this UntisTimeGrid timeGrid) { if (string.IsNullOrEmpty(timeGrid.Name)) { return("Standard"); } else { return(timeGrid.Name); } }
public static List <EcfTimeSlot> GetEcfTimeSlots(this UntisTimeGrid timeGrid) { var timeSlots = new List <EcfTimeSlot>(); foreach (var slot in timeGrid.Slots.FindAll(x => x.Day == DayOfWeek.Monday)) { timeSlots.Add(new EcfTimeSlot() { Label = slot.GetEcfLabel(), StartTime = slot.GetEcfStartTime(), EndTime = slot.GetEcfEndTime() }); } return(timeSlots); }