예제 #1
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            QuestionE2 questionE2 = new QuestionE2();

            questionE2.TopMost = false;
            questionE2.ShowDialog();
            this.Close();
        }
예제 #2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            string questionResultE01 = this.radCheckE01A.Checked ? "A" : radCheckE01B.Checked?"B":"";
            M_QuestionnaireResultDetail questionE01 = new M_QuestionnaireResultDetail();

            questionE01.QuestionCode   = Public.QuestionnaireCode.ZaoAiGanAi + ".E01";
            questionE01.QuestionType   = 1;   //单选
            questionE01.QuestionResult = questionResultE01;
            ClientInfo.AddQuestionToQuestionnaire(questionE01, QuestionnaireCode.ZaoAiGanAi);

            if (radCheckE01A.Checked)
            {
                if (string.IsNullOrEmpty(this.txtE011.Text))
                {
                    MessageBox.Show("请输入您的癌症病史!");
                    this.label6.ForeColor = Color.Red;
                    return;
                }
                string questionResultA = this.txtE011.Text;
                M_QuestionnaireResultDetail questionA = new M_QuestionnaireResultDetail();
                questionA.QuestionCode   = Public.QuestionnaireCode.ZaoAiGanAi + ".E01.1";
                questionA.QuestionType   = 3;   //单选
                questionA.QuestionResult = questionResultA;
                ClientInfo.AddQuestionToQuestionnaire(questionA, QuestionnaireCode.ZaoAiGanAi);
            }

            string questionResult = this.radCheckE02A.Checked ? "A" : radCheckE02B.Checked?"B":"";
            M_QuestionnaireResultDetail question = new M_QuestionnaireResultDetail();

            question.QuestionCode   = Public.QuestionnaireCode.ZaoAiGanAi + ".E02";
            question.QuestionType   = 1;   //单选
            question.QuestionResult = questionResult;
            ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.ZaoAiGanAi);

            if (radCheckE02A.Checked)
            {
                string questionResultB = this.radCheckE021A.Checked ? "A" : radCheckE021B.Checked?"B":"";
                if (string.IsNullOrEmpty(questionResultB))
                {
                    MessageBox.Show("请选择您的检测结果");
                    return;
                }
                M_QuestionnaireResultDetail questionB = new M_QuestionnaireResultDetail();
                questionB.QuestionCode   = Public.QuestionnaireCode.ZaoAiGanAi + ".E02.1";
                questionB.QuestionType   = 1;   //单选
                questionB.QuestionResult = questionResultB;
                ClientInfo.AddQuestionToQuestionnaire(questionB, QuestionnaireCode.ZaoAiGanAi);
            }

            string questionResultE03 = this.radCheckE03A.Checked ? "A" : radCheckE03B.Checked?"B":"";
            M_QuestionnaireResultDetail questionE03 = new M_QuestionnaireResultDetail();

            questionE03.QuestionCode   = Public.QuestionnaireCode.ZaoAiGanAi + ".E03";
            questionE03.QuestionType   = 1;   //单选
            questionE03.QuestionResult = questionResultE03;
            ClientInfo.AddQuestionToQuestionnaire(questionE03, QuestionnaireCode.ZaoAiGanAi);
            if (radCheckE03A.Checked)
            {
                string questionResultC = this.radCheckE031A.Checked ? "A" : radCheckE031B.Checked?"B":"";
                if (string.IsNullOrEmpty(questionResultC))
                {
                    MessageBox.Show("请选择您的检测结果");
                    return;
                }
                M_QuestionnaireResultDetail questionC = new M_QuestionnaireResultDetail();
                questionC.QuestionCode   = Public.QuestionnaireCode.ZaoAiGanAi + ".E03.1";
                questionC.QuestionType   = 1;   //单选
                questionC.QuestionResult = questionResultC;
                ClientInfo.AddQuestionToQuestionnaire(questionC, QuestionnaireCode.ZaoAiGanAi);
            }



            QuestionE2 questionE2 = new QuestionE2();

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