Exemple #1
0
 public MainWindow()
 {
     InitializeComponent();
     students = new BindingList <Student>(StudentIO.LoadStudents());
     ShowData();
     idText.Text = StudentIO.NextId().ToString();
     editStudentButton.Enabled = false;
 }
Exemple #2
0
        private void handleLoadButtonClick()
        {
            toggleStudentDetailsEdit(false);
            List <Student> loadedStudents = StudentIO.LoadStudents();

            if (studentsListBox.Items.Count != loadedStudents.Count)
            {
                students = new BindingList <Student>(loadedStudents);
                ShowData();
            }
            idText.Text = StudentIO.NextId().ToString();
        }