/// <summary> /// returns tickets of a significant airline /// </summary> /// <param name="airline"></param> /// <returns></returns> public List <Ticket> AirlineTickets(Airline airline) { List <Ticket> airlineTickets = new List <Ticket>(); List <Ticket> allTickets = DB.Tickets; foreach (Ticket item in allTickets) { if (item.Flight.AirLine == airline) { airlineTickets.Add(item); } } if (airlineTickets.Count == 0) { return(null); } else { return(airlineTickets); } }
public static void DeleteAirline(Airline airline) { Airlines.Remove(airline); }
public static void AddAirline(Airline airline) { Airlines.Add(airline); }