Пример #1
0
        /// <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);
            }
        }
Пример #2
0
 public static void DeleteAirline(Airline airline)
 {
     Airlines.Remove(airline);
 }
Пример #3
0
 public static void AddAirline(Airline airline)
 {
     Airlines.Add(airline);
 }