ATMLDataAccessLibrary.db.daos.SignalDAO.hasTSFLibrary C# (CSharp) Method

hasTSFLibrary() public method

public hasTSFLibrary ( String uuid ) : bool
uuid String
return bool
        public bool hasTSFLibrary(String uuid)
        {
            bool hasLibrary = false;
            String sql = "SELECT count(*) as _count FROM "
                        + TestSignalLibraryBean._TABLE_NAME
                        + " WHERE "
                        + TestSignalLibraryBean._ID
                        + " = ?";
            OleDbParameter[] dbParams = { CreateParameter(TestSignalLibraryBean._ID, uuid) };
            OleDbDataReader reader = ExecuteSqlQuery(sql, dbParams);
            if (reader != null)
            {
                if (reader.Read())
                {
                    Int32? count = reader.GetInt32(0);
                    hasLibrary = count == null || count == 0 ? false : true;
                }
                reader.Close();
                reader.Dispose();
            }
            return hasLibrary;
        }