public ActionResult HomeEdit([Bind(Include = "HomepageID,Hotline,Address,Email,FacebookLink,YoutubeLink,GoogleLink")] Homepage homepage) { if (ModelState.IsValid) { db.Entry(homepage).State = EntityState.Modified; db.SaveChanges(); var noti = "Cập Nhật Thành Công!"; return(RedirectToAction("Header", "Admin", new { Noti = noti })); } return(View(homepage)); }
public ActionResult HouseEdit([Bind(Include = "HouseID,Name,Intro,PhoneNumber,Street,Ward,District,Province,UserID")] House house) { var UserID = User.Identity.GetUserId(); house.UserID = UserID; if (ModelState.IsValid) { db.Entry(house).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("HouseDetail", "House", new { HouseID = house.HouseID })); } return(View(house)); }
public ActionResult Edit([Bind(Include = "ServiceID,Name")] Service service) { if (ModelState.IsValid) { db.Entry(service).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(service)); }
public ActionResult Edit([Bind(Include = "TypeOfRoomID,Name,SingleBed,TwinBed,DOMBed")] TypeOfRoom typeOfRoom) { if (ModelState.IsValid) { db.Entry(typeOfRoom).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(typeOfRoom)); }
public ActionResult Edit([Bind(Include = "BookingContactID,PersonName,Address,PhoneNumber,Email,RoomID,RoomCount,Messeger,Status")] BookingContact bookingContact) { if (ModelState.IsValid) { db.Entry(bookingContact).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RoomID = new SelectList(db.Room, "RoomID", "Name", bookingContact.RoomID); return(View(bookingContact)); }