void save(object obj) { SystemCourseWindow window = obj as SystemCourseWindow; window.Courses = this.SystemCourses.Where(sc => sc.IsChecked)?.ToList(); window.DialogResult = true; }
void save(object obj) { SystemCourseWindow window = obj as SystemCourseWindow; List <UICourse> selectCourses = new List <UICourse>(); var selects = this.Selectives.Where(sc => sc.IsChecked)?.ToList(); selectCourses.AddRange(selects); var academics = this.Academics.Where(ad => ad.IsChecked)?.ToList(); selectCourses.AddRange(academics); window.Courses = selectCourses; window.DialogResult = true; }
void cancel(object obj) { SystemCourseWindow window = obj as SystemCourseWindow; window.DialogResult = false; }