Beispiel #1
0
 public bool AgregarDestinos(List<int> cantDias, List<string> destinos, Excursion aux)
 {
     bool ret = true;
     int i = 0;
     if (aux != null)
     {
         while (i < destinos.Count && ret)
         {
             Destino destino = CDestino.Instancia.BuscarDestinoPorNombre(destinos[i]);
             if (destino != null)
             {
                 ret = CExcursion.Instancia.AgregarDestinos(cantDias[i], destino, aux);
             }
             else
             {
                 ret = false;
             }
             i++;
         }
     }
     else
     {
         ret = false;
     }
     return ret;
 }
 public Contrato(Excursion excursion, DateTime fecha, int cantPasajero) 
 {
     this.cod = ++Contrato.ultCod;
     this.excursion = excursion;
     this.fecha = fecha;
     this.precio = excursion.Precio * cantPasajero;
     this.cantPasajero = cantPasajero;
 }
 public Contrato(SerializationInfo info, StreamingContext context)
 {
     this.cod = (int)info.GetValue("cod", typeof(int));
     Contrato.ultCod = (int)info.GetValue("ultCod", typeof(int));
     this.pasajeros = (List<Pasajero>)info.GetValue("pasajeros", typeof(List<Pasajero>));
     this.precio = (decimal)info.GetValue("precio", typeof(decimal));
     this.fecha = (DateTime)info.GetValue("fecha", typeof(DateTime));
     this.excursion = (Excursion)info.GetValue("excursion", typeof(Excursion));
     this.cantPasajero = (int)info.GetValue("cantPasajero", typeof(int));           
 }
 public bool EstaExcursionEnLista(List<Excursion> lista, Excursion ex)
 {/*Dada una lista de excursiones devuelve true o false si le excursion ingresada se encuntra en dicha lista*/
     bool esta = false;
     int i = 0;
     while (i < lista.Count && !esta)
     {
         if(lista[i].Equals(ex))
         {
             esta = true;
         }
         i++;
     }
     return esta;
 }
Beispiel #5
0
        public bool PrecargarDestinosAExcursiones(List <Destino> aux, Excursion excursion)
        {
            bool exito = false;

            return(exito);
        }
Beispiel #6
0
 public List<Destino> DestinosPorExcursion(Excursion aux)
 {
     List<Destino> destinos = new List<Destino>();
     if (aux != null)
     {
         List<DestinoExcursion> destinoExcusrion = aux.Destinos;
         foreach(DestinoExcursion unD in destinoExcusrion)
         {
             destinos.Add(unD.Destino);
         }
     }
     return destinos;
 }
Beispiel #7
0
 public void AltaExcursion(Excursion aux)
 {
     this.excursiones.Add(aux);
 }
Beispiel #8
0
 public bool AgregarDestinos(int cantDias, Destino destino, Excursion aux)
 {
     return aux.AgregarDestinos(cantDias, destino);
 }
Beispiel #9
0
 public Compra(Excursion unaExcursion, int cantidadPasajeros)
 {
     this.unaExcursion      = unaExcursion;
     this.cantidadPasajeros = cantidadPasajeros;
     this.codigo            = ultimoCodigo++;
 }