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));
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 6
0
 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));
 }
Ejemplo n.º 8
0
 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));
 }
Ejemplo n.º 9
0
 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));
 }
Ejemplo n.º 10
0
 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));
 }