public TestQuestionData(NewDataSet.TestQuestionRow theTestQuestionRow, NewDataSet projFile) { guid = theTestQuestionRow.guid; IsVisible = theTestQuestionRow.visible; QuestionVernacular = new StringTransfer((theTestQuestionRow.IsTQVernacularNull()) ? null : theTestQuestionRow.TQVernacular); QuestionNationalBT = new StringTransfer((theTestQuestionRow.IsTQNationalBTNull()) ? null : theTestQuestionRow.TQNationalBT); QuestionInternationalBT = new StringTransfer((theTestQuestionRow.IsTQInternationalBTNull()) ? null : theTestQuestionRow.TQInternationalBT); Answers = new AnswersData(theTestQuestionRow, projFile); }
public AnswersData(NewDataSet.TestQuestionRow theTestQuestionRow, NewDataSet projFile) { NewDataSet.AnswersRow[] theAnswersRows = theTestQuestionRow.GetAnswersRows(); NewDataSet.AnswersRow theAnswersRow; if (theAnswersRows.Length == 0) { theAnswersRow = projFile.Answers.AddAnswersRow(theTestQuestionRow); } else { theAnswersRow = theAnswersRows[0]; } foreach (NewDataSet.answerRow anAnswerRow in theAnswersRow.GetanswerRows()) { Add(new StringTransfer((anAnswerRow.Isanswer_textNull()) ? "" : anAnswerRow.answer_text)); MemberIDs.Add(anAnswerRow.memberID); } }