//统计全校考试成绩 private void btnStat_Click(object sender, EventArgs e) { this.gbStat.Text = "统计全校考试信息"; this.dgvScoreList.AutoGenerateColumns = false; this.dgvScoreList.DataSource = objScoreListService.GetScoreList1(""); // new Common.DataGridViewStyle().DgvStyle1(this.dgvScoreList); //显示考试成绩统计 Dictionary <string, string> dic = objScoreListService.GetScoreInfo(); lblAttendCount.Text = dic["stuCount"].ToString(); lblCount.Text = dic["absentCount"].ToString(); lblCSharpAvg.Text = dic["avgCSharp"].ToString(); lblDBAvg.Text = dic["avgDB"].ToString(); //显示缺考人员 List <string> list = objScoreListService.GetAbsentScoreList(); lblList.Items.Clear(); if (list == null) { lblList.Items.Add("没有缺考人员"); } else { this.lblList.Items.AddRange(list.ToArray()); } }