コード例 #1
0
ファイル: MenusController.cs プロジェクト: Clif971/AfpEat
 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));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
 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));
 }
コード例 #4
0
ファイル: MenusController.cs プロジェクト: yoannk/afpa-eats
 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));
 }
コード例 #5
0
 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));
 }
コード例 #6
0
 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));
 }