private void btnNuevo_Click_1(object sender, EventArgs e) { frmDetalleFacturaProveedor frmFactura = new frmDetalleFacturaProveedor(empleado, null); frmFactura.Show(); }
private void btnDetalle_Click_1(object sender, EventArgs e) { int row = -1; FacturaProveedor factura = null; if (dgvFacturas.CurrentRow != null) { row = dgvFacturas.CurrentRow.Index; if (dgvFacturas.CurrentRow.Cells["Nro"].Value != null) { if ((row >= 0) && ((row - 1) <= facturas.Count)) { factura = facturas[row]; frmDetalleFacturaProveedor frmFactura = new frmDetalleFacturaProveedor(empleado, factura); frmFactura.Show(); } } } if (factura == null) { Utils.Utils.Error(null, "Debe seleccionar una factura"); } }