Beispiel #1
0
        protected virtual async Task <IList <OrderPeriodReportLineModel> > GetReportOrderPeriodModel()
        {
            var report            = new List <OrderPeriodReportLineModel>();
            var reportperiod7days = await _orderReportService.GetOrderPeriodReport(7, _workContext.CurrentCustomer.StaffStoreId);

            report.Add(new OrderPeriodReportLineModel
            {
                Period = _localizationService.GetResource("Admin.Reports.Period.7days"),
                Count  = reportperiod7days.Count,
                Amount = reportperiod7days.Amount
            });

            var reportperiod14days = await _orderReportService.GetOrderPeriodReport(14, _workContext.CurrentCustomer.StaffStoreId);

            report.Add(new OrderPeriodReportLineModel
            {
                Period = _localizationService.GetResource("Admin.Reports.Period.14days"),
                Count  = reportperiod14days.Count,
                Amount = reportperiod14days.Amount
            });

            var reportperiodmonth = await _orderReportService.GetOrderPeriodReport(30, _workContext.CurrentCustomer.StaffStoreId);

            report.Add(new OrderPeriodReportLineModel
            {
                Period = _localizationService.GetResource("Admin.Reports.Period.month"),
                Count  = reportperiodmonth.Count,
                Amount = reportperiodmonth.Amount
            });

            var reportperiodyear = await _orderReportService.GetOrderPeriodReport(365, _workContext.CurrentCustomer.StaffStoreId);

            report.Add(new OrderPeriodReportLineModel
            {
                Period = _localizationService.GetResource("Admin.Reports.Period.year"),
                Count  = reportperiodyear.Count,
                Amount = reportperiodyear.Amount
            });

            return(report);
        }
        protected virtual IList <OrderPeriodReportLineModel> GetReportOrderPeriodModel()
        {
            var report            = new List <OrderPeriodReportLineModel>();
            var reportperiod7days = _orderReportService.GetOrderPeriodReport(7);

            report.Add(new OrderPeriodReportLineModel
            {
                Period = _localizationService.GetResource("Admin.SalesReport.Period.7days"),
                Count  = reportperiod7days.Count,
                Amount = reportperiod7days.Amount
            });

            var reportperiod14days = _orderReportService.GetOrderPeriodReport(14);

            report.Add(new OrderPeriodReportLineModel
            {
                Period = _localizationService.GetResource("Admin.SalesReport.Period.14days"),
                Count  = reportperiod14days.Count,
                Amount = reportperiod14days.Amount
            });

            var reportperiodmonth = _orderReportService.GetOrderPeriodReport(30);

            report.Add(new OrderPeriodReportLineModel
            {
                Period = _localizationService.GetResource("Admin.SalesReport.Period.month"),
                Count  = reportperiodmonth.Count,
                Amount = reportperiodmonth.Amount
            });

            var reportperiodyear = _orderReportService.GetOrderPeriodReport(365);

            report.Add(new OrderPeriodReportLineModel
            {
                Period = _localizationService.GetResource("Admin.SalesReport.Period.year"),
                Count  = reportperiodyear.Count,
                Amount = reportperiodyear.Amount
            });

            return(report);
        }