예제 #1
0
 /// <summary>
 /// Add a new contract
 /// </summary>
 /// <param name="contrat"></param>
 /// <exception cref="Exception">Error Contract Existing</exception>
 /// <exception cref="ArgumentNullException">Contract is Null</exception>
 public void AddContrat(Contrat contrat)
 {
     if (contrat != null)
     {
         if (!HasContratActif())
         {
             Contrats.Add(contrat);
         }
         else
         {
             throw new Exception("Un contrat est déja actif \n Impossible d'ajouter un nouveau contrat.");
         }
     }
 }
예제 #2
0
 public Collaborateur(String nom, String prenom, String fonctionCollabo, String address, String zipCode, String town, String tel, String email, Contrat contratActif)
 {
     Id              = 0;
     Name            = nom;
     Firstname       = prenom;
     FonctionCollabo = fonctionCollabo;
     Address         = address;
     ZipCode         = zipCode;
     Town            = town;
     Tel             = tel;
     Email           = email;
     statut          = true;
     Init();
 }