public ActionResult Edit([Bind(Include = "PersonId,PersonLastname,PersonFirstname,PersondateOfBirth,PersonaddressId,Personemail")] Person person) { if (ModelState.IsValid) { db.Entry(person).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(person)); }
public ActionResult Edit([Bind(Include = "GeolocationId,GeoLatitude,GeoLongitude")] Geolocation geolocation) { if (ModelState.IsValid) { db.Entry(geolocation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(geolocation)); }
public ActionResult Edit([Bind(Include = "AmenityId,Amenity1,AmenityDescription")] Amenity amenity) { if (ModelState.IsValid) { db.Entry(amenity).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(amenity)); }
public ActionResult Edit([Bind(Include = "PictureId,Path,Caption")] Picture picture) { if (ModelState.IsValid) { db.Entry(picture).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(picture)); }
public ActionResult Edit([Bind(Include = "AssetId,AssetName")] Asset asset) { if (ModelState.IsValid) { db.Entry(asset).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(asset)); }
public ActionResult Edit([Bind(Include = "AddressId,PostalId,AddressStreetname,AddressNumber,AddressBus,AddressLand")] Address address) { if (ModelState.IsValid) { db.Entry(address).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PostalId = new SelectList(db.Postal, "PostalId", "PostalCode", address.PostalId); return(View(address)); }
public ActionResult Edit([Bind(Include = "PaymentId,BookingId,PaymentAmount,PaymentMethod,Succesfull")] Payment payment) { if (ModelState.IsValid) { db.Entry(payment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BookingId = new SelectList(db.Booking, "BookingId", "BookingId", payment.BookingId); return(View(payment)); }
public ActionResult Edit([Bind(Include = "HotelId,HotelName,LocationId,Phonenumber,HotelDescription,HotelRating")] Hotel hotel) { if (ModelState.IsValid) { db.Entry(hotel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.LocationId = new SelectList(db.Location, "LocationId", "LocationId", hotel.LocationId); return(View(hotel)); }
public ActionResult Edit([Bind(Include = "LocationId,AddressId,GeolocationId")] Location location) { if (ModelState.IsValid) { db.Entry(location).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AddressId = new SelectList(db.Address, "AddressId", "AddressStreetname", location.AddressId); ViewBag.GeolocationId = new SelectList(db.Geolocation, "GeolocationId", "GeolocationId", location.GeolocationId); return(View(location)); }
public ActionResult Edit([Bind(Include = "BookingId,UserId,RoomId,BookingDate,BookingDateFrom,BookingDateTo")] Booking booking) { if (ModelState.IsValid) { db.Entry(booking).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RoomId = new SelectList(db.Room, "RoomId", "Roomdescription", booking.RoomId); ViewBag.UserId = new SelectList(db.User, "UserId", "UserId", booking.UserId); return(View(booking)); }