private void addCacheContainer(int id, string name) { Data.GeocacheContainer attr = new Data.GeocacheContainer(); attr.ID = id; attr.Name = name; GeocacheContainers.Add(attr); }
public static GAPPSF.Core.Data.GeocacheContainer GetGeocacheContainer(string container) { GAPPSF.Core.Data.GeocacheContainer result = null; container = container.ToLower(); result = (from gt in ApplicationData.Instance.GeocacheContainers where gt.Name.ToLower() == container select gt).FirstOrDefault(); if (result == null) { //take special ID result = GetGeocacheContainer(0); } return(result); }
public static GAPPSF.Core.Data.GeocacheContainer GetGeocacheContainer(int containerId) { GAPPSF.Core.Data.GeocacheContainer result = null; result = (from gt in ApplicationData.Instance.GeocacheContainers where gt.ID == containerId select gt).FirstOrDefault(); if (result == null) { //take special ID result = (from gt in ApplicationData.Instance.GeocacheContainers where gt.ID == 0 select gt).FirstOrDefault(); } return(result); }