public Tester_UserControl()
        {
            InitializeComponent();


            bl              = FactoryBL.GetBL(Configuration.BLType);
            bl.TesterEvent += TesterEvent;
            string[] SortByValues = { "firstName", "lastName", "id", "max test in week", "gender", "age", "exp years", "car type", "max distance" };
            listAllTester              = bl.getAllTester(); //To prevent from get the all list every simple action, save the whole list until the original list change (in the event this variable will get the new list)
            currentUseList             = listAllTester;     //on this variable all the changes will be done
            ComboBoxSortBy.ItemsSource = SortByValues;
            CreateDemoEntites();
            filtersControl.radioButtonAscending.Checked  += RadioButtonAscending_Checked;
            filtersControl.radioButtonDescending.Checked += RadioButtonDescending_Checked;
            testerDataGrid.DataContext = currentUseList;
            filtersControl.radioButtonAscending.Checked       += RadioButtonAscending_Checked;
            filtersControl.radioButtonDescending.Checked      += RadioButtonDescending_Checked;
            filtersControl.checkBoxFilterMotorcycle.Checked   += CheckBoxFilterMotorcycle_Checked;
            filtersControl.checkBoxFilterMotorcycle.Unchecked += CheckBoxFilterMotorcycle_Unchecked;
            filtersControl.checkBoxFilterprivetCar.Checked    += CheckBoxFilterprivetCar_Checked;
            filtersControl.checkBoxFilterprivetCar.Unchecked  += CheckBoxFilterprivetCar_Unchecked;
            filtersControl.checkBoxFilterSmallTruck.Checked   += CheckBoxFilterSmallTruck_Checked;
            filtersControl.checkBoxFilterSmallTruck.Unchecked += CheckBoxFilterSmallTruck_Unchecked;
            filtersControl.checkBoxFilterTruck.Checked        += CheckBoxFilterTruck_Checked;
            filtersControl.checkBoxFilterTruck.Unchecked      += CheckBoxFilterTruck_Unchecked;
            findAndSort();
        }
Ejemplo n.º 2
0
 public AddOrderWindow(Host hostIN)
 {
     InitializeComponent();
     myIBL = FactoryBL.GetBL();
     host  = hostIN;
     HostingUnits.ItemsSource = myIBL.GetHostingUnitsOfHost(host);
 }
Ejemplo n.º 3
0
 public AddMotherWindow()
 {
     InitializeComponent();
     bl     = FactoryBL.GetBL();
     mother = new Mother();
     this.MotherDetails.DataContext = mother;
 }
Ejemplo n.º 4
0
 public Remove_Contract()
 {
     InitializeComponent();
     bl = FactoryBL.GetBL();
     Grid.DataContext = contract;
     Contract.Counter--;
 }
Ejemplo n.º 5
0
 public AdminWindow()
 {
     InitializeComponent();
     bl          = FactoryBL.GetBL();
     list        = bl.GetAdmins().ToList();
     DataContext = list;
 }
Ejemplo n.º 6
0
        public Update_Contract()
        {
            InitializeComponent();

            bl = FactoryBL.GetBL();
            Grid.DataContext = contract;
        }
Ejemplo n.º 7
0
        public Add_Child()
        {
            InitializeComponent();

            bl = FactoryBL.GetBL();
            Grid.DataContext = child;
        }
Ejemplo n.º 8
0
        public log_in_tester(Tester tester)
        {
            InitializeComponent();
            tester1     = tester;
            DataContext = tester;
            bl          = FactoryBL.GetBL();
            string DirPath = Directory.GetParent(Environment.CurrentDirectory).Parent.FullName;

            imageNotWorking.Source = new BitmapImage(new Uri(DirPath + "/images/עובד לא.jpg"));
            notWorking.ImageSource = imageNotWorking.Source;
            imageWorking.Source    = new BitmapImage(new Uri(DirPath + "/images/עובד.jpg"));
            working.ImageSource    = imageWorking.Source;
            foreach (Button item in buttons.Children)
            {
                int x = int.Parse(item.Name[1].ToString());
                int y = int.Parse(item.Name[3].ToString());
                if (tester.mat[x, y] == true)
                {
                    item.Background = working;
                }
                if (tester.mat[x, y] == false)
                {
                    item.Background = notWorking;
                }
            }
        }
Ejemplo n.º 9
0
        public Add_Mother()
        {
            InitializeComponent();

            bl = FactoryBL.GetBL();
            Grid.DataContext = mother;
        }
Ejemplo n.º 10
0
        public ContractCard(Contract contractToShow, DataGrid dataGridInput)
        {
            InitializeComponent();
            dataGridToRefresh = dataGridInput;
            bl             = FactoryBL.GetBL();
            contractOfCard = contractToShow.GetCopy();

            ID_TextBlock.Text       = contractToShow.ContID.ToString();
            Child_ID_TextBlock.Text = contractToShow.ChildID.ToString();
            Nanny_ID_TextBlock.Text = contractToShow.NannyID.ToString();
            Introductory_Meeting_CheckBox.IsChecked = contractToShow.IsIntroductoryMeeting;
            SpeicalDetailsOfMeeting.Text            = contractToShow.SpeicalDetailsOfMeeting;
            signed_CheckBox.IsChecked    = contractToShow.IsContractSigned;
            PaymentMethod_TextBlock.Text = contractToShow.PaymentMethod.ToString();
            if (PaymentMethod_TextBlock.Text == "Hourly")
            {
                Calculated_wage_TextBlock.Text = contractToShow.HourlySalary.ToString();
            }
            else
            {
                Calculated_wage_TextBlock.Text = contractToShow.MonthlySalary.ToString();
            }
            Start_Date_TextBlock.Text = $"{contractToShow.StartDate.Day}/{contractToShow.StartDate.Month}/{contractToShow.StartDate.Year}";
            End_Date_TextBlock.Text   = $"{contractToShow.EndDate.Day}/{contractToShow.EndDate.Month}/{contractToShow.EndDate.Year}";
        }
Ejemplo n.º 11
0
 public UpdateChild(Child ch)
 {
     InitializeComponent();
     child            = ch;
     this.DataContext = child;
     bl = FactoryBL.GetBL();
 }
Ejemplo n.º 12
0
        public Add_Contract()
        {
            InitializeComponent();

            bl = FactoryBL.GetBL();
            grid.DataContext = contract;
        }
Ejemplo n.º 13
0
        public update_tester(Tester oldTester, log_in_tester log_In)
        {
            InitializeComponent();
            log         = log_In;
            tester      = oldTester;
            bl          = FactoryBL.GetBL();
            DataContext = tester;
            mat1        = tester.mat;
            string DirPath = Directory.GetParent(Environment.CurrentDirectory).Parent.FullName;

            imageNotWorking.Source = new BitmapImage(new Uri(DirPath + "/images/עובד לא.jpg"));
            notWorking.ImageSource = imageNotWorking.Source;
            imageWorking.Source    = new BitmapImage(new Uri(DirPath + "/images/עובד.jpg"));
            working.ImageSource    = imageWorking.Source;
            foreach (Button item in buttons.Children)
            {
                int x = int.Parse(item.Name[1].ToString());
                int y = int.Parse(item.Name[3].ToString());
                if (mat1[x, y] == true)
                {
                    item.Background = working;
                }
                if (mat1[x, y] == false)
                {
                    item.Background = notWorking;
                }
            }
            carTypeTesterComboBox.ItemsSource = Enum.GetValues(typeof(CarType));
            genderTesterComboBox.ItemsSource  = Enum.GetValues(typeof(Gender));
        }
Ejemplo n.º 14
0
 public AddNunnyWindow()
 {
     InitializeComponent();
     bl    = FactoryBL.GetBL();
     nanny = new Nanny();
     this.NannyDetails.DataContext    = nanny;
     dateBirthDatePicker.SelectedDate = DateTime.Today;
 }
Ejemplo n.º 15
0
 public AddTestPage()
 {
     bl = FactoryBL.GetBL();
     InitializeComponent();
     temp_test    = new Test();
     TestNum.Text = Convert.ToString(Configuration.NumOfTEST++);
     DataContext  = temp_test;
 }
 public DeleteTraineePage()
 {
     bl = FactoryBL.GetBL();
     InitializeComponent();
     temp_trainee = new Trainee();
     this.comboBox.ItemsSource = Enum.GetValues(typeof(BE.TypeOfCar));
     comboBox.SelectedValue    = TypeOfCar.PrivateCar;
 }
Ejemplo n.º 17
0
 public log_in_trainee(Trainee trainee)
 {
     InitializeComponent();
     trainee1    = trainee;
     DataContext = trainee;
     bl          = FactoryBL.GetBL();
     lastTestOfTrainee(trainee1);
 }
Ejemplo n.º 18
0
 public MainWindow()
 {
     InitializeComponent();
     tester  = new Tester();
     trainee = new Trainee();
     test    = new Test();
     bl      = FactoryBL.GetBL();
 }
Ejemplo n.º 19
0
 public Update_Nanny()
 {
     InitializeComponent();
     bl = FactoryBL.GetBL();
     Grid.DataContext          = nanny;
     payHourLabel.Visibility   = Visibility.Hidden;
     payHourTextBox.Visibility = Visibility.Hidden;
 }
        public NannyWindow()
        {
            InitializeComponent();
            bl = FactoryBL.GetBL();

            Nannys_DataGrid.ItemsSource = bl.GetAllNannies();
            MaxNumberOfChildren_ComboBox.SelectedIndex = 7;
        }
Ejemplo n.º 21
0
        public LoginWindow()
        {
            //Configuration.MailSender = new MailClient();

            InitializeComponent();

            bl             = FactoryBL.GetBL();
            InfoBlock.Text = "Login: Enter ID and password to enter.\nFloat above a button for an explanation.";
        }
Ejemplo n.º 22
0
 public RemoveMother()
 {
     InitializeComponent();
     bl = FactoryBL.GetBL();
     ////enter all the mother id to comboBox
     idComboBox.ItemsSource       = bl.getMotherList();
     idComboBox.SelectedValuePath = "Id";
     idComboBox.DisplayMemberPath = "Data";
 }
Ejemplo n.º 23
0
 int dis = 0;//i need that to the caculecting
 public nannies_close_to_mother()
 {
     InitializeComponent();
     bl = FactoryBL.GetBL();
     //enter mother to combobox
     idMother.ItemsSource       = bl.getMotherList();
     idMother.SelectedValuePath = "Id";
     idMother.DisplayMemberPath = "Data";
 }
        public LinkTesterPage()
        {
            bl = FactoryBL.GetBL();
            InitializeComponent();
            IEnumerable <Tester> all = bl.GetAllTesters();

            this.comboBoxCity.ItemsSource = (from item in bl.GetAllTesters()
                                             select item.TesterAddress.City).Distinct();
        }
Ejemplo n.º 25
0
 public RemoveContract()
 {
     InitializeComponent();
     bl = FactoryBL.GetBL();
     //enter all the contract number to comboBox
     contract_Num1ComboBox.ItemsSource       = bl.getContractList();
     contract_Num1ComboBox.SelectedValuePath = "Contract_Num1";
     contract_Num1ComboBox.DisplayMemberPath = "Data";
 }
 public Nannies_that_almost_fit_mom()
 {
     InitializeComponent();
     bl = FactoryBL.GetBL();
     //enter mother do combo box
     idMother.ItemsSource       = bl.getMotherList();
     idMother.SelectedValuePath = "Id";
     idMother.DisplayMemberPath = "Data";
 }
Ejemplo n.º 27
0
 public Children_according_to_Mother()
 {
     InitializeComponent();
     bl = FactoryBL.GetBL();
     //enter mother to combobox
     idMother.ItemsSource       = bl.getMotherList();
     idMother.SelectedValuePath = "Id";
     idMother.DisplayMemberPath = "Data";
 }
Ejemplo n.º 28
0
 public RemoveChild()
 {
     InitializeComponent();
     bl = FactoryBL.GetBL();
     //enter all the children id to the comboBox
     idComboBox.ItemsSource       = bl.getChildList();
     idComboBox.SelectedValuePath = "Id";
     idComboBox.DisplayMemberPath = "Data";
 }
Ejemplo n.º 29
0
 public sign_in_tester()
 {
     InitializeComponent();
     tester      = new Tester();
     bl          = FactoryBL.GetBL();
     DataContext = tester;
     carTypeTesterComboBox.ItemsSource = Enum.GetValues(typeof(CarType));
     genderTesterComboBox.ItemsSource  = Enum.GetValues(typeof(Gender));
 }
Ejemplo n.º 30
0
 public AddTesterPage()
 {
     bl = FactoryBL.GetBL();
     InitializeComponent();
     temp_tester = new Tester();
     this.GendercomboBox.ItemsSource = Enum.GetValues(typeof(BE.Gender));
     this.FamiltSatus.ItemsSource    = Enum.GetValues(typeof(BE.FamilyStatus));
     this.CarcomboBox.ItemsSource    = Enum.GetValues(typeof(BE.TypeOfCar));
     DataContext = temp_tester;
 }