using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace KstCMS.KstCMS_Manager.SystemSet.Smtp
{
    public partial class index : KstCmsBase.WebPage.FrmControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            OkBtn.Click += new EventHandler(OkBtn_Click);
            if (!IsPostBack)
            {
                GetEmlServer();
            }
        }

        void OkBtn_Click(object sender, EventArgs e)
        {
            string[] updatedata = new string[] { txt_Email.Text.Trim(), txt_EmlServer.Text.Trim(), txt_Pwd.Text.Trim() };
            KstCmsBase.DAL.EmlServer.Eml_update(updatedata);
            ShowMsgModle("更新成功！");
        }
        void GetEmlServer()
        {
            KstCmsBase.Entities.EmlServer Eml = KstCmsBase.DAL.EmlServer.Get_EmlServer();
            txt_Email.Text = Eml.Email;
            txt_EmlServer.Text = Eml.Smtp;
            txt_Pwd.Text = Eml.Pwd;
        }
    }
}