Exemplo n.º 1
0
        /// <summary>
        /// Ajoute une reponse à une question du modèle
        /// </summary>
        /// <param name="idQuestion">Id de la question</param>
        /// <param name="idReponse">Id de la réponse</param>
        /// <param name="reponse">Réponse</param>
        public void AddReponseToQuestion(int idQuestion, int idReponse, ReponseDatas reponse)
        {
            QuestionDatas qm;

            if (DictQuestionModele.TryGetValue(idQuestion, out qm))
            {
                qm.AddReponse(idReponse, reponse);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Ajoute une question au QCM
 /// </summary>
 /// <param name="idQuestion">Id de la question</param>
 /// <param name="questionModele">Question</param>
 /// <returns></returns>
 public string AddQuestion(int idQuestion, QuestionDatas questionModele)
 {
     if (DictQuestionModele.Keys.Contains(idQuestion))
     {
         return("Cette question existe déjà !");
     }
     else
     {
         DictQuestionModele.Add(idQuestion, questionModele);
         return("Création de la question avec succès !");
     }
 }