public ActionResult Edit(Bank bank) { if (ModelState.IsValid) { db.Entry(bank).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bank)); }
public ActionResult Edit(BankAccount bankaccount) { if (ModelState.IsValid) { db.Entry(bankaccount).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BankID = new SelectList(db.Banks, "BankID", "Name", bankaccount.BankID); return(View(bankaccount)); }
public ActionResult Edit(RecurringTransaction recurringtransaction) { if (ModelState.IsValid) { db.Entry(recurringtransaction).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Category = new SelectList(db.Categories, "CategoryID", "Name", recurringtransaction.Category); return(View(recurringtransaction)); }
public ActionResult Edit(Transaction transaction) { if (ModelState.IsValid) { db.Entry(transaction).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AcctID = new SelectList(db.BankAccounts, "AcctID", "Name", transaction.AcctID); ViewBag.CategoryID = new SelectList(db.Categories, "CategoryID", "Name", transaction.CategoryID); return(View(transaction)); }