Пример #1
0
        public async Task <IActionResult> ProcuraSimples(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 _registroVendasServico.FindByDateAsync(minDate, maxDate);

            return(View(result));
        }
        public async Task <IActionResult> SimpleSearch(DateTime?minDate, DateTime?maxDate)
        {
            if (!minDate.HasValue)
            {
                minDate = new DateTime(2018, 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 resul = await _registroVendedorService.FindByDateAsync(minDate, maxDate);

            return(View(resul));
        }