Ejemplo n.º 1
0
        private void RemoveTeacher_Click(object sender, RoutedEventArgs e)
        {
            int SelectedTeacherId;

            SelectedTeacherId = TeachersGrid.SelectedIndex;
            Teacher SelectedTeacher;

            SelectedTeacher = (Teacher)TeachersGrid.Items[SelectedTeacherId];
            if (SelectedTeacher.Account != null)
            {
                dbl.RemoveAccount(SelectedTeacher.Account);
            }
            dbl.RemovePerson(SelectedTeacher);
            Teachers.Remove(SelectedTeacher);
        }
Ejemplo n.º 2
0
        private void RemoveDean_Click(object sender, RoutedEventArgs e)
        {
            int SelectedDeanId;

            SelectedDeanId = DeansGrid.SelectedIndex;
            Dean SelectedDean;

            SelectedDean = (Dean)DeansGrid.Items[SelectedDeanId];
            if (SelectedDean.Account != null)
            {
                dbl.RemoveAccount(SelectedDean.Account);
            }
            dbl.RemovePerson(SelectedDean);
            Deans.Remove(SelectedDean);
        }
Ejemplo n.º 3
0
        private void RemoveStudent_Click(object sender, RoutedEventArgs e)
        {
            int SelectedStudentId;

            SelectedStudentId = StudentsGrid.SelectedIndex;
            Student SelectedStudent;

            SelectedStudent = (Student)StudentsGrid.Items[SelectedStudentId];
            if (SelectedStudent.Account != null)
            {
                dbl.RemoveAccount(SelectedStudent.Account);
            }
            dbl.RemovePerson(SelectedStudent);
            Students.Remove(SelectedStudent);
        }