public MainWindow() { InitializeComponent(); students = new BindingList <Student>(StudentIO.LoadStudents()); ShowData(); idText.Text = StudentIO.NextId().ToString(); editStudentButton.Enabled = false; }
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(); }