Example #1
0
        public static GeoPoint GetGeoPointFromDB(string streetAndNumber, string zipCode, string city, string countryCode)
        {
            Data.CSBooster_DataContext csbDAC = new _4screen.CSB.DataAccess.Data.CSBooster_DataContext(Helper.GetSiemeConnectionString());
            var cachedGeoPoint = csbDAC.hisp_GeoKoordinates_Get(streetAndNumber, zipCode, city, countryCode).ElementAtOrDefault(0);

            if (cachedGeoPoint != null)
            {
                GeoPoint geoPoint = new GeoPoint()
                {
                    StreetAndNumber = cachedGeoPoint.GEO_Street, ZipCode = cachedGeoPoint.GEO_PLZ, City = cachedGeoPoint.GEO_City, Region = cachedGeoPoint.GEO_Kanton, CountryCode = cachedGeoPoint.GEO_Land, Lat = cachedGeoPoint.GEO_Breite, Long = cachedGeoPoint.GEO_Laenge,
                };
                return(geoPoint);
            }
            else
            {
                return(null);
            }
        }
Example #2
0
 public static void StoreGeoPointInDB(GeoPoint geoPoint)
 {
     Data.CSBooster_DataContext csbDAC = new _4screen.CSB.DataAccess.Data.CSBooster_DataContext(Helper.GetSiemeConnectionString());
     csbDAC.hisp_GeoKoordinates_Save(geoPoint.StreetAndNumber, geoPoint.ZipCode, geoPoint.City, geoPoint.CountryCode, geoPoint.Region, geoPoint.Lat, geoPoint.Long);
 }