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