private void bwAuth_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            WorkerHelper h = new WorkerHelper();

            try
            {
                SOAuthResponse r = service.Authenticate();

                h.AuthResponse = r;
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                    while (ex.InnerException != null)
                        ex = ex.InnerException;

                h.Ex = ex;
            }

            // pass result
            e.Result = h;
        }
        private void bwFetch_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            WorkerHelper h = new WorkerHelper();

            try
            {
                List<SOAssociate> r = service.ListAllAssociates();

                h.ListAllAssociates = r;
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                    while (ex.InnerException != null)
                        ex = ex.InnerException;

                h.Ex = ex;
            }

            // pass result
            e.Result = h;
        }