Exemplo n.º 1
0
        public static void InsertPosition(string imei, Position position)
        {
            try
            {
                var tracker = TrackerLogic.GetTracker(imei);
                if (tracker == null) return;

                InsertPosition(tracker, position);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("StealME.MessageType:" + ex.Message);
            }
        }
Exemplo n.º 2
0
        public static void InsertPosition(Tracker tracker, Position position)
        {
            try
            {
                position.TrackerId = new Guid("5B9BA752-284E-4B85-BB80-992D610CD806");
                position.Id = Guid.NewGuid();
                position.CreationDate = DateTime.Now;

                var context = DataHandler.GetContext();
                context.Position.AddObject(position);
                context.SaveChanges();

                SMLogger.LogThis("Position inserted.");
            }
            catch (Exception ex)
            {
                Debug.WriteLine("StealME.MessageType:" + ex.Message);
            }
        }
Exemplo n.º 3
0
 partial void DeletePosition(Position instance);
Exemplo n.º 4
0
 partial void UpdatePosition(Position instance);
Exemplo n.º 5
0
 partial void InsertPosition(Position instance);
Exemplo n.º 6
0
		private void detach_Positions(Position entity)
		{
			this.SendPropertyChanging();
			entity.Tracker = null;
		}
Exemplo n.º 7
0
		private void attach_Positions(Position entity)
		{
			this.SendPropertyChanging();
			entity.Tracker = this;
		}
Exemplo n.º 8
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Position EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPosition(Position position)
 {
     base.AddObject("Position", position);
 }
Exemplo n.º 9
0
 /// <summary>
 /// Create a new Position object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="trackerId">Initial value of the TrackerId property.</param>
 /// <param name="creationDate">Initial value of the CreationDate property.</param>
 /// <param name="latitude">Initial value of the Latitude property.</param>
 /// <param name="longtitude">Initial value of the Longtitude property.</param>
 public static Position CreatePosition(global::System.Guid id, global::System.Guid trackerId, global::System.DateTime creationDate, global::System.String latitude, global::System.String longtitude)
 {
     Position position = new Position();
     position.Id = id;
     position.TrackerId = trackerId;
     position.CreationDate = creationDate;
     position.Latitude = latitude;
     position.Longtitude = longtitude;
     return position;
 }