/// <summary>
        /// Charge les diplomes
        /// </summary>
        public void diplomeViewLoad()
        {
            if (diplomesView != null)
            {
                foreach (DiplomeView dv in diplomesView)
                {
                    tabControl1.Controls.Remove(dv);
                }
            }
            this.diplomesView = new System.Collections.Generic.List <view.DiplomeView>();
            int i = 1;

            foreach (Diplome d in DiplomeDAO.findAll())
            {
                DiplomeView dv = new DiplomeView(d);
                dv.Name = "diplomeView" + i;
                dv.Text = d.libelle;
                dv.Tag  = d;
                dv.UseVisualStyleBackColor = true;
                diplomesView.Add(dv);
            }
            foreach (ClientGestionUniversite.view.DiplomeView dv in diplomesView)
            {
                this.tabControl1.Controls.Add(dv);
            }
            if (this.mdv != null)
            {
                this.mdvIndex = tabControl1.TabPages.IndexOf(this.mdv);
            }
        }
        /// <summary>
        /// Evenement valider / modifier
        /// </summary>
        private void valider(object sender, EventArgs e)
        {
            ElementConstitutif ec = new ElementConstitutif(this.nomBox.Text, ue);

            Boolean elementConstitutifIncorrect = string.IsNullOrWhiteSpace(nomBox.Text);

            if (elementConstitutifIncorrect)
            {
                // Initializes the variables to pass to the MessageBox.Show method.
                string message = "Erreur lors de la saisie des données \n";
                message += " le nom de l'élément constitutif est vide !";
                DiplomeView.afficherPopup(message);
            }
            else
            {
                if (input)
                {
                    ElementConstitutifDAO.create(ec);
                }
                else
                {
                    ec.id = elementModifie.id;
                    ElementConstitutifDAO.update(ec);
                }
                this.Close();
            }
        }
 //Ajout
 private void button1_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(textBox1.Text))
     {
         DiplomeView.afficherPopup("Le nom est vide");
     }
     else
     {
         TypeCours type = new TypeCours(textBox1.Text);
         TypeCoursDAO.create(type);
         upadateList();
         List <CategoriePersonnel> catList = CategoriePersonnelDAO.findAll();
         foreach (CategoriePersonnel cat in catList)
         {
             Ratio r = new Ratio(type, cat);
             r.ratio = 1;
             RatioDAO.create(r);
         }
     }
 }