Example #1
0
        public ActionResult SearchHotel(SearchCriteriaModel searchCriteria)
        {
            if (!ModelState.IsValid)
            {
                var hotelGeneralErrorModel = new HotelGeneralModel
                {
                    SearchCriteria = searchCriteria
                };
                return(View(hotelGeneralErrorModel));
            }

            SearchResultsModel searchResultsModel = _webApiInvoker.GetHotels(searchCriteria);
            var hotelGeneralModel = new HotelGeneralModel
            {
                HotelsList     = searchResultsModel.Offers.Hotel,
                SearchCriteria = searchCriteria
            };

            return(View(hotelGeneralModel));
        }
Example #2
0
        public ActionResult SearchHotel()
        {
            var hotelGeneralModel = new HotelGeneralModel();

            return(View(hotelGeneralModel));
        }