예제 #1
0
 private void BtnCompararFinalizarCompra_Click(object sender, RoutedEventArgs e)
 {
     if (!MetodosGestion.IsOpen(cc))
     {
         cc = new Compras_Carrito();
         RefreshListEvent += new RefreshList(guardarCompra);
         cc.Comprar        = RefreshListEvent;
         cc.Show();
     }
 }
예제 #2
0
 private void AnadirInv_Click(object sender, RoutedEventArgs e)
 {
     if (!MetodosGestion.IsOpen(ai))
     {
         ai = new AddInventario();
         RefreshListEvent  += new RefreshList(RellenarTabla);
         ai.Owner           = System.Windows.Application.Current.MainWindow;
         ai.ActualizarLista = RefreshListEvent;
         ai.Show();
     }
 }
예제 #3
0
 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();
     }
 }
예제 #4
0
 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();
     }
 }
예제 #5
0
 private void bAddClientes_Click(object sender, RoutedEventArgs e)
 {
     if (!MetodosGestion.IsOpen(c))
     {
         c       = new ClientesEdicion(0);
         c.Title = "Añadir Cliente";
         c.Owner = System.Windows.Application.Current.MainWindow;
         c.Show();
     }
     nombreCombo();
     cbCliente.Items.Refresh();
 }
예제 #6
0
 private void Buscar_Click(object sender, RoutedEventArgs e)
 {
     if (!MetodosGestion.IsOpen(p))
     {
         p = new VentasEdicion(-1);
         FilterListEvent += new FilterList(Filtrar);
         p.FiltrarLista   = FilterListEvent;
         p.Title          = "Buscar Ventas";
         p.Owner          = Application.Current.MainWindow;
         p.Show();
     }
 }
예제 #7
0
        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();
                }
            }
        }
예제 #8
0
        private void FacturaV_Click(object sender, RoutedEventArgs e)
        {
            if (!MetodosGestion.IsOpen(f))
            {
                if (dgVista.SelectedItem != null)
                {
                    DataRowView dato    = (DataRowView)dgVista.SelectedItem;
                    int         idVenta = dato.Row.Field <int>("Id_Ventas");

                    f = new Factura(idVenta, 1);
                    f.Show();
                }
            }
            else
            {
                Mensajes.Mostrar("Ya hay una factura abierta", Mensajes.Tipo.Info);
            }
        }