Пример #1
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            QuestionThree frmBefore = new QuestionThree();

            frmBefore.TopMost = false;
            frmBefore.ShowDialog();
            this.Close();
        }
Пример #2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            M_QuestionnaireResultDetail question1 = new M_QuestionnaireResultDetail();

            if (rd1A.Checked)
            {
                question1.QuestionResult = "A,";
            }
            if (rd1B.Checked)
            {
                question1.QuestionResult = "B,";
            }
            //打分
            question1.QuestionScore = !string.IsNullOrEmpty(question1.QuestionResult) ?(question1.QuestionResult.Contains("A") ? 10 : 0):0;

            AddResult(question1, QuestionnaireCode.KangFuJiZhu + ".2.A.1");


            M_QuestionnaireResultDetail question2 = new M_QuestionnaireResultDetail();

            if (rd2A.Checked)
            {
                question2.QuestionResult = "A,";
            }
            if (rd2B.Checked)
            {
                question2.QuestionResult = "B,";
            }
            //打分
            question2.QuestionScore = !string.IsNullOrEmpty(question2.QuestionResult) ? (question2.QuestionResult.Contains("A") ? 10 : 0) : 0;

            AddResult(question2, QuestionnaireCode.KangFuJiZhu + ".2.A.2");

            M_QuestionnaireResultDetail question3 = new M_QuestionnaireResultDetail();

            if (rd3A.Checked)
            {
                question3.QuestionResult = "A,";
            }
            if (rd3B.Checked)
            {
                question3.QuestionResult = "B,";
            }
            //打分
            question3.QuestionScore = !string.IsNullOrEmpty(question3.QuestionResult) ? (question3.QuestionResult.Contains("A") ? 10 : 0) : 0;

            AddResult(question3, QuestionnaireCode.KangFuJiZhu + ".2.A.3");

            M_QuestionnaireResultDetail question4 = new M_QuestionnaireResultDetail();

            if (rd4A.Checked)
            {
                question4.QuestionResult = "A,";
            }
            if (rd4B.Checked)
            {
                question4.QuestionResult = "B,";
            }
            //打分
            question4.QuestionScore = !string.IsNullOrEmpty(question4.QuestionResult) ? (question4.QuestionResult.Contains("A") ? 10 : 0) : 0;

            AddResult(question4, QuestionnaireCode.KangFuJiZhu + ".2.A.4");

            M_QuestionnaireResultDetail question5 = new M_QuestionnaireResultDetail();

            if (rd5A.Checked)
            {
                question5.QuestionResult = "A,";
            }
            if (rd5B.Checked)
            {
                question5.QuestionResult = "B,";
            }
            //打分
            question5.QuestionScore = !string.IsNullOrEmpty(question5.QuestionResult) ? (question5.QuestionResult.Contains("A") ? 10 : 0) : 0;

            AddResult(question5, QuestionnaireCode.KangFuJiZhu + ".2.A.5");


            QuestionThree frmNext = new QuestionThree();

            frmNext.TopMost = false;
            //frmNext.Show();
            frmNext.ShowDialog();
            this.Close();
        }