Exemple #1
0
        private void AddStudentToClass_Load(object sender, EventArgs e)
        {
            cbClass.DisplayMember = "ClassName";
            cbClass.ValueMember   = "ClassID";
            cbClass.DataSource    = ClassList.GetAllClass();
            cbClass.SelectedIndex = 0;

            cbStudent.DisplayMember = "StudentName";
            cbStudent.ValueMember   = "StudentID";
            cbStudent.DataSource    = StudentList.GetAllStudent();
            cbStudent.SelectedIndex = 0;
        }