public ActionResult Search(string keyword, bool isPetFriendly, bool hasRestaurant, string keywordCity, int?roomTypeId) { var model = _hotelsManager.SearchResults(keyword, isPetFriendly, hasRestaurant, keywordCity, roomTypeId); ViewBag.SearchList = model; List <string> roomtypes = new List <string>(); roomtypes = _hotelsManager.GetAllRoomType(); GetAllHotelsViewModel Model = new GetAllHotelsViewModel(); Model.RoomTypes = roomtypes; return(View(Model)); }
public ActionResult GetAllHotels() { List <HotelDto> model = new List <HotelDto>(); GetAllHotelsViewModel Model = new GetAllHotelsViewModel(); List <string> roomtypes = new List <string>(); roomtypes = _hotelsManager.GetAllRoomType(); model = _hotelsManager.GetAllHotels(); Model.Hotels = model; Model.RoomTypes = roomtypes; return(View(Model)); }