示例#1
0
        public async Task <IActionResult> GroupingSearch(DateTime?minDate, DateTime?maxDate)
        {
            if (!minDate.HasValue)
            {
                minDate = new DateTime(DateTime.Now.Year, 1, 1);
            }
            if (!maxDate.HasValue)
            {
                maxDate = DateTime.Now;
            }
            ViewData["minDate"] = minDate.Value.ToString("yyyy-MM-dd");
            ViewData["maxDate"] = maxDate.Value.ToString("yyyy-MM-dd");
            var result = await _salesRecordService.FindByDateGroupinAsync(minDate, maxDate);

            return(View(result));
        }
        public async Task <IActionResult> GroupingSearch(DateTime?min, DateTime?max)
        {
            if (!min.HasValue)
            {
                min = new DateTime(2018, 01, 01);
            }
            if (!max.HasValue)
            {
                max = DateTime.Now;
            }
            ViewData["min"] = min.Value.ToString("yyyy-MM-dd");
            ViewData["max"] = min.Value.ToString("yyyy-MM-dd");
            var result = await _salesRecordService.FindByDateGroupinAsync(min, max);

            return(View(result));
        }