public IActionResult Index()
        {
            PageTitle = "Select a Report";
            var viewModel = new ReportIndexViewModel
            {
                Reports = _reportService.GetReportList()
            };

            var configuredMaxActivity = _config[ConfigurationKey.MaximumAllowableActivity];

            if (!string.IsNullOrEmpty(configuredMaxActivity))
            {
                if (!int.TryParse(configuredMaxActivity, out int MaximumAllowableActivity))
                {
                    _logger.LogError("Could not configure maximum allowable activity: {0} in configuration is not a number",
                                     ConfigurationKey.MaximumAllowableActivity);
                }
                else
                {
                    viewModel.ReportingNote = $"Participants who logged more than {MaximumAllowableActivity:N0} minutes have had their activity amount reduced to the program achiever amount for reporting purposes.";
                }
            }

            return(View(viewModel));
        }
        // GET: /<controller>/
        public IActionResult Index()
        {
            var kra = new SelectListItem
            {
                Value = "kra",
                Text  = "KRA"
            };
            var beh = new SelectListItem
            {
                Value = "behavioral",
                Text  = "Behavioral"
            };
            List <SelectListItem> types = new List <SelectListItem>();

            types.Add(kra);
            types.Add(beh);

            var periods = _Services.EvaluationSeasons()
                          .Select(a => new SelectListItem
            {
                Value = a.Id.ToString(),
                Text  = a.Title,
            }).ToList();
            var model = new ReportIndexViewModel
            {
                Periods = periods,
                Types   = types
            };

            return(View(model));
        }
        public IActionResult Index(ReportIndexViewModel model, StationsService service)
        {
            model.Stations     = new List <Stations>(service.GetStationsNames());
            model.StationIdnts = service.GetStationIdntsIEnumerable();
            model.StationCodes = service.GetStationCodesIEnumerable();

            return(View(model));
        }
        public IActionResult Index()
        {
            PageTitle = "Select a Report";
            var viewModel = new ReportIndexViewModel
            {
                Reports = _reportService.GetReportList()
            };

            return(View(viewModel));
        }
예제 #5
0
        public IActionResult IndexNoNavBar()
        {
            var model = new ReportIndexViewModel
            {
                SoldToday        = this.reportServices.GetQtySoldToday(),
                QtySoldLastXDays = this.reportServices.GetQtySoldLast(7),
            };

            model.QtySoldLastXDays.QtySoldList.OrderBy(x => x.Date);
            return(this.View(model));
        }
예제 #6
0
        public async Task <IActionResult> Index()
        {
            var user = await this.userManager.GetUserAsync(this.User);

            if (user?.CompanyId == null)
            {
                return(this.RedirectToAction(RedirectCreate, RedirectCompany));
            }

            var reports = await this.reportService.GetAllReportsAsync(user.CompanyId);

            var result = new ReportIndexViewModel()
            {
                Reports = reports.MapTo <ReportIndexShowViewModel[]>(),
            };

            return(this.View(result));
        }