public Form1() { InitializeComponent(); bt = new BusinessTier.Business(); IReadOnlyList <BusinessTier.Stations> lines = bt.getStations(); IEnumerator <BusinessTier.Stations> lineEn = lines.GetEnumerator(); // number of stations this.textBox6.Text = bt.num_Stat(); BusinessTier.Stations curLine; // format the content while (lineEn.MoveNext()) { curLine = lineEn.Current; string msg = string.Format(" {0}: {1}", curLine.StationID, curLine.Name); this.listBox1.Items.Add(msg); // once formatted , add it to listbox1 } theMap = new Themap(); }
public Form1() { InitializeComponent(); bt = new BusinessTier.Business(); IReadOnlyList<BusinessTier.Stations> lines = bt.getStations(); IEnumerator<BusinessTier.Stations> lineEn = lines.GetEnumerator(); // number of stations this.textBox6.Text = bt.num_Stat(); BusinessTier.Stations curLine; // format the content while (lineEn.MoveNext()) { curLine = lineEn.Current; string msg = string.Format(" {0}: {1}", curLine.StationID, curLine.Name); this.listBox1.Items.Add(msg); // once formatted , add it to listbox1 } theMap = new Themap(); }