private void Anadir_Click(object sender, RoutedEventArgs e)
 {
     if (!MetodosGestion.IsOpen(p))
     {
         p = new ClientesEdicion(0);
         RefreshListEvent += new RefreshList(Actualizar);
         p.Title           = "Añadir Cliente";
         p.Owner           = System.Windows.Application.Current.MainWindow;
         p.ActualizarLista = RefreshListEvent;
         p.Show();
     }
 }
 private void Buscar_Click(object sender, RoutedEventArgs e)
 {
     if (!MetodosGestion.IsOpen(p))
     {
         FilterListEvent += new FilterList(Filtrar);
         p              = new ClientesEdicion(-1);
         p.Title        = "Buscar Cliente";
         p.Owner        = Application.Current.MainWindow;
         p.FiltrarLista = FilterListEvent;
         p.Show();
     }
     else
     {
         Filtrar();
     }
 }
        private void Editar_Click(object sender, RoutedEventArgs e)
        {
            if (!MetodosGestion.IsOpen(p))
            {
                if (dataGridClientes.SelectedItem != null)
                {
                    DataRowView dd = (DataRowView)dataGridClientes.SelectedItem;
                    int         id = dd.Row.Field <int>("Id_Cliente");


                    p = new ClientesEdicion(id);
                    RefreshListEvent += new RefreshList(Actualizar);
                    p.Title           = "Editar Cliente";
                    p.Owner           = Application.Current.MainWindow;
                    p.ActualizarLista = RefreshListEvent;
                    p.Show();
                }
            }
        }