예제 #1
0
        private void btnUpdateTrainee_Click(object sender, RoutedEventArgs e)
        {
            var trainee = bl.getTraineeList().Find(x => x.ID == 317801157);//the id can be given in a textbox in the future

            bl.updateTrainee(trainee);
            try
            {
                bl.updateTrainee(Abigail);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public GroupTraineesByTester()
        {
            InitializeComponent();
            bl = BL.FactoryBL.GetBL();

            foreach (BE.Trainee item in bl.getTraineeList())
            {
                (item.NameOfTeacher) = bl.getTraineeTeacher(item.NameOfTeacher);
            }
            this.dataGrid.ItemsSource = bl.getTraineeList();
            ListCollectionView collection = new ListCollectionView(bl.getTraineeList());

            collection.GroupDescriptions.Add(new PropertyGroupDescription("NameOfTeacher"));
            dataGrid.ItemsSource = collection;
        }
예제 #3
0
        private void btnGetTrainees_Click(object sender, RoutedEventArgs e)
        {
            var lst = bl.getTraineeList();

            foreach (BE.Trainee item in lst)
            {
                MessageBox.Show(item.ToString());
            }
            ;
        }
        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;
        }