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


C# SiteConfig.saveConifg方法代码示例

本文整理汇总了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");
        }
    }
开发者ID:summer-breeze,项目名称:Oodso,代码行数:70,代码来源:SysConfig.aspx.cs


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