Exemplo n.º 1
0
        public async Task <IActionResult> AuMReports(string type)
        {
            string function = StringSwapper.ByArea(
                type,
                SqlFunctionDictionary.ReportFunds,
                SqlFunctionDictionary.ReportSubFunds,
                null);

            var today = DateTime.Today;
            var date  = today.BuildReportDate(type, 1);

            var headers = await this.service.All(function, date).FirstOrDefaultAsync();

            var values = await this.service.All(function, date, 1).ToListAsync();

            var viewModel = new AuMReportViewModel
            {
                Date         = date,
                Headers      = headers,
                Values       = values,
                SelectedType = type,
            };

            await this.recentService.Save(this.User, this.Request.Path);

            return(this.View(viewModel));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> AuMReports(string type)
        {
            string function = StringSwapper.ByArea(
                type,
                SqlFunctionDictionary.ReportFunds,
                SqlFunctionDictionary.ReportSubFunds,
                null);
            int day = (type == EndpointsConstants.FundArea) ?
                      FixedDayNavValue :
                      DateTime.DaysInMonth(DateTime.Today.Year, DateTime.Today.Month - 1);
            var date    = new DateTime(DateTime.Today.Year, DateTime.Today.Month - 1, day);
            var headers = await this.service.All(function, date).FirstOrDefaultAsync();

            var values = await this.service.All(function, date, 1).ToListAsync();

            var viewModel = new AuMReportViewModel
            {
                Date         = date,
                Headers      = headers,
                Values       = values,
                SelectedType = type,
            };

            return(this.View(viewModel));
        }
Exemplo n.º 3
0
        public IActionResult SubOverview(string type)
        {
            var viewModel = new AuMReportViewModel()
            {
                SelectedType = type,
            };

            return(this.View(viewModel));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> AuMReports(AuMReportViewModel model)
        {
            string function = StringSwapper.ByArea(
                model.SelectedType,
                SqlFunctionDictionary.ReportFunds,
                SqlFunctionDictionary.ReportSubFunds,
                null);

            var date = model.Date.BuildReportDate(model.SelectedType);

            model.Headers = await this.service.All(function, date).FirstOrDefaultAsync();

            model.Values = await this.service.All(function, date, 1).ToListAsync();

            return(this.View(model));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> AuMReports(AuMReportViewModel model)
        {
            string function = StringSwapper.ByArea(
                model.SelectedType,
                SqlFunctionDictionary.ReportFunds,
                SqlFunctionDictionary.ReportSubFunds,
                null);

            int day = (model.SelectedType == EndpointsConstants.FundArea) ?
                      FixedDayNavValue :
                      DateTime.DaysInMonth(model.Date.Year, model.Date.Month);
            var date = new DateTime(model.Date.Year, model.Date.Month, day);

            model.Headers = await this.service.All(function, date).FirstOrDefaultAsync();

            model.Values = await this.service.All(function, date, 1).ToListAsync();

            return(this.View(model));
        }