Пример #1
0
        public ActionResult BookingServiceHotel(
            [Bind()] BookingServiceHotelContract bookingServicesContract
            )
        {
            if (ModelState.IsValid)
            {
                return(RedirectToAction(
                           "BookingServiceHotel",
                           new { bookingId = bookingServicesContract.BookingId }));
            }

            return(View(
                       MVCHelper.Resolve(Request, "", "Booking", "BookingServiceHotel"),
                       BookingServiceHotelNew(bookingServicesContract.BookingId)
                       ));
        }
Пример #2
0
        BookingServiceHotelContract BookingServiceHotelNew(
            Guid bookingId
            )
        {
            // fetch booking data
            var bookingServicesContract =
                new BookingServiceHotelContract(
                    bookingId,
                    Logging.UserId(User.Identity, ViewBag)
                    );

            // get service attached to booking
            bookingServicesContract.Services =
                new FinancialSearchService().FinancialServiceDetailsForBooking(
                    bookingId);

            // get available hotels
            bookingServicesContract.ServiceHotelList =
                new FinancialSearchService().ServiceHotelList();

            return(bookingServicesContract);
        }