Exemplo n.º 1
0
        //学生列表行改变时的事件响应函数
        private void lvStudentList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lvStudentList.SelectedItems.Count == 0)
            {
                return;                                        //未选中任何一行
            }
            string sno = lvStudentList.SelectedItems[0].Text;  //取选中行中的第一行的第一列文本

            tbStudentNo.Text   = sno;
            tbStudentName.Text = lvStudentList.SelectedItems[0].SubItems[1].Text;
            cbFaculty.Text     = lvStudentList.SelectedItems[0].SubItems[4].Text;
            StudentManageAction.loadSelectedCourse(lvSelectedCourse, sno);   //与课本不同,多一个参数
            StudentManageAction.loadUnselectedCourse(lvUnselectedCourse, sno);
        }
Exemplo n.º 2
0
 public void loadSelectCourse(ListView lv)
 {
     StudentManageAction.loadSelectedCourse(lv, studentNo);
 }