コード例 #1
0
 private void searchHocPhiCuaSinhVien(string maSV)
 {
     try
     {
         DataTable     dtStudent  = HelperCommon.queryDataByOneCondition("SINHVIEN", "MASV", maSV);
         BindingSource bdsStudent = new BindingSource();
         bdsStudent.DataSource = dtStudent;
         string maLop  = studentService.getClassId(bdsStudent);
         string hoTen  = studentService.getFullname(bdsStudent);
         string gender = studentService.getGender(bdsStudent) == true ? "Nam" : "Nữ";
         initStudentInfo(maSV, hoTen, maLop, gender);
         txtMaSV.Text = maSV;
         searchResult = true;
         if (maLop == "" || hoTen == "")
         {
             searchResult = false;
         }
     } catch (Exception ex)
     {
         MessageBox.Show("Không tìm thấy kết quả phù hợp.", "", MessageBoxButtons.OK);
         Debug.Print(ex.StackTrace);
         searchResult = false;
         return;
     }
 }