Пример #1
0
 public void showListMahasiswa(List <DepartmentSummaryModel> items)
 {
     this.Dispatcher.Invoke(() =>
     {
         icListMahasiswa.ItemsSource = ListMahasiswaContext.FromDepartmentSummary(items, GoToListMahasiswaJurusan);
     });
 }
        public static List <ListMahasiswaContext> FromDepartmentSummary(List <DepartmentSummaryModel> departmentSummaries, Action <DepartmentSummaryModel> goToListMahasiswaJurusan)
        {
            var list = new List <ListMahasiswaContext>();

            foreach (var summary in departmentSummaries)
            {
                var context = new ListMahasiswaContext();
                context.DepartmentSummary = summary;
                context._command          = new ListMahasiswaCommand(goToListMahasiswaJurusan);
                list.Add(context);
            }
            return(list);
        }