public MainController(IHotelSystem hotel, Window mainWindow, IDialogService dialogService) { _loginDashboardModel = new LoginDashboardModel(this, hotel); _loginDashboard = new LoginDashboard(mainWindow, _loginDashboardModel); _registrationDashboardModel = new RegistrationDashboardModel(this, hotel); _registrationDashboard = new RegistrationDashboard(mainWindow, _registrationDashboardModel); _managerDashboardModel = new ManagerDashboardModel(this, hotel, dialogService); _managerDashboard = new ManagerDashboard(mainWindow, _managerDashboardModel); _visitorDashboardModel = new VisitorDashboardModel(this, hotel, dialogService); _visitorDashboard = new VisitorDashboard(mainWindow, _visitorDashboardModel); }
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)); }