示例#1
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        BHomework bh = new BHomework();
        Homework  s  = new Homework(
            sname,
            true
            );

        bh.UpdateHomework2(s);
        BGrade bll = new BGrade();

        bll.DeleteGrade(workname);
        Grade ge = new Grade(
            Convert.ToString(workname),
            Convert.ToString(sname),
            Convert.ToString(Label4.Text),
            Convert.ToString(Label3.Text),
            Convert.ToString(TextBox1.Text),
            Convert.ToString(TextBox2.Text),
            true, true, true, false, classid);

        if (Page.IsValid)
        {
            bll.InsertGrade(ge);
            Response.Write("<script>alert('提交成功!');location='Upwork.aspx'</script>");
        }
        else
        {
            Response.Write("<script>alert('提交失败!');</script>");
        }
    }
示例#2
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        BGrade bll = new BGrade();

        Grade ge = new Grade(
            Convert.ToString(workname),
            Convert.ToString(sname),
            Convert.ToString(Label4.Text),
            Convert.ToString(Label3.Text),
            Convert.ToString(TextBox1.Text),
            Convert.ToString(TextBox2.Text),
            false, false, false, false, classid);

        if (Page.IsValid)
        {
            bll.InsertGrade(ge);
            Response.Write("<script>alert('暂存成功!');location='Upwork.aspx'</script>");
        }
        else
        {
            Response.Write("<script>alert('暂存失败!');</script>");
        }
    }