//adds entries for a specific destination and time for each day of the week assigned to an airliner public void addDailyEntries(RouteEntryDestination destination, TimeSpan time, FleetAirliner airliner) { foreach (DayOfWeek day in Enum.GetValues(typeof(DayOfWeek))) { RouteTimeTableEntry entry = new RouteTimeTableEntry(this, day, time, destination); entry.Airliner = airliner; this.Entries.Add(entry); } }
//adds entries for a specific destination and for each weekday of the week assinged to an airliner public void addWeekDailyEntries(RouteEntryDestination destination, TimeSpan time) { foreach (DayOfWeek day in Enum.GetValues(typeof(DayOfWeek))) { if (day != DayOfWeek.Saturday && day != DayOfWeek.Sunday) { RouteTimeTableEntry entry = new RouteTimeTableEntry(this, day, time, destination); entry.Airliner = null; this.Entries.Add(entry); } } }
public RouteTimeTableEntry(RouteTimeTable timeTable, DayOfWeek day, TimeSpan time, RouteEntryDestination destination, Gate outboundgate) { Guid id = Guid.NewGuid(); this.Day = day; this.Time = time; this.TimeTable = timeTable; this.Destination = destination; this.ID = id.ToString(); this.Gate = outboundgate; }
public RouteTimeTableEntry(RouteTimeTable timeTable, DayOfWeek day, TimeSpan time, RouteEntryDestination destination) : this(timeTable, day, time, destination, null) { }
//adds entries for a specific destination and time for each day of the week public void addDailyEntries(RouteEntryDestination destination, TimeSpan time) { addDailyEntries(destination, time, null); }