Esempio n. 1
0
        private List <CustomPromptWithAnswer> PopulateCustomPromptWithAnswerListFromCourseAdminFieldsResult(
            CourseAdminFieldsResult?result,
            DelegateCourseInfo delegateCourseInfo
            )
        {
            var list = new List <CustomPromptWithAnswer>();

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

            var prompt1 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                1,
                result.CustomField1Prompt,
                result.CustomField1Options,
                false,
                delegateCourseInfo.Answer1
                );

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

            var prompt2 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                2,
                result.CustomField2Prompt,
                result.CustomField2Options,
                false,
                delegateCourseInfo.Answer2
                );

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

            var prompt3 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                3,
                result.CustomField3Prompt,
                result.CustomField3Options,
                false,
                delegateCourseInfo.Answer3
                );

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

            return(list);
        }
Esempio n. 2
0
        private static List <CustomPromptWithAnswer> PopulateCustomPromptWithAnswerListFromCentreCustomPromptsResult(
            CentreCustomPromptsResult?result,
            DelegateUser delegateUser
            )
        {
            var list = new List <CustomPromptWithAnswer>();

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

            var prompt1 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                1,
                result.CustomField1Prompt,
                result.CustomField1Options,
                result.CustomField1Mandatory,
                delegateUser.Answer1
                );

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

            var prompt2 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                2,
                result.CustomField2Prompt,
                result.CustomField2Options,
                result.CustomField2Mandatory,
                delegateUser.Answer2
                );

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

            var prompt3 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                3,
                result.CustomField3Prompt,
                result.CustomField3Options,
                result.CustomField3Mandatory,
                delegateUser.Answer3
                );

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

            var prompt4 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                4,
                result.CustomField4Prompt,
                result.CustomField4Options,
                result.CustomField4Mandatory,
                delegateUser.Answer4
                );

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

            var prompt5 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                5,
                result.CustomField5Prompt,
                result.CustomField5Options,
                result.CustomField5Mandatory,
                delegateUser.Answer5
                );

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

            var prompt6 = CustomPromptHelper.PopulateCustomPromptWithAnswer(
                6,
                result.CustomField6Prompt,
                result.CustomField6Options,
                result.CustomField6Mandatory,
                delegateUser.Answer6
                );

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

            return(list);
        }