Пример #1
0
        private static QuestionReference generateQuestion32()
        {
            QuestionReference qr1 = new QuestionReference();
            Question          q1  = new Question();

            q1.IsMandatory  = true;
            q1.QuestionText = "Which of the following did cause an allergic reaction for you?";
            q1.AnswerType   = DataType.BOOLEAN;
            q1.QuestionType = new Choice(1, 7);
            List <AnswerOption> list = new List <AnswerOption> ();
            AnswerOption        a11  = new AnswerOption("Nuts");
            AnswerOption        a12  = new AnswerOption("Milk");
            AnswerOption        a13  = new AnswerOption("Egg");
            AnswerOption        a14  = new AnswerOption("Egg");
            AnswerOption        a15  = new AnswerOption("Soy");
            AnswerOption        a16  = new AnswerOption("Fish");
            AnswerOption        a17  = new AnswerOption("Other");

            list.Add(a11);
            list.Add(a12);
            list.Add(a13);
            list.Add(a14);
            list.Add(a15);
            list.Add(a16);
            list.Add(a17);
            q1.PossibleAnswers = list;
            qr1.Question       = q1;
            return(qr1);
        }
Пример #2
0
        private static QuestionReference generateQuestion23()
        {
            QuestionReference qr1 = new QuestionReference();
            Question          q1  = new Question();

            q1.IsMandatory  = true;
            q1.QuestionText = "How would you describe your heat comfort?";
            q1.AnswerType   = DataType.STRING;
            q1.QuestionType = new Choice(1, 1);
            List <AnswerOption> list = new List <AnswerOption> ();
            AnswerOption        a11  = new AnswerOption("Freezing");
            AnswerOption        a12  = new AnswerOption("Cold");
            AnswerOption        a13  = new AnswerOption("Acceptable");
            AnswerOption        a14  = new AnswerOption("Warm");
            AnswerOption        a15  = new AnswerOption("Hot");

            list.Add(a11);
            list.Add(a12);
            list.Add(a13);
            list.Add(a14);
            list.Add(a15);
            q1.PossibleAnswers = list;
            qr1.Question       = q1;
            return(qr1);
        }
Пример #3
0
        private static Prerequisite generatePrerequisite33(QuestionReference qr)
        {
            List <AnswerOption> preq = new List <AnswerOption> ();
            AnswerOption        a    = new AnswerOption("Other");

            preq.Add(a);
            return(new Prerequisite(preq, qr, Prerequisite.PrOperator.OR));
        }
Пример #4
0
        private static Prerequisite generatePrerequisite22(QuestionReference qr)
        {
            List <AnswerOption> preq = new List <AnswerOption> ();

            for (int i = 1; i < 4; i++)
            {
                AnswerOption a = new AnswerOption(i.ToString());
                preq.Add(a);
            }
            return(new Prerequisite(preq, qr, Prerequisite.PrOperator.OR));
        }
Пример #5
0
        private static QuestionReference generateQuestion31()
        {
            QuestionReference qr1 = new QuestionReference();
            Question          q1  = new Question();

            q1.IsMandatory  = true;
            q1.QuestionText = "Did you experience any allergic reactions recently?";
            q1.AnswerType   = DataType.BOOLEAN;
            q1.QuestionType = new Choice(1, 1);
            List <AnswerOption> list = new List <AnswerOption> ();
            AnswerOption        a11  = new AnswerOption("Yes");
            AnswerOption        a12  = new AnswerOption("No");

            list.Add(a11);
            list.Add(a12);
            q1.PossibleAnswers = list;
            qr1.Question       = q1;
            return(qr1);
        }
Пример #6
0
        private static QuestionReference generateQuestion21()
        {
            QuestionReference qr1 = new QuestionReference();
            Question          q1  = new Question();

            q1.IsMandatory  = true;
            q1.QuestionText = "How are you feeling today?";
            q1.AnswerType   = DataType.INTEGER;
            q1.QuestionType = new Choice(1, 1);
            List <AnswerOption> list = new List <AnswerOption> ();

            for (int i = 1; i < 11; i++)
            {
                AnswerOption a = new AnswerOption(i.ToString());
                list.Add(a);
            }
            q1.PossibleAnswers = list;
            qr1.Question       = q1;
            return(qr1);
        }
Пример #7
0
        private static QuestionReference generateQuestion11()
        {
            QuestionReference qr1 = new QuestionReference();
            Question          q1  = new Question();

            q1.IsMandatory  = true;
            q1.QuestionText = "What is your gender?";
            q1.AnswerType   = DataType.STRING;
            q1.QuestionType = new Choice(1, 1);
            List <AnswerOption> list = new List <AnswerOption> ();
            AnswerOption        a11  = new AnswerOption("Male");
            AnswerOption        a12  = new AnswerOption("Female");
            AnswerOption        a13  = new AnswerOption("Other");

            list.Add(a11);
            list.Add(a12);
            list.Add(a13);
            q1.PossibleAnswers = list;
            qr1.Question       = q1;
            return(qr1);
        }