Ejemplo n.º 1
0
        public string AddAirTicket(string flightNumber, string from, string to, string airlineCompany, DateTime dateTime, decimal ticketPrice)
        {
            AirTicket ticket = new AirTicket(flightNumber, from, to, airlineCompany, dateTime, ticketPrice);
            string result = this.AddTicket(ticket);

            if (result.Contains("created"))
            {
                this.airTicketsCount++;
            }

            return result;
        }
Ejemplo n.º 2
0
        public string DeleteAirTicket(string flightNumber)
        {
            AirTicket ticket = new AirTicket(flightNumber);
            string result = this.DeleteTicket(ticket);

            if (result.Contains("deleted"))
            {
                this.airTicketsCount--;
            }

            return result;
        }