private void MiCategorieElimina_Click(object sender, RoutedEventArgs e)
        {
            if (lbxCategorie.SelectedIndex == -1)
            {
                return;
            }

            Categoria c = (Categoria)lbxCategorie.SelectedItem;

            MessageBoxResult res = MessageBox.Show("Eliminare la categoria " + c.Nome + "?", "", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (res == MessageBoxResult.Yes)
            {
                categoriaService.Delete(c.IdCategoria.Value);
                LoadCategorie(categoriaService.GetAll());
                //LoadLinks();
            }
        }
Exemple #2
0
 public void Delete(int id)
 {
     _service.Delete(id);
 }