XDF/Student/ModifyPassword.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;

namespace XDF.Student
{
    public partial class ModifyPassword : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {

                if (Session["UserRole"] == null)
                    Response.Redirect("~/Login.aspx");


                
                string stuID = Session["UserID"].ToString();

                LabelStuID.Text = stuID;
            }    
        }

        

        protected void ButtonModify_Click(object sender, EventArgs e)
        {
            Model.Student student = new Model.Student();
            student.StuID = LabelStuID.Text;

            student.Password = TextBoxPassword.Text.Trim();

            

            StudentBLL studentBLL = new StudentBLL();
            ButtonModify.OnClientClick = "return confirm('是否确认更改?')";
            studentBLL.ModifyPassword(student);
            if (studentBLL.ModifyPassword(student))
                Response.Write("<script>alert('修改成功!');location='StudentDefault.aspx';</script>");
            else
                Response.Write("<script>alert('修改失败!');</script>");
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。