Example #1
0
        public virtual ReportDocument CreateReport()
        {
            CrystalReportPagaCae rpt = new CrystalReportPagaCae();

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual ReportDocument CreateReport()
 {
     CrystalReportPagaCae rpt = new CrystalReportPagaCae();
     rpt.Site = this.Site;
     return rpt;
 }
Example #3
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Introducir aqu� el c�digo de usuario para inicializar la p�gina

            string sql;
            string post_ncorr;
            string paga_ncorr;
            string imprimirFinanza;
            string paga_ncorr_d;
            string repa_ncorr;
            int fila = 0;
            string tipo_pagare;

            post_ncorr = Request.QueryString["post_ncorr"];
            imprimirFinanza= Request.QueryString["imprimir"];
            repa_ncorr= Request.QueryString["repa_ncorr"];
            tipo_pagare = Request.QueryString["tipo_pagare"];

            //Response.Write(imprimirFinanza);
            //Response.Write("HOLAAAAA");
            //Response.Flush();
            if (imprimirFinanza=="S")
            {

                // para las repactaciones
                if(repa_ncorr !="")
                {

                    //sql = EscribirPagareRepactacion(repa_ncorr,post_ncorr);

                    if (tipo_pagare=="U")
                    {
                        sql = EscribirPagareRepactacionUpa(repa_ncorr,post_ncorr);
                    }
                    else if (tipo_pagare=="C" )
                    {
                        sql = EscribirCodigorepactacionPagaCae(repa_ncorr,post_ncorr);
                    }
                    else if (tipo_pagare=="B1" || tipo_pagare=="B2")
                    {
                        sql = EscribirCodigorepactacionPagabeca(repa_ncorr,post_ncorr);
                    }
                    else if(tipo_pagare=="M")
                    {
                        sql = EscribirPagareRepactacionMultidebito(repa_ncorr,post_ncorr);
                    }
                    else
                    {
                        sql = EscribirPagareRepactacion(repa_ncorr,post_ncorr);
                    }

                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);
                    fila++;
                }
                else
                {
                    for (int i = 0; i < Request.Form.Count; i++)
                    {
                        paga_ncorr_d="letras[" + fila + "][paga_ncorr]";
                        //Response.Write(paga_ncorr_d+ "<br>");

                        if (Request.Form[i] != "")
                        {
                            paga_ncorr=Request.Form[i];

                            sql = EscribirPagareFinanza(paga_ncorr);
                            oleDbDataAdapter1.SelectCommand.CommandText = sql;
                            oleDbDataAdapter1.Fill(datosPagare1);
                            fila++;

                        }

                    }
                }
            }
            else
                {
                if (tipo_pagare=="U")// Pagare Upa
                {
                    sql = EscribirCodigoPagaUpa(post_ncorr);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);

                }
                else if (tipo_pagare=="C")// Pagare Cae
                {
                    sql = EscribirCodigoPagaCae(post_ncorr,173);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);

                }
                else if (tipo_pagare=="B1")// Pagare BECA 1
                {
                    sql = EscribirCodigoPagaCae(post_ncorr,174);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);

                }
                else if (tipo_pagare=="B2")// Pagare BECA 2
                {
                    sql = EscribirCodigoPagaCae(post_ncorr,175);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);

                }
                else if(tipo_pagare=="M")// Pagare de Multidebito
                {
                    sql = EscribirCodigoMultidebito(post_ncorr);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);
                }
                else if(tipo_pagare=="CU" || tipo_pagare=="CM" || tipo_pagare=="CT") // Pagare de cursos (todos, upa, multidebito y transbank)
                {
                    sql = EscribirPagareRepactacionCurso(repa_ncorr);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);
                }
                else
                {
                    sql = EscribirCodigo(post_ncorr);
                    oleDbDataAdapter1.SelectCommand.CommandText = sql;
                    oleDbDataAdapter1.Fill(datosPagare1);
                }

            }

            CrystalReportPagare reporte = new CrystalReportPagare();
            CrystalReportMultidebito reporteMulti = new CrystalReportMultidebito();
            CrystalReportPagaUpa2 reporteUpa = new CrystalReportPagaUpa2();
            CrystalReportPagaCae reporteCae = new CrystalReportPagaCae();
            CrystalReportPagaBeca reporteBeca = new CrystalReportPagaBeca();

            if(tipo_pagare=="U" || tipo_pagare=="CU")
            {
                reporteUpa.SetDataSource(datosPagare1);
                VerPagare.ReportSource = reporteUpa;
                ExportarPDF(reporteUpa);
            }
            else if(tipo_pagare=="C")
            {
                reporteCae.SetDataSource(datosPagare1);
                VerPagare.ReportSource = reporteCae;
                ExportarPDF(reporteCae);
            }
            else if(tipo_pagare=="B1" || tipo_pagare=="B2")
            {
                reporteBeca.SetDataSource(datosPagare1);
                VerPagare.ReportSource = reporteBeca;
                ExportarPDF(reporteBeca);
            }
            else if(tipo_pagare=="M" || tipo_pagare=="CM")
            {
                reporteMulti.SetDataSource(datosPagare1);
                VerPagare.ReportSource = reporteMulti;
                ExportarPDF(reporteMulti);
            }
            else
            {
                reporte.SetDataSource(datosPagare1);
                VerPagare.ReportSource = reporte;
                ExportarPDF(reporte);
            }
        }