public DataTable getDataDoiTac(BackgroundWorker worker, DoWorkEventArgs e) { if (worker.CancellationPending == true) { e.Cancel = true; return(null); } else { DoiTac objDoiTac = new DoiTac(); return(objDoiTac.GetListOfDoiTacs_NAME()); System.Threading.Thread.Sleep(500); } }