public GroupTraineetBySchool()
        {
            InitializeComponent();
            bl = BL.FactoryBL.GetBL();

            foreach (Trainee item in bl.getTraineeList())
            {
                foreach (Trainee item1 in bl.GetAllTraineeBySchool(BE.School.drivingSchool))
                {
                    item.NameOfSchool = item1.NameOfSchool;
                }
            }
            this.dataGrid.ItemsSource = bl.getTestsList();
            ListCollectionView collection = new ListCollectionView(bl.getTraineeList());

            collection.GroupDescriptions.Add(new PropertyGroupDescription("NameOfSchool"));
            dataGrid.ItemsSource = collection;
            foreach (Trainee item in bl.getTraineeList())
            {
                foreach (Trainee item1 in bl.GetAllTraineeBySchool(BE.School.d_school))
                {
                    item.NameOfSchool = item1.NameOfSchool;
                }
            }

            this.dataGrid.ItemsSource = bl.getTestsList();
            ListCollectionView collection1 = new ListCollectionView(bl.getTraineeList());

            collection.GroupDescriptions.Add(new PropertyGroupDescription("NameOfSchool"));
            dataGrid.ItemsSource = collection;

            foreach (Trainee item in bl.getTraineeList())
            {
                foreach (Trainee item1 in bl.GetAllTraineeBySchool(BE.School.drivingSchool))
                {
                    item.NameOfSchool = item1.NameOfSchool;
                }
            }

            this.dataGrid.ItemsSource = bl.getTestsList();
            ListCollectionView collection2 = new ListCollectionView(bl.getTraineeList());

            collection.GroupDescriptions.Add(new PropertyGroupDescription("NameOfSchool"));
            dataGrid.ItemsSource = collection;
        }
Пример #2
0
        private void btnGetTests_Click(object sender, RoutedEventArgs e)
        {
            var lst = bl.getTestsList();

            foreach (BE.Test item in lst)
            {
                MessageBox.Show(item.ToString());
            }
        }