Beispiel #1
0
        // GET: Corporate/Home
        public ActionResult Home()
        {
            Session.Remove("BranchId");
            Session.Remove("Branch");

            int            companyId      = Convert.ToInt32(Session["CompanyId"]);
            var            branches       = _iBranchManager.GetAllBranches();
            ViewTotalOrder totalOrder     = _iReportManager.GetTotalOrdersByCompanyIdAndYear(companyId, DateTime.Now.Year);
            var            accountSummary = _iAccountsManager.GetAccountSummaryofCurrentMonthByCompanyId(companyId);
            var            products       = _iInventoryManager.GetStockProductByCompanyId(companyId);
            var            orders         = _iOrderManager.GetOrdersByCompanyId(companyId).ToList();
            var            topClients     = _iReportManager.GetTopClientsByYear(DateTime.Now.Year).ToList();
            var            clients        = _iClientManager.GetAllClientDetails();
            var            topProducts    = _iReportManager.GetPopularBatteriesByYear(DateTime.Now.Year).ToList();
            var            employees      = _iEmployeeManager.GetAllEmployeeWithFullInfo().ToList();
            SummaryModel   summary        = new SummaryModel
            {
                Branches       = branches.ToList(),
                CompanyId      = companyId,
                TotalOrder     = totalOrder,
                TopClients     = topClients,
                Orders         = orders,
                TopProducts    = topProducts,
                Clients        = clients,
                Employees      = employees,
                Products       = products,
                AccountSummary = accountSummary
            };

            return(View(summary));
        }
Beispiel #2
0
 public PartialViewResult ViewClient()
 {
     try
     {
         var clients = _iClientManager.GetAllClientDetails().ToList();
         return(PartialView("_ViewClientPartialPage", clients));
     }
     catch (Exception exception)
     {
         Log.WriteErrorLog(exception);
         return(PartialView("_ErrorPartial", exception));
     }
 }
Beispiel #3
0
        // GET: Editor/Home
        public ActionResult Home()
        {
            Session.Remove("BranchId");
            Session.Remove("Branch");
            SummaryModel model = new SummaryModel
            {
                Clients     = _iClientManager.GetAllClientDetails().ToList(),
                Employees   = _iEmployeeManager.GetAllEmployeeWithFullInfo(),
                Departments = _iDepartmentManager.GetAll(),
                Branches    = _iBranchManager.GetAllBranches(),
                Regions     = _iRegionManager.GetAll(),
                Territories = _iTerritoryManager.GetAll()
            };

            return(View(model));
        }