Beispiel #1
0
        // Handle Delete Button Click
        private void Btn_DelStudent_Click(object sender, EventArgs e)
        {
            students.Remove(selectedStudent);

            StudentsDB.SaveStudents(students);

            List_Students.ClearSelected();
        }
Beispiel #2
0
        // Adds new student to the list
        public void InsertUpdateStudentList(Student newStudent)
        {
            students.Add(newStudent);

            StudentsDB.SaveStudents(students);

            UpdateDataSource();
            List_Students.SetSelected(0, true);
        }
Beispiel #3
0
        // Constructor
        public MainForm()
        {
            InitializeComponent();

            UpdateDataSource();
            selectedStudent = null;

            List_Students.ClearSelected();
        }
Beispiel #4
0
        // Updates student scores
        public void UpdateStudentScoresList(Student studentToUpdate, BindingList <int> newScores)
        {
            studentToUpdate.Scores = newScores;

            StudentsDB.SaveStudents(students);

            UpdateDataSource();
            List_Students.ClearSelected();
        }