Exemplo n.º 1
0
    //密码修改
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string teaId = txtteaId.Text;

        teaNews1 = TeacherInfoManager.Getteachernews(teaId);
        string password = txtpsw1.Text;

        if (txtpsw.Text != teaNews1.password)
        {
            //Response.Write("<script type = 'text/javascript'> alert('原密码输入错误!'); </script>");
            RegisterClientScriptBlock("", "<script>alert('原密码输入错误!')</script>");
            txtpsw.Focus();
        }
        else
        {
            TeacherInfo teacherInfo1 = new TeacherInfo(teaId, password);
            TeacherInfoManager.UpdatePsw(teacherInfo1);
            //Response.Write("<script type = 'text/javascript'> alert('密码修改成功!'); </script>");
            RegisterClientScriptBlock("", "<script>alert('密码修改成功!')</script>");
        }
    }