コード例 #1
0
        public async Task <IActionResult> GroupingSearch(DateTime?minDate, DateTime?maxDate)
        {
            var includeList = new List <string> {
                "Seller", "Seller.Department"
            };

            var request = new SalesRecordByDateIncluding
            {
                MinDate                 = minDate,
                MaxDate                 = maxDate,
                IncludeList             = includeList,
                GroupBySellerDepartment = true
            };

            string jsonValues = JsonConvert.SerializeObject(request);

            var result = await _webApiService.FindByDateGroupingAsync <SalesRecord>(jsonValues);

            ViewData["minDate"] = minDate?.Date.ToString("yyyy-MM-dd");
            ViewData["maxDate"] = maxDate?.Date.ToString("yyyy-MM-dd");

            return(View(result));
        }