Exemplo n.º 1
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            QuestionC3 questionC3 = new QuestionC3();

            questionC3.TopMost = false;
            questionC3.ShowDialog();
            this.Close();
        }
Exemplo n.º 2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (radCheckC03A.Checked)
            {
                string questionResult = "A";
                M_QuestionnaireResultDetail question = new M_QuestionnaireResultDetail();
                question.QuestionCode   = QuestionnaireCode.ZaoAiFeiAi + ".C03";
                question.QuestionType   = 1; //单选
                question.QuestionResult = questionResult;
                ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.ZaoAiFeiAi);
            }

            if (radCheckC03B.Checked)
            {
                string questionResult = "B";
                M_QuestionnaireResultDetail question = new M_QuestionnaireResultDetail();
                question.QuestionCode   = QuestionnaireCode.ZaoAiFeiAi + ".C03";
                question.QuestionType   = 1; //单选
                question.QuestionResult = questionResult;
                ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.ZaoAiFeiAi);

                string resultChildA = radCheckC031A.Checked ? "A" : radCheckC031B.Checked?"B":"";
                M_QuestionnaireResultDetail questionChildA = new M_QuestionnaireResultDetail();
                questionChildA.QuestionCode   = QuestionnaireCode.ZaoAiFeiAi + ".C03.1";
                questionChildA.QuestionType   = 1; //单选
                questionChildA.QuestionResult = resultChildA;
                ClientInfo.AddQuestionToQuestionnaire(questionChildA, QuestionnaireCode.ZaoAiFeiAi);

                //string resultChildB = radCheckC032A.Checked ? "A" : radCheckC032B.Checked ? "B" : "";
                string resultChildB = radCheckC032A.Checked ? "A" : radCheckC032B.Checked ? "B" : radCheckC032C.Checked?"C":radCheckC032D.Checked?"D":"";
                M_QuestionnaireResultDetail questionChildB = new M_QuestionnaireResultDetail();
                questionChildB.QuestionCode   = QuestionnaireCode.ZaoAiFeiAi + ".C03.2";
                questionChildB.QuestionType   = 1; //单选
                questionChildB.QuestionResult = resultChildB;
                ClientInfo.AddQuestionToQuestionnaire(questionChildB, QuestionnaireCode.ZaoAiFeiAi);
            }

            if (radCheckC03C.Checked)
            {
                string questionResult = "C";
                M_QuestionnaireResultDetail question = new M_QuestionnaireResultDetail();
                question.QuestionCode   = QuestionnaireCode.ZaoAiFeiAi + ".C03";
                question.QuestionType   = 1; //单选
                question.QuestionResult = questionResult;
                ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.ZaoAiFeiAi);

                string resultChildA = radCheckC031A.Checked ? "A" : radCheckC031B.Checked?"B":"";
                M_QuestionnaireResultDetail questionChildA = new M_QuestionnaireResultDetail();
                questionChildA.QuestionCode   = QuestionnaireCode.ZaoAiFeiAi + ".C03.1";
                questionChildA.QuestionType   = 1; //单选
                questionChildA.QuestionResult = resultChildA;
                ClientInfo.AddQuestionToQuestionnaire(questionChildA, QuestionnaireCode.ZaoAiFeiAi);

                string resultChildB = radCheckC032A.Checked ? "A" : radCheckC032B.Checked ? "B" : radCheckC032C.Checked?"C":radCheckC032D.Checked?"D":"";
                M_QuestionnaireResultDetail questionChildB = new M_QuestionnaireResultDetail();
                questionChildB.QuestionCode   = QuestionnaireCode.ZaoAiFeiAi + ".C03.2";
                questionChildB.QuestionType   = 1; //单选
                questionChildB.QuestionResult = resultChildB;
                ClientInfo.AddQuestionToQuestionnaire(questionChildB, QuestionnaireCode.ZaoAiFeiAi);

                string resultChildC = radCheckC033A.Checked ? "A" : radCheckC033B.Checked ? "B" : "";
                M_QuestionnaireResultDetail questionChildC = new M_QuestionnaireResultDetail();
                questionChildC.QuestionCode   = QuestionnaireCode.ZaoAiFeiAi + ".C03.3";
                questionChildC.QuestionType   = 1; //单选
                questionChildC.QuestionResult = resultChildC;
                ClientInfo.AddQuestionToQuestionnaire(questionChildC, QuestionnaireCode.ZaoAiFeiAi);
            }

            QuestionC3 questionC3 = new QuestionC3();

            questionC3.TopMost = false;
            questionC3.ShowDialog();
            Close();
        }