Search in sources :

Example 6 with Programme

use of ca.etsmtl.applets.etsmobile.model.Programme in project ETSMobile-Android2 by ApplETS.

the class ProfilManager method getProgrammes.

public List<Programme> getProgrammes() {
    DatabaseHelper dbHelper = new DatabaseHelper(context);
    List<Programme> programmeList = null;
    try {
        programmeList = dbHelper.getDao(Programme.class).queryForAll();
        Collections.sort(programmeList, new ProgrammeComparator());
    } catch (SQLException e) {
        Log.e("SQL Exception", e.getMessage());
    }
    return programmeList;
}
Also used : DatabaseHelper(ca.etsmtl.applets.etsmobile.db.DatabaseHelper) SQLException(java.sql.SQLException) Programme(ca.etsmtl.applets.etsmobile.model.Programme)

Example 7 with Programme

use of ca.etsmtl.applets.etsmobile.model.Programme in project ETSMobile-Android2 by ApplETS.

the class ProfilFragment method updateUI.

@Override
void updateUI() {
    Etudiant etudiant = profilManager.getEtudiant();
    profileAdapter.updateEtudiant(etudiant);
    List<Programme> programmes = profilManager.getProgrammes();
    profileAdapter.updateListeDesProgrammes(new ArrayList<Programme>(programmes));
}
Also used : Etudiant(ca.etsmtl.applets.etsmobile.model.Etudiant) Programme(ca.etsmtl.applets.etsmobile.model.Programme)

Aggregations

Programme (ca.etsmtl.applets.etsmobile.model.Programme)7 Etudiant (ca.etsmtl.applets.etsmobile.model.Etudiant)2 View (android.view.View)1 AdapterView (android.widget.AdapterView)1 Spinner (android.widget.Spinner)1 TextView (android.widget.TextView)1 DatabaseHelper (ca.etsmtl.applets.etsmobile.db.DatabaseHelper)1 ca.etsmtl.applets.etsmobile.model.listeDesProgrammes (ca.etsmtl.applets.etsmobile.model.listeDesProgrammes)1 SQLException (java.sql.SQLException)1