private void Favorite_Handler(bool isFavorite) { Recipe recipe = (FavoriteListView.SelectedItem as Recipe); recipe.Favorite = isFavorite; RecipeDAO.UpdateListRecipes(recipe); showFavoriteList(); }
private void Favorite_Handler(bool isFavorite) { Recipe recipe = (DataListview.SelectedItem as Recipe); if (recipe.Favorite != isFavorite) { recipe.Favorite = isFavorite; RecipeDAO.UpdateListRecipes(recipe); } //MessageBox.Show(recipe.Name, (isFavorite) ? "true" : "false"); }