Ejemplo n.º 1
0
        public string DeleteAirTicket(string flightNumber)
        {
            AirTicket ticket = new AirTicket(null, null, default(DateTime), 0, flightNumber, null);

            string result = this.DeleteTicket(ticket);
            if (result.Contains("deleted"))
            {
                this.airTicketsCount--;
            }

            return result;
        }
Ejemplo n.º 2
0
        public string AddAirTicket(string flightNumber, string from, string to, string airline, DateTime dateAndTime, decimal price)
        {
            AirTicket ticket = new AirTicket(from, to, dateAndTime, price, flightNumber, airline);

            string result = this.AddTicket(ticket);
            if (result.Contains("added"))
            {
                this.airTicketsCount++;
            }

            return result;
        }