private void btnBefore_Click(object sender, EventArgs e) { //停止播放 if (wmPlayerForm != null) { wmPlayerForm.Stop(); } QuestionSix frmBefore = new QuestionSix(); frmBefore.TopMost = false; frmBefore.Show(); this.Close(); }
private void btnNext_Click(object sender, EventArgs e) { //停止播放 if (wmPlayerForm != null) { wmPlayerForm.Stop(); } //第五题,每答对一项记1分,共2分,权重1.4 int tempScore = 0; string strResult = ""; if (rd1A.Checked) { strResult += "A,"; } if (rd1B.Checked) { strResult += "B,"; } M_QuestionnaireResultDetail question1 = new M_QuestionnaireResultDetail(); question1.QuestionResult = strResult; question1.QuestionCode = QuestionnaireCode.NaoNianChiDai + ".5.1"; question1.QuestionType = 1; question1.PQuestionCode = QuestionnaireCode.NaoNianChiDai + ".5"; if (strResult.Contains("A")) { question1.QuestionScore = 1; //(decimal) (1*1.4); tempScore += 1; } else { question1.QuestionScore = 0; } //ClientInfo.AddQuestionToQuestionnaire(question1, QuestionnaireCode.NaoNianChiDai); if (rd2A.Checked) { strResult = "A,"; } if (rd2B.Checked) { strResult = "B,"; } M_QuestionnaireResultDetail question2 = new M_QuestionnaireResultDetail(); question2.QuestionResult = strResult; question2.QuestionCode = QuestionnaireCode.NaoNianChiDai + ".5.2"; question2.QuestionType = 1; question2.PQuestionCode = QuestionnaireCode.NaoNianChiDai + ".5"; if (strResult.Contains("A")) { question2.QuestionScore = 1; //(decimal) (1*1.4); tempScore += 1; } else { question2.QuestionScore = 0; } //ClientInfo.AddQuestionToQuestionnaire(question2, QuestionnaireCode.NaoNianChiDai); //计算所属大题加权分,保存答案 decimal weightScore = Convert.ToDecimal(tempScore * 1.4); question1.PQuestionWeightScore = weightScore; ClientInfo.AddQuestionToQuestionnaire(question1, QuestionnaireCode.NaoNianChiDai); question2.PQuestionWeightScore = weightScore; ClientInfo.AddQuestionToQuestionnaire(question2, QuestionnaireCode.NaoNianChiDai); QuestionSix six = new QuestionSix(); six.TopMost = false; //six.Show(); six.Show(); this.Close(); }