예제 #1
0
 private void InscrireEleve_Load(object sender, EventArgs e)
 {
     if (inscription == false)
     {
         btn_inscrire.Text    = "Retirer de l'activité";
         CB_touseleve.Visible = false;
     }
     lesdates     = ladate.initDateJoach();
     lesactivites = lactivite.InitActivite();
     lesactivites = lesactivites.OrderBy(x => x.Heuredebut).ToList();
     lutilisateur.InitEleve();
     lesutilisateurs = lutilisateur.lesEleves;
     lesclasses      = laclasse.InitClasse();
     lestypes        = letype.InitType();
     lesIntervenants = lintervenant.InitIntervenant();
     Controleur.Vmodele.charger_anime();
     foreach (DateJoach dat in lesdates)
     {
         if (Convert.ToBoolean(dat.Inscriteleve) == false && Convert.ToBoolean(dat.Inscritprof) == false)
         {
             CB_date.Items.Add(dat.Dateevenement.ToLongDateString());
         }
     }
     chargerClasses("");
     foreach (Type typ in lestypes)
     {
         CB_type.Items.Add(typ.Libelle);
     }
     filtrerEleve();
     filtrerActivite();
 }
예제 #2
0
        } // recherche via un dico que l'on recharge a chaque filtre

        public void chargerDate()
        {
            DicoDate = new Dictionary <int, DateJoach>();
            Date     = new DateJoach();
            lesDates = new List <DateJoach>();
            lesDates = Date.initDateJoach();
            lesDates = lesDates.OrderBy(x => x.Dateevenement).ToList();
            int i = 0;

            foreach (DateJoach d in lesDates)
            {
                if (d.Inscriteleve == false && d.Inscritprof == false && (d.Aprem == true || d.Matin == true))
                {
                    ComboBoxDate.Items.Add(d.Dateevenement.ToLongDateString());
                    DicoDate.Add(i, d);
                    i++;
                }
            }
        }
예제 #3
0
        public void recupDates()
        {
            List <Activite> listeActivites;
            int             i = 1;

            lesDatesImport = date.initDateJoach();
            foreach (DateJoach d in lesDatesImport)
            {
                if (d.Inscriteleve == false && d.Inscritprof == false)
                {
                    if (d.Matin == true)
                    {
                        listeActivites = new List <Activite>();
                        foreach (Activite a in lesActivites)
                        {
                            if (a.Heuredebut.Hour < 12 && d.Dateevenement.ToShortDateString() == a.Heuredebut.ToShortDateString())
                            {
                                listeActivites.Add(a);
                            }
                        }
                        lesDates.Add(new DatePDF(i, d.Dateevenement, "Matin", listeActivites));
                        i++;
                    }
                    if (d.Aprem == true)
                    {
                        listeActivites = new List <Activite>();
                        foreach (Activite a in lesActivites)
                        {
                            if (a.Heuredebut.Hour > 12 && d.Dateevenement.ToShortDateString() == a.Heuredebut.ToShortDateString())
                            {
                                listeActivites.Add(a);
                            }
                        }
                        lesDates.Add(new DatePDF(i, d.Dateevenement, "Après midi", listeActivites));
                        i++;
                    }
                }
            }
        }
예제 #4
0
        private void ChoixActivite_Load(object sender, EventArgs e)
        {
            lesActivites = Initactivitesnoninscrit(ideleve);
            lesActivites = lesActivites.OrderBy(x => x.Heuredebut).ToList();
            List <DateJoach> lesdates = ladate.initDateJoach(); // Récupère toutes les dates grâce à la méthode dans la classe DateJoach

            foreach (DateJoach d in lesdates)
            {
                if (Convert.ToBoolean(d.Inscriteleve) == false && Convert.ToBoolean(d.Inscritprof) == false)
                {
                    CB_Date.Items.Add(d.Dateevenement.ToLongDateString());
                }
            }
            List <Type> lestypes = type.InitType(); // Récupère tous les types grâce à la méthode dans la classe Type

            foreach (Type t in lestypes)
            {
                CB_Type.Items.Add(t.Libelle);
            }
            lesIntervenants = intervenant.InitIntervenant();
            Controleur.Vmodele.charger_anime();
            filtrer();
        }