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