Esempio n. 1
0
        protected PostResult createPostResult()
        {
            ModuleNavigationAction navAction = NavigationActions[0];
            PostResult             result    = getNewPostResult(navAction);

            return(result);
        }
Esempio n. 2
0
        protected override string getModuleStartDiv()
        {
            string moduleStartDiv            = base.getModuleStartDiv();
            ModuleNavigationAction navAction = NavigationActions[0];
            string navigationUrl             = navAction.NavigationPage != null ? navAction.NavigationPage.RelativeUrl : "";
            string refreshModules            = navAction.RefreshModules == null ? "" : String.Join(",", navAction.RefreshModules);

            //Navigation zit nu in PostResult
//            moduleStartDiv += String.Format(@"<form method=""post"" name=""form{1}{0:N}"" id=""form{0:N}"" onsubmit1=""javascript:return submitPostableModule(this);"" enctype = ""multipart/form-data"">
//<input type=""hidden"" name=""hiddenModuleID"" value=""{0}""/>
//<input type=""hidden"" name=""hiddenModuleType"" value=""{1}""/>
//<input type=""hidden"" name=""hiddenModuleNavigationType"" value=""{2}""/>
//<input type=""hidden"" name=""hiddenRefreshModules"" value=""{3}""/>
//<input type=""hidden"" name=""hiddenNavigationUrl"" value=""{4}""/>
//<input type=""hidden"" id=""hiddenCurrentSubmitAction{0:N}"" name=""hiddenCurrentSubmitAction"" value=""{5}""/>
//<input type=""hidden"" id=""hiddenValidationRequired{0:N}"" value=""true""/>
//", this.ID, this.Type, navAction.NavigationType, refreshModules, navigationUrl, "Submit");

            moduleStartDiv += String.Format(@"<form method=""post"" name=""form{1}{0:N}"" id=""form{0:N}"" onsubmit1=""javascript:return BITSITESCRIPT.submitPostableModule(this);"" enctype = ""multipart/form-data"">
<input type=""hidden"" name=""hiddenIFramePost"" value=""true""/>
<input type=""hidden"" name=""hiddenModuleID"" value=""{0}""/>
<input type=""hidden"" name=""hiddenModuleType"" value=""{1}""/>
<!-- onderste twee fields worden overschreven door setAction van de knoppen in de module -->
<input type=""hidden"" id=""hiddenCurrentSubmitAction{0:N}"" name=""hiddenCurrentSubmitAction"" value=""Submit""/>
<input type=""hidden"" id=""hiddenValidationRequired{0:N}"" name=""hiddenValidationRequired"" value=""true""/>
", this.ID, this.Type);
            return(moduleStartDiv);
        }
Esempio n. 3
0
        public ModuleNavigationAction GetNavigationActionByTagName(string tagName)
        {
            ModuleNavigationAction returnValue = null;

            if (this.NavigationActions.Count > 0)
            {
                tagName            = "{" + tagName.Replace("{", "").Replace("}", "") + "}";
                returnValue        = this.NavigationActions.Where(c => c.Name == tagName).FirstOrDefault();
                returnValue.Module = this;
            }
            return(returnValue);
        }
Esempio n. 4
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);
        }