Esempio n. 1
0
        public void setNumber(Profil profile)
        {
            bool notFound = true;

            if (profile == null)
            {
                throw new Exception("profile can't be null. Please put a profile.");
            }
            foreach (var rule in profile.RulesList)
            {
                if (rule.Lettre == lettre)
                {
                    NoteBorneB = rule.BorneB;
                    NoteBorneH = rule.BorneH;
                }
                notFound = false;
            }
            if (notFound == true)
            {
                throw new Exception("profile doesn't match with this letter.");
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Constructeur par défaut
 /// </summary>
 public Examen(string letter, Profil profile)
 {
     lettre = letter;
     setNumber(profile);
     id = 0;
 }