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