Exemplo n.º 1
0
        public static OptionAssign OptionToOptionAssign(int questionId, RealOption option, string[] answers)
        {
            byte[] answer = new byte[] { 0 };
            if (answers.Contains(option.title))
                answer[0] = 1;
            OptionAssign optionAssign = new OptionAssign
            {
                questionId = questionId,
                optionTitle = option.title,
                answer = answer,
            };

            return optionAssign;
        }
Exemplo n.º 2
0
        public static OptionAssign OptionToOptionAssign(int questionId, RealOption option, string[] answers)
        {
            bool answer = false;

            if (answers.Contains(option.title))
            {
                answer = true;
            }
            OptionAssign optionAssign = new OptionAssign
            {
                questionId  = questionId,
                optionTitle = option.title,
                answer      = answer,
            };

            return(optionAssign);
        }