Ejemplo n.º 1
0
        //根据班级查询
        private void cboClass_SelectedIndexChanged(object sender, EventArgs e)
        {
            StudentClass coSelected = (StudentClass)cboClass.SelectedItem;

            gbStat.Text = "班级考试成绩统计";

            dgvScoreList.AutoGenerateColumns = false;
            dgvScoreList.DataSource          = objScore.GetScoreList(cboClass.Text);
            Dictionary <string, string> scoreDic = new Dictionary <string, string>();

            if (cboClass.SelectedIndex != -1)
            {
                //统计平均分数
                scoreDic = objScore.GetScoreInfo(coSelected.ClassId.ToString());
            }
            else
            {
                scoreDic = objScore.GetScoreInfo();
            }

            lblAttendCount.Text = scoreDic["stuCount"];
            lblDBAvg.Text       = scoreDic["avgSql"];
            lblCSharpAvg.Text   = scoreDic["avgCsharp"];
            lblCount.Text       = scoreDic["absentCount"];
            //显示缺考人员
            lblList.DataSource = null;
            if (cboClass.SelectedIndex != -1)
            {
                lblList.DataSource = objScore.GetAbsentList(coSelected.ClassId.ToString());
            }
            else
            {
                lblList.DataSource = objScore.GetAbsentList();
            }
        }
Ejemplo n.º 2
0
        //统计全校考试成绩
        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());
            }
        }
Ejemplo n.º 3
0
        private void Query(string className)
        {
            //[1]定义方法的输出参数(相对于后台调用)
            Dictionary <string, string> dicParam = null;
            List <string> absentList             = null;
            //[2]执行查询并接收返回的集合与参数
            List <StudentExt> scoreList = objScoreService.GetScoreInfo(className, out dicParam, out absentList);

            //[3]显示结果查询列表
            this.dgvScoreList.AutoGenerateColumns = false;
            this.dgvScoreList.DataSource          = scoreList;
            //[4]显示统计信息(方法输出参数)
            this.lblAttendCount.Text = dicParam["stuCount"];
            this.lblCount.Text       = dicParam["absentCount"];
            this.lblDBAvg.Text       = dicParam["avgDB"];
            this.lblCSharpAvg.Text   = dicParam["avgCSharp"];
            //[5]显示缺考人员列表
            this.lblList.Items.Clear();
            if (absentList.Count != 0)
            {
                this.lblList.Items.AddRange(absentList.ToArray());
            }
            else
            {
                this.lblList.Items.Add("没有缺考");
            }
        }
Ejemplo n.º 4
0
        private void cboClass_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.cboClass.SelectedIndex == -1)
            {
                MessageBox.Show("Select a Class");
                return;
            }
            //ScoList AutoGenerateColumns
            this.dgvScoreList.AutoGenerateColumns = false;
            this.dgvScoreList.DataSource          = objScoreListService.GetScoreList(this.cboClass.Text);
            //get ScoreInfo
            Dictionary <string, string> dic = objScoreListService.GetScoreInfo(this.cboClass.SelectedIndex.ToString());

            this.lblAttendCount.Text = dic["stuCount"];
            this.lblCSharpAvg.Text   = dic["avgCsharp"];
            this.lblDBAvg.Text       = dic["avgDB"];
            this.lblCount.Text       = dic["absentCount"];
            //show absentce students
            List <string> list = objScoreListService.GetAbsentList(this.cboClass.SelectedIndex.ToString());

            this.lblList.Items.Clear();
            this.lblList.Items.AddRange(list.ToArray());
        }
Ejemplo n.º 5
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());
        }
Ejemplo n.º 6
0
        //ͳ¼ÆȫУ¿¼ÊԳɼ¨
        private void btnStat_Click(object sender, EventArgs e)
        {
            this.gbStat.Text = "全校考试成绩统计";
            this.dgvScoreList.AutoGenerateColumns = false;
            this.dgvScoreList.DataSource          = objScoreService.GetScoreList("");
            //查询并显示成绩统计
            Dictionary <string, string> dic = objScoreService.GetScoreInfo();

            this.lblAttendCount.Text = dic["stuCount"];
            this.lblCSharpAvg.Text   = dic["avgCSharp"];
            this.lblCount.Text       = dic["absentCount"];
            this.lblDBAvg.Text       = dic["avgDB"];
            //显示缺考列表
            List <string> list = objScoreService.GetAbsentList();

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