本文整理汇总了C#中SageFrame.Web.SageFrameConfig.GetPageModules_Superuser方法的典型用法代码示例。如果您正苦于以下问题:C# SageFrameConfig.GetPageModules_Superuser方法的具体用法?C# SageFrameConfig.GetPageModules_Superuser怎么用?C# SageFrameConfig.GetPageModules_Superuser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SageFrame.Web.SageFrameConfig
的用法示例。
在下文中一共展示了SageFrameConfig.GetPageModules_Superuser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
if (PagePath != null)
{
suc.PagePath = PagePath;
}
else
{
SageFrameConfig sfConfig = new SageFrameConfig();
suc.PagePath = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage);
}
if (PagePath != null)
{
PageSEOName = GetPageSEOName(PagePath);
}
else
{
SageFrameConfig sfConfig = new SageFrameConfig();
PageSEOName = GetPageSEOName(sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
}
PageSEOName = PageSEOName.Replace("-and-", "&").Replace(" ", "-");
//:TODO: Need to get controlType and pageID from the selected page from routing path
//string controlType = "0";
//string pageID = "2";
StringBuilder redirecPath = new StringBuilder();
if (PageSEOName != string.Empty)
{
SageFrameConfig sfConfig = new SageFrameConfig();
string SEOName = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage).Replace(" ", "-");
List<UserModuleInfo> lstUserModules = new List<UserModuleInfo>();
bool SuperRole = false;
if (Session[SessionKeys.SageRoles] != string.Empty && Session[SessionKeys.SageRoles] != null)
{
string[] objRole = Session[SessionKeys.SageRoles].ToString().Split(',');
foreach (string role in objRole)
{
if (role.Replace(" ", string.Empty).ToLower().Equals(ApplicationKeys.Super_User.ToLower().Replace("-", string.Empty)))
{
SuperRole = true;
}
}
}
if (GetUsername.Equals(ApplicationKeys.anonymousUser))
{
lstUserModules = sfConfig.GetPageModules_Anonymous("1", PageSEOName, GetUsername,GetCurrentCulture());
}
else if (SuperRole)
{
lstUserModules = sfConfig.GetPageModules_Superuser("1", PageSEOName, GetUsername,GetCurrentCulture());
}
else
{
lstUserModules = sfConfig.GetPageModules("1", PageSEOName, GetUsername,GetCurrentCulture());
}
Uri url = HttpContext.Current.Request.Url;
if (lstUserModules[0].IsPageAvailable)
{
if (lstUserModules[0].IsPageAccessible)
{
#region "Load Controls"
if (lstUserModules.Count > 0)
{
OverridePageInfo(lstUserModules[0]);
int i = 0;
foreach (UserModuleInfo usermodule in lstUserModules)
{
bool handheld_status = bool.Parse(usermodule.IsHandHeld.ToString());
if (IsHandheld() == handheld_status)
{
paneName = usermodule.PaneName;
paneName = "pch_" + paneName;
if (string.IsNullOrEmpty(paneName))
paneName = "ContentPane";
string UserModuleTitle = usermodule.UserModuleTitle != string.Empty ? usermodule.UserModuleTitle.ToString() : string.Empty;
ControlSrc = usermodule.ControlSrc;
string SupportsPartialRendering = usermodule.SupportsPartialRendering.ToString();
string SuffixClass = usermodule.SuffixClass.ToString();
string HeaderText = usermodule.ShowHeaderText ? usermodule.HeaderText : "";
bool ContainsEdit = usermodule.IsEdit;
int ControlCount = usermodule.ControlsCount;
UserControl uc = pchWhole.FindControl("lytA") as UserControl;
PlaceHolder phdPlaceHolder = uc.FindControl(paneName) as PlaceHolder;
SuffixClass = IsUserLoggedIn() && ContainsEdit ? string.Format("sfLogged sfModule{0}", SuffixClass) : string.Format("sfModule{0}", SuffixClass);
if (phdPlaceHolder != null)
{
string TemplateControls = Server.MapPath(string.Format("~/Templates/{0}/modules/{1}", activeTemplate, ControlSrc.Substring(ControlSrc.IndexOf('/'), ControlSrc.Length - ControlSrc.IndexOf('/'))));
ControlSrc = File.Exists(TemplateControls) ? string.Format("/Templates/{0}/modules/{1}", activeTemplate, ControlSrc.Substring(ControlSrc.IndexOf('/'), ControlSrc.Length - ControlSrc.IndexOf('/'))) : string.Format("/{0}", ControlSrc);
phdPlaceHolder = LoadControl(i.ToString(), bool.Parse(SupportsPartialRendering), phdPlaceHolder, ControlSrc, paneName, usermodule.UserModuleID.ToString(), SuffixClass, HeaderText, IsUserLoggedIn(), GetModuleControls(usermodule.UserModuleID, ContainsEdit, ControlCount), GetPaneNameContainer(UserModuleTitle), ContainsEdit);
//.........这里部分代码省略.........