/// <summary> /// 统计全校学员考试信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnStart_Click(object sender, EventArgs e) { this.gbInfo.Text = "全校考试成绩统计"; var scoreList = scoreListService.QueryStudentScore(); if (scoreList.Count == 0) { MessageBox.Show("成绩查询结果为空!", "提示信息"); return; } this.dgvScoreList.DataSource = null; this.dgvScoreList.DataSource = scoreList; //总信息展示 var scoureInfo = scoreListService.GetScoureInfo(); this.lblCount.Text = scoureInfo["absentCount"]; this.LblCSharpAvg.Text = scoureInfo["avgCsharp"]; this.LblDBAvg.Text = scoureInfo["avgDB"]; this.lblAttendCount.Text = scoureInfo["stuCount"]; //缺考人员展示 var absentStudeltList = scoreListService.GetAbsentStudentName(); this.lblList.Items.Clear(); this.lblList.Items.AddRange(absentStudeltList.ToArray()); }