public ActionResult DeleteConfirmed(int id) { vhaut vhaut = db.vhaut.Find(id); db.vhaut.Remove(vhaut); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id_vhaut,label,poids,id_texture,id_couleur")] vhaut vhaut) { if (ModelState.IsValid) { db.Entry(vhaut).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.id_couleur = new SelectList(db.couleur, "id_couleur", "label", vhaut.id_couleur); ViewBag.id_texture = new SelectList(db.texture, "id_texture", "label", vhaut.id_texture); return(View(vhaut)); }
// GET: Vhaut/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } vhaut vhaut = db.vhaut.Find(id); if (vhaut == null) { return(HttpNotFound()); } return(View(vhaut)); }
// GET: Vhaut/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } vhaut vhaut = db.vhaut.Find(id); if (vhaut == null) { return(HttpNotFound()); } ViewBag.id_couleur = new SelectList(db.couleur, "id_couleur", "label", vhaut.id_couleur); ViewBag.id_texture = new SelectList(db.texture, "id_texture", "label", vhaut.id_texture); return(View(vhaut)); }