public void deleteEnrollments(Section deleteSection)
 {
     foreach (var enrollment in Enrollments.Where(c => c.Section_Id == deleteSection.Id))
     {
         Enrollments.Remove(enrollment);
     }
 }
        public virtual void RemoveEnrollment(Enrollment enrollment, string comment)
        {
            Enrollments.Remove(enrollment);

            var disenrollment = new Disenrollment(enrollment.Student, enrollment.Course, comment);

            Disenrollments.Add(disenrollment);
        }
Beispiel #3
0
        private void ExecuteDelete(object obj)
        {
            object[] parameterArray = (object[])obj;
            Course   id             = parameterArray[0] as Course;

            Enrollments.Remove(id);
            objschool.Courses.Remove(id);
            (parameterArray[1] as DataGrid).Items.Refresh();
        }