private void initType()
        {
            List <CategoriePersonnel> allCP = CategoriePersonnelDAO.findAll();

            foreach (CategoriePersonnel cp in allCP)
            {
                categorieCB.Items.Add(cp);
            }
        }
        public InputRemplacerCategoriePersonnelForm()
        {
            InitializeComponent();
            List <CategoriePersonnel> categorieList = CategoriePersonnelDAO.findAll();

            foreach (CategoriePersonnel categ in categorieList)
            {
                this.categorieASupprimerCB.Items.Add(categ);
                this.categoriesCB.Items.Add(categ);
            }
        }
コード例 #3
0
        public void TestFindAll()
        {
            // test du fin by libelle
            List <CategoriePersonnel> resultatFind = CategoriePersonnelDAO.findAll();

            foreach (CategoriePersonnel res in resultatFind)
            {
                Assert.IsNotNull(res.id);
                Assert.IsNotNull(res.volumeHoraire);
                Assert.IsNotNull(res.libelle);
            }
        }
        private void loadCategories()
        {
            List <CategoriePersonnel> categories = CategoriePersonnelDAO.findAll();

            foreach (CategoriePersonnel cp in categories)
            {
                this.categorieComboBox.Items.Add(cp);
                if (cp.id == modifCat)
                {
                    this.categorieComboBox.SelectedItem = cp;
                }
            }
        }
コード例 #5
0
 //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);
         }
     }
 }