コード例 #1
0
        public async Task <IActionResult> EmpIndex()
        {
            string user        = User.FindFirst("Index").Value;
            var    Currentuser = await _taskRepository.GetCurrentUser(user);

            ViewBag.photo     = Currentuser.PhotoURL;
            ViewBag.Rcount    = _leaveRepository.leaveRecomCount();
            ViewBag.Acount    = _leaveRepository.leaveAppCount();
            ViewBag.Attcount  = _attendenceRepository.AttendenceCount();
            ViewBag.Taskcount = _taskRepository.TaskRecomendCount();
            return(View());
        }
コード例 #2
0
        public async Task <IActionResult> ViewAttendence(string Search = null)
        {
            ViewBag.count = _attendenceRepository.AttendenceCount();
            var data = await _empRepository.GetSearchEmps(Search);

            if (data == null)
            {
                return(RedirectToAction(nameof(ViewAttendence)));
            }

            return(View(data));
        }