示例#1
0
 public ActionResult Edit(Bank bank)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bank).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bank));
 }
示例#2
0
 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));
 }
示例#3
0
 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));
 }
示例#4
0
 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));
 }