Esempio n. 1
0
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            t.Address       = AddressTextBox.Text.ToAddress();
            t.Date_of_birth = Date_of_birthDatePicker.SelectedDate.Value;
            t.Max_tests     = arr.Length;
            t.Copy(t.Schedule, arr);

            try
            {
                myBL.Add_tester(t);
                MessageBox.Show("The tester was added to the system", "", MessageBoxButton.OK, MessageBoxImage.Information);
                MainWindow.myWindow.Close();
            }
            catch (Exception E)
            {
                MessageBox.Show(E.Message);
            }
        }
Esempio n. 2
0
        void Initialize()
        {
            bool[,] aa = new bool[6, 5];
            aa[0, 0]   = true;
            aa[0, 1]   = true;
            List <DateTime> d = new List <DateTime>();
            //  d.Add(new DateTime(2019, 01, 06, 9, 0, 0));


            Tester t = new Tester("123456789", "M", "n", "*****@*****.**", new DateTime(1970, 10, 12), Gender.Male, "0541123215",
                                  new Address("dfg", "545", "dfg"), 2, 20, CarType.Motorcycle, GearType.Auto, aa, 30, d);

            t.Appointments.Add(new DateTime(2019, 1, 13, 9, 0, 0));
            myBL.Add_tester(t);

            Trainee tr = new Trainee("987654321", "Cohen", "Yoel", "*****@*****.**", Gender.Male, "0548875540", new Address("King George", "21", "Jerusalem"),
                                     new DateTime(1990, 10, 12), CarType.Motorcycle, GearType.Auto, "SmartDrive", "Benny Goren", 20);

            myBL.Add_trainee(tr);
        }