public ActionResult DeleteConfirmed(int id) { PaymentMoodSupplier paymentMoodSupplier = db.PaymentMoodSuppliers.Find(id); db.PaymentMoodSuppliers.Remove(paymentMoodSupplier); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "PaymentMoodSupplierId,Name")] PaymentMoodSupplier paymentMoodSupplier) { if (ModelState.IsValid) { db.Entry(paymentMoodSupplier).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(paymentMoodSupplier)); }
public ActionResult Create([Bind(Include = "PaymentMoodSupplierId,Name")] PaymentMoodSupplier paymentMoodSupplier) { if (ModelState.IsValid) { db.PaymentMoodSuppliers.Add(paymentMoodSupplier); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(paymentMoodSupplier)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PaymentMoodSupplier paymentMoodSupplier = db.PaymentMoodSuppliers.Find(id); if (paymentMoodSupplier == null) { return(HttpNotFound()); } return(View(paymentMoodSupplier)); }