public IActionResult ModifyHome() { HotelModel hotelModel = new HotelModel(connectionString); Hotel hotels = hotelModel.GetAllHotel(); HotelModel hotel = new HotelModel(); hotel.id = hotels.id; hotel.name = hotels.name; hotel.description = hotels.description; ContentPageModel contentpageModel = new ContentPageModel(connectionString); IList <ContentPage> content = contentpageModel.GetAllContentPage(); List <ContentPageModel> contentPage = new List <ContentPageModel>(); for (int i = 0; i < content.Count; i++) { if (content[i].referentpage.Equals("home")) { ContentPageModel contentNew = new ContentPageModel(); contentNew.urlimage = content[i].urlimage; contentPage.Add(contentNew); } } ViewBag.contentPage = contentPage; ViewBag.hotel = hotel; return(View()); }
public IActionResult ModifyLocate() { HotelModel hotelModel = new HotelModel(connectionString); Hotel hotels = hotelModel.GetAllHotel(); HotelModel hotel = new HotelModel(); hotel.id = hotels.id; hotel.address = hotels.address; ViewBag.hotel = hotel; return(View()); }
public IActionResult ModifyAbout() { HotelModel hotelModel = new HotelModel(connectionString); Hotel hotels = hotelModel.GetAllHotel(); HotelModel hotel = new HotelModel(); hotel.id = hotels.id; hotel.aboutus = hotels.aboutus; ViewBag.hotel = hotel; return(View()); }