public ActionResult ChangeHotelAddress(HotelAddress hotel) { if (User.Identity.Name == "Admin") { _hotelsSqlExecutor.EditHotel(hotel.Id_Hotel, hotel.Name, hotel.FullAddress, null, null, hotel.Lat, hotel.Lng); var response = new { response = "ok" }; return(Json(response, JsonRequestBehavior.AllowGet)); } else { return(RedirectToAction("Index")); } }
public ActionResult Edit(Hotel hotel) { if (User.Identity.Name == "Admin") { _hotelsSqlExecutor.EditHotel(hotel.Id_Hotel, hotel.Name, hotel.FullAddress, hotel.Webpage, hotel.Phone, hotel.Lat, hotel.Lng); return(RedirectToAction("Index")); } else { return(RedirectToAction("Index")); } }