private void delete_tnk()
{
if(m_grv_main.FocusedRowHandle < 0)
{
XtraMessageBox.Show("Bạn chưa chọn dòng dữ liệu nào để xóa!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
var dlg = XtraMessageBox.Show("Bạn có chắc chắn muốn xóa dữ liệu? Dữ liệu đã xóa không thể khôi phục được!", "THÔNG BÁO", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if(dlg == System.Windows.Forms.DialogResult.Yes)
{
var v_dc_id_gd_thu_nhap_khac = Convert.ToDecimal(m_grv_main.GetFocusedDataRow()[GD_THU_NHAP_KHAC.ID]);
US_GD_THU_NHAP_KHAC v_us_gd_tnk = new US_GD_THU_NHAP_KHAC();
v_us_gd_tnk.DeleteByID(v_dc_id_gd_thu_nhap_khac);
load_data_to_grid();
}
else
{
return;
}
}