Пример #1
0
 protected void rptCourse_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (AddSQLStringToDAL.DeleteTabTeachers("TabMessage", Session["UserID"].ToString()))
     {
         Response.Redirect("管理员首页.aspx");
     }
 }
    protected void Button5_Click(object sender, EventArgs e)//导入系部人数按钮
    {
        if (TextBox1.Text != "" && TextBox2.Text != "" && TextBox3.Text != "" && TextBox4.Text != "" && TextBox5.Text != "" && TextBox6.Text != "" && TextBox7.Text != "")
        {
            string[] str = { "会计系", "信息工程系", "经济管理系", "食品工程系", "机械工程系", "商务外语系", "建筑工程系" };
            int[]    sum = new int[str.Length];
            sum[0] = Convert.ToInt32(TextBox1.Text.Trim());
            sum[1] = Convert.ToInt32(TextBox2.Text.Trim());
            sum[2] = Convert.ToInt32(TextBox3.Text.Trim());
            sum[3] = Convert.ToInt32(TextBox4.Text.Trim());
            sum[4] = Convert.ToInt32(TextBox5.Text.Trim());
            sum[5] = Convert.ToInt32(TextBox6.Text.Trim());
            sum[6] = Convert.ToInt32(TextBox7.Text.Trim());

            if (AddSQLStringToDAL.DeleteTabTeachers("TabDepartmentSum"))
            {
            }
            for (int i = 0; i < str.Length; i++)
            {
                if (AddSQLStringToDAL.InsertTabTeachers("TabDepartmentSum", str[i], sum[i].ToString()))
                {
                    label6.Visible = true;
                    label6.Text    = "各系人数设置完毕!";
                }
            }
        }
        else
        {
            label6.Visible = true;
            label6.Text    = "部分系部人数未设置,请全部设置!";
        }
    }
 protected void BtnDepartmentCount_Click(object sender, EventArgs e)
 {
     string[] str = { "会计系", "信息工程系", "经济管理系", "食品工程系", "机械工程系", "商务外语系", "建筑工程系" };
     int[]    sum = new int[str.Length];
     if (txtKJ.Text != "" && txtXX.Text != "" && txtJG.Text != "" && txtSP.Text != "")
     // && txtJX.Text != "" && txtWY.Text != "" && txtJZ.Text != ""
     {
         sum[0] = Convert.ToInt32(txtKJ.Text.Trim());
         sum[1] = Convert.ToInt32(txtXX.Text.Trim());
         sum[2] = Convert.ToInt32(txtJG.Text.Trim());
         sum[3] = Convert.ToInt32(txtSP.Text.Trim());
         //sum[4] = Convert.ToInt32(txtJX.Text.Trim());
         //sum[5] = Convert.ToInt32(txtWY.Text.Trim());
         //sum[6] = Convert.ToInt32(txtJZ.Text.Trim());
     }
     if (AddSQLStringToDAL.DeleteTabTeachers("TabDepartment"))
     {
         for (int i = 0; i < str.Length; i++)
         {
             string strSql = "INSERT INTO TabDepartment VALUES('" + str[i] + "','" + sum[i] + "')";
             if (AddSQLStringToDAL.InsertData(strSql))
             {
                 Label16.Text = "各系人数设置完毕";
             }
             else
             {
                 Label16.Text = "设置失败";
             }
         }
     }
 }
Пример #4
0
 protected void gvTeachers_RowDeleting(object sender, GridViewDeleteEventArgs e)   //删除
 {
     if (AddSQLStringToDAL.DeleteTabTeachers("TabTeachers", gvTeachers.DataKeys[e.RowIndex].Value.ToString()))
     {
         Bind();
     }
 }
 protected void Button4_Click(object sender, EventArgs e)//清空入库数据
 {
     Clear();
     if (AddSQLStringToDAL.DeleteTabTeachers("TabTeacherStatus") && AddSQLStringToDAL.DeleteTabTeachers("TabTeacherCourseSimpleMap") && AddSQLStringToDAL.DeleteTabTeachers("TabTeacherAttendance") && AddSQLStringToDAL.DeleteTabTeachers("TabStudentAttendance") && AddSQLStringToDAL.DeleteTabTeachers("TabStudentHomework") && AddSQLStringToDAL.DeleteTabTeachers("校历"))
     {
         lblMessage4.Text = "异常数据清空完毕!请对数据进行分析和处理!";
     }
 }
Пример #6
0
 protected void btnClearPreData_Click(object sender, EventArgs e)
 {
     Clear();
     if (AddSQLStringToDAL.DeleteTabTeachers("TabTeacherstatus") && AddSQLStringToDAL.DeleteTabTeachers("TabTeacherCourseSimpleMap") && AddSQLStringToDAL.DeleteTabTeachers("TabTeacherAttendance") && AddSQLStringToDAL.DeleteTabTeachers("TabStudentAttendance") && AddSQLStringToDAL.DeleteTabTeachers("TabTeacherHome"))
     {
         lbMessage4.Text = "异常数据清空完毕!请对数据进行分析和处理";
     }
 }