public IActionResult SimpleSearch(DateTime?min, DateTime?max)
        {
            if (!min.HasValue)
            {
                min = new DateTime(DateTime.Now.Year - 1, 1, 1);
            }
            if (!max.HasValue)
            {
                min = DateTime.Now;
            }

            ViewData["min"] = min.Value.ToString("yyyy/MM/dd");
            ViewData["max"] = max.Value.ToString("yyyy/MM/dd");
            var result = _salesRecordsService.FindByDate(min, max);

            return(View(result));
        }
        public async Task <IActionResult> SimpleSearch(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"] = minDate.Value.ToString("yyyy-MM-dd");

            var result = await _salesRecords.FindByDate(minDate, maxDate);

            return(View(result));
        }