Пример #1
0
 protected void addCacheAttribute(int id, string name)
 {
     Data.GeocacheAttribute attr = new Data.GeocacheAttribute();
     attr.ID   = id;
     attr.Name = name;
     GeocacheAttributes.Add(attr);
 }
Пример #2
0
        public static GAPPSF.Core.Data.GeocacheAttribute GetGeocacheAttribute(int typeId)
        {
            GAPPSF.Core.Data.GeocacheAttribute result = null;

            result = (from gt in ApplicationData.Instance.GeocacheAttributes
                      where gt.ID == (int)Math.Abs(typeId)
                      select gt).FirstOrDefault();
            if (result == null)
            {
                //take special ID
                result = (from gt in ApplicationData.Instance.GeocacheAttributes
                          where gt.ID == 0
                          select gt).FirstOrDefault();
            }
            return(result);
        }