Пример #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Student     stu         = (Student)Session["student"];
        TitleManage titleManage = new TitleManage();

        titleManage.ModifiyTitleChooseNum(stu.Title.TitleID);
        int num = studentManage.EscTitleByStudentId(stu.SID);

        ThesisManage.BLL.ThesisManage thesisManage = new ThesisManage.BLL.ThesisManage();
        int num2 = thesisManage.DeleteThesisByStudentID(stu.SID);

        if (num > 0)
        {
            Student student = studentManage.GetStudentBySID(stu.SID);
            Session.Remove("student");
            Session["student"] = student;
            this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('退选成功!');window.location.href='StudentMessage.aspx';</script>");
        }
        else
        {
            this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('退选失败!');</script>");
        }
    }