Ejemplo n.º 1
0
        private void CheckBox_Click(object sender, RoutedEventArgs e)
        {
            var s = sender as CheckBox;

            System.Diagnostics.Debug.WriteLine("Checkbox => " + s.IsChecked);
            var user = s.DataContext as User;

            System.Diagnostics.Debug.WriteLine("Affichage donnée user muse => " + user.Id + " " + user.UserName);

            AddDeleteFavourites elem = new AddDeleteFavourites();

            if (s.IsChecked == true)
            {
                elem.addNouvelAbonnement(user.Id);
            }
            else
            {
                elem.deleteAbonnement(user.Id);
            }
        }
Ejemplo n.º 2
0
        private void CheckBox_Click(object sender, RoutedEventArgs e)
        {
            var s = sender as CheckBox;

            System.Diagnostics.Debug.WriteLine(s.IsChecked);

            var score = s.DataContext as Score;

            System.Diagnostics.Debug.WriteLine("Affichage donnée score my favourite => " + score.Id + " " + score.Title);

            AddDeleteFavourites elem = new AddDeleteFavourites();

            if (s.IsChecked == true)
            {
                elem.addNouveauFavourites(score.Id);
            }
            else
            {
                elem.deleteFavourites(score.Id);
            }
        }