//导入了学生才直接跳到考勤界面,否则跳到添加学生界面 private void Picture_Click_checkStu(object sender, EventArgs e) { PictureBox p = (PictureBox)sender; DataTable dt = teacherBll.getCourseIdAndNum(tea_id); cou_id = dt.Rows[Convert.ToInt32(p.Name)][0].ToString(); cou_num = dt.Rows[Convert.ToInt32(p.Name)][1].ToString(); checking c = new checking(tea_id, cou_id, cou_num); c.Show(); this.Hide(); }