public async void PickUpUnChecked(int cardId) { if (AuthorizedEmployee.Id == 1) { this.UpdateCard = AllCards.Find(al => cardId == al.Id); this.UpdateCard.PickUp = false; Card card = await UpdateCard.PutCardAsync(this.UpdateCard); } }
public async void PickUpCheck(int cardId) { if (AuthorizedEmployee.Id == 1) { this.UpdateCard = AllCards.Find(al => cardId == al.Id); this.UpdateCard.PickUp = true; Card card = await UpdateCard.PutCardAsync(this.UpdateCard); //this.AllCards = await UpdateCard.GetCardsAsync(); } }
public async void FavoriteUnChecked(int cardId) { this.UpdateCard = AllCards.Find(al => cardId == al.Id); //this.UpdateCard.Favorite = false; Card card = await UpdateCard.PutCardAsync(this.UpdateCard); Favorite favorite = new Favorite(); this.Favorites = await favorite.GetFavoritesAsync(); this.DeleteFavorite = new Favorite(); this.Favorite.EmployeeId = AuthorizedEmployee.Id; this.Favorite.CardId = cardId; this.DeleteFavorite = Favorites.Find(f => Favorite.EmployeeId == f.EmployeeId && Favorite.CardId == f.CardId); Favorite deletefavorite = await Favorite.DeleteFavoriteAsync(DeleteFavorite.Id); }