//取得修課學生清單 private void GetSCAttendExt() { this.students = new Dictionary<string, SeatTableStudent>(); this.stud_coords = new Dictionary<string, CellCoordinate>(); //取得修課學生的系統編號、學號、姓名、座位座標等。 string strSQL = string.Format("select stu.id, stu.student_number, stu.name, stu.freshman_photo, ext.seat_x, ext.seat_y, ext.uid from $ischool.emba.scattend_ext ext inner join student stu on ext.ref_student_id = stu.id where ext.ref_course_id={0}", this.currentCourseID); QueryHelper q = new QueryHelper(); DataTable dt = q.Select(strSQL); foreach (DataRow dr in dt.Rows) { string studID = dr["id"].ToString(); string studNumber = dr["student_number"].ToString(); string name = dr["name"].ToString(); string freshman_photo = dr["freshman_photo"].ToString(); string seat_x = dr["seat_x"].ToString(); string seat_y = dr["seat_y"].ToString(); string uid = dr["uid"].ToString(); SeatTableStudent stud = new SeatTableStudent(studID, studNumber, name, Base64ToImage(freshman_photo), seat_x, seat_y, uid); // this.listBox1.Items.Add(stud); this.students.Add(stud.ID, stud); } this.fillListBox(); this.fillStudentSeatPosition(); }
public void ClearData() { this.stud = null; this.label1.Text = ""; this.pictureBox1.Image = null; }