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


C# SageFrameConfig.ResetSettingKeys方法代码示例

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


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

示例1: rptrTemplates_ItemCommand

 protected void rptrTemplates_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName.Equals("Activate"))
     {
         int TemplateID = int.Parse(e.CommandArgument.ToString());
         Label lbl = (Label)e.Item.FindControl("lblTemplateTitle");
         SettingProvider sageSP = new SettingProvider();
         sageSP.SaveSageSetting(SettingType.SiteAdmin.ToString(), SageFrameSettingKeys.PortalCssTemplate, lbl.Text, GetUsername, GetPortalID.ToString());
         SageFrameConfig sfConfig = new SageFrameConfig();
         sfConfig.ResetSettingKeys(GetPortalID);
         BindTemplate();
     }
     else if (e.CommandName.Equals("DeleteTemplate"))
     {
         string[] args = e.CommandArgument.ToString().Split('_');
         string templateName = args[0];
         if (templateName.ToLower() == "default")
         {
             ShowMessage(SageMessageTitle.Notification.ToString(), GetSageMessage("TemplateManagement", "TemplateCannotDeleted"), "", SageMessageType.Alert);
         }
         else
         {
             if (DeleteTemplate(Int32.Parse(args[1].ToString())))
             {
                 string templateFolderPath = HttpContext.Current.Server.MapPath("~/") + "Templates\\" + args[0];
                 DeleteDirectory(templateFolderPath);
                 BindTemplate();
                 PanelVisibility(false, true);
             }
         }
     }
 }
开发者ID:electrono,项目名称:veg-web,代码行数:32,代码来源:ctl_TemplateManagement.ascx.cs

示例2: SaveProtal

        private void SaveProtal()
        {
            try
            {
                string newpassword = GetRandomPassword(6);
                int passowrdformat = 2;
                string password;

                int? customerID = 0;
                string passwordsalt, portalUrl;
                string portalName = txtPortalName.Text.Trim().Replace(" ", "_");
                if (IsUseFriendlyUrls)
                {
                    portalUrl = Request.ServerVariables["SERVER_NAME"] + "/portal/" + portalName + "/" + "home.aspx";
                }
                else
                {
                    portalUrl = Request.ServerVariables["SERVER_NAME"] + "/portal/" + "home";
                }

                if (!(string.IsNullOrEmpty(txtPortalName.Text.Trim())))
                {
                    if (Int32.Parse(hdnPortalID.Value) > 0)
                    {
                        dbPortal.sp_PortalUpdate(Int32.Parse(hdnPortalID.Value), txtPortalName.Text.Trim(), false,
                                                 GetUsername);
                        ShowMessage(SageMessageTitle.Information.ToString(),
                                    GetSageMessage("PortalSettings", "PortalSaveSuccessfully"), "",
                                    SageMessageType.Success);

                    }
                    else
                    {
                        PasswordHelper.EnforcePasswordSecurity(passowrdformat, newpassword, out password,
                                                               out passwordsalt);
                        string email = txtEmail.Text.Trim();
                        dbPortal.usp_Aspx_AddStoreSubscriber(portalName, "", "", email, null, false, false, "superuser",
                                                             password, passwordsalt, passowrdformat, false,
                                                             ref customerID);
                        try
                        {
                            sendEmail(customerID, newpassword, portalName, txtEmail.Text.Trim(), "superuser", "",
                                      portalUrl);
                            ShowMessage(SageMessageTitle.Information.ToString(),
                                        GetSageMessage("PortalSettings", "PortalSavedAndEmailSendSuccessfully"), "",
                                        SageMessageType.Success);
                        }
                        catch
                        {
                            ShowMessage(SageMessageTitle.Notification.ToString(),
                                        GetSageMessage("PortalSettings", "PortalAddEmailSendProblem"), "",
                                        SageMessageType.Alert);
                        }
                    }
                    BindPortalSetting();
                    HttpContext.Current.Cache.Remove("Portals");
                    BindPortal();
                    PanelVisibility(false, true);
                    HttpContext.Current.Cache.Remove("SageSetting");
                    SageFrameConfig sf = new SageFrameConfig();
                    sf.ResetSettingKeys(int.Parse(this.hdnPortalID.Value.ToString()));
                }
            }
            catch (Exception)
            {
                ShowMessage(SageMessageTitle.Notification.ToString(),
                            GetSageMessage("PortalSettings", "PortalAlreadyExist"), "", SageMessageType.Alert);
            }
        }
开发者ID:Dashboard-X,项目名称:Aspxcommerce,代码行数:69,代码来源:ctl_PortalManagement.ascx.cs

示例3: imgSave_Click

        protected void imgSave_Click(object sender, ImageClickEventArgs e)
        {

            try
            {
                if (Int32.Parse(hdnPortalID.Value) > 0)
                {
                    if (txtPortalName.Text.Trim() != "")
                    {
                        SaveProtal();
                        BindPortalSetting();
                        HttpContext.Current.Cache.Remove("Portals");
                        BindPortal();
                        PanelVisibility(false, true);
                        HttpContext.Current.Cache.Remove("SageSetting");
                        SageFrameConfig sf = new SageFrameConfig();
                        sf.ResetSettingKeys(int.Parse(this.hdnPortalID.Value.ToString()));
                    }
                    else
                    {
                        lblPortalNameError.Visible = true;
                    }
                }
                else
                {
                    if (txtEmail.Text.Trim() != "")
                    {
                        if (txtPortalName.Text.Trim() != "")
                        {
                            SaveProtal();
                            BindPortalSetting();
                            HttpContext.Current.Cache.Remove("Portals");
                            BindPortal();
                            PanelVisibility(false, true);
                            HttpContext.Current.Cache.Remove("SageSetting");
                            SageFrameConfig sf = new SageFrameConfig();
                            sf.ResetSettingKeys(int.Parse(this.hdnPortalID.Value.ToString()));

                        }
                        else
                        {
                            lblPortalNameError.Visible = true;
                        }
                    }
                    else
                    {
                        lblStoreEmailError.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
                ProcessException(ex);
            }
        }
开发者ID:electrono,项目名称:veg-web,代码行数:55,代码来源:ctl_PortalManagement.ascx.cs

示例4: imgSave_Click

 protected void imgSave_Click(object sender, EventArgs e)
 {
     try
     {
         bool status = false;
         foreach (GridViewRow row in gdvPortal.Rows)
         {
             LinkButton lnkPortal = row.FindControl("lnkUsername") as LinkButton;
             if (gdvPortal.DataKeys[row.RowIndex]["PortalID"].ToString() != hdnPortalIndex.Value)
             {
                 if (lnkPortal.Text.ToLower().Equals(txtPortalName.Text.ToLower()))
                 {
                     status = true;
                 }
             }
         }
         if (!(string.IsNullOrEmpty(txtPortalName.Text)))
         {
             if (!status)
             {
                 SaveProtal();
                 BindPortalSetting();
                 HttpRuntime.Cache.Remove(CacheKeys.Portals);
                 SageFrameConfig sf = new SageFrameConfig();
                 sf.ResetSettingKeys(int.Parse(this.hdnPortalID.Value.ToString()));
                 HttpContext.Current.Session.Remove(SessionKeys.SageFrame_PortalSEOName);
                 AppErazer.ClearSysCache();
                 BindPortal();
                 // BindSitePortal();
                 PanelVisibility(false, true);
                 //Redirect(GetPortalID);
             }
             else
             {
                 ShowMessage("", GetSageMessage("PortalSettings", "PortalAlreadyExists"), "", SageMessageType.Alert);
             }
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
开发者ID:xiaoxiaocoder,项目名称:AspxCommerce2.7,代码行数:43,代码来源:ctl_PortalManagement.ascx.cs


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