public ActionResult Edit([Bind(Include = "IdSejour,IdHotel,Duree")] Sejours sejours) { if (ModelState.IsValid) { db.Entry(sejours).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdHotel = new SelectList(db.Hotels, "IdHotel", "Nom", sejours.IdHotel); return(View(sejours)); }
public ActionResult Edit([Bind(Include = "IdHotel,IdVille,Categorie,Description,Photo,Nom")] Hotels hotels) { if (ModelState.IsValid) { db.Entry(hotels).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdVille = new SelectList(db.Villes, "idVille", "name", hotels.IdVille); return(View(hotels)); }
public ActionResult Edit([Bind(Include = "IdProduit,IdSejour,NbPlaces,DateDepart,Description,Prix")] Produits produits) { if (ModelState.IsValid) { db.Entry(produits).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdSejour = new SelectList(db.Sejours, "IdSejour", "IdSejour", produits.IdSejour); return(View(produits)); }
public ActionResult Edit([Bind(Include = "IdPromo,IdHotel,DateDebut,DateFin,Valeur")] Promotions promotions) { if (ModelState.IsValid) { db.Entry(promotions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdHotel = new SelectList(db.Hotels, "IdHotel", "Nom", promotions.IdHotel); return(View(promotions)); }