Ejemplo n.º 1
0
 public void getListeSujetsJustAbo()
 {
     // List<Sujet> lsS = new List<Sujet>();
     foreach (Abonnement ab in db.getAllAbonnementByIdUser(idUser))
     {
         Sujet s  = db.getSujetByName(ab.NomSujetAbon);
         var   ch = lesSujets.Find(x => x.nomSujet == s.nomSujet);
         if (ch == null)
         {
             lesSujets.Add(s);
         }
     }
     adapter          = new SujetAdapter(this, lesSujets);
     lstSujet.Adapter = adapter;
 }
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.AbonnementLayout);

            idUser    = Intent.GetIntExtra("idUser", 0);
            db        = new Database();
            lesSujets = db.getAllSujets();

            lstSujetAbon         = FindViewById <ListView>(Resource.Id.lstSujetsAbon);
            adapter              = new SujetAdapter(this, lesSujets);
            lstSujetAbon.Adapter = adapter;

            if (lesSujets.Count == 0)
            {
                Toast.MakeText(this, "Pourpour l'instant il n'existe pas de sujets!", ToastLength.Long).Show();
            }

            lstSujetAbon.ItemClick += LstSujetAbon_ItemClick;
        }
Ejemplo n.º 3
0
 public void getListeSujets()
 {
     adapter          = new SujetAdapter(this, this.getAllSujets());
     lstSujet.Adapter = adapter;
 }