Exemple #1
0
      public static DbTable GetByName(DbConnector dbConn, string name) {
         dbConn.SetQueryText(string.Format("{0} where type = 'U' and name = '{1}'", _selectQuery, name));
         dbConn.Execute();

         if (!dbConn.NextRow()) {
            return null;
         }

         var t = new DbTable();
         t.FromDb(dbConn);

         return t;
      }
Exemple #2
0
      public static List<DbTable> GetAll(DbConnector dbConn) {
         dbConn.SetQueryText(string.Format("{0} where type = 'U'", _selectQuery));
         dbConn.Execute();

         List<DbTable> tables = new List<DbTable>();

         while (dbConn.NextRow()) {
            var t = new DbTable();
            t.FromDb(dbConn);
            tables.Add(t);
         }

         return tables;
      }