public JwSet<String> GetOriginAirportCodes()
 {
     if( _originAirportCodes == null )
     {
         _originAirportCodes = new JwSet<String>();
         foreach( VmScheduledArrivingFlight sf in _scheduledFlights)
         {
             _originAirportCodes.Add(sf.OriginAirportCode);
         }
     }
     return _originAirportCodes;
 }
 public JwSet<String> GetDestinationAirportCodes()
 {
     if( _destinationAirportCodes == null )
     {
         _destinationAirportCodes = new JwSet<String>();
         foreach( VmScheduledFlight sf in _scheduledFlights)
         {
             _destinationAirportCodes.Add(sf.DestinationAirportCode);
         }
     }
     return _destinationAirportCodes;
 }
Esempio n. 3
0
 private void PopulateFlightCB()
 {
     if( _flightNumberCB == null ) return;
     if( _destinationAirportCodeCB == null ) return;
     String airportCode = (String)_destinationAirportCodeCB.SelectedItem;
     if( JwUtility.IsEmpty(airportCode) )
     {
         _flightNumberCB.ClearValues();
     }
     else
     {
         JwSet<String> v = new JwSet<String>();
         foreach( VmScheduledFlight sf in _scheduledFlights )
         {
             if( sf.MatchesDestinationAirportCode(airportCode) )
                 v.Add(sf.CarrierCode + sf.FlightNumber);
         }
         if( ! VmProperties.Default.IsCartFlightNumberRequired() ) v.Add("");
         if( Engine.Cart!=null && ! JwUtility.IsEmpty( Engine.Cart.FlightNumber ) ) v.Add(Engine.Cart.FlightNumber);
         _flightNumberCB.SetValues(v);
     }
 }
Esempio n. 4
0
        public void PopulateComboBoxes()
        {
            if( ! ShouldCollectDestinationAirportCode() ) return;

            JwSet<String> airportCodes = new JwSet<String>();
            _airports = airportCodes;
            airportCodes.AddRange( VmAccountData.Default.GetAirportCodes() );

            if( Engine.Cart != null && ! JwUtility.IsEmpty( Engine.Cart.DestinationAirportCode ) )
                airportCodes.Add(Engine.Cart.DestinationAirportCode);

            if( Engine.HasLocationCode() && VmProperties.Default.ShouldNestCartDefaultTagDestination() )
                airportCodes.Add(Engine.LocationCode);

            if( ! VmProperties.Default.IsCartDestinationAirportRequired() ) airportCodes.Add("");

            if( ShouldCollectFlightNumber() )
            {
                _scheduledFlights = VmAirportData.Default.GetScheduledFlights();
                _flightNumberCB.ClearValues();
            }

            _destinationAirportCodeCB.SetValues(airportCodes.GetSortedList());

            if( airportCodes.Count == 1 ) _destinationAirportCodeCB.SelectedItem = airportCodes.GetAny();

            if( Engine.HasLocationCode() && VmProperties.Default.ShouldNestCartDefaultTagDestination() )
                _destinationAirportCodeCB.SelectedItem = Engine.LocationCode;
        }
 //# __________ PROTOCOL :: PROTECTED __________ #//
 public JwSet<String> GetAirportCodes()
 {
     JwSet<String> airportCodes = new JwSet<String>();
     airportCodes.AddRange( VmAccountData.Default.GetAirportCodes() );
     return airportCodes;
 }
Esempio n. 6
0
        public JwSet<String> GetAirportCodes()
        {
            JwSet<String> airportCodes = new JwSet<String>();
            airportCodes.AddRange( VmAccountData.Default.GetAirportCodes() );

            if( Engine.Cart != null && ! JwUtility.IsEmpty( Engine.Cart.DestinationAirportCode ) )
                airportCodes.Add(Engine.Cart.DestinationAirportCode);

            if( Engine.HasLocationCode() && VmProperties.Default.ShouldNestCartDefaultTagDestination() )
                airportCodes.Add(Engine.LocationCode);

            if( ! VmProperties.Default.IsCartDestinationAirportRequired() ) airportCodes.Add("");

            return airportCodes;
        }
        public void populateUldTypes()
        {
            String defaultValue = null;

            JwSet<String> vs = new JwSet<String>();
            vs.AddRange( VmProperties.Default.GetUldTemplateTypes());

            String uldTemplateTypeDefault = VmProperties.Default.GetUldTemplateTypeDefault();
            if( ! JwUtility.IsEmpty( uldTemplateTypeDefault ) )
            {
                vs.Add( uldTemplateTypeDefault);
                defaultValue = uldTemplateTypeDefault;
            }

            if( ! JwUtility.IsEmpty( Engine.DefaultUldType ) )
            {
                vs.Add( Engine.DefaultUldType );
                defaultValue = Engine.DefaultUldType;
            }

            vs.Add( GetUnknownOption());

            JwList<String> v = vs.GetSortedList();
            _uldTypeCB.Items.Clear();
            _uldTypeCB.AddRange(v);

            if( ! JwUtility.IsEmpty( defaultValue) )
                _uldTypeCB.SelectedItem = defaultValue;
        }
 public void FindScheduledFlights(JwDate departureDate)
 {
     _destinationAirportCodes = null;
     _scheduledFlights.Clear();
     _scheduledFlights.AddRange( PickerEngine.GetScheduledFlightsForDate(departureDate));
 }
 public void FindScheduledFlights(JwDate arrivalDate)
 {
     _originAirportCodes = null;
     _scheduledFlights.Clear();
     _scheduledFlights.AddRange( PickerEngine.GetScheduledFlightsForDate(arrivalDate));
 }
Esempio n. 10
0
        public void PopulateUldTypes()
        {
            JwSet<String> vs = new JwSet<String>();
            vs.AddRange( VmProperties.Default.GetUldDefaultTypes());
            if( Engine.HasDefaultType() ) vs.Add( Engine.DefaultType);
            vs.Add( GetUnknownOption());
            JwList<String> v = vs.GetSortedList();
            _uldTypeCB.Items.Clear();
            _uldTypeCB.AddRange(v);

            if( Engine.HasDefaultType() )
                _uldTypeCB.SelectedItem = Engine.DefaultType;
        }
        public void PopulateTruckNumberCB()
        {
            String originAirportCode = _originAirportSearchableComboBox.GetSelectedValue();
            String carrierCode = _carrierCodeSearchableComboBox.GetSelectedValue();

            JwSet<String> truckNumbers = new JwSet<String>();
            foreach( VmScheduledTruck st in _scheduledTrucks )
            {
                if( ! st.MatchesOriginAirportCode(originAirportCode) ) continue;
                if( ! st.MatchesCarrierCode(carrierCode) ) continue;
                truckNumbers.Add(st.FlightNumber);
            }
            _truckNumberCB.SetValues(truckNumbers.GetSortedList());
        }
 public void PopulateOriginAirportCB()
 {
     ObtainScheduledTrucks();
     JwSet<String> airportCodes = new JwSet<String>();
     foreach( VmScheduledTruck st in _scheduledTrucks )
     {
         airportCodes.Add(st.OriginAirportCode);
     }
     _originAirportSearchableComboBox.ActivatePanel(
         airportCodes.GetSortedList(),
         null);
 }
        public void PopulateCarrierCodeCB()
        {
            String originAirportCode = _originAirportSearchableComboBox.GetSelectedValue();

            JwSet<String> carrierCodes = new JwSet<String>();
            foreach( VmScheduledTruck st in _scheduledTrucks )
            {
                if( ! st.MatchesOriginAirportCode(originAirportCode) ) continue;
                carrierCodes.Add(st.CarrierCode);
            }
            _carrierCodeSearchableComboBox.ActivatePanel(
                carrierCodes.GetSortedList(),
                null);
        }
Esempio n. 14
0
        public void PopulateComboBoxes(IEnumerable valuesx, String defaultValue)
        {
            JwSet<String> valueSet = new JwSet<String>();
            valueSet.AddRange( valuesx );
            _values = valueSet.GetCopy();

            if( ! JwUtility.IsEmpty(defaultValue)  )
                valueSet.Add(defaultValue);

            _valuesCB.SetValues(valueSet.GetSortedList());

            if( valueSet.Count == 1 ) _valuesCB.SelectedItem = valueSet.GetAny();

            AssignDefaultValue(defaultValue);
        }