Esempio n. 1
0
        public ActionResult ViewTransferBooking(int id)
        {
            View_TripBookingTransport transfer = null;
            var blError = TripManager.GetTripBookingTransport(id, out transfer);

            if (blError.ErrorCode > 0)
            {
                throw new ApplicationException(blError.ErrorMessage);
            }

            var model = new FlightBookingViewModel()
            {
                TripId          = transfer.TripId,
                Adults          = transfer.Adults.HasValue ? transfer.Adults.Value : 0,
                BookingStatus   = transfer.BookingStatus,
                FlightClass     = transfer.TravelClass,
                FlightDate      = transfer.BookingDate.HasValue ? transfer.BookingDate.Value : DateTime.MinValue,
                From            = transfer.TransportFrom, To = transfer.TransportTo,
                Kids            = transfer.Kids.HasValue ? transfer.Kids.Value : 0,
                TravellerNotes  = transfer.TravellerNotes,
                TransportType   = transfer.TransportType,
                AdminNotes      = transfer.AdminNotes,
                TransferDetails = transfer.TransferDetails
            };

            return(View(model));
        }