Exemple #1
0
        public async Task <IActionResult> GetAll()
        {
            var helper   = new Helper(_configuration, _userManager);
            var response = helper.VerifyToken(HttpContext);

            if (!response.Flagged)
            {
                return(BadRequest(new { message = response.Message }));
            }

            var result = await _attendanceRepository.GetAllAttendance(response.UserId);

            return(Ok(result));
        }
        public async Task <IEnumerable <AttendanceResource> > GetAttendance()
        {
            List <Attendance> Attendances = await _repo.GetAllAttendance();

            return(_mapper.Map <List <Attendance>, List <AttendanceResource> >(Attendances));
        }
        public IActionResult GeneralAttendanceReport()
        {
            var model = attendanceRepository.GetAllAttendance();

            return(View(model));
        }