private void SumResult(object sender, SatisfactionResultEventArgs e) { Count += e.Count; AnswerID_count += e.AnswerID_count; //----------------- //该调查统计结果 decimal d = decimal.Round(Convert.ToDecimal(AnswerID_count) / Convert.ToDecimal((Count == 0 ? 1 : Count)) * 100, 1); if (d >= distribute.PERCENTAGE) { txtResult.Text = "通过( " + AnswerID_count.ToString() + "/" + Count.ToString() + " = " + d.ToString() + "% )"; } else { txtResult.Text = "不通过( " + AnswerID_count.ToString() + "/" + Count.ToString() + " = " + d.ToString() + "% )"; } }
private void SumResult(object sender, SatisfactionResultEventArgs e) { Count += e.Count; AnswerID_count += e.AnswerID_count; //----------------- //该调查统计结果 decimal d = decimal.Round(Convert.ToDecimal(AnswerID_count) / Convert.ToDecimal((Count == 0 ? 1 : Count)) * 100, 1); if (d >= distribute.PERCENTAGE) txtResult.Text = "通过( " + AnswerID_count.ToString() + "/" + Count.ToString() + " = " + d.ToString() + "% )"; else txtResult.Text = "不通过( " + AnswerID_count.ToString() + "/" + Count.ToString() + " = " + d.ToString() + "% )"; }