public SinhVien GetById(string maSV)
 {
     try
     {
         SinhVien sv = context.GetById(maSV);
         return(sv);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
         return(null);
     }
 }
Example #2
0
 public void DangKy(int maLopTC, string maSV)
 {
     try
     {
         SinhVienDAO contextSV = new SinhVienDAO();
         LopTinChi   lpTest    = context.GetById(maLopTC);
         SinhVien    sv        = contextSV.GetById(maSV);
         if (lpTest != null && sv != null)
         {
             context.DangKy(maLopTC, maSV);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
 }