Exemplo n.º 1
0
        public static TrackerInfo GetTrackerInfo(string trackerId)
        {
            GPSTrackerEntities1 context = new GPSTrackerEntities1();

            //get the Tracker (this is probably done elsewhere, so it's an extra hit, but it's less work than currently being done
            Trackers _tracker = context.Trackers.Where(t => t.Id == trackerId).FirstOrDefault();

            TrackerInfo retVal = new TrackerInfo(_tracker);

            return(retVal);
        }
Exemplo n.º 2
0
        public static GTSLocationMessage GetLocationMessageById(int messageId)
        {
            GPSTrackerEntities1 context = new GPSTrackerEntities1();

            GTSLocationMessage retVal = null;

            LocationMessages message = context.LocationMessages.Where(t => t.Id == messageId).FirstOrDefault();
            TrackerInfo      info    = null;

            if (message != null)
            {
                info = GetTrackerInfo(message.TrackerId);
            }

            retVal = CreateLocationMessage(message);
            retVal.TrackerDetail = info;
            return(retVal);
        }
Exemplo n.º 3
0
 public GTSLocationMessageHistory(List <GTSLocationMessageLite> messages, TrackerInfo trackerInfo)
 {
     _trackerInfo = trackerInfo;
     _messages    = messages;
 }