예제 #1
0
        public void InsertQuestion(QuestionModel model)
        {
            var question = new Question(model.Id, model.Data, LevelTree.Count > 0 ? LevelTree.Peek().Question.Id : 1);

            LevelTree.Push(new LevelTreeNode(question));
            CreateNode(question);
        }
예제 #2
0
 public AnswerModel(Question que, string data, bool isLeaf)
     : this(que)
 {
     Data = data;
     IsLeaf = isLeaf;
 }
예제 #3
0
 public AnswerModel(Question que, int id, string data, bool isLeaf)
     : this(que, data, isLeaf)
 {
     Id = id;
 }
예제 #4
0
 public LevelTreeNode(Question question)
     : this()
 {
     Question = question;
 }
예제 #5
0
 public AnswerModel(Question que)
 {
     Question = que;
 }
예제 #6
0
 public QuestionDisplayModel(Question que, IEnumerable<Answer> answers)
     : this()
 {
     Question = que;
     Answers = answers;
 }
예제 #7
0
 public AnswerListModel(Question question, List<AnswerModel> answers)
     : this(question)
 {
     Answers = answers;
     NewAnswer.Data = answers.Count > 0 ? answers.Last().Data : "";
 }
예제 #8
0
 public AnswerListModel(Question que, AnswerModel answer)
     : this(que)
 {
     NewAnswer = answer;
 }
예제 #9
0
 public AnswerListModel(Question question)
 {
     Question = question;
     Answers = new List<AnswerModel>();
     NewAnswer = new AnswerModel(question);
 }
예제 #10
0
 public QuestionModel(Question question)
 {
     Id = question.Id;
     Data = question.Data;
     ParentId = question.ParentId;
 }