本文整理汇总了C#中SiteConfig.saveConifg方法的典型用法代码示例。如果您正苦于以下问题:C# SiteConfig.saveConifg方法的具体用法?C# SiteConfig.saveConifg怎么用?C# SiteConfig.saveConifg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiteConfig
的用法示例。
在下文中一共展示了SiteConfig.saveConifg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnSubmit_Click
/// <summary>
/// 保存配置信息
/// </summary>
protected void btnSubmit_Click(object sender, EventArgs e)
{
base.ChkAdminLevel("sys_config", "edit");
SiteConfig bll = new SiteConfig();
Com_Config model = bll.loadConfig(Utils.GetXmlMapPath(LoneuKeys.FILE_SITE_XML_CONFING));
try
{
model.webname = webname.Text;
model.webcompany = webcompany.Text;
model.weburl = weburl.Text;
model.webtel = webtel.Text;
model.webfax = webfax.Text;
model.webmail = webmail.Text;
model.webcrod = webcrod.Text;
model.webtitle = webtitle.Text;
model.webkeyword = webkeyword.Text;
model.webdescription = Utils.DropHTML(webdescription.Text);
model.webcopyright = webcopyright.Text;
//model.webpath = webpath.Text;
//model.webmanagepath = webmanagepath.Text;
//model.webstatus = int.Parse(webstatus.Text.Trim());
//model.webclosereason = webclosereason.Text;
//model.webcountcode = webcountcode.Text;
//model.staticstatus = int.Parse(staticstatus.SelectedValue);
//model.staticextension = staticextension.Text;
//model.memberstatus = int.Parse(memberstatus.SelectedValue);
//model.commentstatus = int.Parse(commentstatus.SelectedValue);
//model.logstatus = int.Parse(logstatus.SelectedValue);
model.emailstmp = emailstmp.Text;
model.emailport = int.Parse(emailport.Text.Trim());
model.emailfrom = emailfrom.Text;
model.emailusername = emailusername.Text;
//判断密码是否更改
if (emailpassword.Text.Trim() != defaultpassword)
{
model.emailpassword = DESEncrypt.Encrypt(emailpassword.Text, model.sysencryptstring);
}
model.emailnickname = emailnickname.Text;
model.attachpath = attachpath.Text;
model.attachextension = attachextension.Text;
model.attachsave = int.Parse(attachsave.SelectedValue);
model.attachfilesize = int.Parse(attachfilesize.Text.Trim());
model.attachimgsize = int.Parse(attachimgsize.Text.Trim());
model.attachimgmaxheight = int.Parse(attachimgmaxheight.Text.Trim());
model.attachimgmaxwidth = int.Parse(attachimgmaxwidth.Text.Trim());
model.thumbnailheight = int.Parse(thumbnailheight.Text.Trim());
model.thumbnailwidth = int.Parse(thumbnailwidth.Text.Trim());
model.watermarktype = int.Parse(watermarktype.SelectedValue);
model.watermarkposition = int.Parse(watermarkposition.Text.Trim());
model.watermarkimgquality = int.Parse(watermarkimgquality.Text.Trim());
model.watermarkpic = watermarkpic.Text;
model.watermarktransparency = int.Parse(watermarktransparency.Text.Trim());
model.watermarktext = watermarktext.Text;
model.watermarkfont = watermarkfont.Text;
model.watermarkfontsize = int.Parse(watermarkfontsize.Text.Trim());
bll.saveConifg(model, Utils.GetXmlMapPath(LoneuKeys.FILE_SITE_XML_CONFING));
//JscriptMsg("修改系统信息成功啦!", "sys_config.aspx", "Success");
}
catch
{
//JscriptMsg("文件写入失败,请检查是否有权限!", "", "Error");
}
}