Exemplo n.º 1
0
        public List <Exam> StudentFindAllExam(Pagination pagination, int userId)
        {
            List <Exam> exams = null;

            try
            {
                exams = examDal.FindNeedUpdateScoreUserIdAndExamId();
                for (int i = 0; i < exams.Count; i++)
                {
                    examDal.UpdateResultWithNoExamineeUser(exams[i].Id, exams[i].UserId);
                }
                exams = examDal.StudentFindAllExam(pagination, userId);
            }
            catch (SqlException sqlException)
            {
                log.Error(sqlException.StackTrace);
                throw new FaultException <DBException>(new DBException(), Constants.ServerError);
            }
            return(exams);
        }