Example #1
0
        public async void GetData()
        {
            if (CrossConnectivity.Current.IsConnected)
            {
                FireSharpClient FsClient = FireSharpClient.Instance;
                var             hud      = DependencyService.Get <IHUDProvider>();
                hud.DisplayProgress("Getting Data");
                var storesDict = await FsClient.GetAll <Store>("stores");

                if (storesDict == null || storesDict.Count == 0)
                {
                    var msg = "No Results :(";
                    msg.ToToast(ToastNotificationType.Error);
                }
                else
                {
                    storesList         = new ObservableDictionary <string, Store>(storesDict);
                    filteredStoresList = storesList;
                }
                hud.Dismiss();
            }
            else
            {
                var hud = DependencyService.Get <IHUDProvider>();
                hud.DisplayError("Please Connect to Internet.");
            }
        }
        public async void GetData()
        {
            if (CrossConnectivity.Current.IsConnected)
            {
                FireSharpClient FsClient = FireSharpClient.Instance;
                var             hud      = DependencyService.Get <IHUDProvider>();
                hud.DisplayProgress("Getting Reviews");
                var reviewsDict = await FsClient.GetAll <Review>("stores/" + KeyValue.Key + "/Reviews");

                if (reviewsDict == null || reviewsDict.Count == 0)
                {
                    var msg = "No Reviews :(";
                    msg.ToToast(ToastNotificationType.Error);
                }
                else
                {
                    reviewsList = new ObservableDictionary <string, Review>(reviewsDict);
                }
                hud.Dismiss();
            }
            else
            {
                var hud = DependencyService.Get <IHUDProvider>();
                hud.DisplayError("Please Connect to Internet.");
            }
        }
Example #3
0
        private async Task getData()
        {
            payments = await fsClient.GetAll <Payment>("payments");

            deliveryList.ItemsSource = payments;
        }