private void btnBefore_Click(object sender, EventArgs e) { QuestionThree frmBefore = new QuestionThree(); frmBefore.TopMost = false; frmBefore.ShowDialog(); this.Close(); }
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,"; } M_QuestionnaireResultDetail question = new M_QuestionnaireResultDetail(); question.QuestionCode = Public.QuestionnaireCode.KangFuZuHuai + ".2"; question.QuestionType = 2;//多选 question.QuestionResult = strResult; //打分 int tempScore = 0; if (strResult.Contains("A")) { tempScore += 3; } if (strResult.Contains("B")) { tempScore += 2; } if (strResult.Contains("C")) { tempScore += 5; } if (tempScore > 5) { tempScore = 5; } question.QuestionScore = tempScore; ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.KangFuZuHuai); QuestionThree frmNext = new QuestionThree(); frmNext.TopMost = false; frmNext.ShowDialog(); this.Close(); }