public ActionResult Index(string hotelCode) { selectedHotelCode = hotelCode; HotelSearchDto searchCriteria = TempData["HotelSearchDto"] as HotelSearchDto; //Call manager class and there make a call to provider based on selected ddl value(Provider) var provider = HotelProviderBroker.GetHotelSearchProvider((HotelSearchProviderTypes)int.Parse(searchCriteria.Provider)); var searchResponse = provider.RetrieveHotelRates(ConvertToProviderRequest(searchCriteria)); return(View()); }
public ActionResult searchBedbank(FormCollection collection) { HotelSearchDto searchCriteria = new HotelSearchDto(); searchCriteria.Provider = collection["ddlProvider"]; searchCriteria.Address = collection["add"]; if (collection["lat"] != "") { searchCriteria.Latitude = double.Parse(collection["lat"]); } if (collection["lan"] != "") { searchCriteria.Longitude = double.Parse(collection["lan"]); } searchCriteria.StartDate = collection["checkIn"]; searchCriteria.EndDate = collection["checkOut"]; searchCriteria.TotalGuest = collection["ddlTotalGuest"]; searchCriteria.TotalRoom = collection["ddlNoOfRooms"]; searchCriteria.Provider = collection["ddlProvider"]; //if (collection["hotelcodes"] != "") searchCriteria.HotelCodes = GetHotels(collection); TempData["HotelSearchDto"] = searchCriteria; //Call manager class and there make a call to provider based on selected ddl value(Provider) ViewBag.StartDate = searchCriteria.StartDate; ViewBag.EndDate = searchCriteria.EndDate; ViewBag.TotalTravellers = searchCriteria.TotalGuest; ViewBag.Lat = searchCriteria.Latitude; ViewBag.Lan = searchCriteria.Longitude; var provider = HotelProviderBroker.GetHotelSearchProvider((HotelSearchProviderTypes)int.Parse(searchCriteria.Provider)); var searchResponse = provider.Search(ConvertToProviderReqeust(searchCriteria)); return(View("SearchHotelTourico", searchResponse)); }