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

            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,";
            }

            M_QuestionnaireResultDetail question = new M_QuestionnaireResultDetail();

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

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

            ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.KangFuZuHuai);

            QuestionEight frmNext = new QuestionEight();

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