Example #1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            var fact = new factura();

            fact.ID_CLIENTE  = int.Parse(txtCodCliente.Text);
            fact.ID_VENDEDOR = 1;

            foreach (DataGridViewRow row in DataGridViewDetalleFactura.Rows)
            {
                var detallefact = new facturadetalle();
                detallefact.PRODUCTOID = int.Parse(row.Cells["ColumnCodProducto"].Value.ToString());
                detallefact.CANTIDAD   = int.Parse(row.Cells["ColumnCantidad"].Value.ToString());
                detallefact.PRECIO     = float.Parse(row.Cells["ColumnPrecio"].Value.ToString());

                fact.FACTURADETALLE.Add(detallefact);
            }

            int          facturaid = facturaBL.Insertarfactura(fact);
            Form_Reporte factura   = new Form_Reporte(facturaid);

            factura.Show();
            Limpiar(txtCodCliente, txtCodFactura, txtCodProducto, txtNombreProducto, txtSaldoFinal, txtSaldoInicial
                    , txtPrecio, txtCantidad, txtClienteNombre, txtVendedorNombre, txtCodVendedor);
            DataGridViewDetalleFactura.Rows.Clear();
        }
Example #2
0
        private void btnBuscarFactura_Click(object sender, EventArgs e)
        {
            Form_BuscarFactura factura = new Form_BuscarFactura();

            if (factura.ShowDialog() == DialogResult.OK)
            {
                Form_Reporte reporte = new Form_Reporte(factura.FacturaID);
                reporte.Show();
            }
        }
Example #3
0
        private void reporteToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form_Reporte form_Reporte = new Form_Reporte();

            form_Reporte.Show();
        }