private void Button_Click_Fav(object sender, RoutedEventArgs e) { var favScreen = new FavoriteFood(); favScreen.Show(); this.Close(); }
private void Button_Click_RemoveFav(object sender, RoutedEventArgs e) { var id = ((Button)sender).Tag; bool result = FoodDAO.updateIsFavorite(id.ToString(), false); if (!result) { MessageBox.Show("Lỗi id không đúng", "Thông báo"); } MessageBox.Show("Đã xóa khỏi danh sách yêu thích", "Thông báo"); var updatedScreen = new FavoriteFood(); updatedScreen.Show(); this.Close(); }