Ejemplo n.º 1
0
        public ActionResult Dashboard()
        {
            var finacialYear = _financialYearAppService.GetActiveFinancialYear();
            var userInfo     = _userAppService.GetLoggedInUser();

            var Dashboard = new RegistrationDashboard
            {
                candidates         = _candidateAppService.GetTotalCandidatesByStationId(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                pending            = _dealerAppService.GetTotalPendingDealerByStationId(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                dealers            = _dealerAppService.GetTotalDealerByStationId(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                estimatedVolume    = _candidateAppService.GetTotalAppliedVolumeByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                TotalCollection    = _dealerAppService.GetTotalDealerFeesByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear).Sum(),
                dealersPerMonth    = _dealerAppService.GetTotalMonthDealerByStationId(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                pendingPerMonth    = _dealerAppService.GetTotalMonthPendingDealerByStationId(_stationAppService.GetStation(userInfo.StationId), finacialYear),
                CollectionPerMonth = _dealerAppService.GetTotalMonthDealerFeesByStation(_stationAppService.GetStation(userInfo.StationId), finacialYear).Sum()
            };

            return(View(Dashboard));
        }