private static string ProcessCreateFlightCommand(string[] parameters)
        {
            string   flightNumber  = parameters[0];
            string   from          = parameters[1];
            string   to            = parameters[2];
            string   airline       = parameters[3];
            DateTime dateTime      = ParseDateTime(parameters[4]);
            decimal  price         = decimal.Parse(parameters[5]);
            string   commandResult = ticketRepository.AddAirTicket(flightNumber, from, to, airline, dateTime, price);

            return(commandResult);
        }
Example #2
0
        private static string ProcessCreateFlightCommand(string[] parameters)
        {
            string   flightNumber         = parameters[0];
            string   departureAirport     = parameters[1];
            string   arrivalAirport       = parameters[2];
            string   airlineCompany       = parameters[3];
            DateTime departureDateAndTime = ParseDateTime(parameters[4]);
            decimal  price         = decimal.Parse(parameters[5]);
            string   commandResult = ticketRepository.AddAirTicket(
                flightNumber,
                departureAirport,
                arrivalAirport,
                airlineCompany,
                departureDateAndTime,
                price);

            return(commandResult);
        }