public void showListSubject(List <SubjectModel> items) { this.Dispatcher.Invoke(() => { icListSubject.ItemsSource = ListStudentSubjectsContext.FromSubjectModel(items, student, GoToListKehadiranMahasiswa); }); }
public static List <ListStudentSubjectsContext> FromSubjectModel(List <SubjectModel> listSubject, StudentModel student, Action <StudentSubjectModel> goToListDetailKehadiranMhs) { var list = new List <ListStudentSubjectsContext>(); foreach (var subject in listSubject) { var context = new ListStudentSubjectsContext(); context.StudentSubject.Subject = subject; context.StudentSubject.Student = student; context._command = new ListStudentSubjectsCommand(goToListDetailKehadiranMhs); list.Add(context); } return(list); }