Пример #1
0
        protected PostResult createPostResult()
        {
            ModuleNavigationAction navAction = NavigationActions[0];
            PostResult             result    = getNewPostResult(navAction);

            return(result);
        }
Пример #2
0
        protected PostResult getNewPostResult(ModuleNavigationAction navigationAction)
        {
            PostResult result = new PostResult();

            result.NavigationType = navigationAction.NavigationType;
            if (navigationAction.NavigationType == NavigationTypeEnum.NavigateToPage)
            {
                string navigationUrl = navigationAction.NavigationPage != null ? navigationAction.NavigationPage.RelativeUrl : "";

                result.NavigationUrl = navigationUrl;
            }
            else
            {
                string refreshModules = navigationAction.RefreshModules == null ? "" : String.Join(",", navigationAction.RefreshModules);
                result.RefreshModules = refreshModules;
            }
            return(result);
        }
Пример #3
0
        /// <summary>
        /// valideer captchacode als die bestaat.
        /// </summary>
        /// <param name="FormParameters"></param>
        /// <returns></returns>
        protected PostResult validateCaptchaIfExists(Dictionary <string, string> FormParameters)
        {
            PostResult result            = createPostResult();
            bool       captchaValidation = true;

            if (FormParameters["hiddenValidationRequired"] == "true")
            {
                //alleen als catcha in sessie is gezet in Publish2() controle doen
                if (HttpContext.Current.Session["captcha_code_" + this.ID.ToString("N")] != null)
                {
                    captchaValidation = (FormParameters.ContainsKey("CaptchaValidationField") && HttpContext.Current.Session["captcha_code_" + this.ID.ToString("N")].ToString().ToLower() == FormParameters["CaptchaValidationField"].ToString().ToLower());
                }
            }
            if (!captchaValidation)
            {
                result = new PostResult()
                {
                    ErrorMessage = "<li>De ingevoerde code klopt niet.</li>"
                };
            }
            return(result);
        }