protected void btnSeleccionPasajeros_Click(object sender, EventArgs e)
    {
        rbltapspagos();
        Button       btnSeleccion = (Button)sender;
        RepeaterItem RpPasajeros  = (RepeaterItem)btnSeleccion.Parent;
        Repeater     RpCabina     = (Repeater)RpPasajeros.Parent;
        RepeaterItem RpiCabina    = (RepeaterItem)RpCabina.Parent;

        lbliditemseleccionado.Text = RpiCabina.ItemIndex.ToString() + "|" + RpPasajeros.ItemIndex.ToString();

        DataTable dtLista   = new csResultadoVuelos().SetBuscarUsuarios(new csCache().cCache().Contacto, new csCache().cCache().Empresa);
        int       Afiliados = Convert.ToInt32(clsValidaciones.GetKeyOrAdd("NumAfiliados", "6"));

        new csGenerales().sConsultaGeneros(ddlGeneroR, false);
        new csGenerales().sConsultaTposIdentificacion(ddlTpoDocumentoR, false);



        if (dtLista.Rows.Count >= Afiliados)
        {
            btnRegistrar.Visible = false;
        }

        if (dtLista.Rows.Count == 1)
        {
            lbltexto.Text = clsValidaciones.GetKeyOrAdd("textoSinAfiliados", "Aun no haz regístrado tus elegidos, haz Click en el botón Registrar Nuevo para Registrarlos.");
        }
        else if (dtLista.Rows.Count < Afiliados)
        {
            int elegidos = Afiliados - dtLista.Rows.Count;
            if (elegidos == 1)
            {
                lbltexto.Text = "Aún puedes registrar un (1) elegido más.";
            }
            else
            {
                lbltexto.Text = "Aún puedes registrar  (" + elegidos.ToString() + ") elegidos más.";
            }
        }

        if (dtLista != null)
        {
            rptpasajeros.DataSource = dtLista;
            rptpasajeros.DataBind();
            HttpContext.Current.Session["dtLista"] = dtLista;
        }

        MPAfiliados.Show();
    }
    protected void lbCrear_Click(object sender, EventArgs e)
    {
        rbltapspagos();
        int  contactoPadre = Convert.ToInt32(new csCache().cCache().Contacto);
        bool bValida       = new csReservaPlanes().SetCrearAfiliadosPlanes(this, contactoPadre);

        DataTable dtLista   = new csResultadoVuelos().SetBuscarUsuarios(new csCache().cCache().Contacto, new csCache().cCache().Empresa);
        int       Afiliados = Convert.ToInt32(clsValidaciones.GetKeyOrAdd("NumAfiliados", "6"));

        new csGenerales().sConsultaGeneros(ddlGeneroR, false);
        new csGenerales().sConsultaTposIdentificacion(ddlTpoDocumentoR, false);

        if (dtLista.Rows.Count >= Afiliados)
        {
            btnRegistrar.Visible = false;
        }
        else if (dtLista.Rows.Count == 1)
        {
            lbltexto.Text = clsValidaciones.GetKeyOrAdd("textoSinAfiliados", "Usted no tiene usuarios afiliados. Haga click en el botón Registrar Nuevo para crearlos.");
        }

        if (dtLista != null)
        {
            rptpasajeros.DataSource = dtLista;
            rptpasajeros.DataBind();
            HttpContext.Current.Session["dtLista"] = dtLista;
        }
        MPAfiliados.Show();
        if (bValida)
        {
            lbltexto.Text = "Su afiliado fue creado Exitosamente";
        }
        else
        {
            lbltexto.Text = "Lo sentimos Por Favor Vuelva a crear su afiliado ";
        }
    }