Exemplo n.º 1
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     if (bm.CheckBusyworkTime(txtBusyworkTime.Text.ToString(), Request.QueryString["courseid"].ToString()) == true)
     {
         if (CheckTime() == true)
         {
             if (FUL.HasFile)
             {
                 bm.TeacherUploadBusywork(txtBusyworkTime.Text.ToString(), Request.QueryString["courseid"].ToString(), bm.GetTimeString(DropDownList1.SelectedValue, DropDownList2.SelectedValue, DropDownList3.SelectedValue));
                 UploadFile(txtBusyworkTime.Text.ToString());
                 bm.AddGradeList(txtBusyworkTime.Text.ToString(), Request.QueryString["courseid"].ToString());
             }
             else
             {
                 Response.Write("<Script language='JavaScript'>alert('" + "没有上传文件!" + "');</Script>");
             }
         }
         else
         {
             Response.Write("<Script language='JavaScript'>alert('" + "时间已经过期!" + "');</Script>");
         }
     }
     else
     {
         Response.Write("<Script language='JavaScript'>alert('" + "作业次数已经存在!" + "');</Script>");
     }
 }