private void Buscar_Click(object sender, RoutedEventArgs e)
 {
     if (!MetodosGestion.IsOpen(a))
     {
         a = new EditaArticulos(-1);
         RefreshListEvent += new RefreshList(Filtrar);
         a.Title           = "Buscar Artículo";
         a.Owner           = Application.Current.MainWindow;
         a.FiltrarLista    = RefreshListEvent;
         a.Show();
     }
 }
 private void Anadir_Click(object sender, RoutedEventArgs e)
 {
     if (!MetodosGestion.IsOpen(a))
     {
         a = new EditaArticulos(0);
         RefreshListEvent += new RefreshList(Actualizar);
         a.Title           = "Añadir Artículo";
         a.Owner           = Application.Current.MainWindow;
         a.ActualizarLista = RefreshListEvent;
         a.Show();
     }
 }
        private void Editar_Click(object sender, RoutedEventArgs e)
        {
            if (!MetodosGestion.IsOpen(a))
            {
                if (articulosDataGrid.SelectedItem != null)
                {
                    DataRowView dd = (DataRowView)articulosDataGrid.SelectedItem;
                    int         id = dd.Row.Field <int>("Id_Articulo");

                    a = new EditaArticulos(id);
                    RefreshListEvent += new RefreshList(Actualizar);
                    a.Title           = "Editar Artículo";
                    a.Owner           = System.Windows.Application.Current.MainWindow;
                    a.ActualizarLista = RefreshListEvent;
                    a.Show();
                }
            }
        }