Example #1
0
    protected void bt_OK_Click(object sender, EventArgs e)
    {
        CM_DIUsersBLL      user = new CM_DIUsersBLL((int)Session["ClientUserID"]);
        CM_DIMembershipBLL ship = new CM_DIMembershipBLL(user.Model.ShipID);

        if (!DataEncrypter.Compare(ship.Model.Password, tbx_OrgPassword.Text))
        {
            Literal1.Text = "原密码输入错误!";
        }
        else
        {
            ship.Model.Password = DataEncrypter.EncrypteString(tbx_NewPassword.Text);
            ship.Update();
            Literal1.Text        = "";
            tbx_NewPassword.Text = "";
            tbx_OrgPassword.Text = "";
            tbx_RePassword.Text  = "";
            MessageBox.Show(this, "密码修改成功!");
        }
    }