当前位置: 首页>>代码示例>>C#>>正文


C# SageFrameConfig.GetPageSettingsByPageSEONameForAdmin方法代码示例

本文整理汇总了C#中SageFrame.Web.SageFrameConfig.GetPageSettingsByPageSEONameForAdmin方法的典型用法代码示例。如果您正苦于以下问题:C# SageFrameConfig.GetPageSettingsByPageSEONameForAdmin方法的具体用法?C# SageFrameConfig.GetPageSettingsByPageSEONameForAdmin怎么用?C# SageFrameConfig.GetPageSettingsByPageSEONameForAdmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SageFrame.Web.SageFrameConfig的用法示例。


在下文中一共展示了SageFrameConfig.GetPageSettingsByPageSEONameForAdmin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BindModuleControls

        private void BindModuleControls()
        {
            string preFix = string.Empty;
            string paneName = string.Empty;
            string ControlSrc = string.Empty;
            string phdContainer = string.Empty;
            string PageSEOName = string.Empty;
            SageUserControl suc = new SageUserControl();
           
            string PageName = PagePath;
            if (PagePath == null)
            {
                string PageUrl = Request.RawUrl;
                PageName = Path.GetFileNameWithoutExtension(PageUrl);
            }
            else
            {
                PageName = PagePath;
            }
            suc.PagePath = PageName;
            if (Request.QueryString["pgnm"] != null)
            {
                PageSEOName = Request.QueryString["pgnm"].ToString();
            }
            else
            {
                PageSEOName = GetPageSEOName(PageName);
            }
            //:TODO: Need to get controlType and pageID from the selected page from routing path
            //string controlType = "0";
            //string pageID = "2";
            string redirecPath = string.Empty;
            if (PageSEOName != string.Empty)
            {
                DataSet dsPageSettings = new DataSet();
                SageFrameConfig sfConfig = new SageFrameConfig();
                dsPageSettings = sfConfig.GetPageSettingsByPageSEONameForAdmin("1", PageSEOName, GetUsername);
                if (bool.Parse(dsPageSettings.Tables[0].Rows[0][0].ToString()) == true)
                {
                    if (bool.Parse(dsPageSettings.Tables[0].Rows[0][1].ToString()) == true)
                    {
                        // Get ModuleControls data table
                        DataTable dtPages = dsPageSettings.Tables[1];
                        if (dtPages != null && dtPages.Rows.Count > 0)
                        {
                            OverridePageInfo(dtPages);
                        }

                        // Get ModuleDefinitions data table
                        DataTable dtPageModule = dsPageSettings.Tables[2];
                        if (dtPageModule != null && dtPageModule.Rows.Count > 0)
                        {
                            for (int i = 0; i < dtPageModule.Rows.Count; i++)
                            {

                                paneName = dtPageModule.Rows[i]["PaneName"].ToString();
                                if (string.IsNullOrEmpty(paneName))
                                    paneName = "ContentPane";
                                string UserModuleID = dtPageModule.Rows[i]["UserModuleID"].ToString();
                                ControlSrc = "/" + dtPageModule.Rows[i]["ControlSrc"].ToString();
                                string SupportsPartialRendering = dtPageModule.Rows[i]["SupportsPartialRendering"].ToString();
                                PlaceHolder phdPlaceHolder = (PlaceHolder)this.FindControl(paneName);
                                if (phdPlaceHolder != null)
                                {
                                    phdPlaceHolder = LoadControl(i.ToString(), bool.Parse(SupportsPartialRendering), phdPlaceHolder, ControlSrc, paneName, UserModuleID);
                                }
                                AddModuleCssToPage(ControlSrc, false);
                            }
                        }
                    } 
                    else
                    {
                        if (IsUseFriendlyUrls)
                        {
                            if (GetPortalID > 1)
                            {
                              
                                    redirecPath =
                                        ResolveUrl("~/portal/" + GetPortalSEOName + "/" +
                                                   sfConfig.GetSettingsByKey(
                                                       SageFrameSettingKeys.PortalPageNotAccessible) + ".aspx");
                              
                            }
                            else
                            {
                             
                                  redirecPath = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PlortalLoginpage) + ".aspx");
                              
                            }
                        }
                        else
                        {
                            redirecPath = ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalPageNotAccessible));
                        }
                        Response.Redirect(redirecPath);
                    }
                }
                else
                {
                    if (IsUseFriendlyUrls)
//.........这里部分代码省略.........
开发者ID:electrono,项目名称:veg-web,代码行数:101,代码来源:Default.aspx.cs

示例2: BindModuleControls

        private void BindModuleControls()
        {
            string preFix = string.Empty;
            string paneName = string.Empty;
            string ControlSrc = string.Empty;
            string phdContainer = string.Empty;
            string PageSEOName = string.Empty;
            SageUserControl suc = new SageUserControl();
            suc.PagePath = PagePath;
            if (Request.QueryString["pgnm"] != null)
            {
                PageSEOName = Request.QueryString["pgnm"].ToString();
            }
            else
            {
                PageSEOName ="ManagePages";
            }
            PageSEOName = "ManagePages";
            string redirecPath = string.Empty;
            if (PageSEOName != string.Empty)
            {
                DataSet dsPageSettings = new DataSet();
                SageFrameConfig sfConfig = new SageFrameConfig();
                dsPageSettings = sfConfig.GetPageSettingsByPageSEONameForAdmin("1", PageSEOName, GetUsername);
                if (bool.Parse(dsPageSettings.Tables[0].Rows[0][0].ToString()) == true)
                {    //checking IsPageAccessible true or false
                    if (bool.Parse(dsPageSettings.Tables[0].Rows[0][1].ToString()) == true)
                    {
                        // Get ModuleControls data table
                        DataTable dtPages = dsPageSettings.Tables[1];
                        if (dtPages != null && dtPages.Rows.Count > 0)
                        {
                            OverridePageInfo(dtPages);
                        }

                        // Get ModuleDefinitions data table
                        DataTable dtPageModule = dsPageSettings.Tables[2];
                        if (dtPageModule != null && dtPageModule.Rows.Count > 0)
                        {
                            for (int i = 0; i < dtPageModule.Rows.Count; i++)
                            {
                                paneName = dtPageModule.Rows[i]["PaneName"].ToString();
                                if (string.IsNullOrEmpty(paneName))
                                    paneName = "ContentPane";
                                string strUserModuleID = dtPageModule.Rows[i]["UserModuleID"].ToString();
                                ControlSrc = "/" + dtPageModule.Rows[i]["ControlSrc"].ToString();
                                string SupportsPartialRendering = dtPageModule.Rows[i]["SupportsPartialRendering"].ToString();
                                PlaceHolder phdPlaceHolder = (PlaceHolder)this.FindControl(paneName);
                                if (phdPlaceHolder != null)
                                {
                                    phdPlaceHolder = LoadControl(i.ToString(), bool.Parse(SupportsPartialRendering), phdPlaceHolder, ControlSrc, paneName, strUserModuleID);
                                }
                               // AddModuleCssToPage(ControlSrc, false);
                            }
                        }
                    }
                    else
                    {
                        if (IsUseFriendlyUrls)
                        {
                            if (GetPortalID > 1)
                            {
                                redirecPath = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalPageNotAccessible) + ".aspx");
                            }
                            else
                            {
                                redirecPath = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalPageNotAccessible) + ".aspx");
                            }
                        }
                        else
                        {
                            redirecPath = ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalPageNotAccessible));
                        }
                               Response.Redirect(redirecPath);
                    }
                }
                else
                {
                    if (IsUseFriendlyUrls)
                    {
                        if (GetPortalID > 1)
                        {
                            redirecPath = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalPageNotFound) + ".aspx");
                        }
                        else
                        {
                            redirecPath = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalPageNotFound) + ".aspx");
                        }
                    }
                    else
                    {
                        redirecPath = ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalPageNotFound));
                    }
                    Response.Redirect(redirecPath);
                }
            }

            HttpContext.Current.Session["ModuleCss"] = null;
            HttpContext.Current.Session["ModuleJs"] = null;
        }
开发者ID:Dashboard-X,项目名称:Aspxcommerce,代码行数:100,代码来源:ManagePage.aspx.cs

示例3: BindModuleControls

        private void BindModuleControls()
        {
            string preFix = string.Empty;
            string paneName = string.Empty;
            string ControlSrc = string.Empty;
            string phdContainer = string.Empty;
            string PageSEOName = string.Empty;
            SageUserControl suc = new SageUserControl();
            string PageName = PagePath;
            if (PagePath == null)
            {
                string PageUrl = Request.RawUrl;
                PageName = Path.GetFileNameWithoutExtension(PageUrl);
            }
            else
            {
                PageName = PagePath;
            }
            suc.PagePath = PageName;
            if (Request.QueryString["pgnm"] != null)
            {
                PageSEOName = Request.QueryString["pgnm"].ToString();
            }
            else
            {
                PageSEOName = GetPageSEOName(PageName);
            }
            //:TODO: Need to get controlType and pageID from the selected page from routing path
            //string controlType = "0";
            //string pageID = "2";
            StringBuilder redirecPath = new StringBuilder();
            Uri url = HttpContext.Current.Request.Url;
            if (PageSEOName != string.Empty)
            {
                DataSet dsPageSettings = new DataSet();
                SageFrameConfig sfConfig = new SageFrameConfig();
                dsPageSettings = sfConfig.GetPageSettingsByPageSEONameForAdmin("1", PageSEOName, GetUsername);
                if (bool.Parse(dsPageSettings.Tables[0].Rows[0][0].ToString()) == true)
                {
                    #region "Control Load Part"

                    if (bool.Parse(dsPageSettings.Tables[0].Rows[0][1].ToString()) == true)
                    {
                        // Get ModuleControls data table
                        DataTable dtPages = dsPageSettings.Tables[1];
                        if (dtPages != null && dtPages.Rows.Count > 0)
                        {
                            OverridePageInfo(dtPages);
                        }
                        List<string> moduleDefIDList = new List<string>();
                        // Get ModuleDefinitions data table
                        DataTable dtPageModule = dsPageSettings.Tables[2];
                        if (dtPageModule != null && dtPageModule.Rows.Count > 0)
                        {
                            for (int i = 0; i < dtPageModule.Rows.Count; i++)
                            {
                                paneName = dtPageModule.Rows[i]["PaneName"].ToString();
                                if (string.IsNullOrEmpty(paneName))
                                    paneName = "ContentPane";
                                string UserModuleID = dtPageModule.Rows[i]["UserModuleID"].ToString();
                                ControlSrc = "/" + dtPageModule.Rows[i]["ControlSrc"].ToString();
                                string SupportsPartialRendering = dtPageModule.Rows[i]["SupportsPartialRendering"].ToString();
                                PlaceHolder phdPlaceHolder = (PlaceHolder)this.FindControl(paneName);
                                if (paneName.Equals("navigation"))
                                {
                                    divNavigation.Attributes.Add("style", "display:block");
                                }
                                if (phdPlaceHolder != null)
                                {
                                    //bool status = LoadModuleInfo(phdPlaceHolder, int.Parse(UserModuleID), 0);
                                    LoadControl(phdPlaceHolder, ControlSrc, paneName, UserModuleID, "", "", false, new HtmlGenericControl("div"), new HtmlGenericControl("span"), false);
                                    //if (!status)
                                    //{
                                    //    LoadModuleInfo(phdPlaceHolder, int.Parse(UserModuleID), 1);
                                    //}
                                    moduleDefIDList.Add(dtPageModule.Rows[i]["ModuleDefID"].ToString());
                                }

                            }
                        }
                        SetModuleDefList(moduleDefIDList);
                    }
                    #endregion
                    else
                    {
                        if (!IsParent)
                        {
                            redirecPath.Append(url.Scheme);
                            redirecPath.Append("://");
                            redirecPath.Append(url.Authority);
                            redirecPath.Append(PortalAPI.GetApplicationName);
                            redirecPath.Append("/portal/");
                            redirecPath.Append(GetPortalSEOName);
                            redirecPath.Append("/");
                            redirecPath.Append(PortalAPI.LoginPageWithExtension);
                        }
                        else
                        {
                            redirecPath.Append(url.Scheme);
                            redirecPath.Append("://");
//.........这里部分代码省略.........
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:101,代码来源:Admin.aspx.cs

示例4: BindModuleControls

 private void BindModuleControls()
 {
     string preFix = string.Empty;
     string paneName = string.Empty;
     string ControlSrc = string.Empty;
     string phdContainer = string.Empty;
     string PageSEOName = string.Empty;
     SageUserControl suc = new SageUserControl();
     string PageName = PagePath;
     if (PagePath == null)
     {
         PageName = PagePath;
     }
     else
     {
         PageName = PagePath;
     }
     suc.PagePath = PageName;
     if (PagePath != null)
     {
         PageSEOName = GetPageSEOName(PagePath);
     }
     else
     {
         SageFrameConfig sfConfig = new SageFrameConfig();
         PageSEOName = GetPageSEOName(sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
     }
     //:TODO: Need to get controlType and pageID from the selected page from routing path
     //string controlType = "0";
     //string pageID = "2";
     StringBuilder redirecPath = new StringBuilder();
     Uri url = HttpContext.Current.Request.Url;
     if (PageSEOName != string.Empty)
     {
         DataSet dsPageSettings = new DataSet();
         SageFrameConfig sfConfig = new SageFrameConfig();
         dsPageSettings = sfConfig.GetPageSettingsByPageSEONameForAdmin("1", PageSEOName, GetUsername);
         if (bool.Parse(dsPageSettings.Tables[0].Rows[0][0].ToString()) == true)// Is Page Exists
         {
             if (bool.Parse(dsPageSettings.Tables[0].Rows[0][1].ToString()) == true)// Is Page Aceessable
             {
                 // Get ModuleControls data table
                 DataTable dtPages = dsPageSettings.Tables[1];
                 if (dtPages != null && dtPages.Rows.Count > 0)
                 {
                     OverridePageInfo(dtPages);
                 }
                 // Get ModuleDefinitions data table
                 DataTable dtPageModule = dsPageSettings.Tables[2];
                 if (dtPageModule != null && dtPageModule.Rows.Count > 0)
                 {
                     for (int i = 0; i < dtPageModule.Rows.Count; i++)
                     {
                         paneName = dtPageModule.Rows[i]["PaneName"].ToString();
                         if (string.IsNullOrEmpty(paneName))
                             paneName = "ContentPane";
                         string UserModuleID = dtPageModule.Rows[i]["UserModuleID"].ToString();
                         ControlSrc = "/" + dtPageModule.Rows[i]["ControlSrc"].ToString();
                         string SupportsPartialRendering = dtPageModule.Rows[i]["SupportsPartialRendering"].ToString();
                         PlaceHolder phdPlaceHolder = (PlaceHolder)this.FindControl(paneName);
                         if (paneName.ToLower().Equals("navigation")) { divNavigation.Attributes.Add("style", "display:block"); }
                         if (paneName.ToLower().Equals("middlemaincurrent")) { divRight.Attributes.Add("style", "display:block"); }
                         if (paneName.ToLower().Equals("cpanel")) { divBottompanel.Attributes.Add("style", "display:block"); }
                         if (paneName.ToLower().Equals("lefta")) { divLeft.Attributes.Add("style", "display:block"); }
                         if (phdPlaceHolder != null)
                         {
                             bool status = LoadModuleInfo(phdPlaceHolder, int.Parse(UserModuleID), 0);
                             phdPlaceHolder = LoadControl(i.ToString(), bool.Parse(SupportsPartialRendering), phdPlaceHolder, ControlSrc, paneName, UserModuleID, "", "", false, new HtmlGenericControl("div"), new HtmlGenericControl("span"), false);
                             if (!status) { LoadModuleInfo(phdPlaceHolder, int.Parse(UserModuleID), 1); }
                         }
                     }
                 }
             }
             else
             {
                 if (IsUseFriendlyUrls)
                 {
                     if (GetPortalID > 1)
                     {
                         redirecPath.Append(url.Scheme);
                         redirecPath.Append("://");
                         redirecPath.Append(url.Authority);
                         redirecPath.Append(PortalAPI.GetApplicationName);
                         redirecPath.Append("/portal/");
                         redirecPath.Append(GetPortalSEOName);
                         redirecPath.Append("/");
                         redirecPath.Append(PortalAPI.LoginPageWithExtension);
                     }
                     else
                     {
                         redirecPath.Append(url.Scheme);
                         redirecPath.Append("://");
                         redirecPath.Append(url.Authority);
                         redirecPath.Append(PortalAPI.LoginURL);
                     }
                 }
                 else
                 {
                     redirecPath.Append(url.Scheme);
                     redirecPath.Append("://");
//.........这里部分代码省略.........
开发者ID:RexSystemsbd,项目名称:SageFrameV2.1Source,代码行数:101,代码来源:Default.aspx.cs


注:本文中的SageFrame.Web.SageFrameConfig.GetPageSettingsByPageSEONameForAdmin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。