public ActionResult Edit([Bind(Include = "IdMenu,Nom,Statut,Prix")] Menu menu) { if (ModelState.IsValid) { db.Entry(menu).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(menu)); }
public ActionResult Edit([Bind(Include = "IdUtilisateur,Nom,Prenom,Matricule,Password,Statut,Solde")] Utilisateur utilisateur) { if (ModelState.IsValid) { db.Entry(utilisateur).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(utilisateur)); }
public ActionResult Edit([Bind(Include = "IdTypeCuisine,Nom,Statut")] TypeCuisine typeCuisine) { if (ModelState.IsValid) { db.Entry(typeCuisine).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(typeCuisine)); }
public ActionResult Edit([Bind(Include = "IdMenu,Nom,Statut,Prix,IdRestaurant")] Menu menu) { if (ModelState.IsValid) { db.Entry(menu).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdRestaurant = new SelectList(db.Restaurants, "IdRestaurant", "Nom", menu.IdRestaurant); return(View(menu)); }
public ActionResult Edit([Bind(Include = "IdRestaurant,Nom,IdTypeCuisine,Budget,Description,Responsable,Adresse,CodePostal,Ville,Tel,Mobile,Email,Login,Password")] Restaurant restaurant) { if (ModelState.IsValid) { db.Entry(restaurant).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdTypeCuisine = new SelectList(db.TypeCuisines, "IdTypeCuisine", "Nom", restaurant.IdTypeCuisine); return(View(restaurant)); }
public ActionResult Edit([Bind(Include = "IdProduit,IdRestaurant,IdCategorie,Nom,Prix,Description,Quantite")] Produit produit) { if (ModelState.IsValid) { db.Entry(produit).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdCategorie = new SelectList(db.Categories, "IdCategorie", "Nom", produit.IdCategorie); ViewBag.IdRestaurant = new SelectList(db.Restaurants, "IdRestaurant", "Nom", produit.IdRestaurant); return(View(produit)); }