Beispiel #1
0
        public int ExecuteCount()
        {
            try
            {
                TimeStamp.Start("ExecuteCount");

                int rc = 0;
                using (DbRecordset rs = Execute())
                {
                    while (rs.Next())
                    {
                        rc++;
                    }
                }
                return(rc);
            }
            finally
            {
                TimeStamp.Log("ExecuteCount", text);
            }
        }
Beispiel #2
0
        private void IsNotEmptyCoordinate()
        {
            DConsole.WriteLine(nameof(IsNotEmptyCoordinate));
            if (_data != null)
            {
                DConsole.WriteLine($"{_data.IsClosed}");
                if (!_data.IsClosed)
                {
                    while (_data.Next())
                    {
                        var latitude  = (double)_data["Latitude"];
                        var longitude = (double)_data["Longitude"];

                        Dictionary <string, object> dictionary =
                            new Dictionary <string, object>()
                        {
                            { "Description", _data["Description"] },
                            { "Latitude", latitude },
                            { "Longitude", longitude }
                        };
                        _location.Add(dictionary);
                    }

                    _isNotEmptyLocationData = _location.Count > 0;
                }
                else
                {
                    DConsole.WriteLine($"Error in {nameof(IsNotEmptyCoordinate)}");
                }
            }
            else
            {
                DConsole.WriteLine($"{_data} is null");
            }
            DConsole.WriteLine(nameof(_isNotEmptyLocationData) + " = " +
                               _isNotEmptyLocationData);
        }