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); } } }
public void UpdateQuestionById(QuestionDTO questionDto) { QuestionCRUD question = new QuestionCRUD(); question.Update(questionDto); }