using System;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EKETEAM.Data;
using EKETEAM.FrameWork;


namespace eFrameWork.AppMobile
{
    public partial class ModifyPass : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            eUser user = new eUser("AppMobile");
            if (Request.Form["f1"] != null) //读取内容
            {
                string mm = eOleDB.getValue("select mm from a_eke_sysUsers where  Userid='" + user.ID + "'");
                if (mm != eBase.getPassWord(eParameters.Form("f1")))
                {
                    Response.Write("<script>alert('旧密码不正确，修改失败!');document.location='ModifyPass.aspx';</script>");
                    Response.End();
                }
                string sql = "update a_eke_sysUsers set ";
                sql += "mm='" + eBase.getPassWord(eParameters.Form("f2")) + "'";
                sql += " where Userid='" + user.ID + "'";
                eOleDB.Execute(sql);
                Response.Write("<script>alert('新密码修改成功,请牢记!');document.location='ModifyPass.aspx';</script>");
                Response.End();
            }
        }
    }
}