public RouteCollections SelectList() { RouteCollections collection = new RouteCollections(); IDataReader Reader = DataAccess.SelectList(); while (Reader.Read()) { RouteInfo routeinfo = new RouteInfo(); routeinfo.RouteID = Convert.ToString(Reader["RouteID"]); routeinfo.RouteCode = Convert.ToString(Reader["RouteCode"]); routeinfo.RouteName = Convert.ToString(Reader["RouteName"]); routeinfo.FromLocationID = Convert.ToString(Reader["FromLocationID"]); routeinfo.FromLocationName = Convert.ToString(Reader["LocationName"]); routeinfo.ToLocationID = Convert.ToString(Reader["ToLocationID"]); routeinfo.ToLocationName = Convert.ToString(Reader["LocationName"]); collection.Add(routeinfo); } Reader.Close(); return(collection); }
public void UpdateByRouteID(RouteInfo routeInfo) { DataAccess.UpdateByRouteID(routeInfo.RouteID, routeInfo.RouteCode, routeInfo.RouteName, routeInfo.FromLocationID, routeInfo.ToLocationID); }
public void Insert(RouteInfo routeInfo) { DataAccess.Insert(routeInfo.RouteID, routeInfo.RouteCode, routeInfo.RouteName, routeInfo.FromLocationID, routeInfo.ToLocationID); }