示例#1
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            QuestionTwo frmBefore = new QuestionTwo();

            frmBefore.TopMost = false;
            frmBefore.ShowDialog();
            this.Close();
        }
示例#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 + ".1";
            question.QuestionType   = 2;//多选
            question.QuestionResult = strResult;
            //打分
            int score = 0;

            if (strResult.Contains("A") || (strResult.Contains("B")) || strResult.Contains("C") || strResult.Contains("D"))
            {
                score += 15;
            }
            else if (strResult.Contains("E"))
            {
                score += 5;
            }
            question.QuestionScore = score;

            ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.KangFuZuHuai);


            QuestionTwo frmNext = new QuestionTwo();

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