async Task ExecuteRefreshCommand(bool forceRefresh) { if (IsBusy) { return; } if (!await CheckConnectivityAsync()) { return; } IsBusy = true; try { await Task.Run(async() => { string userSignInString = _userEmail; if (String.IsNullOrWhiteSpace(_userEmail)) { userSignInString = _userPhoneNumber; } IQueryable <Shippingorder_Mobilesearch> loads = App.soapService.GetAll(userSignInString).ShippingOrder_MobileSearch.AsQueryable(); if (loads != null && loads.Count() > 0) { Loads.ReplaceRange(loads.AsEnumerable()); } else if (loads != null && loads.Count() == 0) { await PageService.DisplayAlert("No Loads", "There are no loads assigned to or viewable by '" + userSignInString + "'. Please contact Citation Logistics about your loads.", "OK"); } else { await PageService.DisplayAlert("Error Getting Loads", "There was an error getting the loads.", "OK"); } }); } catch (Exception ex) { Crashes.TrackError(ex); System.Diagnostics.Debug.WriteLine($"*** ERROR: {ex.Message}"); } finally { IsBusy = false; } }