public PageElementWithErrorDto(string elementText, bool isActive, PageElementType pageElementType, int pageId, int sortSequence, int maxLength, string errorText, bool isRequired, bool isPrefilled, string ckmFieldId)
     : base(elementText, isActive, pageElementType, pageId, sortSequence, maxLength, isRequired)
 {
     _errorText = errorText;
     _isPrefilled = isPrefilled;
     _ckmFieldId = ckmFieldId;
 }
 public PageElementReqDto(string elementText, bool isActive, PageElementType pageElementType, int pageId, int sortSequence, int maxLength, bool isRequired)
     : base(elementText, pageId, sortSequence, maxLength)
 {
     _isActive = isActive;
     _pageElementType = pageElementType;
     _isRequired = isRequired;
 }
Exemple #3
0
 public static Validator GetValidator(PageElementType pageElementType)
 {
     Validator retval = null;
     if (!_map.TryGetValue(pageElementType, out retval))
     {
         throw new BugException("No validator available for \"" + pageElementType + "\"");
     }
     return retval;
 }
Exemple #4
0
 private QuestionnaireDto SetupQuestionnaireForMasterReport(PageElementType[] elements)
 {
     QuestionnaireDto retval = CreateNewQuestionnaire();
     PageDto page = CreateNewFormPage();
     Assert.IsNotNull(page);
     for (int i = 0; i < elements.Length; i++ )
     {
         PageElementReqDto element = TestData.CreateElement(page, retval.QidTitle + "_" + i, elements[i], i + 1, "error_" + i);
     }
     return retval;
 }
Exemple #5
0
 public static PageElementReqDto CreateElement(PageDto page, string elementText, PageElementType pageElementType, int sortSequence, string errorText)
 {
     PageElementReqDto retval = null;
     if (Array.Exists<PageElementType>(Constants.PageElementErrorTypes, delegate(PageElementType cur) { return cur == pageElementType; }))
     {
         retval = CreateErrorElement(page, elementText, pageElementType, sortSequence, errorText);
     }
     else
     {
         retval = CreateReqElement(page, elementText, pageElementType, sortSequence);
     }
     return retval;
 }
Exemple #6
0
 public static int GetMaxLength(PageElementType type)
 {
     int retval = 100;
     switch (type)
     {
         case PageElementType.RequestedMoreInfo:
             retval = 50;
             break;
         default:
             retval = 100;
             break;
     }
     return retval;
 }
 public PrivacySectionValidator(PageElementType type)
     : base(type)
 { }
Exemple #8
0
 public static string Convert(PageElementType pageElementType)
 {
     string retval;
     switch (pageElementType)
     {
         case PageElementType.BandedHeader://    bh	bandedheader
             retval = "bh";
             break;
         case PageElementType.RequestedCallback://    c1	requested call back
             retval = "c1";
             break;
         case PageElementType.RequestedLiterature://	requested literature
             retval = "c2";
             break;
         case PageElementType.RequestedMoreInfo://    requested more info
             retval = "c3";
             break;
         case PageElementType.RequestedUnAndSubscribe://	requested un-/subscribe
             retval = "c4";
             break;
         case PageElementType.RespondentInterested://	respondent interested
             retval = "c5";
             break;
         case PageElementType.Content://	content
             retval = "cc";
             break;
         case PageElementType.CheckBoxesLong://	checkboxes long
             //element_id, element_text, required
             retval = "cl";
             break;
         case PageElementType.CheckBoxesShort://	checkboxes short
             retval = "cs";
             break;
         case PageElementType.DropDown://	dropdown
             retval = "dd";
             break;
         case PageElementType.MailToSubject://	mailto subject
             retval = "dm";
             break;
         case PageElementType.FileUpload://	file upload
             retval = "fu";
             break;
         case PageElementType.LoginEmailField://	login email field
             retval = "le";
             break;
         case PageElementType.ForgotPwdLink://	forgotpwd link
             retval = "lf";
             break;
         case PageElementType.NewUserLink://	new user link
             retval = "ln";
             break;
         case PageElementType.LoginPasswordField://	login password field
             retval = "lp";
             break;
         case PageElementType.LoginPasswordSentMessage://	login password sent message
             retval = "ls";
             break;
         case PageElementType.MultipleTextLines://	multiple textlines
             retval = "mt";
             break;
         case PageElementType.PasswordFields://	password fields
             retval = "pw";
             break;
         case PageElementType.RadioButtonsLong://	radiobuttons long
             retval = "rl";
             break;
         case PageElementType.RadioButtonsShort://	radiobuttons short
             retval = "rs";
             break;
         case PageElementType.SingleTextLine://	single textline
             retval = "st";
             break;
         case PageElementType.Divider:
             retval = "di";
             break;
         case PageElementType.Date:
             retval = "dt";
             break;
         default:
             string err = "Page element type \"" + pageElementType + "\" is not supported in for conversion to database elements";
             Trace.WriteLine(err);
             throw new ArgumentException(err);
     }
     return retval;
 }
 public PageElementReqDto(): base()
 {
     _pageElementType = PageElementType.Unknown;
 }
Exemple #10
0
 public static PageElementReqDto CreateReqElement(PageDto page, string elementText, PageElementType pageElementType, int sortSequence)
 {
     PageElementReqDto retval = new PageElementReqDto(elementText, true, pageElementType, page.PageId, sortSequence, 100, true);
     Assert.Contains(pageElementType, Constants.PageElementReqTypes);
     retval = FormRegistry.PageElementDao.Create(retval);
     Assert.IsNotNull(retval);
     return retval;
 }
Exemple #11
0
 public FieldValidator(PageElementType type)
     : base(type)
 { }
 public LoginEmailFieldValidator(PageElementType type)
     : base(type)
 { }
 public LoginPasswordFieldValidator(PageElementType type)
     : base(type)
 { }
 public LoginPasswordSentMessageValidator(PageElementType type)
     : base(type)
 { }
Exemple #15
0
 public DropDownValidator(PageElementType type)
     : base(type)
 { }
 public FileUploadValidator(PageElementType type)
     : base(type)
 { }
Exemple #17
0
 public ChoicesValidator(PageElementType type)
     : base(type)
 { }
 public CrmUnAndSubscribeValidator(PageElementType type)
     : base(type)
 { }
 public CrmMoreInfoValidator(PageElementType type)
     : base(type)
 { }
 public CrmLiteratureValidator(PageElementType type)
     : base(type)
 { }
Exemple #21
0
 public NopValidator(PageElementType type)
     : base(type)
 { }
Exemple #22
0
 public static void Register(PageElementType pageElementType, Validator validator)
 {
     _map[pageElementType] = validator;
 }
 public string TypeParser(PageElementType peType)
 {
     string retval = String.Empty;
     switch (peType)
     {
         case PageElementType.CheckBoxesLong:
             retval = "cl";
             break;
         case PageElementType.RadioButtonsLong:
             retval = "rl";
             break;
         case PageElementType.DropDown:
             retval = "dd";
             break;
     }
     return retval;
 }
 public void Initialize(QuestionnaireDto quesitonnaire, PageDto page, PageElementAssemblyDto pageElementAssembly)
 {
     _pageElementType = pageElementAssembly.Pageelement.PageElementType;
     _questionnaire = quesitonnaire;
     _page = page;
     _pageElement = pageElementAssembly.Pageelement;
     _choices = pageElementAssembly.Elementchoices;
     _isValid = true;
     Load += new EventHandler(WucPageElementBase_Load);
 }
Exemple #25
0
 /*
  * Add a static method “RegisterComponent(PageElementType type, CreateWebControl maker)” 
  * to ControlFactory which will store the delegate in an internal SortedList 
  * (faster than dictionary for base types) and use the delegates to construct components on request.
  */
 public static void RegisterComponent(PageElementType type, string virtualPath)
 {
     _mappings[type] = virtualPath;
 }
        public void Initialize(QuestionnaireDto quesitonnaire, PageDto page, PagePredefinedQuestionAssemblyDto pagePredefinedQuestionAssembly)
        {

            _pageElementType = pagePredefinedQuestionAssembly.Question.ElementType;
            _questionnaire = quesitonnaire;
            _page = page;
            _pageQuestion = pagePredefinedQuestionAssembly.Question;
            _pageQuestionChoices = pagePredefinedQuestionAssembly.Choices; 
            _isValid = true;
            Load += new EventHandler(WucPageElementBase_Load);
        }
 public CrmCallbackValidator(PageElementType type)
     : base(type)
 { }
Exemple #28
0
 public static PageElementWithErrorDto CreateErrorElement(PageDto page, string elementText, PageElementType pageElementType, int sortSequence, string errorText)
 {
     PageElementWithErrorDto retval = new PageElementWithErrorDto(elementText, true, pageElementType, page.PageId, sortSequence, 100, errorText, true, false,string.Empty);
     Assert.Contains(pageElementType, Constants.PageElementErrorTypes);
     retval = FormRegistry.PageElementDao.Create(retval);
     Assert.IsNotNull(retval);
     return retval;
 }
Exemple #29
0
 public PasswordValidator(PageElementType type)
     : base(type)
 { }
 public NewUserLinkValidator(PageElementType type)
     : base(type)
 { }