Exemplo n.º 1
0
        private void SaveAnswers()
        {
            foreach (Control fgp in pnlQuestions.Controls)
            {
                IQuestion question = (IQuestion)fgp.Controls[0];

                if (question != null && !String.IsNullOrEmpty(question.Answer))
                {
                    QuestionAnswer answer = new QuestionAnswer(question.QuestionGuid, ResponseGuid)
                    {
                        Answer = question.Answer
                    };

                    answer.Save();
                }
            }
        }
Exemplo n.º 2
0
        private void SaveAnswers()
        {
            foreach (Control control in pnlQuestions.Controls)
            {
                HtmlGenericControl convertedControl = control as HtmlGenericControl;

                //check this is a question container and not a spacer
                if (convertedControl as HtmlGenericControl != null && convertedControl.Attributes["class"] == "settingrow")
                {
                    IQuestion question = (IQuestion)control.Controls[0];
                    if (!String.IsNullOrEmpty(question.Answer))
                    {
                        QuestionAnswer answer = new QuestionAnswer(question.QuestionGuid, ResponseGuid);
                        answer.Answer = question.Answer;
                        answer.Save();
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void SaveAnswers()
        {
            foreach (Control control in pnlQuestions.Controls)
            {
                HtmlGenericControl convertedControl = control as HtmlGenericControl;

                //check this is a question container and not a spacer
                if (convertedControl as HtmlGenericControl != null && convertedControl.Attributes["class"] == "settingrow")
                {
                    IQuestion question = (IQuestion)control.Controls[0];
                    if (!String.IsNullOrEmpty(question.Answer))
                    {
                        QuestionAnswer answer = new QuestionAnswer(question.QuestionGuid, ResponseGuid);
                        answer.Answer = question.Answer;
                        answer.Save();
                    }
                }
            }
        }