public ActionResult DeleteConfirmed(int id) { Playment playment = db.Playment.Find(id); db.Playment.Remove(playment); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_Sposob,Naim_Sposob")] Playment playment) { if (ModelState.IsValid) { db.Entry(playment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(playment)); }
public ActionResult Create([Bind(Include = "ID_Sposob,Naim_Sposob")] Playment playment) { if (ModelState.IsValid) { db.Playment.Add(playment); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(playment)); }
// GET: Playments/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Playment playment = db.Playment.Find(id); if (playment == null) { return(HttpNotFound()); } return(View(playment)); }