Esempio n. 1
0
 public ActionResult Edit(LedgerHead ledgerHead)
 {
     UpdateModel(ledgerHead);
     ModelState.Clear();
     TryValidateModel(ledgerHead);
     if (ModelState.IsValid)
     {
         ledgerRepository.SaveLedgerHead(ledgerHead);
         TempData["message"] = string.Format("{0} saved successfully", ledgerHead.LedgerHeadName);
         CacheRepository.RefreshLedgerHeads();
         return(RedirectToAction("Index"));
     }
     SetMetaDataForForm();
     return(View(ledgerHead));
 }