using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using AVC.Passport;
using AVC.Passport.DataEntity;

public partial class ChangeUserPassword : LoginPageBase
{
    protected void Page_Load(object sender, System.EventArgs e)
    {
        if (!IsPostBack)
        {
			if (!CheckRight("UserPasswordChange"))
            {
                NoRightAlert();
            }
			int intUserID;
			int.TryParse(Request["userid"] + "",out intUserID);
			ViewState["UserID"] = intUserID;
        }
    }

	protected void btnOK_Click(object sender, System.EventArgs e)
	{
	    // 2、修改密码
		int ResultCode;
		if (UserMstBiz.ChangePassword((int)ViewState["UserID"], txtNewPassword.Text, out ResultCode))
		{
			ShowServerMessage("密码修改成功！", "密码修改成功！", "Main.aspx");
		}
		else
		{
			// 密码修改失败，提示
		}
	}
}