Ejemplo n.º 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());
        }
Ejemplo n.º 2
0
 public ActionResult LedgersList()
 {
     if (Session["ClientId"] != null)
     {
         ViewData.Model = MasterModels.GetLedgerMasterList((int)Session["ClientId"]);
     }
     else
     {
         ViewData.Model = MasterModels.GetLedgerMasterList();
     }
     return(View());
 }
Ejemplo n.º 3
0
 public ActionResult Ledgers()
 {
     ViewData.Model = MasterModels.GetLedgerMasterList();
     return(View());
 }