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