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

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

            return(result);
        }
        public string AddAirTicket(string flightNumber, string from, string to, string airline, DateTime dateTime, decimal price)
        {
            var    ticket = new AirTicket(flightNumber, from, to, airline, dateTime, price);
            string result = this.AddTicket(ticket);

            return(result);
        }
        public string DeleteAirTicket(string flightNumber)
        {
            AirTicket ticket = new AirTicket(flightNumber);

            string result = this.DeleteTicketByUniqueKey(ticket.UniqueKey);

            return result;
        }
        public string AddAirTicket(string flightNumber, string from, string to, string airline, DateTime dateTime, decimal price)
        {
            AirTicket ticket = new AirTicket(flightNumber, from, to, airline, dateTime, price);

            string result = this.AddTicket(ticket);

            return result;
        }
        public string AddAirTicket(string name, string from, string to, string airline, string datTime, string price)
        {
            var ticket = new AirTicket(name, from, to, airline, datTime, price);
            var result = this.AddTicket(ticket);
            if (result.Contains("created"))
            {
                this.AirTicketsCount++;
            }

            return result;
        }
Ejemplo n.º 7
0
        public string DeleteAirTicket(string flightNumber)
        {
            var ticket = new AirTicket(flightNumber);
            string operationResult = this.DeleteTicket(ticket);
            if (operationResult.Contains("deleted"))
            {
                this.AirTicketsCount--;
            }

            return operationResult;
        }
Ejemplo n.º 8
0
        public string AddAirTicket(string flightNumber, string from, string to, string airline, DateTime dateTime, decimal price)
        {
            var ticket = new AirTicket(flightNumber, from, to, airline, dateTime, price);
            string operationResult = this.AddTicket(ticket);

            if (operationResult.Contains("added"))
            {
                this.AirTicketsCount++;
            }

            return operationResult;
        }
Ejemplo n.º 9
0
        public string AddAirTicket(
            string flightNumber,
            string departureAirline,
            string arrivalAiriline,
            string airlineCompany,
            DateTime departureDateTime,
            decimal price)
        {
            Ticket ticket = new AirTicket(
                flightNumber,
                departureAirline,
                arrivalAiriline,
                airlineCompany,
                departureDateTime,
                price);
            var result = this.AddTicket(ticket);

            return(result);
        }
        public string DeleteAirTicket(string ticketToDelete)
        {
            var ticket = new AirTicket(ticketToDelete);
            var result = this.DeleteTicket(ticket);

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

            return result;
        }