Exemplo n.º 1
0
        private void LoadSurveyQuestions(Guid SurveyID)
        {
            classes.SQLCode         mySQL           = new classes.SQLCode();
            List <classes.Question> surveyQuestions = mySQL.GetQuestionsBySurvey(SurveyID);

            surveyQuestions = surveyQuestions.OrderBy(a => a.QuestionNumber).ToList();
            SerializeSurveyQuestions(surveyQuestions);

            lbCurrentQuestions.DataSource     = surveyQuestions;
            lbCurrentQuestions.DataTextField  = "QuestionText";
            lbCurrentQuestions.DataValueField = "QuestionID";
            lbCurrentQuestions.DataBind();
        }
Exemplo n.º 2
0
 private void LoadQuestions(Guid SurveyID)
 {
     classes.SQLCode mySQL = new classes.SQLCode();
     theseQuestions = mySQL.GetQuestionsBySurvey(SurveyID);
     foreach (classes.Question thisQuestion in theseQuestions)
     {
         List <classes.Answer> qAnswers = mySQL.GetAnswers(thisQuestion.QuestionID);
         foreach (classes.Answer thisAnswer in qAnswers)
         {
             theseAnswers.Add(thisAnswer);
         }
     }
     SerializeQuestions(theseQuestions);
     SerializeAnswers(theseAnswers);
 }