Example #1
0
        private void LoadStudentsListBox()
        {
            lstStudents.Items.Clear();

            foreach (var student in Students)
            {
                lstStudents.Items.Add(student);
            }
            StudentDB.SaveStudents(Students);

            if (lstStudents.Items.Count > 0)
            {
                lstStudents.SelectedIndex = -1;
            }
            else
            {
                ClearLabels();
            }
        }
Example #2
0
        private void FrmStudentScores_Load(object sender, EventArgs e)
        {
            Students = StudentDB.GetStudents();

            LoadStudentsListBox();
        }