Exemplo n.º 1
0
        public bool GetCaches(List<Cache> caches)
        {
            if (Connected) {
                dsCache = new DataSet();
                dbAdapter = new OleDbDataAdapter(@"SELECT * FROM [Caches]", dbConnection);
                dbAdapter.Fill(dsCache);
                dbAdapter.Dispose();

                for (int i = 0; i <= dsCache.Tables[0].Rows.Count - 1; i++) {
                    Cache c = new Cache();
                    c.GCID = (int)dsCache.Tables[0].Rows[i].ItemArray[1];
                    c.Name = (string)dsCache.Tables[0].Rows[i].ItemArray[2];
                    c.Description = (string)dsCache.Tables[0].Rows[i].ItemArray[3];
                    c.Found = (bool)dsCache.Tables[0].Rows[i].ItemArray[4];
                    c.Latitude = (float)dsCache.Tables[0].Rows[i].ItemArray[5];
                    c.Longitude = (float)dsCache.Tables[0].Rows[i].ItemArray[6];
                    caches.Add(c);
                }
                dsCache.Dispose(); dsCache = null;

                return true;
            }
            return false;
        }
Exemplo n.º 2
0
 public bool AddCache(Cache cache)
 {
     return false;
 }
Exemplo n.º 3
0
 public bool UpdateCache(Cache cache)
 {
     return false;
 }