public void Add(STATION_BUSES stationBus) { dBase.STATION_BUSES.Add(stationBus); dBase.SaveChanges(); }
public void AddStation_Buses_Route(ROUTE route, STATION_BUSES stationBus) { dBase.STATION_BUSES.Add(stationBus); dBase.SaveChanges(); }
private bool parsePoint(Placemark placemark, DBStation_Bus dbStationBus, DBStation dbStation, BUS bus, ROUTE route, bool hasStation) { foreach (var lineString in placemark.Flatten().OfType<SharpKml.Dom.Point>()) { IList<STATION> stationsNear = dbStation.SelectStationsNear(50, Methods.ConvertLatLonToDbGeography(lineString.Coordinate.Longitude, lineString.Coordinate.Latitude)); foreach (var station in stationsNear) { STATION_BUSES stationBus = new STATION_BUSES(); stationBus.STATION = station; stationBus.BUS = bus; dbStationBus.AddStation_Buses_Route(route, stationBus); hasStation = true; } } return hasStation; }