Пример #1
0
 public static VmScheduledFlight Convert(JwList<String> tokens)
 {
     int index = 0;
     VmScheduledFlight sf = new VmScheduledFlight();
     sf.Id                           = JwUtility.ParseInteger(tokens[index++]);
     sf.EffectiveDateInterval.Start  = JwDateParser.ParseDate(tokens[index++]);
     sf.EffectiveDateInterval.End    = JwDateParser.ParseDate(tokens[index++]);
     sf.CarrierCode                  = tokens[index++];
     sf.FlightNumber                 = tokens[index++];
     sf.OriginAirportCode            = tokens[index++];
     sf.DepartureTime                = JwTimeParser.ParseTime(tokens[index++]);
     sf.DestinationAirportCode       = tokens[index++];
     sf.ArrivalTime                  = JwTimeParser.ParseTime(tokens[index++]);
     sf.Frequency                    = new VmFrequency(tokens[index++]);
     return sf;
 }
Пример #2
0
        //# __________ PROTOCOL :: PUBLIC __________ #//
        public void AssignFlight(VmScheduledFlight sf, JwDate date)
        {
            VmFlight f = new VmFlight();
            f.Date = date;
            f.ScheduledFlight = sf;
            VmFlight existingFlight = VmAirportData.Default.AirportOutputData.FlightFile.GetFlight(f);
            if( existingFlight != null )
            {
                f = existingFlight;
            }
            else
            {
                f.Id = VmAirportData.Default.AirportOutputData.IdentityFile.GetNextIdentity();
                VmAirportData.Default.AirportOutputData.FlightFile.Append(f);
            }
            Flight = f;

            JwTimestamp now = JwTimestamp.CreateNowLocal();
            if( Flight.GetScheduledDepartureTs().IsBefore(now) )
                ShowWarnLateDeparturePanel();
            else
                DoExitEvent();
        }
Пример #3
0
 private void HandleOk()
 {
     if( ! _inputControlManager.ValidateControls() ) return;
     VmScheduledFlight sf = new VmScheduledFlight();
     sf.Id = -1;
     sf.CarrierCode = _carrierCodeTB.Text.ToUpper();
     sf.FlightNumber = _flightNumberTB.Text.ToUpper();
     sf.DestinationAirportCode = (String)_destinationAirportCodeCB.SelectedItem;
     JwTimestamp scheduledDepartureTs = JwTimestamp.CreateTimestamp(_scheduledDepartureDT.Value);
     VmFlight f = new VmFlight();
     f.Date = scheduledDepartureTs.GetDate();
     sf.DepartureTime = scheduledDepartureTs.GetTime();
     f.ScheduledFlight = sf;
     Flight = f;
     ParentPanel.HandleOk();
 }
Пример #4
0
        private void HandleOk()
        {
            if( ! _inputControlManager.ValidateControls() ) return;
            VmScheduledFlight sf = new VmScheduledFlight();
            sf.Id = -1;
            sf.CarrierCode = _carrierCodeTB.Text.ToUpper();
            sf.FlightNumber = _flightNumberTB.Text.ToUpper();
            sf.DestinationAirportCode = (String)_destinationAirportSearchableComboBox.GetSelectedValue();
            JwTimestamp scheduledDepartureTs = JwTimestamp.CreateTimestamp(_scheduledDepartureDT.Value);
            VmFlight f = new VmFlight();
            f.Date = scheduledDepartureTs.GetDate();
            sf.DepartureTime = scheduledDepartureTs.GetTime();
            f.ScheduledFlight = sf;

            PickerEngine.Flight = f;
            PickerEngine.ShowChooseFlightPanel();
        }