public ActionResult DeleteConfirmed(string id) { Tarrifs tarrifs = db.Tarrifs.Find(id); db.Tarrifs.Remove(tarrifs); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "tarrifID,Btarrif,ResTarrif")] Tarrifs tarrifs) { if (ModelState.IsValid) { db.Entry(tarrifs).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tarrifs)); }
public ActionResult Create([Bind(Include = "tarrifID,Btarrif,ResTarrif")] Tarrifs tarrifs) { if (ModelState.IsValid) { db.Tarrifs.Add(tarrifs); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tarrifs)); }
// GET: Tarrifs/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Tarrifs tarrifs = db.Tarrifs.Find(id); if (tarrifs == null) { return(HttpNotFound()); } return(View(tarrifs)); }