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); }
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(); }