예제 #1
0
        public void GetTrainsFromDB( )
        {
            // TODO: use StoredRelation objects to automate this and create index in DB
            DBQuery  dbq         = new DBQuery("traintracker");
            SAString stationname = new SAString("stationname");

            stationname.Set(name.GetString());
            List <Hashtable> trainslist = dbq.Select("stationtrain", stationname);

            this.BuildStationTrains(trainslist);
        }
예제 #2
0
 public StationTrain(Station s, Hashtable atthash) : base("stationtrain")
 {
     this.key = train_id;
     station  = s;
     this.LoadFromHT(atthash);
     train = (Train)station.ntwrk.trains[train_id];
     stationname.Set(s.key.GetString());
     this.attributes.Add(stationname);
     this.AddTable();
     this.Save();
 }