Ejemplo n.º 1
0
 private void cargaPasajeros(ListaVuelos lv)
 {
     lpO.Clear();
     foreach (Vuelo v in lv)
     {
         foreach (Pasajero p in v.getLp())
         {
             lpO.Add(p);
             actializarListBoxt(lpO);
         }
     }
     lpF = lpO;
 }
Ejemplo n.º 2
0
 public void setPasajero(Pasajero p)
 {
     lp.Add(p);
 }
Ejemplo n.º 3
0
        public ListaPasajeros busquedaPasajeros(int opc, string dato)
        {
            ListaPasajeros lpF = new ListaPasajeros();

            dato = dato.ToUpper();
            int aux;

            switch (opc)
            {
            case 1:

                for (int i = 0; i < this.Count; i++)
                {
                    int j;
                    for (j = 0; j < dato.Length; j++)
                    {
                        if (this[i].getNomAp()[j] != dato[j])
                        {
                            break;
                        }
                    }
                    if (j == dato.Length)
                    {
                        lpF.Add(this[i]);
                    }
                }

                break;

            case 2:

                for (int i = 0; i < this.Count; i++)
                {
                    int j;
                    for (j = 0; j < dato.Length; j++)
                    {
                        if (this[i].getRuta()[j] != dato[j])
                        {
                            break;
                        }
                    }
                    if (j == dato.Length)
                    {
                        lpF.Add(this[i]);
                    }
                }
                break;

            case 3:
                Int32.TryParse(dato, out aux);

                for (int i = 0; i < this.Count; i++)
                {
                    int j;
                    for (j = 0; j < dato.Length; j++)
                    {
                        if (this[i].getAsiento() != aux)
                        {
                            break;
                        }
                    }
                    if (j == dato.Length)
                    {
                        lpF.Add(this[i]);
                    }
                }


                break;
            }

            return(lpF);
        }