public string ReserveASeat(string flighIdentifier, string departureTimeString, string row, string colum) { string returnedMessage = string.Empty; List <SeatDTO> seats = new List <SeatDTO>(); DateTime departureTime = ConvertDepartureTimeToDateTime(departureTimeString); ValidateParametersForReserveSeat(flighIdentifier, departureTime, Convert.ToInt16(row, CultureInfo.InvariantCulture), colum); ReservationSeatRequestDTO reservationSeatRequestDTO = new ReservationSeatRequestDTO(flighIdentifier, departureTime, Convert.ToInt16(row, CultureInfo.InvariantCulture), colum); FlightDTO flight = _localMapper.Map <ReservationSeatRequestDTO, FlightDTO>(reservationSeatRequestDTO); SeatDTO seat = _localMapper.Map <ReservationSeatRequestDTO, SeatDTO>(reservationSeatRequestDTO); seats.Add(seat); returnedMessage = CallApplicationMethods(SeatReservationForAircraftsOperationsEnum.ReserveASeat, flight, seats); return(returnedMessage); }
internal static SeatDTO MapToSeatDTO(ReservationSeatRequestDTO reservationSeatDTO) { return(new SeatDTO(reservationSeatDTO.SeatRow.ToString(CultureInfo.InvariantCulture), reservationSeatDTO.SeatColum)); }
internal static FlightDTO MapToFlightDTO(ReservationSeatRequestDTO reservationSeatDTO) { return(new FlightDTO(reservationSeatDTO.FlighIdentifier, reservationSeatDTO.DepartureTime)); }