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