public override void Refresh() { try { this.Cursor = Cursors.WaitCursor; reportStatus(new StatusEventArgs("Refreshing consignees...")); string clientNumber = this.cboClient.SelectedValue.ToString(); this.mConsignees.Clear(); this.mConsignees.Merge(FreightGateway.ViewLTLConsignees(clientNumber)); this.grdConsignees.Focus(); base.Refresh(); } catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); } finally { setUserServices(); this.Cursor = Cursors.Default; } }
private void OnAutoRefresh(object sender, DoWorkEventArgs e) { //Event handler for background worker thread DoWork event; runs on worker thread try { e.Result = FreightGateway.ViewLTLConsignees(this.mClientNumber); } catch { } }