Esempio n. 1
0
        protected void AProSureButton_Click(object sender, EventArgs e)
        {
            Problem Apro = new Problem();

            Apro.assignment = int.Parse(Request.QueryString["Assignmentid"].ToString());
            Apro.title      = AProtitleTextBox.Text;
            Apro.descrip    = AProdescriTextBox.Text;
            Apro.score      = float.Parse(scoreTextBox.Text);

            ProMan.create(Apro);
            Response.Redirect("OneAssignment.aspx?Assignmentid=" + Request.QueryString["Assignmentid"] + "&Assignmentnum=" + Request.QueryString["Assignmentnum"]);
        }
Esempio n. 2
0
 //保存此次作业
 protected void ProblemsSaveButton_Click(object sender, EventArgs e)
 {
     //将问题存入数据库
     problems = (List <Problem>)Session["problems"];
     if (problems.Count == 0)
     {
         NoProblemLabel.Visible = true;
     }
     else
     {
         foreach (Problem Apro in problems)
         {
             ProMan.create(Apro);
         }
         Response.Redirect("AllAssignment.aspx?Coursenum=" + Request.QueryString["Coursenum"]);
     }
 }