示例#1
0
        private void curriculumListLbox_SelectedIndexChanged(object sender, EventArgs e)
        {
            //(long)curriculumListLbox.SelectedValue

            //更新右侧gridview

            var selectedproperty = (KeyValuePair <long, string>)curriculumListLbox.SelectedItem; // 获取已经选择的项目

            var sktableiqueryable = from c in _fDataModule.GetSktable07Viewro()                  // 获取上课编号
                                    where c.KKNO == selectedproperty.Key                         //选啊选啊选....
                                    select c;

            //更新下方的label
            _sktable = sktableiqueryable.ToList();                                          //转成list选完以后转成list

            var dt = DataDownloadControl.GetDisplayClassStatusTable(_sktable);              //将list转换成可以直接显示的datatable

            rollCallGridView.DataSource = dt;                                               //给右侧的gridview绑定数据源

            var currentkkrecord = _jsandkkviewro.Find(x => x.KKNO == selectedproperty.Key); //linq表达式,得到这堂课的其他信息.

            //给label们赋值
            teacherNameLbl.Text = currentkkrecord.JSNAME;

            studentTotalLbl.Text = currentkkrecord.XXRS.ToString();

            courseNameLbl.Text = currentkkrecord.KKNAME;
        }
示例#2
0
        private void downloadCourseBtn_Click(object sender, EventArgs e)
        {
            //下载课程.调用一个函数 将kkno和datamodule传进去. 剩下的由它负责就好啦

            var selectedproperty = (KeyValuePair <long, string>)curriculumListLbox.SelectedItem;

            DataDownloadControl.DownloadOneCourse(selectedproperty.Key);
        }