本文整理汇总了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);
}
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}