public static Registration CreateForm(OdbcDataReader reader) { Registration registration = new Registration(); Registration.CreateForm(reader, registration); return(registration); }
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)); }
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); }