private void btnReporte2_Click(object sender, EventArgs e) { try { if (cmbTipo.Text == "INGRESO") { clsReporteCaja dso = new clsReporteCaja(); CRRecibodeEgresosCajaChica rpt = new CRRecibodeEgresosCajaChica(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboCajaChica(1, codrecibo)); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } else if (cmbTipo.Text == "EGRESO") { clsReporteCaja dso = new clsReporteCaja(); CRReciboEgresosMovilidadAgazajosFestividades rpt = new CRReciboEgresosMovilidadAgazajosFestividades(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboCajaChica(2, codrecibo)); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } /*Int32 tip = Convert.ToInt32(cmbTipo.SelectedValue); * * * if (tip == 1) * { * clsReporteCaja dso = new clsReporteCaja(); * CRRecibodeEgresosCajaChica rpt = new CRRecibodeEgresosCajaChica(); * frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); * rpt.SetDataSource(dso.ReciboCajaChica(tip, codrecibo)); * frm.crvReciboCajaChica.ReportSource = rpt; * frm.Show(); * * } * else if (tip == 2) * { * clsReporteCaja dso = new clsReporteCaja(); * CRReciboEgresosMovilidadAgazajosFestividades rpt = new CRReciboEgresosMovilidadAgazajosFestividades(); * frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); * rpt.SetDataSource(dso.ReciboCajaChica(tip, codrecibo)); * frm.crvReciboCajaChica.ReportSource = rpt; * frm.Show(); * } * else if (tip == 3) * { * clsReporteCaja dso = new clsReporteCaja(); * CRReciboEgresosMovilidsdCajaChica rpt = new CRReciboEgresosMovilidsdCajaChica(); * frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); * rpt.SetDataSource(dso.ReciboCajaChica(tip, codrecibo)); * frm.crvReciboCajaChica.ReportSource = rpt; * frm.Show(); * } * else if (tip == 4) * { * clsReporteCaja dso = new clsReporteCaja(); * CRReciboEgresosPorTercerosCajaChica rpt = new CRReciboEgresosPorTercerosCajaChica(); * frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); * rpt.SetDataSource(dso.ReciboCajaChica(tip, codrecibo)); * frm.crvReciboCajaChica.ReportSource = rpt; * frm.Show(); * } * else if (tip == 6) * { * clsReporteCaja dso = new clsReporteCaja(); * CRRecibodeIngresosCajaChica rpt = new CRRecibodeIngresosCajaChica(); * frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); * rpt.SetDataSource(dso.ReciboCajaChica(tip, codrecibo)); * frm.crvReciboCajaChica.ReportSource = rpt; * frm.Show(); * }*/ } catch (Exception ex) { MessageBox.Show("Se presento el siguiente error" + ex.ToString(), "Cierre", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnReporte2_Click(object sender, EventArgs e) { try { Int32 tip = Convert.ToInt32(cmbtipopagoser.SelectedValue); if (tip == 1) { clsReporteCaja dso = new clsReporteCaja(); CRRecibodeEgresos rpt = new CRRecibodeEgresos(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, CodMovimiento)); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } else if (tip == 2) { clsReporteCaja dso = new clsReporteCaja(); CRReciboEgresosMovilidadAgazajosFestividades rpt = new CRReciboEgresosMovilidadAgazajosFestividades(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, CodMovimiento)); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } else if (tip == 3) { clsReporteCaja dso = new clsReporteCaja(); CRReciboEgresosMovilidsd rpt = new CRReciboEgresosMovilidsd(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, CodMovimiento)); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } else if (tip == 4) { clsReporteCaja dso = new clsReporteCaja(); CRReciboEgresosPorTerceros rpt = new CRReciboEgresosPorTerceros(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, CodMovimiento)); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } else if (tip == 5) { clsReporteCaja dso = new clsReporteCaja(); CRReciboEgresoDietasyEstimulos rpt = new CRReciboEgresoDietasyEstimulos(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, CodMovimiento)); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } else if (tip == 6) { //clsReporteCaja dso = new clsReporteCaja(); //CRRecibodeIngresosSecretariadeBienestar rpt = new CRRecibodeIngresosSecretariadeBienestar(); //frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); //rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, cod).Tables[0]); //frm.crvReciboCajaChica.ReportSource = rpt; //frm.Show(); } else if (tip == 7) { //clsReporteCaja dso = new clsReporteCaja(); //CRRecibodeIngresos rpt = new CRRecibodeIngresos(); //frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); //rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, cod).Tables[0]); //frm.crvReciboCajaChica.ReportSource = rpt; //frm.Show(); } else if (tip == 8) { //clsReporteCaja dso = new clsReporteCaja(); //CRRecibodeIngresosChequeUgel rpt = new CRRecibodeIngresosChequeUgel(); //frmReporteChequeUgelRPT frm = new frmReporteChequeUgelRPT(); //rpt.SetDataSource(dso.ReciboChequeUgel(tip, cod).Tables[0]); //frm.crvChequeUgelRPT.ReportSource = rpt; //frm.Show(); } else if (tip == 9) { //clsReporteCaja dso = new clsReporteCaja(); //CRReciboIngresoMortuorio rpt = new CRReciboIngresoMortuorio(); //frmPendientesMortuorioRP frm = new frmPendientesMortuorioRP(); //rpt.SetDataSource(dso.PendientesFondoMortuorio(tip, cod).Tables[0]); //frm.crvPendientesMortuorioRPT.ReportSource = rpt; //frm.Show(); } else if (tip == 10) { //clsReporteCaja dso = new clsReporteCaja(); //CRReciboEgresoMortuorio rpt = new CRReciboEgresoMortuorio(); //frmRecibodeEgresosMortuorioRP frm = new frmRecibodeEgresosMortuorioRP(); //rpt.SetDataSource(dso.PendientesFondoMortuorio(tip, cod).Tables[0]); //frm.crvEgresosMortuorio.ReportSource = rpt; //frm.Show(); } else if (tip == 11) { clsReporteCaja dso = new clsReporteCaja(); CRRecibodeIngresos rpt = new CRRecibodeIngresos(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, CodMovimiento).Tables[0]); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } else if (tip == 12) { clsReporteCaja dso = new clsReporteCaja(); CRRecibodeIngresos rpt = new CRRecibodeIngresos(); frmReporteReciboCajaChicaRPT frm = new frmReporteReciboCajaChicaRPT(); rpt.SetDataSource(dso.ReciboDietasyEstimulo(tip, CodMovimiento).Tables[0]); frm.crvReciboCajaChica.ReportSource = rpt; frm.Show(); } } catch (Exception ex) { MessageBox.Show("Se presento el siguiente error" + ex.ToString(), "Cierre", MessageBoxButtons.OK, MessageBoxIcon.Error); } }