Ejemplo n.º 1
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            QuestionNine frmBefore = new QuestionNine();

            frmBefore.TopMost = false;
            frmBefore.ShowDialog();
            this.Close();
        }
Ejemplo n.º 2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            string strResult = "";

            if (chkA.Checked)
            {
                strResult += "A,";
            }
            if (chkB.Checked)
            {
                strResult += "B,";
            }
            if (chkC.Checked)
            {
                strResult += "C,";
            }
            if (chkD.Checked)
            {
                strResult += "D,";
            }
            if (chkE.Checked)
            {
                strResult += "E,";
            }
            if (chkF.Checked)
            {
                strResult += "F,";
            }

            M_QuestionnaireResultDetail question = new M_QuestionnaireResultDetail();

            question.QuestionCode   = Public.QuestionnaireCode.KangFuZuHuai + ".8";
            question.QuestionType   = 2;//多选
            question.QuestionResult = strResult;
            //打分
            int tempScore = 0;

            if (strResult.Contains("A"))
            {
                tempScore += 5;
            }
            if (strResult.Contains("B"))
            {
                tempScore += 3;
            }
            if (strResult.Contains("C"))
            {
                tempScore += 3;
            }
            if (strResult.Contains("D"))
            {
                tempScore += 2;
            }
            if (strResult.Contains("E"))
            {
                tempScore += 2;
            }
            if (tempScore > 10)
            {
                tempScore = 10;
            }

            question.QuestionScore = tempScore;

            ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.KangFuZuHuai);


            QuestionNine frmNext = new QuestionNine();

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