Beispiel #1
0
 public Window_specialization(BL.IBL bl)//ctor
 {
     this.bl = bl;
     InitializeComponent();
     specialiste      = new BE.specialization();
     this.DataContext = specialiste;
     bl = BL.FactoryBL.GetBL();
     showDataGridView();
     this.expertiseComboBox.ItemsSource  = Enum.GetValues(typeof(BE.expertise));
     this.disciplineComboBox.ItemsSource = Enum.GetValues(typeof(BE.discipline));
 }
Beispiel #2
0
        public UpdateBranch()
        {
            InitializeComponent();
            branch           = new BE.Branch();
            this.DataContext = branch;
            bl = BL.FactoryBL.getBL();
            branchNumberComboBox.ItemsSource = from item in bl.getAllBranch()
                                               select item.branchNumber;

            this.hechsherComboBox.ItemsSource = Enum.GetValues(typeof(BE.kosherLevel));
        }
        public GetHuName(Host H, GuestRequest g)
        {
            bl           = BL.FactoryBL.GetBL();
            host         = H;
            guestRequest = g;
            order        = new Order();
            InitializeComponent();
            NavigationService.NavigationStack.Push(this);
            IEnumerable <string> nameHu = bl.NameOfUnit(host);

            this.NameHu.ItemsSource = nameHu;
        }
Beispiel #4
0
        public UpdateTrainee()
        {
            InitializeComponent();
            trainee          = new BE.Trainee();
            this.DataContext = trainee;
            bl = BL.FactoryBL.getBL();
            IDComboBox.ItemsSource = from item in bl.getAllTrainee()
                                     select item.branchNumber;

            Gendr.ItemsSource    = Enum.GetValues(typeof(BE.Gender));
            GearType.ItemsSource = Enum.GetValues(typeof(BE.GearType));
        }
Beispiel #5
0
        public AddOrder()
        {
            InitializeComponent();
            order = new BE.Order();
            this.gridAddOrder.DataContext = order;
            bl = BL.FactoryBL.getBL();
            branchNumberComboBox.ItemsSource = from item in bl.getAllBranch()
                                               select item.branchNumber;

            //branchNumberComboBox.DisplayMemberPath = "branchNumber";
            this.hechsherComboBox.ItemsSource = Enum.GetValues(typeof(BE.kosherLevel));
        }
 public AddHostingUnitW(Host h)
 {
     host = h;
     InitializeComponent();
     NavigationService.NavigationStack.Push(this);
     bl = BL.FactoryBL.GetBL();
     this.AreaCB.ItemsSource            = Enum.GetValues(typeof(BE.AreasInTheCountry));
     this.TypeHostingUnitCB.ItemsSource = Enum.GetValues(typeof(BE.TypesOfVacation));
     hostingUnit.CntImg = 0;
     i           = 0;
     DataContext = this;
 }
        public MainWindow()
        {
            InitializeComponent();

            bl = BL.factoryBL.getBL();

            currentTesters  = bl.testersList();
            currentTrainees = bl.traineesList();

            myTester  = new BE.Tester();
            myTrainee = new BE.Trainee();
        }
 public ADD_EMPLOYEE(BL.IBL Bl)//ctor
 {
     this.bl = Bl;
     InitializeComponent();
     employee         = new BE.Employee();
     BANK             = new bank();
     this.DataContext = employee;
     bl = BL.FactoryBL.GetBL();
     showDataGridView();
     this.degreeComboBox.ItemsSource = Enum.GetValues(typeof(BE.Degree));
     comboboxyeshouv();
 }
Beispiel #9
0
        public AddTest()
        {
            InitializeComponent();
            test             = new Test();
            this.DataContext = test;
            bl = BL.FactoryBL.getBL();
            TraineeIDcomboBox.ItemsSource = from item in bl.getAllTrainee()
                                            select item.branchNumber;

            TesterIDcomboBox.ItemsSource = from item in bl.getAllTester()
                                           select item.TesterID;
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            BL.IBL myBL = BlFactory.GetBL();
            HostingUnitDataGrid.Items.Clear();
            IEnumerable <IGrouping <Area, HostingUnit> > list = myBL.HostingUnits_On_This_Area();
            IEnumerable <HostingUnit> newList    = list.SelectMany(group => group);
            List <HostingUnit>        listToShow = newList.ToList();

            foreach (HostingUnit unit in listToShow)
            {
                HostingUnitDataGrid.Items.Add(unit);
            }
        }
        public AddingNanny()
        {
            InitializeComponent();
            bl = BL.FactoryBL.GetBL();

            nanny            = new Nanny();
            this.DataContext = nanny;
            nanny.born       = DateTime.Parse("07/09/97");

            BornDatePicker.DisplayDateEnd  = DateTime.Now;
            this.UpdateButton.IsEnabled    = false;
            this.FloorComboBox.ItemsSource = Enum.GetValues(typeof(BE.FLOORS));
        }
        public traineesByTeachers()
        {
            InitializeComponent();
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            bl = IBL_imp.Instance;
            IEnumerable <IGrouping <string, Trainee> > TraineesByTeachers = bl.TraineesByTeachers(true);

            foreach (var teachergroup in TraineesByTeachers)
            {
                var teacher = teachergroup.Key;
                TeacherComboBox.Items.Add((string)teacher);
            }
        }
 //constractor
 public MotherWindow()
 {
     InitializeComponent();
     bl = BL.FactoryBl.getBl();
     option.SelectionChanged += Option_SelectionChanged;
     mother = new BE.Mother();
     this.MotherDetailsGrid.DataContext = mother;
     idComboBox.ItemsSource             = null;
     this.idComboBox.ItemsSource        = bl.getMothers();
     idComboBox.DisplayMemberPath       = "idAndName";
     idComboBox.SelectedValuePath       = "id";
     errorMessages = new List <string>();
 }
Beispiel #14
0
        public AddTrainee1()
        {
            InitializeComponent();
            trainee          = new BE.Trainee();
            this.DataContext = trainee;
            bl = BL.FactoryBL.GetBL();
            trainee.BirthDay = DateTime.Now.AddYears(-(int)Configuration.MinAgeOfTrainee);
            trainee.BirthDay = trainee.BirthDay.AddDays(-1);

            sexComboBox.ItemsSource            = Enum.GetValues(typeof(BE.Gender));
            gearTypeComboBox.ItemsSource       = Enum.GetValues(typeof(BE.GearType));
            currentCarTypeComboBox.ItemsSource = Enum.GetValues(typeof(BE.VehicleType));
        }
Beispiel #15
0
        public DeleteHostingUnit(Host H)
        {
            bl               = BL.FactoryBL.GetBL();
            host             = H;
            this.DataContext = host;
            InitializeComponent();
            NavigationService.NavigationStack.Push(this);
            IEnumerable <string> nameHu = bl.NameOfUnit(host);

            this.NameHu.ItemsSource = nameHu;


            InitializeComponent();
        }
 public MainWindow()
 {
     try
     {
         InitializeComponent();
         bl                = BLSingleton.GetBL;
         nannyMain         = new Nanny();
         this.SizeChanged += OnWindowSizeChanged;
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
        public TestersByCarType()
        {
            InitializeComponent();
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            bl = IBL_imp.Instance;
            IEnumerable <IGrouping <CarType, Tester> > TestersByCarType = bl.TestersByCarType(true);

            foreach (var cargroup in TestersByCarType)
            {
                var car = cargroup.Key;
                CarComboBox.Items.Add((CarType)car);
            }
            //this.testercarComboBox.ItemsSource = Enum.GetValues(typeof(BE.CarType));
        }
Beispiel #18
0
 public updateGuestRequest()
 {
     InitializeComponent();
     NavigationService.NavigationStack.Push(this);
     gr     = new GuestRequest();
     bl     = BL.FactoryBL.GetBL();
     Click1 = false;
     this.AreaCB.ItemsSource            = Enum.GetValues(typeof(BE.AreasInTheCountry));
     this.poolCB.ItemsSource            = Enum.GetValues(typeof(BE.ChoosingAttraction));
     this.GardenCB.ItemsSource          = Enum.GetValues(typeof(BE.ChoosingAttraction));
     this.jakouziCB.ItemsSource         = Enum.GetValues(typeof(BE.ChoosingAttraction));
     this.attractionCB.ItemsSource      = Enum.GetValues(typeof(BE.ChoosingAttraction));
     this.TypeHostingUnitCB.ItemsSource = Enum.GetValues(typeof(BE.TypesOfVacation));
 }
Beispiel #19
0
 public TestsOfTraineeWindow(bool t)
 {
     InitializeComponent();
     bl = BL.FactoryBL.GetBL();
     if (t)
     {
         lblSearch_Copy.Visibility = Visibility.Visible;
         txtSearch_Copy.Visibility = Visibility.Visible;
         btnUpdate.Visibility      = Visibility.Visible;
         lblSearch.Visibility      = Visibility.Hidden;
         txtSearch.Visibility      = Visibility.Hidden;
         btnDelete.Visibility      = Visibility.Hidden;
     }
 }
        public UpdateHostingUnit(Host H)
        {
            bl               = BL.FactoryBL.GetBL();
            host             = H;
            this.DataContext = host;
            InitializeComponent();
            NavigationService.NavigationStack.Push(this);
            this.AreaCB.ItemsSource            = Enum.GetValues(typeof(BE.AreasInTheCountry));
            this.TypeHostingUnitCB.ItemsSource = Enum.GetValues(typeof(BE.TypesOfVacation));
            IEnumerable <string> nameHu = bl.NameOfUnit(host);

            this.NameHu.ItemsSource = nameHu;
            DataContext             = this;
        }
Beispiel #21
0
        public AddOrder(Host H)
        {
            bl               = BL.FactoryBL.GetBL();
            guestRequest     = new ObservableCollection <GuestRequest>();
            g                = new GuestRequest();
            host             = H;
            this.DataContext = host;
            InitializeComponent();
            NavigationService.NavigationStack.Push(this);

            IEnumerable <string> nameHu = bl.NameOfUnit(host);

            this.NameHu.ItemsSource = nameHu;
        }
        public GuestRequestList()
        {
            this.WindowState = WindowState.Maximized;//Setting window size to maximum
            InitializeComponent();
            BL.IBL myBL = BlFactory.GetBL();
            List <GuestRequest> list = myBL.get_All_Requests();

            foreach (GuestRequest unit in list)
            {
                GuestRequestDataGrid.Items.Add(unit);
            }
            //Erase extra row
            GuestRequestDataGrid.IsReadOnly             = true;
            this.GuestRequestDataGrid.CanUserDeleteRows = true;
        }
Beispiel #23
0
 public threeMonthTestsWindow1(Tester tester)
 {
     try
     {
         bl = BL.FactoryBL.GetBL();
         t  = tester;
         InitializeComponent();
         IEnumerable <Test> find = bl.getTestsOf3LastMonths(t);
         findGrid.ItemsSource = find;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        private void UpdateHostingUnitBT(object sender, RoutedEventArgs e)
        {
            BL.IBL             myBL = BlFactory.GetBL();
            HostingUnit        temp = HostUnitsDataGrid.SelectedItem as HostingUnit;
            UnitToUpdateWindow unitToUpdateWindow = new UnitToUpdateWindow(temp);

            unitToUpdateWindow.ShowDialog();
            HostUnitsDataGrid.Items.Clear();
            List <HostingUnit> list = myBL.units_of_Host(currentHost);

            foreach (HostingUnit unit in list)
            {
                HostUnitsDataGrid.Items.Add(unit);
            }
        }
        public SeeRequestsUserControl()
        {
            InitializeComponent();
            GuestRequestDataGrid.Foreground = Brushes.Black;
            BL.IBL myBL = BlFactory.GetBL();
            List <GuestRequest> list = myBL.get_All_Requests();

            foreach (GuestRequest unit in list)
            {
                GuestRequestDataGrid.Items.Add(unit);
            }
            //Erase extra row
            GuestRequestDataGrid.IsReadOnly             = true;
            this.GuestRequestDataGrid.CanUserDeleteRows = true;
        }
        public SeeAllHostsUserControl()
        {
            InitializeComponent();
            HostsDataGrid.Foreground = Brushes.Black;
            BL.IBL      myBL = BlFactory.GetBL();
            List <Host> list = myBL.GetHosts();

            foreach (Host h in list)
            {
                HostsDataGrid.Items.Add(h);
            }
            //Erase extra row
            HostsDataGrid.IsReadOnly             = true;
            this.HostsDataGrid.CanUserDeleteRows = true;
        }
Beispiel #27
0
 public AddEmployee(BL.IBL Bl)
 {
     this.bl = Bl;
     InitializeComponent();
     BANK             = new BE.BankAccount();
     employee         = new BE.Employee();
     this.DataContext = employee;
     bl = BL.FactoryBL.GetBL();
     showDataGridView();
     this.degreeComboBox.ItemsSource = Enum.GetValues(typeof(BE.Degree));
     foreach (string id in bl.returnCity())
     {
         cityComboBox.Items.Add(id);
     }
 }
        public void DisplayResult(Object sender, EventArgs e)
        {
            BL.IBL bl    = BL.FactoryBL.GetBL();
            var    bc    = new BrushConverter();
            string id    = this.checkId.Text;
            int    newid = int.Parse(id);

            BE.Trainee isExistTrainee = bl.getTraineeBL(newid);
            if (isExistTrainee != null)
            {
                BE.Test testOfnumber = bl.getTestByNumber((checkTestNumber.Text));
                if (testOfnumber != null)
                {
                    if (isExistTrainee.Id == testOfnumber.TraineeId)
                    {
                        details.Foreground = (Brush)bc.ConvertFrom("#019EAA");

                        if (testOfnumber.PassedTheTest == true)
                        {
                            details.Text = "!מזל טוב עברת את הטסט בהצלחה \nהודעה רישמית תשלח אליך בהקדם\n\nתודה שבחרתם בטסט דרייב\n\n\n";
                        }
                        else
                        {
                            details.Text = "לצערנו לא עברת את המבחן\nלא נורא פעם הבאה תצליח\n\n\n";
                        }

                        string help = ":הערת הבוחן";
                        help         += testOfnumber.TesterComment;
                        details.Text += help;
                    }
                    else
                    {
                        details.Foreground = (Brush)bc.ConvertFrom("Red");
                        details.Text       = "הת.ז. לא מתאים למספר מבחן שהוזן ";
                    }
                }
                else
                {
                    details.Foreground = (Brush)bc.ConvertFrom("Red");
                    details.Text       = "המספר מבחן שהוזן לא נמצא במערכת";
                }
            }
            else
            {
                details.Foreground = (Brush)bc.ConvertFrom("Red");
                details.Text       = "הת.ז. שהוזן לא נמצא במערכת ";
            }
        }
Beispiel #29
0
 public UnitToUpdateWindow(HostingUnit currentUnit)
 {
     BL.IBL myBL = BlFactory.GetBL();
     this.updateUnit = currentUnit;
     InitializeComponent();
     HostingUnitNameTextBox.Text  = updateUnit.HostingUnitName;
     AreaTextBlock.Text           = currentUnit.Area.ToString();
     SubAreaTextBlock.Text        = currentUnit.SubArea.ToString();
     AdultSlider.Value            = currentUnit.Adults;
     ChildrenSlider.Value         = updateUnit.Children;
     AttractionCheckBox.IsChecked = updateUnit.ChildrensAttractions;
     GardenCheckBox.IsChecked     = updateUnit.Garden;
     PoolCheckBox.IsChecked       = updateUnit.Pool;
     JacuzziCheckBox.IsChecked    = updateUnit.Jacuzzi;
     TypeComboBox.SelectedItem    = currentUnit.Area;
 }
Beispiel #30
0
        public HostingUnitsList()
        {
            this.WindowState = WindowState.Maximized;//Setting window size to maximum
            InitializeComponent();
            HostingUnitDataGrid.Foreground = Brushes.Black;
            BL.IBL             myBL = BlFactory.GetBL();
            List <HostingUnit> list = myBL.get_All_units();

            foreach (HostingUnit unit in list)
            {
                HostingUnitDataGrid.Items.Add(unit);
            }
            //Erase extra row
            HostingUnitDataGrid.IsReadOnly             = true;
            this.HostingUnitDataGrid.CanUserDeleteRows = true;
        }