Example #1
0
 public static Questionnaire MakeNew(string xmlPath)
 {
     Questionnaire qn = new Questionnaire();
     qn.Id = Guid.NewGuid();
     qn.Index = 0;
     //qn.Subject = subject;
     //qn.Description = desc;
     //qn.Bosses = bosses;
     //qn.Branches = branches;
     qn.ReadQuestions(xmlPath);
     return qn;
 }
Example #2
0
 //public void FillAnswer(Answer.Symbol answerSym)
 //{
 //    FillAnswerCommand.Sym = answerSym;
 //    FillAnswerCommand.Do();
 //}
 public static Question MakeNew(int index, Typee questionType, string title, string subtitle, Questionnaire qn)
 {
     Question q = new Question();
     q.Index = index;
     q.Title = title;
     q.Subtitle = subtitle;
     q.QuestionType = questionType;
     q.AvailableAnswers = new AnswerList();
     q.SelectedAnswer = Answer.Empty;
     q.Questionnaire = qn;
     return q;
 }
Example #3
0
        public Questionnaire MakeCopy()
        {
            Questionnaire qn = new Questionnaire();
            qn.Id = Guid.NewGuid();
            qn.Index = this.Index + 1;
            qn.Subject = this.Subject;
            qn.Description = this.Description;
            qn.Bosses = this.Bosses;
            qn.Branches = this.Branches;
            qn.Questions = this.Questions.MakeCopy(qn);

            return qn;
        }
Example #4
0
 public Question MakeCopy(Questionnaire qn)
 {
     Question q = new Question();
     q.Index = this.Index;
     q.Title = this.Title;
     q.Subtitle = this.Subtitle;
     q.QuestionType = this.QuestionType;
     q.AvailableAnswers = this.AvailableAnswers.MakeCopy();
     q.SelectedAnswer = Answer.Empty;
     q.Questionnaire = qn;
     return q;
 }
Example #5
0
 public QuestionnaireReader(Questionnaire entity)
 {
     Entity = entity;
 }