コード例 #1
0
        // GET: Bills/Dashboard
        public ActionResult Dashboard()
        {
            var finacialYear = _financialYearAppService.GetActiveFinancialYear();
            var userInfo     = _userAppService.GetLoggedInUser();

            var Dashboard = new BillDashboard
            {
                Pending            = _billAppService.GetTotalPendingBillsByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                Paid               = _billAppService.GetTotalPaidBillsByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                PaidPerMonth       = _billAppService.GetTotalMonthBillsByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                PendingPerMonth    = _billAppService.GetTotalMonthPendingBillsByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                TotalCollection    = _billAppService.GetTotalPendingBillsAmountByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear).Sum(),
                CollectionPerMonth = _billAppService.GetTotalPendingMonthBillsAmountByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear).Sum()
            };

            return(View(Dashboard));
        }