//Get All Systems from the local database table public List <RemoteSystem> getAllSystems() { this.connect(); List <RemoteSystem> systemsList = new List <RemoteSystem>(); String query = "Select * from " + TABLE_NAME; SqlCeCommand cmd = new SqlCeCommand(query, this.conn); SqlCeDataReader sqlReader = cmd.ExecuteReader(); while (sqlReader.Read()) { RemoteSystem rSystem = new RemoteSystem(); if (!DBNull.Value.Equals(sqlReader[0])) { rSystem.setID(sqlReader.GetInt32(0)); } if (!DBNull.Value.Equals(sqlReader[1])) { rSystem.setSystemName(sqlReader.GetString(1)); } if (!DBNull.Value.Equals(sqlReader[2])) { rSystem.setDomain(sqlReader.GetString(2)); } if (!DBNull.Value.Equals(sqlReader[3])) { rSystem.setIgnoreFlag(sqlReader.GetBoolean(3)); } systemsList.Add(rSystem); } this.disconnect(); return(systemsList); }