Exemple #1
0
        private async void GetAllOffers()
        {
            if (CrossConnectivity.Current.IsConnected)
            {
                try
                {
                    var data = await offer.AllOffers();

                    if (data.Count == 0)
                    {
                        await DisplayAlert("We are deeply sorry", "There are no offers at the moment, check back later", "ok");
                    }
                    else
                    {
                        OfferList           = data;
                        OfferLV.ItemsSource = OfferList;
                        activity.IsRunning  = false;
                        activity.IsEnabled  = false;
                        activity.IsVisible  = false;
                    }
                }
                catch (Exception)
                {
                    await DisplayAlert("Hello" + " " + Settings.UserName, "We trust you are doing fine", "Sure");
                }
            }
        }