Esempio n. 1
0
        public ProductViewModel()
        {
            List <product> models = ShopifyRequests.GetAllProducts(thisApp.api_key, thisApp.password, thisApp.GetFullUrl(""));

            if (models != null)
            {
                List <product> recrods = models as List <product>;
                ShopifyProductViewModel = new ObservableCollection <product>();
                foreach (var record in recrods)
                {
                    ShopifyProductViewModel.Add(record);
                }
            }
        }
Esempio n. 2
0
        private async Task LoadProducts()
        {
            UpdateProgress("Getting Products...", true);
            List <product> newRecords = new List <product>();

            newRecords = ShopifyRequests.GetAllProducts(thisApp.api_key, thisApp.password, thisApp.GetFullUrl(""));
            if (newRecords != null)
            {
                thisApp.productsCollection.Clear();

                foreach (var x in newRecords)
                {
                    thisApp.productsCollection.Add(x);
                }
            }
            UpdateProgress("Completed.", false);
            thisApp.productsCollection.OrderBy(v => v.title);
        }