Пример #1
0
        private static List <CustomPrompt> PopulateCustomPromptListFromCourseCustomPromptsResult(
            CourseAdminFieldsResult?result
            )
        {
            var list = new List <CustomPrompt>();

            if (result == null)
            {
                return(list);
            }

            var prompt1 = CustomPromptHelper.PopulateCustomPrompt(
                1,
                result.CustomField1Prompt,
                result.CustomField1Options,
                false
                );

            if (prompt1 != null)
            {
                list.Add(prompt1);
            }

            var prompt2 = CustomPromptHelper.PopulateCustomPrompt(
                2,
                result.CustomField2Prompt,
                result.CustomField2Options,
                false
                );

            if (prompt2 != null)
            {
                list.Add(prompt2);
            }

            var prompt3 = CustomPromptHelper.PopulateCustomPrompt(
                3,
                result.CustomField3Prompt,
                result.CustomField3Options,
                false
                );

            if (prompt3 != null)
            {
                list.Add(prompt3);
            }

            return(list);
        }
Пример #2
0
        private static List <CustomPrompt> PopulateCustomPromptListFromCentreCustomPromptsResult(
            CentreCustomPromptsResult?result
            )
        {
            var list = new List <CustomPrompt>();

            if (result == null)
            {
                return(list);
            }

            var prompt1 = CustomPromptHelper.PopulateCustomPrompt(
                1,
                result.CustomField1Prompt,
                result.CustomField1Options,
                result.CustomField1Mandatory
                );

            if (prompt1 != null)
            {
                list.Add(prompt1);
            }

            var prompt2 = CustomPromptHelper.PopulateCustomPrompt(
                2,
                result.CustomField2Prompt,
                result.CustomField2Options,
                result.CustomField2Mandatory
                );

            if (prompt2 != null)
            {
                list.Add(prompt2);
            }

            var prompt3 = CustomPromptHelper.PopulateCustomPrompt(
                3,
                result.CustomField3Prompt,
                result.CustomField3Options,
                result.CustomField3Mandatory
                );

            if (prompt3 != null)
            {
                list.Add(prompt3);
            }

            var prompt4 = CustomPromptHelper.PopulateCustomPrompt(
                4,
                result.CustomField4Prompt,
                result.CustomField4Options,
                result.CustomField4Mandatory
                );

            if (prompt4 != null)
            {
                list.Add(prompt4);
            }

            var prompt5 = CustomPromptHelper.PopulateCustomPrompt(
                5,
                result.CustomField5Prompt,
                result.CustomField5Options,
                result.CustomField5Mandatory
                );

            if (prompt5 != null)
            {
                list.Add(prompt5);
            }

            var prompt6 = CustomPromptHelper.PopulateCustomPrompt(
                6,
                result.CustomField6Prompt,
                result.CustomField6Options,
                result.CustomField6Mandatory
                );

            if (prompt6 != null)
            {
                list.Add(prompt6);
            }

            return(list);
        }