Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["Msjpop"] != null)
            {
                lblmensaje.Text = Request.QueryString["Msjpop"].ToString();
                MPEEAdicionales.Show();
            }


            cRefere.setCargarResultMulti19(this);

            if (clsSesiones.getParametrosAirBargain() != null)
            {
                if (clsSesiones.getParametrosAirBargain().ETipoTrayecto != null)
                {
                    paramertros  = "Externo=1&";
                    paramertros += "modal_vuelos=2&";
                    paramertros += "TB=Buscar vuelos&";
                    paramertros += "ETIPOSALIDA=" + clsSesiones.getParametrosAirBargain().ETipoSalida + "&";



                    paramertros += "txt_Multi_O1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].Vo_AeropuertoOrigen.SCodigo + " " + "&";
                    paramertros += "txt_Multi_D1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].Vo_AeropuertoDestino.SCodigo + " " + "&";
                    paramertros += "txtFechaMultiO1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].SFechaSalida + "&";

                    if (clsSesiones.getParametrosAirBargain().Lvo_Rutas.Count > 1)
                    {
                        paramertros += "txt_Multi_O2=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[1].Vo_AeropuertoOrigen.SCodigo + " " + "&";
                        paramertros += "txt_Multi_D2=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[1].Vo_AeropuertoDestino.SCodigo + " " + "&";
                        paramertros += "txtFechaMultiO2=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[1].SFechaSalida + "&";
                    }

                    if (clsSesiones.getParametrosAirBargain().Lvo_Rutas.Count > 2)
                    {
                        paramertros += "txt_Multi_O3=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[2].Vo_AeropuertoOrigen.SCodigo + " " + "&";
                        paramertros += "txt_Multi_D3=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[2].Vo_AeropuertoDestino.SCodigo + " " + "&";
                        paramertros += "txtFechaMultiO3=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[2].SFechaSalida + "&";
                    }

                    if (clsSesiones.getParametrosAirBargain().Lvo_Rutas.Count > 3)
                    {
                        paramertros += "txt_Multi_O4=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[3].Vo_AeropuertoOrigen.SCodigo + " " + "&";
                        paramertros += "txt_Multi_D4=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[3].Vo_AeropuertoDestino.SCodigo + " " + "&";
                        paramertros += "txtFechaMultiO4=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[3].SFechaSalida + "&";
                    }

                    if (clsSesiones.getParametrosAirBargain().Lvo_Rutas.Count > 4)
                    {
                        paramertros += "txt_Multi_O5=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[4].Vo_AeropuertoOrigen.SCodigo + " " + "&";
                        paramertros += "txt_Multi_D5=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[4].Vo_AeropuertoDestino.SCodigo + " " + "&";
                        paramertros += "txtFechaMultiO5=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[4].SFechaSalida + "&";
                    }

                    if (clsSesiones.getParametrosAirBargain().Lvo_Rutas.Count > 5)
                    {
                        paramertros += "txt_Multi_O6=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[5].Vo_AeropuertoOrigen.SCodigo + " " + "&";
                        paramertros += "txt_Multi_D6=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[5].Vo_AeropuertoDestino.SCodigo + " " + "&";
                        paramertros += "txtFechaMultiO5=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[5].SFechaSalida + "&";
                    }

                    paramertros += Pasajeros();
                }
            }

            if (rptItinerario != null)
            {
                if (rptItinerario.Items.Count > 0)
                {
                    for (int i = 0; i < rptItinerario.Items.Count; i++)
                    {
                        double   dblValores        = 0;
                        Label    lblValorSinImp    = (Label)rptItinerario.Items[i].FindControl("lblValorSinImp");
                        Repeater RptTiposPasajeros = (Repeater)rptItinerario.Items[i].FindControl("RptTiposPasajeros");
                        if (RptTiposPasajeros != null)
                        {
                            if (RptTiposPasajeros.Items.Count > 0)
                            {
                                for (int b = 0; b < RptTiposPasajeros.Items.Count; b++)
                                {
                                    Label lblvalores = (Label)RptTiposPasajeros.Items[b].FindControl("lblValorSinImp");
                                    if (lblvalores != null)
                                    {
                                        if (lblvalores.Text != "")
                                        {
                                            dblValores += Convert.ToDouble(lblvalores.Text);
                                        }
                                    }
                                }
                            }
                        }
                        if (lblValorSinImp != null)
                        {
                            lblValorSinImp.Text = dblValores.ToString("###,###.##");
                        }
                    }
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (clsSesiones.getParametrosAirBargain() != null)
            {
                Etipo = clsSesiones.getParametrosAirBargain().ETipoTrayecto;
                if (Request.QueryString["Msjpop"] != null)
                {
                    lblmensaje.Text = Request.QueryString["Msjpop"].ToString();
                    MPEEAdicionales.Show();
                }
                Stopwatch stopWatch = new Stopwatch();
                TimeSpan  ts;
                stopWatch.Start();
                //Vraible de ssion para el filrtro se incializa
                Session["$DsFilter"] = null;
                Session["$DsAir"]    = null;
                cRefere.setCargarResult(this);

                loadGranFilter();
                loadFilter();
                stopWatch.Stop();
                ts = stopWatch.Elapsed;
                this.lblTime.Text = "Sec" + ts.Seconds.ToString();

                if (rptItinerarioBFM.Items.Count > 0)
                {
                    for (int i = 0; i < rptItinerarioBFM.Items.Count; i++)
                    {
                        double dblValores     = 0;
                        Label  lblValorSinImp = (Label)rptItinerarioBFM.Items[i].FindControl("lblValorSinImp");
                        Label  lblSequence    = (Label)rptItinerarioBFM.Items[i].FindControl("lblSequence");
                        if (lblSequence != null)
                        {
                            lblSequence.Text = (i + 1).ToString();
                        }

                        Repeater RptTiposPasajeros = (Repeater)rptItinerarioBFM.Items[i].FindControl("RptTiposPasajeros");
                        if (RptTiposPasajeros != null)
                        {
                            if (RptTiposPasajeros.Items.Count > 0)
                            {
                                for (int b = 0; b < RptTiposPasajeros.Items.Count; b++)
                                {
                                    Label lblvalores = (Label)RptTiposPasajeros.Items[b].FindControl("lblValorSinImp");
                                    if (lblvalores != null)
                                    {
                                        if (lblvalores.Text != "")
                                        {
                                            dblValores += Convert.ToDouble(lblvalores.Text);
                                        }
                                    }
                                }
                            }
                        }
                        if (lblValorSinImp != null)
                        {
                            lblValorSinImp.Text = dblValores.ToString("###,###.##");
                        }
                    }
                }

                string paramertros = string.Empty;



                if (clsSesiones.getParametrosAirBargain() != null)
                {
                    string strDir = clsValidaciones.GetKeyOrAdd("urlpagtopflight", "162.248.52.117");
                    paramertros = strDir;
                    if (clsSesiones.getParametrosAirBargain().ETipoTrayecto != null)
                    {
                        if (clsSesiones.getParametrosAirBargain().ETipoTrayecto.ToString().Trim().ToUpper().Equals("IDA"))
                        {
                            paramertros += "?Externo=1&";
                            paramertros += "modal_vuelos=1&";
                            paramertros += "TB=Buscar vuelos&";
                            paramertros += "ETIPOSALIDA=" + clsSesiones.getParametrosAirBargain().ETipoSalida + "&";
                            paramertros += "txtFechaMultiO1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].SFechaSalida + "&";
                            paramertros += "txt_Multi_O1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].Vo_AeropuertoOrigen.SCodigo + " " + "&";
                            paramertros += "txt_Multi_D1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].Vo_AeropuertoDestino.SCodigo + " " + "&";
                            paramertros += Pasajeros();
                        }
                        else if (clsSesiones.getParametrosAirBargain().ETipoTrayecto.ToString().Trim().ToUpper().Equals("IDAREGRESO"))
                        {
                            paramertros += "?Externo=1&";
                            paramertros += "modal_vuelos=0&";
                            paramertros += "TB=Buscar vuelos&";
                            paramertros += "ETIPOSALIDA=" + clsSesiones.getParametrosAirBargain().ETipoSalida + "&";
                            paramertros += "txtFechaMultiO1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].SFechaSalida + "&";
                            paramertros += "txt2VFechaMulti=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[1].SFechaSalida + "&";
                            paramertros += "txt_Multi_O1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].Vo_AeropuertoOrigen.SCodigo + " " + "&";
                            paramertros += "txt_Multi_D1=" + clsSesiones.getParametrosAirBargain().Lvo_Rutas[0].Vo_AeropuertoDestino.SCodigo + " " + "&";
                            paramertros += Pasajeros();
                        }
                    }
                }


                lbltopflight.Text = paramertros;
            }
        }
    }