コード例 #1
0
        public void RecountAttemptsResult(int id, byte count)
        {
            QuestionCRUD question  = new QuestionCRUD();
            QuestionDTO  questions = question.GetById(id);

            questions.Weight = count;
            question.Update(questions);
            AttemptQuestionAnswerCRUD       attemptQuestionAnswerCRUD = new AttemptQuestionAnswerCRUD();
            List <AttemptQuestionAnswerDTO> attemptQuestionAnswers    = attemptQuestionAnswerCRUD.GetAll();
            AttemptManager manager = new AttemptManager();

            foreach (AttemptQuestionAnswerDTO aqa in attemptQuestionAnswers)
            {
                if (aqa.QuestionID == id)
                {
                    manager.UpdateResult(aqa.AttemptID);
                }
            }
        }
コード例 #2
0
        public void UpdateQuestionById(QuestionDTO questionDto)
        {
            QuestionCRUD question = new QuestionCRUD();

            question.Update(questionDto);
        }