예제 #1
0
        //根据班级查询
        private void cboClass_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.cboClass.SelectedIndex == -1)
            {
                MessageBox.Show("请首先选择要查询的班级!", "查询提示");
                return;
            }
            this.gbStat.Text = "[" + this.cboClass.Text.Trim() + "]考试成绩统计";
            //展示考试成绩列表
            this.dgvScoreList.AutoGenerateColumns = false;
            this.dgvScoreList.DataSource          = objSocreService.GetScoreList(this.cboClass.Text.ToString());
            //查询成绩统计结果
            Dictionary <string, string> dic = objSocreService.GetScoreInfo(this.cboClass.SelectedValue.ToString());

            this.lblAttendCount.Text = dic["stuCount"];
            this.lblCSharpAvg.Text   = dic["avgCsharp"];

            this.lblCount.Text = dic["absentCount"];
            //显示缺考学员
            List <string> list = objSocreService.getAbsentList(this.cboClass.SelectedValue.ToString());

            this.lblList.Items.Clear();
            this.lblList.Items.AddRange(list.ToArray());
        }