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


C# SageFrameConfig.GetSettingValueByIndividualKey方法代码示例

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


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

示例1: SendMultipleEmail

        /// <summary>
        /// Sends multiple email.
        /// </summary>
        /// <param name="From">Email sending from.</param>
        /// <param name="sendTo">Email sending to.</param>
        /// <param name="Subject">Email's subject.</param>
        /// <param name="Body">Email's body.</param>
        public static void SendMultipleEmail(string From, string sendTo, string Subject, string Body)
        {
            SageFrameConfig sfConfig = new SageFrameConfig();
            string ServerPort = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.SMTPServer);
            string SMTPAuthentication = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.SMTPAuthentication);
            string SMTPEnableSSL = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.SMTPEnableSSL);
            string SMTPPassword = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.SMTPPassword);
            string SMTPUsername = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.SMTPUsername);
            string[] SMTPServer = ServerPort.Split(':');
            try
            {
                MailMessage myMessage = new MailMessage();
                foreach (string emailTo in sendTo.Split(','))
                {
                    myMessage.To.Add(new MailAddress(emailTo));
                }
                myMessage.From = new MailAddress(From);
                myMessage.Subject = Subject;
                myMessage.Body = Body;
                myMessage.IsBodyHtml = true;

                SmtpClient smtp = new SmtpClient();
                if (SMTPAuthentication == "1")
                {
                    if (SMTPUsername.Length > 0 && SMTPPassword.Length > 0)
                    {
                        smtp.Credentials = new System.Net.NetworkCredential(SMTPUsername, SMTPPassword);
                    }
                }
                smtp.EnableSsl = bool.Parse(SMTPEnableSSL.ToString());
                if (SMTPServer.Length > 0)
                {
                    if (SMTPServer[0].Length != 0)
                    {
                        smtp.Host = SMTPServer[0];
                        if (SMTPServer.Length == 2)
                        {
                            smtp.Port = int.Parse(SMTPServer[1]);
                        }
                        else
                        {
                            smtp.Port = 25;
                        }
                        smtp.Send(myMessage);
                    }
                    else
                    {
                        throw new Exception("SMTP Host must be provided");
                    }
                }

            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:65,代码来源:MailHelper.cs

示例2: 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);
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:28,代码来源:ctl_PortalSettings.ascx.cs

示例3: ContactUsAdd

 /// <summary>
 /// Adds contactus for given portalID.
 /// </summary>
 /// <param name="name">Name.</param>
 /// <param name="email">Email.</param>
 /// <param name="subject">Subject.</param>
 /// <param name="message">Message.</param>
 /// <param name="isActive">IsActive</param>
 /// <param name="portalID">Portal id.</param>
 /// <param name="addedBy">Added by.</param>
 public void ContactUsAdd(string name, string email, string subject, string message, bool isActive, int portalID, string addedBy)
 {
     try
     {
         ContactUsDataProvider contactProvider = new ContactUsDataProvider();
         contactProvider.ContactUsAdd(name, email, message, isActive, portalID, addedBy);
         SageFrameConfig pagebase = new SageFrameConfig();
         string emailSuperAdmin = pagebase.GetSettingValueByIndividualKey(SageFrameSettingKeys.SuperUserEmail);
         string emailSiteAdmin = pagebase.GetSettingValueByIndividualKey(SageFrameSettingKeys.SiteAdminEmailAddress);
         MailHelper.SendMailNoAttachment(email, emailSiteAdmin, subject, email, emailSuperAdmin, string.Empty);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:26,代码来源:ContactUsController.cs

示例4: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     appPath = GetApplicationName;
     SageFrameConfig pagebase = new SageFrameConfig();
     LoadLiveFeed = bool.Parse(pagebase.GetSettingValueByIndividualKey(SageFrameSettingKeys.EnableLiveFeeds));
     IncludeJs("SageFrameInfo", "/js/jquery.jgfeed-min.js");
     IncludeCss("SageFrameInfo", "/Modules/Admin/SageFrameInfo/module.css");
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:8,代码来源:SageFrameInfoView.ascx.cs

示例5: LoadHeadContent

 private void LoadHeadContent()
 {
     try
     {
         SageFrameConfig sfConfig = new SageFrameConfig();
         string strCPanleHeader = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalCopyright);
         litCPanlePortalCopyright.Text = strCPanleHeader;            
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:13,代码来源:ctl_CPanleFooter.ascx.cs

示例6: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            Extension = SageFrameSettingKeys.PageExtension;

            SageFrameConfig sfConf = new SageFrameConfig();
            string PortalLogoTemplate = sfConf.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalLogoTemplate);
            if (SageFrameSettingKeys.PortalLogoTemplate.ToString() != string.Empty)
            {
                lblSfInfo.Text = PortalLogoTemplate.ToString();
            }
            if (!Page.IsPostBack)
            {
                DashBoardView();
            }
        }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:15,代码来源:DashBoard.ascx.cs

示例7: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        IncludeLanguageJS();
        appPath = GetApplicationName;
        SecurityPolicy objSecurity = new SecurityPolicy();
        userName = objSecurity.GetUser(GetPortalID);
        Extension = SageFrameSettingKeys.PageExtension;


        if (!IsPostBack)
        {
            // BindThemes();
            //BindLayouts();
            //BindValues();
            hlnkDashboard.Visible = false;
            SageFrameConfig conf = new SageFrameConfig();
            string ExistingPortalShowProfileLink = conf.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalShowProfileLink);
            lnkAccount.NavigateUrl = GetProfileLink();
            if (ExistingPortalShowProfileLink == "1")
            {
                lnkAccount.Visible = true;
            }
            else
            {
                lnkAccount.Visible = false;
            }
            SageFrame.Application.Application app = new SageFrame.Application.Application();
            lblVersion.Text = string.Format("V {0}", app.FormatShortVersion(app.Version, true));
        }
        hypLogo.NavigateUrl = GetPortalAdminPage();
        hypLogo.ImageUrl = appPath + "/Administrator/Templates/Default/images/sagecomers-logoicon.png";
        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;
            AspxAdminNotificationView1.Visible = true;
            IsAdmin = true;
        }
        else
        {
            cpanel.Visible = false;
        }
        
    }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:47,代码来源:TopStickyBar.ascx.cs

示例8: RedirectToInvalid

    public void RedirectToInvalid()
    {
        SageFrameConfig sfConfig = new SageFrameConfig();
        string redirecPath = "";

        if (!IsParent)
        {
            redirecPath =
               GetParentURL + "/portal/" + GetPortalSEOName + "/sf/" +
                sfConfig.GetSettingValueByIndividualKey(
                SageFrameSettingKeys.PortalPageNotAccessible) + SageFrameSettingKeys.PageExtension;
        }
        else
        {
            redirecPath = GetParentURL + "/sf/" + sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalPageNotAccessible) + SageFrameSettingKeys.PageExtension;
        }
        Response.Redirect(redirecPath);
    }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:18,代码来源:UserProfile.ascx.cs

示例9: Results

    public static string Results(string controlName)
    {
        try
        {
            SageFrameConfig sfConf = new SageFrameConfig();
            string portalCulture = sfConf.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalDefaultLanguage);
            if (HttpContext.Current.Session[SessionKeys.SageUICulture] != null)
            {
                Thread.CurrentThread.CurrentUICulture = (CultureInfo)HttpContext.Current.Session[SessionKeys.SageUICulture];
            }
            else
            {
                CultureInfo newUICultureInfo = new CultureInfo(portalCulture);
                Thread.CurrentThread.CurrentUICulture = newUICultureInfo;
                HttpContext.Current.Session[SessionKeys.SageUICulture] = newUICultureInfo;
            }
            if (HttpContext.Current.Session[SessionKeys.SageUICulture] != null)
            {
                Thread.CurrentThread.CurrentCulture = (CultureInfo)HttpContext.Current.Session[SessionKeys.SageUICulture];
            }
            else
            {
                CultureInfo newCultureInfo = new CultureInfo(portalCulture);
                Thread.CurrentThread.CurrentCulture = newCultureInfo;
                HttpContext.Current.Session[SessionKeys.SageUICulture] = newCultureInfo;
            }
            Page page = new Page();
            SageUserControl userControl = (SageUserControl)page.LoadControl(controlName);
            page.Controls.Add(userControl);

            StringWriter textWriter = new StringWriter();
            HttpContext.Current.Server.Execute(page, textWriter, false);
            return textWriter.ToString();
        }
        catch (Exception ex)
        {
            return ex.ToString();
        }
    }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:39,代码来源:LoadControlHandler.aspx.cs

示例10: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        SageFrameConfig objConfig = new SageFrameConfig();
        bool EnableSessionTracker = bool.Parse(objConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.EnableSessionTracker));
        if (EnableSessionTracker)
        {

            IncludeJs("SiteAnalytics", "/Modules/SiteAnalytics/pjs/jquery.jqplot.min.js");
            IncludeJs("SiteAnalytics", "/Modules/SiteAnalytics/pjs/excanvas.min.js");
            IncludeJs("SiteAnalytics", "/Modules/SiteAnalytics/pjs/jqplot.pieRenderer.min.js");
            IncludeCss("SiteAnalytics", "/Modules/SiteAnalytics/css/jquery.jqplot.css");
            GetTopFiveCountryName();
            hyLnkSiteAnalytics.NavigateUrl = GetHostURL() + "/Admin/Site-Analytics" + SageFrameSettingKeys.PageExtension;
            Flag = 1;
        }
        else
        {
            divtopFiveCountry.Visible = false;
            divMsg.Visible = true;
            lblMsg.InnerText = "Session tracker is not enable.";
            Flag = 0;
        }
    }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:23,代码来源:TopFiveCountry.ascx.cs

示例11: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            Extension = SageFrameSettingKeys.PageExtension;
            SageFrameConfig sfConfig = new SageFrameConfig();
            SecurityPolicy objSecurity = new SecurityPolicy();
            userName = objSecurity.GetUser(GetPortalID);
            if (!IsPostBack)
            {
                profileText = GetSageMessage("LoginStatus", "MyProfile");
                Literal lnkProfileUrl = (Literal)LoginView1.TemplateControl.FindControl("lnkProfileUrl");
                RegisterURL = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalRegistrationPage) + SageFrameSettingKeys.PageExtension;
                if (sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalShowProfileLink) == "1")
                {
                    if (!IsParent)
                    {
                        profileURL = "<a  href='" + GetParentURL + "/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalUserProfilePage) + SageFrameSettingKeys.PageExtension + "'>" + profileText + "</a>";
                    }
                    else
                    {
                        profileURL = "<a  href='" + GetParentURL + "/" + sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalUserProfilePage) + SageFrameSettingKeys.PageExtension + "'>" + profileText + "</a>";
                    }

                }
                else
                {
                    profileURL = "";
                }
                if (!IsParent)
                {
                    RegisterURL = GetParentURL + "/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalRegistrationPage) + SageFrameSettingKeys.PageExtension;
                }
                else
                {
                    RegisterURL = GetParentURL + "/" + sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalRegistrationPage) + SageFrameSettingKeys.PageExtension;
                }

            }
        }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:38,代码来源:ctl_LoginStatus.ascx.cs

示例12: LoadModuleCss


//.........这里部分代码省略.........
                    string fullPath_template = Server.MapPath(string.Format("~/{0}/{1}/modules/{2}",
                        templatePathFirst, templatePathSecond, css.ModuleName));

                    string fullPath_module = Server.MapPath(string.Format("~/{0}", css.Path));

                    #region "Strategy 3-Priority-3:Check at the module level(the default fallback)"

                    ///Strategy 3-Priority-3:Check at the module level(the default fallback)
                    if (Directory.Exists(fullPath_module))
                    {
                        ///Check to see if the file exists in the root level
                        if (File.Exists(string.Format("{0}/{1}", fullPath_module, css.FileName)))
                        {
                            lstCssInclude.Add(new KeyValue(string.Format("~/{0}/{1}", css.Path, css.FileName), css.Path));
                        }
                        ///Check to see if the file exists in the css folder
                        else if (File.Exists(string.Format("{0}/css/{1}", fullPath_module, css.FileName)))
                        {
                            lstCssInclude.Add(new KeyValue(string.Format("~/{0}/{1}", css.Path, css.FileName), css.Path));
                        }
                    }

                    #endregion

                    #region "Strategy 1-Priority-1:Check the themes"

                    ///Strategy 1-Priority-1:Check the themes                   
                    if (Directory.Exists(fullPath_theme))
                    {
                        ///Check to see if the file exists in the root level
                        if (File.Exists(fullPath_theme + "/" + css.FileName))
                        {
                            lstCssInclude.Add(new KeyValue(string.Format("~/{0}/{1}/themes/{2}/modules/{3}/{4}",
                                templatePathFirst, templatePathSecond, preset.ActiveTheme, css.ModuleName, css.FileName), css.Path));
                        }
                        ///Check to see if the file exists in the css folder
                        else if (File.Exists(string.Format("{0}/css/{1}", fullPath_theme, css.FileName)))
                        {
                            lstCssInclude.Add(new KeyValue(string.Format("~/{0}/{1}/themes/{2}/modules/{3}/css/{4}",
                                templatePathFirst, templatePathSecond, preset.ActiveTheme, css.ModuleName, css.FileName), css.Path));

                        }
                    }

                    #endregion

                    #region "Strategy 2-Priority-2:Check at the template level"

                    ///Strategy 2-Priority-2:Check at the template level
                    else if (Directory.Exists(fullPath_template))
                    {
                        ///Check to see if the file exists in the root level
                        if (File.Exists(string.Format("{0}/{1}", fullPath_template, css.FileName)))
                        {
                            lstCssInclude.Add(new KeyValue(string.Format("~/{0}/{1}/modules/{2}/{3}", templatePathFirst, templatePathSecond, css.ModuleName, css.FileName), css.Path));
                        }
                        ///Check to see if the file exists in the css folder
                        else if (File.Exists(string.Format("{0}/css/{1}", fullPath_template, css.FileName)))
                        {
                            lstCssInclude.Add(new KeyValue(string.Format("~/{0}/{1}/modules/{2}/css/{3}", templatePathFirst, templatePathSecond, css.ModuleName, css.FileName), css.Path));
                        }
                    }

                    #endregion
                }

                #endregion

                #region "Css Load"

                SageFrameConfig pagebase = new SageFrameConfig();
                bool IsCompressCss = bool.Parse(pagebase.GetSettingsByKeyIndividual(SageFrameSettingKeys.OptimizeCss));

                Literal SageFrameModuleCSSlinks = this.Page.FindControl("SageFrameModuleCSSlinks") as Literal;
                if (SageFrameModuleCSSlinks != null)
                {
                    SageFrameModuleCSSlinks.Text = "";

                    foreach (KeyValue cssfile in lstCssInclude)
                    {
                        AddModuleCssToPage(cssfile.Key, SageFrameModuleCSSlinks);
                    }
                    if (IsUserLoggedIn())
                    {
                        AddModuleCssToPage("~/js/jquery-ui-1.8.14.custom/css/redmond/jquery-ui-1.8.16.custom.css", SageFrameModuleCSSlinks);
                    }
                    SetTemplateCss(SageFrameModuleCSSlinks);
                    if (isAdmin)
                    {
                        string cssColoredTemplate = string.Empty;
                        SageFrameConfig sageConfig = new SageFrameConfig();
                        string defaultAdminTheme = sageConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.DefaultAdminTheme);
                        cssColoredTemplate = "~/Administrator/Templates/Default/themes/" + defaultAdminTheme + ".css";
                        AddModuleCssToPage(cssColoredTemplate, SageFrameModuleCSSlinks);
                    }
                }
                #endregion
            }

        }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:101,代码来源:PageBase.cs

示例13: BinDDls

 private void BinDDls()
 {
     BindPageDlls();
     Bindlistddls();
     SageFrameConfig pagebase = new SageFrameConfig();
     BindddlTimeZone(pagebase.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalDefaultLanguage));
     BindRegistrationTypes();
     BindYesNoRBL();
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:9,代码来源:ctl_PortalSettings.ascx.cs

示例14: GetExtensions

 public static string GetExtensions(int portalID, string userName, int userModuleID, string secureToken)
 {
     string extension = "";
     AuthenticateService objService = new AuthenticateService();
     if (objService.IsPostAuthenticatedView(portalID, userModuleID, userName, secureToken))
     {
         SageFrameConfig config = new SageFrameConfig();
         extension = config.GetSettingValueByIndividualKey(SageFrameSettingKeys.FileExtensions);
     }
     return extension;
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:11,代码来源:WebMethods.aspx.cs

示例15: RestartApplication

 private void RestartApplication()
 {
     SageFrame.Application.Application app = new SageFrame.Application.Application();
     File.SetLastWriteTime((app.ApplicationMapPath + "\\web.config"), System.DateTime.Now);
     SecurityPolicy objSecurity = new SecurityPolicy();
     HttpCookie authenticateCookie = new HttpCookie(objSecurity.FormsCookieName(GetPortalID));
     authenticateCookie.Expires = DateTime.Now.AddYears(-1);
     Response.Cookies.Add(authenticateCookie);
     System.Web.Security.FormsAuthentication.SignOut();
     SetUserRoles(string.Empty);
     string redUrl = string.Empty;
     SageFrameConfig sfConfig = new SageFrameConfig();
     if (!IsParent)
     {
         redUrl = GetParentURL + "/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalDefaultPage) + SageFrameSettingKeys.PageExtension;
     }
     else
     {
         redUrl = GetParentURL + "/" + sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.PortalDefaultPage) + SageFrameSettingKeys.PageExtension;
     }
     Response.Redirect(redUrl);
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:22,代码来源:ctl_PortalSettings.ascx.cs


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