예제 #1
0
 /// <summary>
 /// Конструктор для отправки данных на форму
 /// </summary>
 /// <param name="questionnaireRepo"></param>
 /// <param name="respondentId"></param>
 /// <param name="questionId"></param>
 public QuestionnaireViewModel(IQuestionnaireRepository questionnaireRepo, int respondentId, int questionId)
 {
     _questionnaireRepo = questionnaireRepo;
     RespondentId       = respondentId;
     QuestionId         = questionId;
     CurrentQuestion    = questionnaireRepo.CalculateQuestion(QuestionId).Result;
     IsThisLastQuestion = questionnaireRepo.IsLastQuestion(QuestionId).Result;
     AnswerContent      = questionnaireRepo.GetAnswerContent(respondentId, questionId).Result;
 }