Beispiel #1
0
 public DateTime AircraftPositionYoungestEntry()
 {
     lock (db.DBCommand)
     {
         db.DBCommand.CommandText = "SELECT max(LastUpdated) FROM " + AircraftPositionDesignator.TableName;
         db.DBCommand.Parameters.Clear();
         object result = db.DBCommand.ExecuteScalar();
         if (IsValid(result))
         {
             DateTime dt = SupportFunctions.UNIXTimeToDateTime(System.Convert.ToInt32(result));
             return(dt);
         }
     }
     return(DateTime.MinValue);
 }
Beispiel #2
0
        public List <DateTime> AircraftPositionGetAllLastUpdated()
        {
            List <DateTime> l      = new List <DateTime>();
            DataTable       Result = db.Select("SELECT LastUpdated FROM " + AircraftPositionDesignator.TableName + " ORDER BY LastUpdated ASC");

            if (!IsValid(Result) || (Result.Rows.Count == 0))
            {
                return(l);
            }
            foreach (DataRow row in Result.Rows)
            {
                l.Add(SupportFunctions.UNIXTimeToDateTime((int)row[0]));
            }
            return(l);
        }
Beispiel #3
0
 // LEGACY!!!
 public PlaneInfo(DataRow row)
 {
     Time         = SupportFunctions.UNIXTimeToDateTime(System.Convert.ToInt32(row[0]));
     Call         = (string)row[1];
     Reg          = (string)row[2];
     Hex          = (string)row[3];
     Lat          = (double)row[4];
     Lon          = (double)row[5];
     Track        = System.Convert.ToInt32(row[6]);
     Alt          = System.Convert.ToInt32(row[7]);
     Speed        = System.Convert.ToInt32(row[8]);
     Type         = (string)row[9];
     Manufacturer = (string)row[10];
     Model        = (string)row[11];
     Category     = (PLANECATEGORY)row[12];
 }