protected string ShowTerminals(string bus) { StringBuilder html = new StringBuilder(); var Data = RouteRepository.GetRepository().GetAllRoute().Where(r => r.NumberOfBus == bus).First(); string FL = Data.Stations.First() + '-' + Data.Stations.Last(); string LF = Data.Stations.Last() + '-' + Data.Stations.First(); html.Append(String.Format("<th>{0}</th><th>{1}</th>", FL, LF)); return(html.ToString()); }
protected string ShowRoute(string bus) { StringBuilder html = new StringBuilder(); var Data = RouteRepository.GetRepository().GetAllRoute().Where(r => r.NumberOfBus == bus); foreach (var rtbus in Data) { for (int i = 0; i < rtbus.Stations.Count; i++) { int j = rtbus.Stations.Count - i - 1; html.Append(String.Format("<tr><td>{0}</td><td>{1}</td></tr>", rtbus.Stations[i], rtbus.Stations[j])); } } return(html.ToString()); }