using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.BLL;
|
using CY.Infrastructure.DESEncrypt;
|
using CY.Config;
|
|
namespace CY.WebForm.Pages.sysglobal
|
{
|
//吴辉
|
//邮箱配置
|
public partial class EmailConfig : BasePage
|
{
|
//邮箱密码赋值使用
|
public string page_EmailPwd = "";
|
|
//页面加载
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
if (!IsPostBack)
|
{
|
page_EmailPwd = DESEncrypt.Decrypt(WebInfo.Instance.EmailPwd);
|
this.txtEmailServer.Value = WebInfo.Instance.EmailServer;
|
this.txtEmailLoginName.Value = WebInfo.Instance.EmailLoginName;
|
this.txtEmail.Value = WebInfo.Instance.Email;
|
this.txtEmailPort.Value = WebInfo.Instance.EmailPort;
|
this.selIsUseEmail.Value = WebInfo.Instance.IsUseEmail;
|
|
}
|
}
|
|
|
//提交表单
|
protected void btn_Submit_Config(object sender, EventArgs e)
|
{
|
try
|
{
|
WebInfo.Instance.EmailServer = this.txtEmailServer.Value.ToString();
|
WebInfo.Instance.EmailLoginName = this.txtEmailLoginName.Value.ToString();
|
WebInfo.Instance.Email = this.txtEmail.Value.ToString();
|
WebInfo.Instance.EmailPwd = DESEncrypt.Encrypt(this.txtEmailPwd.Value.ToString());
|
page_EmailPwd = this.txtEmailPwd.Value.ToString();
|
WebInfo.Instance.EmailPort = this.txtEmailPort.Value.ToString();
|
WebInfo.Instance.IsUseEmail = this.selIsUseEmail.Value.ToString();
|
WebInfo.Instance.Update();
|
}
|
catch (Exception ex)
|
{
|
PAGEHandleException(ex);
|
JavaScript.MessageBox("操作失败", this);
|
}
|
JavaScript.MessageBox("操作成功",this);
|
}
|
}
|
}
|