Beispiel #1
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 pers_ncorr;
            string cdoc_ncorr;
            string indefinido;

            pers_ncorr = Request.QueryString["pers_ncorr"];           //"23874";
            cdoc_ncorr = Request.QueryString["cdoc_ncorr"];           //"3334";
            indefinido = Request.QueryString["indefinido"];

            oleDbDataAdapter1.SelectCommand.CommandTimeout = 450;
            //pers_ncorr = "22262";
            //cdoc_ncorr = "741";
            //indefinido="SI";

            //string[] informe = new string[4] {"ORIGINAL","DUPLICADO","TRIPLICADO","CUADRIPLICADO"};
            string[] informe = new string[2] {
                "ORIGINAL", "DUPLICADO"
            };
            //CrystalReportContrato reporte = new CrystalReportContrato();

            for (int i = 0; i < 1; i++)
            {
                sql = EscribirCodigo(pers_ncorr, cdoc_ncorr);

                oleDbDataAdapter1.SelectCommand.CommandText = sql;
                oleDbDataAdapter1.Fill(contratos1);
            }

            if (indefinido == "SI")
            {
                imprimir_anexos.ContratoIndefinido reporte2 = new imprimir_anexos.ContratoIndefinido();
                reporte2.SetDataSource(contratos1);
                VerContrato.ReportSource = reporte2;
                ExportarPDF(reporte2);
            }
            else
            {
                if (indefinido == "NO")
                {
                    imprimir_anexos.ContratoHonorario reporte1 = new imprimir_anexos.ContratoHonorario();
                    reporte1.SetDataSource(contratos1);
                    VerContrato.ReportSource = reporte1;
                    ExportarPDF(reporte1);
                }
                else
                {
                    imprimir_anexos.ContratoPlazoFijo reporte3 = new imprimir_anexos.ContratoPlazoFijo();
                    reporte3.SetDataSource(contratos1);
                    VerContrato.ReportSource = reporte3;
                    ExportarPDF(reporte3);
                }
            }
        }
Beispiel #2
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 pers_ncorr;
            string cdoc_ncorr;
            string indefinido;

            pers_ncorr =Request.QueryString["pers_ncorr"];//"23874";
            cdoc_ncorr =Request.QueryString["cdoc_ncorr"];//"3334";
            indefinido =Request.QueryString["indefinido"];

            oleDbDataAdapter1.SelectCommand.CommandTimeout=450;
            //pers_ncorr = "22262";
            //cdoc_ncorr = "741";
            //indefinido="SI";

            //string[] informe = new string[4] {"ORIGINAL","DUPLICADO","TRIPLICADO","CUADRIPLICADO"};
            string[] informe = new string[2] {"ORIGINAL","DUPLICADO"};
            //CrystalReportContrato reporte = new CrystalReportContrato();

            for (int i=0; i<1; i++)
            {
                sql = EscribirCodigo(pers_ncorr, cdoc_ncorr);

                oleDbDataAdapter1.SelectCommand.CommandText = sql;
                oleDbDataAdapter1.Fill(contratos1);

            }

              if (indefinido == "SI")
            {
              imprimir_anexos.ContratoIndefinido  reporte2 = new imprimir_anexos.ContratoIndefinido();
              reporte2.SetDataSource(contratos1);
              VerContrato.ReportSource = reporte2;
              ExportarPDF(reporte2);

            }
            else
            {
              if (indefinido == "NO")
              {
                  imprimir_anexos.ContratoHonorario reporte1 = new imprimir_anexos.ContratoHonorario();
                  reporte1.SetDataSource(contratos1);
                  VerContrato.ReportSource = reporte1;
                  ExportarPDF(reporte1);
              }
              else
              {
                  imprimir_anexos.ContratoPlazoFijo reporte3 = new imprimir_anexos.ContratoPlazoFijo();
                  reporte3.SetDataSource(contratos1);
                  VerContrato.ReportSource = reporte3;
                  ExportarPDF(reporte3);
              }
            }
        }