Beispiel #1
0
        public static Role CreateForm(OdbcDataReader reader)
        {
            Role role = new Role();

            Role.CreateForm(reader, role);
            return(role);
        }
Beispiel #2
0
        public override bool LoadFromDB(DBManager db, string sqlCriteria)
        {
            OdbcDataReader reader = db.Query("SELECT * FROM role WHERE " + sqlCriteria);

            if (!reader.Read())
            {
                return(false);
            }
            return(Role.CreateForm(reader, this));
        }
Beispiel #3
0
        public static Role[] LoadListFromDB(DBManager db, string sqlCriteria)
        {
            OdbcDataReader    reader = db.Query("SELECT * FROM role " + sqlCriteria);
            LinkedList <Role> list   = new LinkedList <Role>();

            while (reader.Read())
            {
                list.AddLast(Role.CreateForm(reader));
            }

            Role[] entities = new Role[list.Count];
            int    i        = 0;

            foreach (Role t in list)
            {
                entities[i++] = t;
            }
            return(entities);
        }