protected override void SaveDetail()
 {
     try
     {
         foreach (var row in dgv_DanhSach.Rows)
         {
             var hs = new DiemThi
             {
                 MaSV     = int.Parse(row.Cells["MaSV"].Text),
                 Diem     = double.Parse(row.Cells["TongDiem"].Text),
                 IdNamHoc = _idnamhoc,
                 HocKy    = _hocky
             };
             _listThongke.Add(hs);
         }
         if (_listThongke.Count > 0)
         {
             InsertData.ThemThongKe(_listThongke);
             MessageBox.Show(@"Thêm thành công");
         }
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }
 private void SaveDetail1()
 {
     try
     {
         foreach (var row in dgv_DanhSach.Rows)
         {
             var hs = new DiemThi
             {
                 MaSV     = int.Parse(row.Cells["MaSV"].Text),
                 Diem     = double.Parse(row.Cells["DiemThi"].Text),
                 IdNamHoc = _idnamhoc,
                 HocKy    = _hocky
             };
             _listThongke.Add(hs);
         }
         if (_listThongke.Count > 0 || _listUpdate.Count > 0)
         {
             UpdateData.UpdateDiemThi(_listUpdate);
             InsertData.ThemThongKe(_listThongke);
             MessageBox.Show(@"Lưu lại thành công");
         }
     }
     catch (Exception ex)
     {
         Log2File.LogExceptionToFile(ex);
     }
 }