Пример #1
0
        public void GetYandexCoordinates()
        {
            ProcessPoint Point = hdb.GetNewLinePointForGeocoding();

            Point.Type = PointType.CustomerNewLine;

            _logger.Info(string.Format("{0} {1} {2}", Point.CardId.ToString(), "Address Get DB for check Yandex:", Point.SourceAddress));

            Point = hyandex.GetRequestXmlDocumentPointsByAddress(Point);
            _logger.Info(string.Format("{0} YandexStatus:{5}, {1} {2} Lat={3}, Lng={4}",
                                       Point.CardId.ToString(),
                                       "Point Get Yandex:",
                                       Point.FormattedAddress,
                                       Point.Coordinate != null ? Point.Coordinate.Lat : "none",
                                       Point.Coordinate != null ? Point.Coordinate.Lng : "none",
                                       Point.PStatus.ToString()
                                       ));
            if (Point.CardId > 0)
            {
                Point.Save(hdb);
                _logger.Info(string.Format("{0} {1}", Point.CardId.ToString(), "Yandex Point Set Data in DB"));
            }
        }