public IActionResult ReportCustomerTimeChart(DataSourceRequest command, DateTime?startDate, DateTime?endDate)
        {
            var model     = _customerReportService.GetCustomerByTimeReport(startDate, endDate);
            var gridModel = new DataSourceResult
            {
                Data = model
            };

            return(Json(gridModel));
        }
Exemple #2
0
        public async Task <IActionResult> ReportCustomerTimeChart(DataSourceRequest command, DateTime?startDate, DateTime?endDate)
        {
            string storeId = "";

            if (_workContext.CurrentCustomer.IsStaff())
            {
                storeId = _workContext.CurrentCustomer.StaffStoreId;
            }

            var model = await _customerReportService.GetCustomerByTimeReport(storeId, startDate, endDate);

            var gridModel = new DataSourceResult {
                Data = model
            };

            return(Json(gridModel));
        }