internal void ResetCallInfo(RetUrlConfig retUrl, IPageData pageData)
 {
     if (retUrl != null)
     {
         fPageInfo = new WebPageInfo(pageData, WebGlobalVariable.SessionGbl,
                                     RetUrlConfig.GetRetUrl(retUrl, pageData), pageData.PageUrl);
     }
 }
        internal RazorPageTemplatePageMaker(string pageTemplateName, RetUrlConfig config, IPageData pageData)
        {
            TkDebug.AssertArgumentNullOrEmpty(pageTemplateName, "pageTemplateName", null);

            PageTemplateName = pageTemplateName;
            fPageInfo        = new WebPageInfo(pageData, WebGlobalVariable.SessionGbl,
                                               RetUrlConfig.GetRetUrl(config, pageData), pageData.PageUrl);
        }
Exemplo n.º 3
0
        public static Uri GetRetUrl(RetUrlConfig config, IPageData input)
        {
            if (config == null || config.Style == null)
            {
                string retUrl = input.QueryString["RetURL"];
                if (!string.IsNullOrEmpty(retUrl))
                {
                    return(new Uri(retUrl, UriKind.RelativeOrAbsolute));
                }
                return(GetDefaultStyleUrl(PageStyle.List, input));
            }
            else
            {
                if (config.UseRetUrlFirst)
                {
                    string retUrl = input.QueryString["RetURL"];
                    if (!string.IsNullOrEmpty(retUrl))
                    {
                        return(new Uri(retUrl, UriKind.RelativeOrAbsolute));
                    }
                }
                switch (config.Style.Value)
                {
                case PageStyle.Custom:
                    if (config.CustomUrl != null)
                    {
                        string url = WebUtil.ResolveUrl(Expression.Execute(config.CustomUrl));
                        return(new Uri(url, UriKind.RelativeOrAbsolute));
                    }
                    break;

                case PageStyle.Insert:
                case PageStyle.List:
                case PageStyle.Update:
                case PageStyle.Delete:
                case PageStyle.Detail:
                    return(GetDefaultStyleUrl(config.Style.Value, input));
                }
            }
            return(null);
        }