Exemplo n.º 1
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            //停止播放
            if (wmPlayerForm != null)
            {
                wmPlayerForm.Stop();
            }
            QuestionSeven frmBefore = new QuestionSeven();

            frmBefore.TopMost = false;
            frmBefore.Show();
            this.Close();
        }
Exemplo n.º 2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            //停止播放
            if (wmPlayerForm != null)
            {
                wmPlayerForm.Stop();
            }

            //保存答题信息
            //权重分
            decimal weightScore = 0;
            decimal tempSum     = 0;

            M_QuestionnaireResultDetail question1 = new M_QuestionnaireResultDetail();

            question1.QuestionScore = CalculateScore(rd1A, rd1B, rd1C, rd1D, question1, QuestionnaireCode.NaoNianChiDai + ".6.1");
            tempSum += question1.QuestionScore;

            M_QuestionnaireResultDetail question2 = new M_QuestionnaireResultDetail();

            question2.QuestionScore = CalculateScore(rd2A, rd2B, rd2C, rd2D, question2,
                                                     QuestionnaireCode.NaoNianChiDai + ".6.2");
            tempSum += question2.QuestionScore;

            M_QuestionnaireResultDetail question3 = new M_QuestionnaireResultDetail();

            question3.QuestionScore = CalculateScore(rd3A, rd3B, rd3C, rd3D, question3,
                                                     QuestionnaireCode.NaoNianChiDai + ".6.3");
            tempSum += question3.QuestionScore;

            M_QuestionnaireResultDetail question4 = new M_QuestionnaireResultDetail();

            question4.QuestionScore = CalculateScore(rd4A, rd4B, rd4C, rd4D, question4,
                                                     QuestionnaireCode.NaoNianChiDai + ".6.4");
            tempSum += question4.QuestionScore;

            M_QuestionnaireResultDetail question5 = new M_QuestionnaireResultDetail();

            question5.QuestionScore = CalculateScore(rd5A, rd5B, rd5C, rd5D, question5, QuestionnaireCode.NaoNianChiDai + ".6.5");
            tempSum += question5.QuestionScore;

            M_QuestionnaireResultDetail question6 = new M_QuestionnaireResultDetail();

            question6.QuestionScore = CalculateScore(rd6A, rd6B, rd6C, rd6D, question6, QuestionnaireCode.NaoNianChiDai + ".6.6");
            tempSum += question6.QuestionScore;

            M_QuestionnaireResultDetail question7 = new M_QuestionnaireResultDetail();

            question7.QuestionScore = CalculateScore(rd7A, rd7B, rd7C, rd7D, question7, QuestionnaireCode.NaoNianChiDai + ".6.7");
            tempSum += question7.QuestionScore;

            M_QuestionnaireResultDetail question8 = new M_QuestionnaireResultDetail();

            question8.QuestionScore = CalculateScore(rd8A, rd8B, rd8C, rd8D, question8, QuestionnaireCode.NaoNianChiDai + ".6.8");
            tempSum += question8.QuestionScore;

            M_QuestionnaireResultDetail question9 = new M_QuestionnaireResultDetail();

            question9.QuestionScore = CalculateScore(rd9A, rd9B, rd9C, rd9D, question9, QuestionnaireCode.NaoNianChiDai + ".6.9");
            tempSum += question9.QuestionScore;

            M_QuestionnaireResultDetail question10 = new M_QuestionnaireResultDetail();

            question10.QuestionScore = CalculateScore(rd10A, rd10B, rd10C, rd10D, question10, QuestionnaireCode.NaoNianChiDai + ".6.10");
            tempSum += question10.QuestionScore;

            //计算第六大题权重分
            weightScore = tempSum * Convert.ToDecimal(-0.8);

            //赋值并保存
            question1.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question1, QuestionnaireCode.NaoNianChiDai);

            question2.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question2, QuestionnaireCode.NaoNianChiDai);

            question3.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question3, QuestionnaireCode.NaoNianChiDai);

            question4.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question4, QuestionnaireCode.NaoNianChiDai);

            question5.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question5, QuestionnaireCode.NaoNianChiDai);

            question6.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question6, QuestionnaireCode.NaoNianChiDai);

            question7.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question7, QuestionnaireCode.NaoNianChiDai);

            question8.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question8, QuestionnaireCode.NaoNianChiDai);

            question9.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question9, QuestionnaireCode.NaoNianChiDai);

            question10.PQuestionWeightScore = weightScore;
            ClientInfo.AddQuestionToQuestionnaire(question10, QuestionnaireCode.NaoNianChiDai);


            //AddResult(rd1A, rd1B, rd1C, rd1D, QuestionnaireCode.NaoNianChiDai + ".6.1");
            //AddResult(rd2A, rd2B, rd2C, rd2D, QuestionnaireCode.NaoNianChiDai + ".6.2");
            //AddResult(rd3A, rd3B, rd3C, rd3D, QuestionnaireCode.NaoNianChiDai + ".6.3");
            //AddResult(rd4A, rd4B, rd4C, rd4D, QuestionnaireCode.NaoNianChiDai + ".6.4");
            //AddResult(rd5A, rd5B, rd5C, rd5D, QuestionnaireCode.NaoNianChiDai + ".6.5");
            //AddResult(rd6A, rd6B, rd6C, rd6D, QuestionnaireCode.NaoNianChiDai + ".6.6");
            //AddResult(rd7A, rd7B, rd7C, rd7D, QuestionnaireCode.NaoNianChiDai + ".6.7");
            //AddResult(rd8A, rd8B, rd8C, rd8D, QuestionnaireCode.NaoNianChiDai + ".6.8");
            //AddResult(rd9A, rd9B, rd9C, rd9D, QuestionnaireCode.NaoNianChiDai + ".6.9");
            //AddResult(rd10A, rd10B, rd10C, rd10D, QuestionnaireCode.NaoNianChiDai + ".6.10");

            //跳转第七个页面
            QuestionSeven seven = new QuestionSeven();

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