public async Task <IActionResult> ViewWorkS(DateTime Date) { ViewBag.Emps = new SelectList(await _empRepository.GetEmps(), "EmpId", "EmpFullName"); if (Date == DateTime.MinValue) { ViewBag.Empty = true; return(View()); } else { ViewBag.Date = Date; var data = await _taskRepository.GetWorkSheet(Date); if (data != null) { ViewBag.Empty = false; return(View(data)); } else { ViewBag.Empty = true; return(View()); } } }