private void mostrarRFC() { WinControl_ELR_NET.ELRFormPreviewRDLC frm = new WinControl_ELR_NET.ELRFormPreviewRDLC(); string pathReporte = ""; DateTime fecha = DateTime.Now.Date; try { pathReporte = objUtil.GetPathReportRDLC("RptDGII607_RFC"); frm.pathReporte = pathReporte; frm.DTData = DTRFC; frm.DTOficina = DTOficina; frm.oficinaId = oficinaID; frm.empresaId = empresaID; frm.nombreUsuario = nombreUsuario; frm.titulo = "607 - RESUMEN FACTURA DE CONSUMO, FECHAS: ["; frm.titulo += objUtil.GetDateAsString(dtpFecha1.Value) + " - "; frm.titulo += objUtil.GetDateAsString(dtpFecha2.Value) + "]"; frm.ShowDialog(); } catch (Exception) { throw; } finally { frm.Dispose(); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { string valorUnico = "0"; string valorId = "0"; string pathReporte = ""; DataRow fila0 = null; double monto = 0; DataTable DTDetalle = null, DTData = null; WinControl_ELR_NET.ELRFormPreviewRDLC frm = new WinControl_ELR_NET.ELRFormPreviewRDLC(); try { if (MyData == null) { return; } if (MyData.Rows.Count == 0) { return; } pathReporte = objUtil.GetPathReportRDLC("RptCreditoRecibo"); valorUnico = DataGridConsulta["Unico", DataGridConsulta.CurrentRow.Index].Value.ToString(); fila0 = MyData.Select("Unico = " + valorUnico)[0]; if (DataGridConsulta.Columns[e.ColumnIndex] is DataGridViewLinkColumn && e.RowIndex >= 0) { valorId = objUtil.GetAsString("Recibo_Id", fila0, "0"); monto = objUtil.GetAsDouble("Monto", fila0); montoLetras = Numalet.ToCardinal(monto); DTData = objDB.GetById("VCAJAS_RECIBOS", valorId, "Recibo_Id"); DTDetalle = objDB.GetById("TPRESTAMOS_DETALLE_COBRADO", valorId, "Recibo_Id"); frm.pathReporte = pathReporte; frm.DTOficina = DTOficina; frm.nombreUsuario = nombreUsuario; frm.titulo = "RECIBO NO.: " + valorId.PadLeft(7, '0'); frm.AddDS("DSData", DTData); frm.AddDS("DSDetalle", DTDetalle); frm.AddParm("MONTO_LETRAS", montoLetras.ToUpper()); frm.ShowDialog(); } } catch (Exception ex) { objUtil.MostrarMensajeError(ex.Message); } finally { frm.Dispose(); DTData = null; DTDetalle = null; } }
public override void Imprimir() { //base.Imprimir(); string valorId = "0"; DataTable DTReportes = null; string pathReporte = ""; WinControl_ELR_NET.ELRFormPreviewRDLC frm = new WinControl_ELR_NET.ELRFormPreviewRDLC(); DataRow fila0 = null; bool esAnexo = false; string nombreReporte = "", titulo = ""; int oficinaId = 0; try { if (DataGridConsulta.RowCount > 0) { valorId = DataGridConsulta["Registro_Id", DataGridConsulta.CurrentRow.Index].Value.ToString(); fila0 = MyData.Select("Registro_Id = " + valorId)[0]; esAnexo = objUtil.GetAsBoolean("EsAnexo", fila0); titulo = objUtil.GetAsString("Titulo", fila0) + " " + objUtil.GetAsString("Nombre_Mes", fila0) + " " + objUtil.GetAsString("Anio", fila0); oficinaId = objUtil.GetAsInt("Oficina_Id", fila0); esAnexo = false; if (esAnexo) { nombreReporte = "RptContaEstadosAnexos"; } else { nombreReporte = "RptContaEstadosFinancieros"; } objDB.LimpiarFiltros(); objDB.AddFiltroIgualA("Registro_Id", valorId); objDB.AddFiltroOrderBY("Unico"); DTReportes = objDB.GetAll("VCONTA_ESTADOS_GENERADOS_DETALLES", -1, objDB.Filtros); pathReporte = objUtil.GetPathReportRDLC(nombreReporte); frm.pathReporte = pathReporte; frm.DTData = DTReportes; frm.oficinaId = oficinaId; frm.empresaId = empresaID; frm.nombreUsuario = nombreUsuario; frm.titulo = titulo; frm.ShowDialog(); } } catch (Exception ex) { objUtil.MostrarMensajeError(ex.Message); } }