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