Beispiel #1
0
        private void ShowLessonList(object sender, EventArgs e)
        {
            BUS_UserControls.DisposeControls <LessonList>(this); //Xoá các LessonList không còn dùng

            int courseId = (int)((Control)sender).Tag;           //Lấy courseId từ tag của button gọi hàm

            List <Label> labels = BUS_UserControls.SearchLessonsList(courseId);

            LessonList lessonList = new LessonList(courseId, labels);

            lessonList.Dock = DockStyle.Fill;
            //lessonList.btnChangeCourseClick += new EventHandler(BUS_UserControls.ShowCourse);
            this.Controls.Add(lessonList); //Add LessonList nới tạo vào form

            lessonList.BringToFront();
        }