Esempio n. 1
0
        public void SaveLastGPSStatus(Guid vehicleCode, LastGPSStatus status)
        {
            var key = CONST_KEY_LAST_GPS_STATUS + vehicleCode.ToString();
            if (status == null)
            {
                status = new LastGPSStatus();
            }

            this.CachedService.Add(key, status, DateTime.Now.AddDays(1));
        }
Esempio n. 2
0
        public LastGPSStatus GetLastGPSStatus(EGPSCurrentInfo current)
        {
            if (!current.VehicleCode.HasValue) return null;

            string key = CONST_KEY_LAST_GPS_STATUS + current.VehicleCode.Value.ToString();
            var status = this.CachedService.Get(key) as LastGPSStatus;
            if (status == null)
            {
                status = new LastGPSStatus() { LastGPSTime = current.ReportTime };
            }
            return status;
        }