예제 #1
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            string questionResultA = radCheckW03A.Checked ? "A" : radCheckW03B.Checked?"B":"";
            M_QuestionnaireResultDetail questionA = new M_QuestionnaireResultDetail();

            questionA.QuestionCode   = Public.QuestionnaireCode.ZaoAiRuXianAi + ".W03";
            questionA.QuestionType   = 1;   //单选
            questionA.QuestionResult = questionResultA;
            ClientInfo.AddQuestionToQuestionnaire(questionA, QuestionnaireCode.ZaoAiRuXianAi);
            if (radCheckW03A.Checked)
            {
                if (string.IsNullOrEmpty(this.txtAge.Text))
                {
                    MessageBox.Show("请输入您的年龄!");
                    this.label4.ForeColor = Color.Red;
                    return;
                }
                string questionResultB = this.txtAge.Text;
                M_QuestionnaireResultDetail questionB = new M_QuestionnaireResultDetail();
                questionB.QuestionCode   = Public.QuestionnaireCode.ZaoAiRuXianAi + ".W03.1";
                questionB.QuestionType   = 3;   //单选
                questionB.QuestionResult = questionResultB;
                ClientInfo.AddQuestionToQuestionnaire(questionB, QuestionnaireCode.ZaoAiRuXianAi);
            }

            string questionResultC = radCheckW04A.Checked ? "A" : radCheckW04B.Checked?"B":"";
            M_QuestionnaireResultDetail questionC = new M_QuestionnaireResultDetail();

            questionC.QuestionCode   = Public.QuestionnaireCode.ZaoAiRuXianAi + ".W04";
            questionC.QuestionType   = 1;   //单选
            questionC.QuestionResult = questionResultC;
            ClientInfo.AddQuestionToQuestionnaire(questionC, QuestionnaireCode.ZaoAiRuXianAi);

            if (radCheckW04A.Checked)
            {
                string questionResult = radCheckW041A.Checked ? "A" : radCheckW041B.Checked ? "B" : "";
                M_QuestionnaireResultDetail question = new M_QuestionnaireResultDetail();
                question.QuestionCode   = Public.QuestionnaireCode.ZaoAiRuXianAi + ".W04.1";
                question.QuestionType   = 1; //单选
                question.QuestionResult = questionResult;
                ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.ZaoAiRuXianAi);
            }


            string questionResultD = radCheckW06A.Checked ? "A" : radCheckW06B.Checked?"B":"";
            M_QuestionnaireResultDetail questionD = new M_QuestionnaireResultDetail();

            questionD.QuestionCode   = Public.QuestionnaireCode.ZaoAiRuXianAi + ".W06";
            questionD.QuestionType   = 1;   //单选
            questionD.QuestionResult = questionResultD;
            ClientInfo.AddQuestionToQuestionnaire(questionD, QuestionnaireCode.ZaoAiRuXianAi);


            QuestionW2 questionW2 = new QuestionW2();

            questionW2.TopMost = false;
            questionW2.ShowDialog();
            this.Close();
        }
예제 #2
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            var questionW2 = new QuestionW2();

            questionW2.TopMost = false;
            questionW2.ShowDialog();
            this.Close();
        }