private async Task addcard(Results2 result) { await DisplayAlert("Alert", "You added this shoe as favorite", "OK"); string listId = "5fd4e03623dc8d8494238fd9"; TrelloCard newCard = new TrelloCard { name = result.Name, CardDesc = result.ImgUrl, IsClosed = false }; await TrelloRepository.AddCardAsync(listId, newCard); }
private async void btnSave_Clicked(object sender, EventArgs e) { TrelloCard card = new TrelloCard() { Name = editName.Text }; if (IsNewCard) { await TrelloRepository.AddCardAsync(this.Card.List.ListId, card); } else { Card.Name = card.Name; await TrelloRepository.UpdateCardAsync(Card); } Navigation.PopAsync(); }
private async Task TestModels() { List <TrelloBoard> list = new List <TrelloBoard>(); list = await TrelloRepository.GetTrelloBoards(); foreach (TrelloBoard item in list) { Debug.WriteLine(item.Name); List <TrelloList> l = new List <TrelloList>(); l = await TrelloRepository.GetTrelloListsAsync(item.BoardId); foreach (TrelloList tl in l) { TrelloCard card = new TrelloCard() { Name = "Testerdetesterdetest" }; await TrelloRepository.AddCardAsync(tl.ListId, card); Debug.WriteLine($"Listname: {tl.Name}"); List <TrelloCard> ltc = new List <TrelloCard>(); ltc = await TrelloRepository.GetTrelloCardsAsync(tl.ListId); foreach (TrelloCard c in ltc) { Debug.WriteLine($"Cardname: {c.Name}"); } } } TrelloBoard b = list.Where(x => x.IsFavorite == true).ToList <TrelloBoard>().First(); if (b != null) { Debug.WriteLine(b.Name); } }