本文整理汇总了C#中SageFrame.Web.SageFrameConfig.GetPageSettingsByPageSEOName方法的典型用法代码示例。如果您正苦于以下问题:C# SageFrameConfig.GetPageSettingsByPageSEOName方法的具体用法?C# SageFrameConfig.GetPageSettingsByPageSEOName怎么用?C# SageFrameConfig.GetPageSettingsByPageSEOName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SageFrame.Web.SageFrameConfig
的用法示例。
在下文中一共展示了SageFrameConfig.GetPageSettingsByPageSEOName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckAccess
public void CheckAccess()
{
string preFix = string.Empty;
string paneName = string.Empty;
string ControlSrc = string.Empty;
string phdContainer = string.Empty;
string PageSEOName = string.Empty;
string redirecPath = string.Empty;
SageFrameConfig sfConfig = new SageFrameConfig();
IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
StoreAccessDetailsInfo storeAccessTracker = new StoreAccessDetailsInfo();
storeAccessTracker.PortalID = GetPortalID.ToString();
storeAccessTracker.StoreID = GetStoreID.ToString();
storeAccessTracker.Username = GetUsername;
if (Membership.GetUser() != null)
{
MembershipUser userDetail = Membership.GetUser(GetUsername);
storeAccessTracker.UserEmail = userDetail.Email;
}
else
{
storeAccessTracker.UserEmail = "";
}
StoreAccessResultInfo saResults = (StoreAccessResultInfo)GetStoreAccessByCurrentData(storeAccessTracker);
bool storeClosed = (bool)saResults.StoreClosed;
bool storeAccessible = (bool)saResults.IsAccess;
if (storeAccessible)
{
DataSet dsPageSettings = new DataSet();
dsPageSettings = sfConfig.GetPageSettingsByPageSEOName("1", "Home", GetUsername);
if (bool.Parse(dsPageSettings.Tables[0].Rows[0][0].ToString()) == true)
{
//if (bool.Parse(dsPageSettings.Tables[0].Rows[0][2].ToString()) != true)
//{
if (bool.Parse(dsPageSettings.Tables[0].Rows[0][1].ToString()) == true)
{
//from session previous url will retrive and redirect to id
string returnURL = HttpContext.Current.Session["StoreClosed"].ToString();
HttpContext.Current.Session.Remove("StoreClosed");
Response.Redirect(returnURL);
}
else
{
}
}
else
{
//portal no found
}
}
else
{
}
}
示例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();
if (PagePath != null)
{
suc.PagePath = PagePath;
}
else
{
SageFrameConfig sfConfig = new SageFrameConfig();
suc.PagePath = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + ".aspx";
}
if (Request.QueryString["pgnm"] != null)
{
PageSEOName = Request.QueryString["pgnm"].ToString();
}
else
{
PageSEOName = GetPageSEOName(PagePath);
}
//: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)
{
SageFrameConfig sfConfig = new SageFrameConfig();
string SEOName = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage);
if (SEOName.ToLower() == PageSEOName.ToLower())
{
divTopWrapper.Attributes.Add("class", " cssClassTopWrapper cssClassIndexPage");
}
//TODO:: check store access control here Based on @IPAddress, @Domain, @CustomerName, @email, @StoreID, @PortalID
StoreAccessDetailsInfo storeAccessTracker = new StoreAccessDetailsInfo();
storeAccessTracker.PortalID = GetPortalID.ToString();
storeAccessTracker.StoreID = GetStoreID.ToString();
storeAccessTracker.Username = GetUsername;
if (Membership.GetUser() != null)
{
MembershipUser userDetail = Membership.GetUser(GetUsername);
storeAccessTracker.UserEmail = userDetail.Email;
}
else
{
storeAccessTracker.UserEmail = "";
}
StoreAccessResultInfo saResults = (StoreAccessResultInfo)GetStoreAccessByCurrentData(storeAccessTracker);
bool storeClosed = (bool)saResults.StoreClosed;
bool storeAccessible = (bool)saResults.IsAccess;
if (!storeClosed)
{
if (storeAccessible)
{
DataSet dsPageSettings = new DataSet();
dsPageSettings = sfConfig.GetPageSettingsByPageSEOName("1", PageSEOName, GetUsername);
if (bool.Parse(dsPageSettings.Tables[0].Rows[0][0].ToString()) == true)
{
//if (bool.Parse(dsPageSettings.Tables[0].Rows[0][2].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)
{
//.........这里部分代码省略.........