private void bttnReporte_Click(object sender, EventArgs e) { if (this.txtBxNombreObra.Text.Trim() != "") { this.Cursor = Cursors.WaitCursor; FrmVisualizaReporte RepObraCte = new FrmVisualizaReporte(1); Operador = this.clsListasOperadorComboBox.Text; Monto = Convert.ToDecimal(this.montoEstimadoTextBox.Text); Zona = Convert.ToInt16(this.clsListasZonaComboBox.SelectedValue); //origen de datos RepObraCte.TablaReporteObraCte = ClsReportes.ListObraCliente(Operador, Monto, Zona); Fecha = DateTime.Now.ToString("dd-MM-yyyy"); RepObraCte.Fecha = Fecha; RepObraCte.Empresa = "ANJU INMOBILIARIA"; RepObraCte.RFC = ""; RepObraCte.Domicilio = "CALLE TOLEDO # 910 ENTRE JIMENEZ Y ABASOLO, COL. JUAREZ, NAV., SON."; RepObraCte.ReporteDesc = "REPORTE DE PROSPECTOS QUE COINCIDEN CON LA VIVIENDA: " + this.txtBxNombreObra.Text.Trim() + " "; RepObraCte.Condiciones = "CON MONTO " + Operador + " AL $ " + Monto.ToString("#,##0.000") + " EN LA ZONA: " + this.clsListasZonaComboBox.Text.Trim() + " "; RepObraCte.Show(); this.Cursor = Cursors.Arrow; } else { MessageBox.Show("Debe de Seleccionar Una Vivienda Para poder ver los Prospectos que coincidan con los Parametros...", "Reporte", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }
private void btnReport_Click(object sender, EventArgs e) { int Obra = 0; //if (dTPFinal.Value < dTPInicial.Value) // { // MessageBox.Show("La fecha Final no puede ser menor a la fecha Inicial...", "MENSAJE DEL SISTEMA"); // return; //} if (this.textBox1.Text.Trim() == "") { Obra = 0; } else { Obra = Convert.ToInt32(this.textBox1.Text); } this.Cursor = Cursors.WaitCursor; FrmVisualizaReporte ReporteObra = new FrmVisualizaReporte(2); ReporteObra.TablaReporteObraArti = ClsReportes.ListObraArti(dTPInicial.Value, dTPFinal.Value, Obra); if (ReporteObra.TablaReporteObraArti.Rows.Count <= 0) { this.Cursor = Cursors.Default; MessageBox.Show("No hay informacion con los filtros seleccionados...", "MENSAJE DEL SISTEMA"); return; } string Filtro = ""; ReporteObra.Empresa = "ANJU INMOBILIARIA"; ReporteObra.RFC = ""; ReporteObra.Domicilio = "CALLE TOLEDO # 910 ENTRE JIMENEZ Y ABASOLO, COL. JUAREZ, NAV., SON."; if (this.textBox1.Text.Trim() == "") { Filtro = "TODAS"; } else { Filtro = this.textBox2.Text.Trim(); } ReporteObra.ReporteDesc = "REPORTE DE ARTICULOS POR VIVIENDA: " + Filtro.Trim() + " "; ReporteObra.Condiciones = "DE LA FECHA: " + this.dTPInicial.Value.ToShortDateString() + " A " + this.dTPFinal.Value.ToShortDateString() + " "; ReporteObra.Show(); this.Cursor = Cursors.Default; }