public bool AddFenceTracker(string fenceId, string trackers) { int id = 0; if (!int.TryParse(fenceId, out id)) { return(false); } TrackerFenceMapManager.RemoveTrackerByFenceId(id); var tr = (trackers + "").Split(','); foreach (var item in tr) { if (String.IsNullOrWhiteSpace(item)) { continue; } var trackerFenceMap = new TrackerFenceMap() { TrackerId = item, FencesId = id }; TrackerFenceMapManager.Add(trackerFenceMap); } return(true); }
public void RemoveTrackers(int fenceId) { TrackerFenceMapManager.RemoveTrackerByFenceId(fenceId); }