public SeqAccessTableNode(string tableName) { using (DAOContext con = new DAOContext(AccessConstring.conString)) { con.OpenConnection(); tableDAO dao = new tableDAO(con, tableName); this.table = dao.selectAll(); con.CloseConnection(); } }
public RandomAccessTableNode(string tableName) { using (DAOContext con = new DAOContext(AccessConstring.conString)) { con.OpenConnection(); tableDAO dao = new tableDAO(con, tableName); this.table = dao.selectAll(); con.CloseConnection(); } this.max = this.table.Rows.Count; int seed = Environment.TickCount; this.objRandom = new Random(seed); }