Exemplo n.º 1
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            if (!radioButton1.Checked && !radioButton2.Checked)
            {
                pictureBox7.Show();
                label10.Show();
                return;
            }
            else
            {
                pictureBox7.Hide();
                label10.Hide();
            }
            sql_apply sa = new sql_apply(CP);

            if (radioButton1.Checked)//同意
            {
                sa.check_agree(applyDemo, teacherDemo);
                MessageBox.Show("通过成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            else
            {
                sa.check_refuse(applyDemo, teacherDemo, richTextBox2.Text);
                MessageBox.Show("拒绝成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
            teacher_check tc = new teacher_check(CP, teacherDemo);

            tc.Show();
            this.Close();
        }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (richTextBox1.Text == "")
     {
         pictureBox2.Show();
         label6.Show();
         flag = false;
         return;
     }
     else
     {
         pictureBox2.Hide();
         label6.Hide();
         flag = true;
     }
     if (flag == true)//验证通过
     {
         apply applyDemo = new apply();
         applyDemo.setStu_ID(studentDemo.getStu_ID());
         applyDemo.setApply_start(dateTimePicker1.Value);
         applyDemo.setApply_end(dateTimePicker2.Value);
         applyDemo.setApply_reason(richTextBox1.Text);
         applyDemo.setCheck_tutor(0);
         applyDemo.setInstructor_ID(0);
         applyDemo.setApply_refuse("");
         applyDemo.setApply_editTime(DateTime.Now);
         applyDemo.setApply_time(DateTime.Now);
         applyDemo.setTutor_ID(tutor_ID);
         applyDemo.setInstructor_ID(instructor_ID);
         applyDemo.setApply_editTime(DateTime.Now);
         sql_apply sa = new sql_apply(CP);
         sa.insert(applyDemo);
         MessageBox.Show("添加成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         this.Hide();
     }
 }