/// <summary>
 /// A currency object that requires 3 landings in the previous 90 days
 /// </summary>
 /// <param name="szName">the name for the currency</param>
 public PassengerCurrency(string szName) : base(3, 90, false, szName)
 {
     Query = new FlightQuery()
     {
         DateRange             = FlightQuery.DateRanges.Trailing90,
         HasLandings           = true,
         PropertiesConjunction = GroupConjunction.None
     };
     Query.PropertyTypes.Add(CustomPropertyType.GetCustomPropertyType((int)CustomPropertyType.KnownProperties.IDPropPilotMonitoring));
 }
        public NightCurrency(string szName) : base(RequiredLandings, TimeSpan, false, szName)
        {
            NightTakeoffCurrency = new FlightCurrency(RequiredTakeoffs, TimeSpan, false, szName);

            Query = new FlightQuery()
            {
                DateRange             = FlightQuery.DateRanges.Trailing90,
                HasNightLandings      = true,
                PropertiesConjunction = GroupConjunction.None
            };
            Query.PropertyTypes.Add(CustomPropertyType.GetCustomPropertyType((int)CustomPropertyType.KnownProperties.IDPropPilotMonitoring));
        }
Example #3
0
 /// <summary>
 /// A currency object that requires 3 full-stop landings in the previous 90 days
 /// </summary>
 /// <param name="szName">the name for the currency</param>
 public TailwheelCurrency(string szName) : base(3, 90, false, szName)
 {
     Query = new FlightQuery()
     {
         DateRange           = FlightQuery.DateRanges.Trailing90,
         HasNightLandings    = true,
         HasFullStopLandings = true,
         FlightCharacteristicsConjunction = GroupConjunction.Any,
         IsTailwheel           = true,
         PropertiesConjunction = GroupConjunction.None
     };
     Query.PropertyTypes.Add(CustomPropertyType.GetCustomPropertyType((int)CustomPropertyType.KnownProperties.IDPropPilotMonitoring));
 }
Example #4
0
        private PendingFlight(MySqlDataReader dr) : this()
        {
            User      = dr["username"].ToString();
            PendingID = dr["id"].ToString();
            string jsonflight = dr["jsonflight"].ToString();

            if (jsonflight != null)
            {
                JsonConvert.PopulateObject(jsonflight, this);
            }
            // Populating an object doesn't fully flesh out a custom property with its type
            foreach (CustomFlightProperty cfp in this.CustomProperties)
            {
                cfp.InitPropertyType(new CustomPropertyType[] { CustomPropertyType.GetCustomPropertyType(cfp.PropTypeID) });
            }
        }
Example #5
0
        public OptionalColumn(int idPropType) : this()
        {
            ColumnType = OptionalColumnType.CustomProp;
            IDPropType = idPropType;
            CustomPropertyType cpt = CustomPropertyType.GetCustomPropertyType(idPropType);

            switch (cpt.Type)
            {
            case CFPPropertyType.cfpDecimal:
                ValueType = (cpt.IsBasicDecimal) ? OptionalColumnValueType.Decimal : OptionalColumnValueType.Time;
                break;

            case CFPPropertyType.cfpInteger:
                ValueType = OptionalColumnValueType.Integer;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(idPropType));
            }
            Title = cpt.Title;
        }