Beispiel #1
0
        public dbTSFLibrary getTSFLibraryByNameSpace(String libraryNameSpace)
        {
            dbTSFLibrary lb  = null;
            String       sql = "SELECT * FROM "
                               + dbTSFLibrary._TABLE_NAME
                               + " WHERE "
                               + dbTSFLibrary._TARGET_NAMESPACE
                               + " = ?";

            OleDbParameter[] dbParams = { CreateParameter(dbTSFLibrary._ID, libraryNameSpace) };
            OleDbDataReader  reader   = ExecuteSqlQuery(sql, dbParams);

            if (reader != null)
            {
                bool reading = reader.Read();
                if (reading)
                {
                    lb = new dbTSFLibrary();
                    while (reading)
                    {
                        lb.load(reader);
                        lb.Signals = getTSFLibrarySignals(lb.id);
                        reading    = reader.Read();
                    }
                }
                reader.Close();
                reader.Dispose();
            }
            return(lb);
        }
Beispiel #2
0
        public List <dbTSFLibrary> getTSFLibraries()
        {
            List <dbTSFLibrary> list = new List <dbTSFLibrary>();
            String sql = "SELECT * FROM "
                         + dbTSFLibrary._TABLE_NAME;

            OleDbParameter[] dbParams = {};
            OleDbDataReader  reader   = ExecuteSqlQuery(sql, dbParams);

            if (reader != null)
            {
                while (reader.Read())
                {
                    dbTSFLibrary lb = new dbTSFLibrary();
                    lb.load(reader);
                    list.Add(lb);
                }
                reader.Close();
                reader.Dispose();
            }
            return(list);
        }
Beispiel #3
0
        public dbTSFLibrary getTSFLibrary(Guid libraryUUID)
        {
            dbTSFLibrary lb  = new dbTSFLibrary();
            String       sql = "SELECT * FROM "
                               + dbTSFLibrary._TABLE_NAME
                               + " WHERE "
                               + dbTSFLibrary._ID
                               + " = ?";

            OleDbParameter[] dbParams = { CreateParameter(dbTSFLibrary._ID, libraryUUID) };
            OleDbDataReader  reader   = ExecuteSqlQuery(sql, dbParams);

            if (reader != null)
            {
                while (reader.Read())
                {
                    lb.load(reader);
                    lb.Signals = getTSFLibrarySignals(libraryUUID);
                }
                reader.Close();
                reader.Dispose();
            }
            return(lb);
        }