예제 #1
0
        public static Registration CreateForm(OdbcDataReader reader)
        {
            Registration registration = new Registration();

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

            if (!reader.Read())
            {
                return(false);
            }
            return(Registration.CreateForm(reader, this));
        }
예제 #3
0
        public static Registration[] LoadListFromDBCustom(DBManager db, string sqlAll)
        {
            OdbcDataReader            reader = db.Query(sqlAll);
            LinkedList <Registration> list   = new LinkedList <Registration>();

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

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

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