/** * Methodes pour aider aux tests * **/ public static TypeCours creerTypeCours(String libelle) { TypeCours res = new TypeCours(); res.libelle = libelle; TypeCours c = TypeCoursDAO.create(res); return(c); }
//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); } } }