Beispiel #1
0
        //更新dataGridView
        public void Fill()
        {
            //Display all classes dataGridView ColumnName
            var d = CourseManager.AllCourse();

            d.Columns[0].ColumnName  = "课程ID";
            d.Columns[1].ColumnName  = "课程名称";
            d.Columns[2].ColumnName  = "任课教师";
            d.Columns[3].ColumnName  = "任课教师ID";
            d.Columns[4].ColumnName  = "大类";
            d.Columns[5].ColumnName  = "上课时间";
            d.Columns[6].ColumnName  = "上课地点";
            d.Columns[7].ColumnName  = "课程容量";
            d.Columns[8].ColumnName  = "平时成绩比重";
            dataGridView1.DataSource = d;

            //Display selected classes dataGridView ColumnName
            RefreshSelectedClasses();

            //Display students' grades in dataGridView
            var tab = GradeManager.DisplayStudentGrade(student.Id);

            tab.Columns[0].ColumnName = "课程ID";
            tab.Columns[1].ColumnName = "课程名称";
            tab.Columns[2].ColumnName = "任课教师";
            tab.Columns[3].ColumnName = "平时成绩";
            tab.Columns[4].ColumnName = "期末成绩";
            tab.Columns[5].ColumnName = "总成绩";
            dataGridView3.DataSource  = tab;

            var table = SignManager.DisplaySignList(student.Id);

            table.Columns[0].ColumnName = "课程ID";
            table.Columns[1].ColumnName = "课程名称";
            table.Columns[2].ColumnName = "任课教师ID";
            table.Columns[3].ColumnName = "任课教师";
            table.Columns[4].ColumnName = "大类";
            table.Columns[5].ColumnName = "上课时间";
            table.Columns[6].ColumnName = "上课地点";
            dataGridView4.DataSource    = table;

            var Tab = SignManager.IPaddress(student.Id);

            Tab.Columns[0].ColumnName = "编号";
            Tab.Columns[1].ColumnName = "课程编号";
            Tab.Columns[2].ColumnName = "IP地址";
            Tab.Columns[3].ColumnName = "签到时间";
            Tab.Columns[4].ColumnName = "签到状态";
            dataGridView5.DataSource  = Tab;

            var ta = MessageManager.DisplayTea();

            ta.Columns[0].ColumnName  = "ID";
            ta.Columns[1].ColumnName  = "姓名";
            ta.Columns[2].ColumnName  = "性别";
            ta.Columns[3].ColumnName  = "部门";
            dataGridView10.DataSource = ta;

            var datat = MessageManager.DisplayNotice();

            datat.Columns[0].ColumnName = "编号";
            datat.Columns[1].ColumnName = "标题";
            datat.Columns[2].ColumnName = "发布教师";
            datat.Columns[3].ColumnName = "发布时间";
            dataGridView8.DataSource    = datat;
            dataGridView6.DataSource    = datat;

            var tabb = MessageManager.DisplayStuSend(student);

            tabb.Columns[0].ColumnName = "编号";
            tabb.Columns[1].ColumnName = "教师ID";
            tabb.Columns[2].ColumnName = "留言内容";
            tabb.Columns[3].ColumnName = "时间";
            dataGridView9.DataSource   = tabb;

            var tta = MessageManager.DisplayStuRece(student);

            tta.Columns[0].ColumnName = "编号";
            tta.Columns[1].ColumnName = "教师ID";
            tta.Columns[2].ColumnName = "留言内容";
            tta.Columns[3].ColumnName = "时间";
            dataGridView7.DataSource  = tta;
        }