/// <summary> /// Lưu dữ liệu trên UltraGrid /// </summary> protected override void SaveDetail() { try { foreach (var row in dgv_DanhSach.Rows) { var hs = new BaiLam { MaSV = int.Parse(row.Cells["MaSV"].Text), MaDe = row.Cells["MaDe"].Text, KetQua = row.Cells["KetQua"].Text, IdKyThi = _idKythi, MaHoiDong = row.Cells["MaHoiDong"].Text, MaLoCham = row.Cells["MaLoCham"].Text, TenFile = row.Cells["TenFile"].Text, }; _listAdd.Add(hs); } InsertData.ThemBaiLam(_listAdd); Invoke((Action)(() => MessageBox.Show(@"Đã lưu vào CSDL", FormResource.MsgCaption, MessageBoxButtons.OK, MessageBoxIcon.Information))); } catch (Exception ex) { Log2File.LogExceptionToFile(ex); } }