private void Ventas_Load_1(object sender, EventArgs e)
        {
            DataTable t1 = productos.SQL(String.Format("SELECT idProducto, nombre, categoria, marca, año, proveedor FROM taller.producto"));

            dataGridView2.DataSource = null;
            dataGridView2.DataSource = t1;
            dataGridView2.Refresh();

            DataTable t2 = ventas.SQL(String.Format("SELECT ev.numeroFactura, ev.fecha, ev.cliente, dv.idDetalle, " +
                                                    "dv.producto, dv.cantidad, dv.precio, dv.impuesto, dv.subTotal, dv.total FROM taller.encabezadoventa As ev " +
                                                    "INNER JOIN taller.detalleventa AS dv ON ev.numeroFactura = dv.encabezado where ev.numeroFactura = {0}", venta.Encabezado));

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = t2;
            dataGridView1.Refresh();

            cargar_Venta_Actual();

            dtpFechaVenta.Enabled = false;
            dtpFechaVenta.Enabled = false;
            DataGridLectura();


            //txtNumeroFactura.Text = venta.NumeroFactura.ToString();
        }
Beispiel #2
0
        private void Inventario_Load(object sender, EventArgs e)
        {
            DataTable t1 = productos.SQL(String.Format("Select * FROM taller.producto"));

            dataGridView2.DataSource = null;
            dataGridView2.DataSource = t1;
            dataGridView2.Refresh();

            DataGridLectura();
        }
Beispiel #3
0
        private void Producto_Load(object sender, EventArgs e)
        {
            DataTable t1 = productos.SQL(String.Format("SELECT idProducto, nombre, categoria, marca, año, proveedor, existencia," +
                                                       "precioCompra,precioVenta FROM taller.producto"));

            dataGridView2.DataSource = null;
            dataGridView2.DataSource = t1;
            dataGridView2.Refresh();

            DatosCombos();
            DataGridLectura();
        }
Beispiel #4
0
        private void Compras_Load(object sender, EventArgs e)
        {
            DataTable t1 = productos.SQL(String.Format("SELECT idProducto, nombre, categoria, marca, año, proveedor, existencia," +
                                                       "precioCompra,precioVenta FROM taller.producto"));

            dataGridView2.DataSource = null;
            dataGridView2.DataSource = t1;
            dataGridView2.Refresh();

            DataTable t2 = compras.SQL(String.Format("SELECT e.numeroFactura, e.proveedor, e.fecha, e.facturaProveedor, d.idDetalleCompra," +
                                                     " d.producto, d.cantidad, d.precio, d.impuesto,d.subTotal, d.total FROM taller.encabezadocompra " +
                                                     "As e INNER JOIN taller.detallecompra AS d ON e.numeroFactura = d.encabezadoCompra"));

            //DataTable t2 = compras.SQL(String.Format("SELECT * FROM taller.vistacompraproducto;"));
            dataGridView1.DataSource = null;
            dataGridView1.DataSource = t2;
            dataGridView1.Refresh();

            Datos_DataGrid();
            txtEncabezado.Enabled = false;
            DataGridLectura();
        }