本文整理汇总了C#中SageFrame.Web.SageFrameConfig类的典型用法代码示例。如果您正苦于以下问题:C# SageFrameConfig类的具体用法?C# SageFrameConfig怎么用?C# SageFrameConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SageFrameConfig类属于SageFrame.Web命名空间,在下文中一共展示了SageFrameConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: Application_Start
protected void Application_Start(object sender, EventArgs e)
{
try
{
string IsInstalled = Config.GetSetting("IsInstalled").ToString();
string InstallationDate = Config.GetSetting("InstallationDate").ToString();
if ((IsInstalled != "" && IsInstalled != "false") && InstallationDate != "")
{
SageFrameConfig pagebase = new SageFrameConfig();
RolesManagementDataContext db = new RolesManagementDataContext(SystemSetting.SageFrameConnectionString);
sp_GetRoleIDByRoleNameResult res = (sp_GetRoleIDByRoleNameResult)db.sp_GetRoleIDByRoleName(SystemSetting.AnonymousUsername).SingleOrDefault();
if (res != null)
{
SystemSetting.ANONYMOUS_ROLEID = res.RoleId.ToString();
}
bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
if (IsUseFriendlyUrls)
{
RegisterRoutes(RouteTable.Routes);
}
}
}
catch
{
}
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
SageFrameConfig pagebase = new SageFrameConfig();
IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
storeID = GetStoreID;
portalID = GetPortalID;
userName = GetUsername;
customerID = GetCustomerID;
cultureName = GetCurrentCultureName;
if (HttpContext.Current.Session.SessionID != null)
{
sessionCode = HttpContext.Current.Session.SessionID.ToString();
}
userIP = HttpContext.Current.Request.UserHostAddress;
IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
ipToCountry.GetCountry(userIP, out countryName);
noImageWishList = StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
enableWishList = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList, storeID, portalID, cultureName);
showImageInWishlist = StoreSetting.GetStoreSettingValueByKey(StoreSetting.ShowItemImagesInWishList, storeID, portalID, cultureName);
allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
}
catch (Exception ex)
{
ProcessException(ex);
}
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
SageFrameConfig pagebase = new SageFrameConfig();
IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
if (!IsPostBack)
{
storeID = GetStoreID;
portalID = GetPortalID;
userName = GetUsername;
customerID = GetCustomerID;
cultureName = GetCurrentCultureName;
if (HttpContext.Current.Session.SessionID != null)
{
sessionCode = HttpContext.Current.Session.SessionID.ToString();
}
noImageMyCartPath = StoreSetting.GetStoreSettingValueByKey(StoreSetting.DefaultProductImageURL, storeID, portalID, cultureName);
allowMultipleAddShipping = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowMultipleShippingAddress, storeID, portalID, cultureName);
showItemImagesOnCart = StoreSetting.GetStoreSettingValueByKey(StoreSetting.ShowItemImagesInCart, storeID, portalID, cultureName);
minOrderAmount = StoreSetting.GetStoreSettingValueByKey(StoreSetting.MinimumOrderAmount, storeID, portalID, cultureName);
minimumItemQuantity = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.MinimumItemQuantity, storeID, portalID, cultureName));
maximumItemQuantity = Convert.ToInt32(StoreSetting.GetStoreSettingValueByKey(StoreSetting.MaximumItemQuantity, storeID, portalID, cultureName));
allowOutStockPurchase = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowOutStockPurchase, storeID, portalID, cultureName);
}
}
catch (Exception ex)
{
ProcessException(ex);
}
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
templateFavicon = SetFavIcon(GetActiveTemplate);
imgLogo.ImageUrl = ResolveUrl("~/") + "images/sageframe.png";
Extension = SageFrameSettingKeys.PageExtension;
SageFrameConfig sfConfig = new SageFrameConfig();
appPath = GetAppPath();
string pagePath = ResolveUrl(GetParentURL) + GetReduceApplicationName;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "BreadCrumGlobal1", " var BreadCrumPagePath='" + pagePath + "';", true);
pagePath = IsParent ? pagePath : pagePath + "portal/" + GetPortalSEOName;
PortalID = GetPortalID;
if (!IsParent)
{
fallBackPath = GetParentURL + "/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + Extension;
}
else
{
fallBackPath = GetParentURL + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + Extension;
}
if (Session[SessionKeys.TemplateError] != null)
{
Exception ex = Session[SessionKeys.TemplateError] as Exception;
StringBuilder sb = new StringBuilder();
sb.Append(string.Format("<h3>{0}</h3>", ex.Message));
sb.Append(string.Format("<p>{0}</p>", ex.ToString()));
ltrErrorMessage.Text = sb.ToString();
}
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
Response.Cache.SetExpires(DateTime.Now);
Response.Cache.SetValidUntilExpires(true);
GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName, CustomerID, SessionCode);
UserModuleIDCart = int.Parse(SageUserModuleID);
try
{
CartModulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
SageFrameConfig pagebase = new SageFrameConfig();
string template = TemplateName;
StoreSettingConfig ssc = new StoreSettingConfig();
ssc.GetStoreSettingParamNine(StoreSetting.DefaultProductImageURL,
StoreSetting.AllowMultipleShippingAddress,
StoreSetting.ShowItemImagesInCart,
StoreSetting.MinimumCartSubTotalAmount,
StoreSetting.AllowOutStockPurchase,
StoreSetting.MultiCheckOutURL,
StoreSetting.AllowShippingRateEstimate,
StoreSetting.AllowCouponDiscount,
StoreSetting.AllowRealTimeNotifications,
out NoImageMyCartPath,
out AllowMultipleAddShipping,
out ShowItemImagesOnCart,
out MinCartSubTotalAmount,
out AllowOutStockPurchase,
out MultipleAddressChkOutURL,
out AllowShippingRateEstimate,
out AllowCouponDiscount,
out AllowRealTimeNotifications,
StoreID,
PortalID,
CultureName
);
if (!IsPostBack)
{
IncludeCss("MyCart", "/Templates/" + template + "/css/GridView/tablesort.css",
"/Templates/" + template + "/css/MessageBox/style.css",
"/Templates/", template, "/css/ToolTip/tooltip.css",
"/Modules/AspxCommerce/AspxCart/css/module.css");
IncludeJs("MyCart","/Modules/AspxCommerce/AspxCart/js/MyCart.js", "/js/encoder.js", "/js/MessageBox/alertbox.js", "/js/jquery.easing.1.3.js", "/js/jquery.tipsy.js", "/js/Session.js");
}
DisplayCartItems(template);
IncludeLanguageJS();
CouponInfo();
}
catch (Exception ex)
{
ProcessException(ex);
}
}
示例7: Application_Start
protected void Application_Start(object sender, EventArgs e)
{
try
{
ApplicationController objAppController = new ApplicationController();
if (objAppController.IsInstalled())
{
SageFrameConfig pagebase = new SageFrameConfig();
RolesManagementController objController = new RolesManagementController();
RolesManagementInfo res = objController.GetRoleIDByRoleName(SystemSetting.AnonymousUsername);
if (res != null)
{
SystemSetting.ANONYMOUS_ROLEID = res.RoleId.ToString();
}
bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
SageFrameSettingKeys.PageExtension = pagebase.GetSettingsByKey(SageFrameSettingKeys.SettingPageExtension);
bool isSchedulerOn = pagebase.GetSettingBollByKey(SageFrameSettingKeys.Scheduler);
if (IsUseFriendlyUrls)
{
RegisterRoutes(RouteTable.Routes);
}
if (isSchedulerOn)
{
RunSchedule();
}
}
}
catch
{
}
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
SageFrameConfig pagebase = new SageFrameConfig();
IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
if (!IsPostBack)
{
storeID = GetStoreID;
portalID = GetPortalID;
customerID = GetCustomerID;
userName = GetUsername;
cultureName = GetCurrentCultureName;
if (HttpContext.Current.Session.SessionID != null)
{
sessionCode = HttpContext.Current.Session.SessionID.ToString();
}
myAccountURL = StoreSetting.GetStoreSettingValueByKey(StoreSetting.MyAccountURL, storeID, portalID, cultureName);
shoppingCartURL = StoreSetting.GetStoreSettingValueByKey(StoreSetting.ShoppingCartURL, storeID, portalID, cultureName);
wishListURL = StoreSetting.GetStoreSettingValueByKey(StoreSetting.WishListURL, storeID, portalID, cultureName);
allowAnonymousCheckOut = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowAnonymousCheckOut, storeID, portalID, cultureName);
allowMultipleShipping = StoreSetting.GetStoreSettingValueByKey(StoreSetting.AllowMultipleShippingAddress, storeID, portalID, cultureName);
minOrderAmount = StoreSetting.GetStoreSettingValueByKey(StoreSetting.MinimumOrderAmount, storeID, portalID, cultureName);
allowWishList = StoreSetting.GetStoreSettingValueByKey(StoreSetting.EnableWishList,storeID,portalID,cultureName);
}
}
catch (Exception ex)
{
ProcessException(ex);
}
}
示例9: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
SageFrameConfig pagebase = new SageFrameConfig();
IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
string modulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
AspxAdminNotificationModulePath = ResolveUrl(modulePath);
if (!IsPostBack)
{
IncludeJs("AspxAdminNotificationView",
"/Modules/AspxCommerce/AspxAdminNotification/js/AspxAdminNotificationView.js"
);
IncludeCss("AspxAdminNotificationView",
"/Modules/AspxCommerce/AspxAdminNotification/css/AdminNotification.css",
"/Modules/AspxCommerce/AspxAdminNotification/css/style.css"
);
}
IncludeLanguageJS();
}
catch (Exception ex)
{
ProcessException(ex);
}
}
示例10: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
IncludeLanguageJS();
appPath = GetApplicationName;
userName = SecurityPolicy.GetUser(GetPortalID);
Extension = SageFrameSettingKeys.PageExtension;
if (!IsPostBack)
{
// BindThemes();
//BindLayouts();
//BindValues();
hlnkDashboard.Visible = false;
SageFrameConfig conf = new SageFrameConfig();
string ExistingPortalShowProfileLink = conf.GetSettingsByKey(SageFrameSettingKeys.PortalShowProfileLink);
lnkAccount.NavigateUrl = GetProfileLink();
if (ExistingPortalShowProfileLink == "1")
{
}
else
{
}
}
RoleController _role = new RoleController();
string[] roles = _role.GetRoleNames(GetUsername, GetPortalID).ToLower().Split(',');
if (roles.Contains(SystemSetting.SUPER_ROLE[0].ToLower()) || roles.Contains(SystemSetting.SITEADMIN.ToLower()))
{
hlnkDashboard.Visible = true;
hlnkDashboard.NavigateUrl = GetPortalAdminPage();
cpanel.Visible = true;
}
else
{
cpanel.Visible = false;
}
}
示例11: BindValues
public void BindValues()
{
PresetInfo preset = GetPresetDetails;
if (preset.ActiveTheme == string.Empty)
{
preset.ActiveTheme = "default";
}
ddlThemes.Items.FindByText(preset.ActiveTheme.ToLower()).Selected = true;
if (preset.ActiveWidth == string.Empty)
{
preset.ActiveWidth = "Wide";
}
ddlScreen.Items.FindByText(preset.ActiveWidth.ToLower()).Selected = true;
string activeLayout = string.Empty;
string pageName = Request.Url.ToString();
SageFrameConfig sfConfig = new SageFrameConfig();
pageName = Path.GetFileNameWithoutExtension(pageName);
pageName = pageName.ToLower().Equals("default") ? sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) : pageName;
foreach (KeyValue kvp in preset.lstLayouts)
{
string[] arrLayouts = kvp.Value.Split(',');
if (arrLayouts.Contains(pageName))
{
activeLayout = kvp.Key;
}
}
if (activeLayout != null && activeLayout != string.Empty)
{
if (ddlLayout.Items.FindByText(string.Format("{0}.ascx", activeLayout)) != null)
{
ddlLayout.Items.FindByText(string.Format("{0}.ascx", activeLayout)).Selected = true;
}
}
}
示例12: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
SageFrameConfig sfConfig = new SageFrameConfig();
IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
if (HttpContext.Current.User != null)
{
if (Membership.GetUser() != null)
{
lnkloginStatus.Text = SageLogOutText;
lnkloginStatus.CommandName = "LOGOUT";
}
else
{
lnkloginStatus.Text = SageLogInText;
lnkloginStatus.CommandName = "LOGIN";
}
}
else
{
lnkloginStatus.Text = SageLogInText;
lnkloginStatus.CommandName = "LOGIN";
}
}
catch
{
}
}
示例13: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
IncludeCss("PortalSettings", "/Modules/Admin/PortalSettings/css/popup.css");
if (!IsPostBack)
{
AddImageUrls();
BinDDls();
BindData();
SageFrameConfig sfConf = new SageFrameConfig();
ViewState["SelectedLanguageCulture"] = sfConf.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalDefaultLanguage);
GetLanguageList();
GetFlagImage();
}
RoleController _role = new RoleController();
string[] roles = _role.GetRoleNames(GetUsername, GetPortalID).ToLower().Split(',');
if (!roles.Contains(SystemSetting.SUPER_ROLE[0].ToLower()))
{
TabContainer.Tabs[2].Visible = false;
TabContainer.Tabs[1].Visible = false;
}
}
catch (Exception ex)
{
ProcessException(ex);
}
}
示例14: Page_Init
protected void Page_Init(object sender, EventArgs e)
{
SageFrameConfig sfConfig = new SageFrameConfig();
if (sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalShowFooterLink) == "1")
{
LoadControl(phdFooterMenu, "~/Controls/ctl_FooterMenu.ascx");
divFooterLink.Attributes.Add("style", "display:block;");
}
else
{
phdFooterMenu.Controls.Clear();
divFooterLink.Attributes.Add("style", "display:none;");
}
if (sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalShowCopyRight) == "1")
{
divCopyWrite.InnerHtml = Server.HtmlDecode(sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalCopyright));
divCopyWrite.Attributes.Add("style", "display:block;");
}
else
{
divCopyWrite.InnerHtml = "";
divCopyWrite.Attributes.Add("style", "display:none;");
}
}
示例15: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
try
{
SageFrameConfig pagebase = new SageFrameConfig();
GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName);
if (!IsPostBack)
{
IncludeCss("ShoppingBagHeader", "/Templates/" + TemplateName + "/css/PopUp/style.css",
"/Templates/" + TemplateName + "/css/MessageBox/style.css",
"/Modules/AspxCommerce/AspxShoppingBagHeader/css/module.css");
IncludeJs("ShoppingBagHeader", "/js/PopUp/custom.js", "/js/MessageBox/jquery.easing.1.3.js",
"/js/MessageBox/alertbox.js",
"/Modules/AspxCommerce/AspxShoppingBagHeader/js/ShoppingBag.js", "/js/Session.js");
UserModuleID = SageUserModuleID;
if (HttpContext.Current.Session.SessionID != null)
{
SessionCode = HttpContext.Current.Session.SessionID.ToString();
}
StoreSettingConfig ssc = new StoreSettingConfig();
ssc.GetStoreSettingParamEight(StoreSetting.ShowMiniShoppingCart, StoreSetting.ShowAddToCartButton,
StoreSetting.AllowMultipleShippingAddress, StoreSetting.MinimumCartSubTotalAmount, StoreSetting.AllowAnonymousCheckOut,
StoreSetting.ShoppingCartURL,StoreSetting.SingleCheckOutURL, StoreSetting.AllowRealTimeNotifications,
out ShowMiniShopCart, out AllowAddToCart, out AllowMultipleAddChkOut, out MinCartSubTotalAmount, out AllowAnonymousCheckOut,
out ShoppingCartURL, out SingleAddressChkOutURL, out AllowRealTimeNotifications, StoreID, PortalID, CultureName);
AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID,CultureName);
BagType = AspxShoppingBagController.GetShoppingBagSetting(aspxCommonObj);
}
IncludeLanguageJS();
}
catch (Exception ex)
{
ProcessException(ex);
}
}