public ActionResult Edit(NextSavingAccount nextsavingaccount) { if (ModelState.IsValid) { db.Entry(nextsavingaccount).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(nextsavingaccount)); }
public ActionResult Edit(NextTransactionNumber nexttransactionnumber) { if (ModelState.IsValid) { db.Entry(nexttransactionnumber).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(nexttransactionnumber)); }
public ActionResult Edit(SilverState silverstate) { if (ModelState.IsValid) { db.Entry(silverstate).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(silverstate)); }
public ActionResult Edit(Client client) { if (ModelState.IsValid) { db.Entry(client).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(client)); }
public ActionResult Edit(TransactionType transactiontype) { if (ModelState.IsValid) { db.Entry(transactiontype).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(transactiontype)); }
public ActionResult Edit(Institution institution) { if (ModelState.IsValid) { db.Entry(institution).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(institution)); }
public ActionResult Edit(PlatinumState platinumstate) { if (ModelState.IsValid) { db.Entry(platinumstate).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(platinumstate)); }
public ActionResult Edit(RFIDTag rfidtag) { if (ModelState.IsValid) { db.Entry(rfidtag).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ClientId = new SelectList(db.Clients, "ClientId", "FirstName", rfidtag.ClientId); return(View(rfidtag)); }
public ActionResult Edit(Transaction transaction) { if (ModelState.IsValid) { db.Entry(transaction).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BankAccountId = new SelectList(db.BankAccounts, "BankAccountId", "Notes", transaction.BankAccountId); ViewBag.TransactionTypeId = new SelectList(db.TransactionTypes, "TransactionTypeId", "Description", transaction.TransactionTypeId); return(View(transaction)); }
public ActionResult Edit(MortgageAccount mortgageaccount) { if (ModelState.IsValid) { db.Entry(mortgageaccount).State = EntityState.Modified; db.SaveChanges(); mortgageaccount.ChangeState(); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AccountStateId = new SelectList(db.AccountStates, "AccountStateId", "Description", mortgageaccount.AccountStateId); ViewBag.ClientId = new SelectList(db.Clients, "ClientId", "FullName", mortgageaccount.ClientId); return(View(mortgageaccount)); }
public ActionResult Edit(ChequingAccount chequingaccount) { chequingaccount.SetNextAccountNumber(); if (ModelState.IsValid) { db.Entry(chequingaccount).State = EntityState.Modified; db.SaveChanges(); chequingaccount.ChangeState(); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AccountStateId = new SelectList(db.AccountStates, "AccountStateId", "Description", chequingaccount.AccountStateId); ViewBag.ClientId = new SelectList(db.Clients, "ClientId", "FullName", chequingaccount.ClientId); return(View(chequingaccount)); }
// PUT api/AccountState/5 public HttpResponseMessage PutAccountState(int id, AccountState accountstate) { if (ModelState.IsValid && id == accountstate.AccountStateId) { db.Entry(accountstate).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } return(Request.CreateResponse(HttpStatusCode.OK)); } else { return(Request.CreateResponse(HttpStatusCode.BadRequest)); } }