Example #1
0
 protected EditDelegateCourseAdminFieldFormData(EditDelegateCourseAdminFieldFormData formData)
 {
     Answer          = formData.Answer;
     DelegateId      = formData.DelegateId;
     CustomisationId = formData.CustomisationId;
     ReturnPageQuery = formData.ReturnPageQuery;
 }
Example #2
0
        public EditDelegateCourseAdminFieldViewModel(
            EditDelegateCourseAdminFieldFormData formData,
            DelegateCourseInfo delegateCourseInfo,
            int progressId,
            int promptNumber,
            DelegateAccessRoute accessedVia
            ) : base(formData)
        {
            var courseAdminField = delegateCourseInfo.CourseAdminFields.Single(c => c.PromptNumber == promptNumber);

            Options      = courseAdminField !.Options;
            Radios       = GetRadioItems(delegateCourseInfo, promptNumber);
            PromptText   = courseAdminField.PromptText;
            CourseName   = delegateCourseInfo.CourseName;
            DelegateName = DisplayStringHelper.GetNonSortableFullNameForDisplayOnly(
                delegateCourseInfo.DelegateFirstName,
                delegateCourseInfo.DelegateLastName
                );
            ProgressId  = progressId;
            AccessedVia = accessedVia;
        }