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