コード例 #1
0
        public void AddMultiQuestion(MultiChoiceQModel multiChoice, int chapterID, int surveyID)
        {
            MultichoiceQuestion multichoiceQuestion = new MultichoiceQuestion
            {
                Question  = multiChoice.Question,
                OwnOption = multiChoice.OwnOption,
            };
            var multiQuestionItem = _mr.Add(multichoiceQuestion);

            var optionsList = AddOption(multiChoice.Options); //---- finns längre upp så länge

            AddMultiQuestion_Options(optionsList, multiQuestionItem.ID);
            AddMultiQuestion_Survey(surveyID, chapterID, multiQuestionItem.ID, multiChoice.Order);
        }
コード例 #2
0
        public void Add(int surveyID, MultichoiceQuestion_OptionsModel multichoiceQuestion_Options)
        {
            MultichoiceQuestion multichoiceQuestion = new MultichoiceQuestion
            {
                Question  = multichoiceQuestion_Options.MultiChoiceQuestion,
                OwnOption = multichoiceQuestion_Options.OwnOption
            };
            var multichoice = _mr.Add(multichoiceQuestion);

            List <Options> optionsList = AddOption(multichoiceQuestion_Options);
            var            optionsitem = _or.AddRange(optionsList);

            AddMultiQuestion_Options(optionsitem, multichoice.ID);
            AddMultiQuestion_Survey(surveyID, multichoice.ID);
        }