Exemplo n.º 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string password = CommonFunc.FilterSpecialString(txtPassword.Text.Trim());

        if (string.IsNullOrEmpty(password))
        {
            ShowMessageBox.Showmessagebox(this.Page, "登录密码不能为空", null);
            return;
        }
        if (password.Length > 50)
        {
            ShowMessageBox.Showmessagebox(this.Page, "登录密码不能超过50个字符", null);
            return;
        }
        int n = studentsBLL.UpdatePassword(user_name, password);

        if (n > 0)
        {
            ShowMessageBox.Showmessagebox(this.Page, "修改成功", null);
            return;
        }
    }