Esempio n. 1
0
 public ActionResult Edit(LedgerAccount ledgerAccount)
 {
     ModelState.Clear();
     TryValidateModel(ledgerAccount);
     if (ModelState.IsValid)
     {
         ledgerRepository.SaveLedgerAccount(ledgerAccount);
         TempData["message"] = string.Format("{0} saved successfully", ledgerAccount.LedgerAccountName);
         CacheRepository.RefreshLedgerAccounts();
         return(RedirectToAction("Index"));
     }
     SetMetaDataForForm();
     return(View(ledgerAccount));
 }