コード例 #1
0
        public async Task <IActionResult> ViewTimeS(DateTime Date, int Search)
        {
            ViewBag.Emps = new SelectList(await _empRepository.GetEmps(), "EmpId", "EmpFullName");
            if (Date == DateTime.MinValue && Search == 0)
            {
                ViewBag.Empty = true;
                return(View());
            }
            else
            {
                ViewBag.Date = Date;

                ViewBag.TotalHours = _taskRepository.GetTotalHours(Search, Date);
                var data = await _taskRepository.GetTimeSheet(Search, Date);

                if (data != null)
                {
                    ViewBag.Empty = false;
                    return(View(data));
                }
                else
                {
                    ViewBag.Empty = true;
                    return(View());
                }
            }
        }
コード例 #2
0
        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());
                }
            }
        }
コード例 #3
0
        public async Task <IActionResult> Leave(DateTime Date, int Search, int id = 0)
        {
            ViewBag.Emps = new SelectList(await _empRepository.GetEmps(), "EmpId", "EmpFullName");
            ViewBag.Id   = id;
            if (Date == DateTime.MinValue)
            {
                var data = await _leaveRepository.SearchLeave1(Search);

                return(View(data));
            }
            else if (Search == 0)
            {
                var data = await _leaveRepository.SearchLeave3(Date);

                return(View(data));
            }
            else
            {
                var data = await _leaveRepository.SearchLeave2(Search, Date);

                return(View(data));
            }
        }
コード例 #4
0
 public async Task <IActionResult> Dashboard()
 {
     ViewBag.Emps = new SelectList(await _empRepository.GetEmps(), "EmpId", "EmpFullName");
     return(View());
 }
コード例 #5
0
 public List <Emp> GetEmps()
 {
     return(_empRepository.GetEmps());
 }