public override void Limpiar() { if (dataGridView.Rows.Count == 0) { return; } object dataSet = dataGridView.DataSource; FormReporteFactura ReporteFactura = new FormReporteFactura(); ReporteFactura.Show(); }
private void BtnComprobante_Click(object sender, EventArgs e) { FormReporteFactura reporte = new FormReporteFactura(); if (dgvVentas.SelectedRows.Count > 0) { reporte.IdVenta = Convert.ToInt32(dgvVentas.CurrentRow.Cells[0].Value.ToString()); reporte.ShowDialog(); } else { MessageBox.Show("Seleccione una fila", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public void generarFactura(string numeroFactura) { if (!validateDataGridView()) { activarCliente(); activarProducto(); string storeProceduraConsultarVentas = string.Format("EXEC consultarVentas {0}", numeroFactura); DS = Execution.Ejecutar(storeProceduraConsultarVentas); FormReporteFactura ReporteFactura = new FormReporteFactura(); ReporteFactura.reportViewer1.LocalReport.DataSources[0].Value = DS.Tables[0]; ReporteFactura.ShowDialog(); nuevoProcesos(); } }