예제 #1
0
        public void TestUpdateAnnee()
        {
            List <Annee> annees = AnneeDAO.findByLibelle("TEST_ANNEE%");

            foreach (Annee annee in annees)
            {
                long temp = annee.diplome.id;
                // modification annees
                annee.libelle = "TEST_ANNEE_2";

                AnneeDAO.update(annee);
            }

            List <Annee> resultatFind2 = AnneeDAO.findByLibelle("TEST_ANNEE_2");

            Assert.IsTrue(resultatFind2.Count > 0);
        }
예제 #2
0
 /// <summary>
 /// Evenement valider / modifier
 /// </summary>
 private void valider(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(this.nomBox.Text))
     {
         DiplomeView.afficherPopup("L'année est vide");
     }
     else
     {
         Annee a = new Annee(this.nomBox.Text, d);
         if (input)
         {
             AnneeDAO.create(a);
         }
         else
         {
             a.id = modifId;
             AnneeDAO.update(a);
         }
         this.Close();
     }
 }