public ActionResult DeleteConfirmed(int id) { OrdiBureau ordiBureau = db.OrdiBureaux.Find(id); db.OrdiBureaux.Remove(ordiBureau); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,TypeCatego,Prix,Nom,Description,Memoire,Processeur,CarteGraphique")] OrdiBureau ordiBureau) { if (ModelState.IsValid) { db.Entry(ordiBureau).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ordiBureau)); }
public ActionResult Create([Bind(Include = "Id,TypeCatego,Prix,Nom,Description,Memoire,Processeur,CarteGraphique")] OrdiBureau ordiBureau) { if (ModelState.IsValid) { db.OrdiBureaux.Add(ordiBureau); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ordiBureau)); }
// GET: OrdiBureaux/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OrdiBureau ordiBureau = db.OrdiBureaux.Find(id); if (ordiBureau == null) { return(HttpNotFound()); } return(View(ordiBureau)); }