public ActionResult DeleteConfirmed(int id) { vrptExpens vrptExpens = db.vrptExpenses.Find(id); db.vrptExpenses.Remove(vrptExpens); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IDExpense,ExpenseDate,ORNumber,Vendor,Particulars,Account,EncodedBy,ChargeToCodep,VATSales,VATAmount,VATExempt,Amount")] vrptExpens vrptExpens) { if (ModelState.IsValid) { db.Entry(vrptExpens).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vrptExpens)); }
// GET: vrptExpens/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } vrptExpens vrptExpens = db.vrptExpenses.Find(id); if (vrptExpens == null) { return(HttpNotFound()); } return(View(vrptExpens)); }