public AdminWindow1()
        {
            InitializeComponent();
            bl = BL.FactoryBL.Instance();
            // List<Trainee> trainees = FactoryBL.Instance().GetTraineesList();
            List <Test> tests = FactoryBL.Instance().GetTestsList();

            //  this.TestDataGrid.Text = tests.ToString();
            //  foreach (var item in trainees) MessageBox.Show(item.ToString());

            this.TraineeDataGrid.ItemsSource = FactoryBL.Instance().GetTraineesList();
            this.TesterDataGrid.ItemsSource  = FactoryBL.Instance().GetTestersList();
            this.TestDataGrid.ItemsSource    = FactoryBL.Instance().GetTestsList();
        }
        private void GroupByCarType_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show
                                      (
                "To sort?", "sort",
                MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes,
                MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign);

            if (result == MessageBoxResult.Yes)
            {
                this.TesterDataGrid.ItemsSource = FactoryBL.Instance().GroupByCarTypeTester(true);
            }
            else
            {
                this.TesterDataGrid.ItemsSource = FactoryBL.Instance().GroupByCarTypeTester(false);
            }
        }
Exemple #3
0
        public static void a()
        {
            IBL bl = FactoryBL.Instance();

            bl.DeleteAllTrainee();



            List <Trainee> list = bl.GetTraineesList();


            for (int i = 0; i < 3; i++)
            {
                Trainee s = new Trainee {
                    ID = i, FName = "first", LName = "last"
                };
                bl.AddTrainee(s);
            }
            list = bl.GetTraineesList();
            foreach (var item in list)
            {
                Console.WriteLine(item.ToString());
            }
            Console.WriteLine("sdsssssssssssssssssssssssssssss");


            bl.DeleteTrainee(1);


            bl.UpdateTrainee(new Trainee {
                ID = 2, FName = "oshri", LName = "cohen"
            });
            list = bl.GetTraineesList();
            foreach (var item in list)
            {
                Console.WriteLine(item.ToString());
            }
        }