Ejemplo n.º 1
0
 public void loadDSHS()
 {
     try
     {
         ClassStudentDAO dt = new ClassStudentDAO();
         grcDanhSachHocSinh.DataSource = dt.listviewSD((int)cbbLophoc.SelectedValue, (int)cbbDotthu.SelectedValue);
     }
     catch
     {
     }
 }
Ejemplo n.º 2
0
 public void loadStuden()
 {
     try
     {
         ClassStudentDAO dt = new ClassStudentDAO();
         Student         a  = new Student();
         a                = dt.lookForStuden(ClassStudentDAO.StudentID);
         txtHoten.Text    = a.FirstName + a.LastName;
         txtNgaySinh.Text = a.Birthday.ToShortDateString();
         txtDiachi.Text   = a.AdressDetail;
         MemoryStream mom = new MemoryStream(a.Image.ToArray());
         Image        img = Image.FromStream(mom);
         pcAnhhocsinh.Image = img;
     }
     catch
     {
     }
 }
Ejemplo n.º 3
0
 private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 {
     try
     {
         ClassStudentDAO dt = new ClassStudentDAO();
         ClassStudentDAO.StudentID = (int)gridView1.GetRowCellValue(e.FocusedRowHandle, "StudentID");
         Student a = dt.lookForStuden(ClassStudentDAO.StudentID);
         txtTenhocsinh.Text = a.FirstName + " " + a.LastName;
         txtNgaySinh.Text   = a.Birthday.ToShortDateString();
         txtDiachi.Text     = a.AdressDetail;
         MemoryStream mom = new MemoryStream(a.Image.ToArray());
         Image        b   = Image.FromStream(mom);
         pcAnhhocsinh.Image = b;
     }
     catch
     {
     }
 }