Example #1
0
        public ActionResult LedgersList(FormCollection form)
        {
            if (Session["ClientId"] != null)
            {
                ViewData.Model = MasterModels.GetLedgerMasterList((int)Session["ClientId"]);
            }
            else
            {
                ViewData.Model = MasterModels.GetLedgerMasterList();
            }

            int ledgerId = 0;

            if (!int.TryParse(form["hdnSelectedLedgerId"], out ledgerId))
            {
                ledgerId = 0;
            }

            if (ledgerId > 0)
            {
                if (MasterModels.DeleteLedgerByLedgerId(ledgerId) > 0)
                {
                    ViewData["Message"] = "Ledger Deleted Successfully";
                    ViewData.Model      = MasterModels.GetLedgerMasterList();
                }
                else
                {
                    ViewData["Message"] = "This Ledger Cannot Be Deleted.";
                }
            }
            return(View());
        }
Example #2
0
 public ActionResult LedgersList()
 {
     if (Session["ClientId"] != null)
     {
         ViewData.Model = MasterModels.GetLedgerMasterList((int)Session["ClientId"]);
     }
     else
     {
         ViewData.Model = MasterModels.GetLedgerMasterList();
     }
     return(View());
 }
Example #3
0
 public ActionResult Ledgers()
 {
     ViewData.Model = MasterModels.GetLedgerMasterList();
     return(View());
 }