private async Task FillFrames()
        {
            //Shoes2 shoe = await ShoesRepository.GetShoesAsync();
            List <Results2> shoeData = await ShoesRepository.GetShoesAsync();

            // als er lege value's zijn deze vervangen door placeholders
            foreach (var item in shoeData)
            {
                if (item.ImgUrl == "")
                {
                    item.ImgUrl = "https://stockx-assets.imgix.net/media/New-Product-Placeholder-Default.jpg?fit=fill&bg=FFFFFF&w=700&h=500&auto=format,compress&trim=color&q=90&dpr=2&updated_at=0";
                }
                if (item.RetailPrice == "")
                {
                    item.RetailPrice = "N/A";
                }
                if (item.EstimatedMarketValue == "")
                {
                    item.EstimatedMarketValue = "N/A";
                }
            }
            //data aan itemsource binden
            Shoe = shoeData;
            lvwShoes.ItemsSource = shoeData;
        }
        private async Task NavigateToShoePage()
        {
            TrelloCard      card     = (TrelloCard)lvwTrelloLists.SelectedItem;
            List <Results2> shoeData = await ShoesRepository.GetShoesByNameAsync(card.name);

            Results2 shoe       = shoeData[0];
            var      DetailPage = new Views.DetailPage(shoe);

            Navigation.PushModalAsync(DetailPage);
        }
        //Frames vullen op basis van searchbar
        private async Task FillFramesByName(string name)
        {
            lvwShoes.ItemsSource = null;
            List <Results2> shoeData = await ShoesRepository.GetShoesByNameAsync(name);

            foreach (var item in shoeData)
            {
                if (item.ImgUrl == "")
                {
                    item.ImgUrl = "https://stockx-assets.imgix.net/media/New-Product-Placeholder-Default.jpg?fit=fill&bg=FFFFFF&w=700&h=500&auto=format,compress&trim=color&q=90&dpr=2&updated_at=0";
                }
                if (item.RetailPrice == "")
                {
                    item.RetailPrice = "N/A";
                }
                if (item.EstimatedMarketValue == "")
                {
                    item.EstimatedMarketValue = "N/A";
                }
            }
            //data aan itemsource binden
            Shoe = shoeData;
            lvwShoes.ItemsSource = shoeData;
        }
Beispiel #4
0
 public ShoesService(ShoesRepository repo)
 {
     _repo = repo;
 }
Beispiel #5
0
 public OrdersService(OrdersRepository repo, ShoesRepository shoeRepo)
 {
     _shoeRepo = shoeRepo;
     _repo     = repo;
 }
        private async Task FillPicker()
        {
            Brands brands = await ShoesRepository.GetShoeBrandsAsync();

            BrandEntry.ItemsSource = brands.Result;
        }