public HostingUnit(BE.HostingUnit H) { InitializeComponent(); bl = BL.FactoryBL.GetBL(); hostU = H; this.DataContext = hostU; this.BankBranchComboBox.ItemsSource = bl.bankBranchesList(); mainGrid.Height = this.Height; mainGrid.Width = this.Width; TabChoice.Width = this.Width; TabChoice.Height = this.Height; AddTab.Width = this.Width; AddTab.Height = this.Height; HostingUkey.Password = hostU.HostingUnitKey.ToString(); this.DataContext = hostU; PrivateAreaPasswordBorder.Visibility = Visibility.Collapsed; PrivateAreaBorder.Visibility = Visibility.Visible; WelcomeHost.Text = "welcome " + hostU.Owner.PrivateName + " " + hostU.Owner.FamilyName + "!"; WelcomeHost.FontSize = 20; WelcomeHost.FontWeight = FontWeights.Bold; InitializeDiaryandOrders(); }
public AddNewTester() { InitializeComponent(); tester = new BE.Tester(); this.TesterGrid.DataContext = tester; bl = BL.FactoryBL.GetBL(); this.TesterGenderComboBox.ItemsSource = Enum.GetValues(typeof(BE.Gender)); this.TesterTypeOfVehicle.ItemsSource = Enum.GetValues(typeof(BE.TypeOfVehicle)); this.TesterTypeOfGearControl.ItemsSource = Enum.GetValues(typeof(BE.TypeOfGearControl)); this.town1.Text = tester.TesterAddress.town; this.buildingNumber1.Text = tester.TesterAddress.ToString(); this.street1.Text = tester.TesterAddress.street; DateTime helpStart = new DateTime(1943, 1, 1); DateTime helpEnd = new DateTime(2003, 1, 31); testerBirthDate.DisplayDateStart = helpStart; testerBirthDate.DisplayDateEnd = helpEnd; }
public UpdateTest() { InitializeComponent(); bl = BL.FactoryBL.getBL(); test = new BE.Test(); comboBox.ItemsSource = from item in bl.getAllTest() select item.TestNumber; #region Init With The Former value textBox9.Text = Convert.ToString(test.studentId); textBox10.Text = Convert.ToString(test.TesterId); DestinationTextBox.Text = Convert.ToString(test.address); TestDateTextBox.Text = Convert.ToString(test.testDate); DestinationTextBox.Text = Convert.ToString(test.address); LightsTextBox.Text = Convert.ToString(test.signal); textBox4.Text = Convert.ToString(test.keepingDistance); textBox3.Text = Convert.ToString(test.Parking); textBox.Text = Convert.ToString(test.keepingDistance); textBox6.Text = Convert.ToString(test.StopCrossWalk); textBox5.Text = Convert.ToString(test.pouncing); #endregion }
public HUGuestsListUC() { InitializeComponent(); bl = BL.Factory.GetInstance(); IEnumerable <BE.GuestRequest> ieGuest = bl.GetGuestRequestList(); list.ItemsSource = ieGuest; void mouseClick(object sender, RoutedEventArgs e) { var btn = sender as System.Windows.Controls.Button; list.SelectedItem = btn.DataContext; GRShow = (BE.GuestRequest)list.SelectedItem; Console.WriteLine(GRShow.ToString()); } }
public UpdateTesterWindow() { InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; bl = BL.FactoryBL.getBL(); tester = null; this.birthDateDatePicker.DisplayDateEnd = DateTime.Now; this.carTypeTesterComboBox.ItemsSource = Enum.GetValues(typeof(CarType)); this.workerTypeComboBox.ItemsSource = Enum.GetValues(typeof(WorkerType)); this.genderTesterComboBox.ItemsSource = Enum.GetValues(typeof(Gender)); this.personalStatusComboBox.ItemsSource = Enum.GetValues(typeof(Status)); setMatrix(); this.idComboBox.ItemsSource = bl.getTestersList(); this.idComboBox.DisplayMemberPath = "Id"; this.idComboBox.SelectedValuePath = "Id"; errorMessages = new List <string>(); }
public AddContract() { InitializeComponent(); //Startup (initializes component) bl = BL.FactoryBL.GetBL(); //Links the panel to the BL database M = new BE.Mother(); N = new BE.Nanny(); C = new BE.Contract(); child = new BE.Child(); boys = bl.GetListOfChildS(); //Copies the list of the "child" from the database in BL List <BE.Mother> m = bl.GetListOfMotherS(); //Copies the list of "mothers" to a new list foreach (BE.Mother item in m) //Passing the list of "mothers" { motherIdComboBox.Items.Add(item); //Adds the ID of all mothers to a selection panel } List <BE.Nanny> n = bl.GetListOfNannys(); //Copies the list of "nannys" to a new list foreach (BE.Nanny item in n) //Passing the list of "nannys" { nannyIdComboBox.Items.Add(item); } }
public AddNanny() { int j = 0; for (int i = 0; i < 9; i++) { if (!(i == 1 || i == 6 || i == 7)) { arr[j] = "05" + i; j++; } } InitializeComponent(); nanny = new BE.Nanny(); this.DataContext = nanny; errorMessages = new List <string>(); this.numberFonComboBox.ItemsSource = arr; bl = BL.Bl_Singleton.GetBl(); }
public AddMotherWindow() { try { InitializeComponent(); mother = new BE.Mother(); this.DataContext = mother; errorMessages = new List <string>(); bl = BL.FactoryBL.GetBL(); for (int i = 0; i <= 23; i++) { timesList.Add(new TimeSpan(i, 0, 0)); timesList.Add(new TimeSpan(i, 15, 0)); timesList.Add(new TimeSpan(i, 30, 0)); timesList.Add(new TimeSpan(i, 45, 0)); } this.SundayBeginningTimeComboBox.ItemsSource = timesList; this.MondayBeginningTimeComboBox.ItemsSource = timesList; this.TuesdayBeginningTimeComboBox.ItemsSource = timesList; this.WednesdayBeginningTimeComboBox.ItemsSource = timesList; this.ThursdayBeginningTimeComboBox.ItemsSource = timesList; this.FridayBeginningTimeComboBox.ItemsSource = timesList; this.SundayEndTimeComboBox.ItemsSource = timesList; this.MondayEndTimeComboBox.ItemsSource = timesList; this.TuesdayEndTimeComboBox.ItemsSource = timesList; this.WednesdayEndTimeComboBox.ItemsSource = timesList; this.ThursdayEndTimeComboBox.ItemsSource = timesList; this.FridayEndTimeComboBox.ItemsSource = timesList; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public AdminWindow() { bl = BL.FactoryBL.GetBL(); InitializeComponent(); lsvAdminGuestRequest.ItemsSource = MainWindow.bl.GetReadableListOfGuestRequest(); lsvAdminHosts.ItemsSource = MainWindow.bl.GetReadableListOfHosts(); cmbGuestRequestArea.ItemsSource = HebrewEnum.getListStrings <AreaEnum>(); cmbHotingUnitArea.ItemsSource = HebrewEnum.getListStrings <AreaEnum>(); int i = 0; foreach (var host in MainWindow.bl.getListHostingUnit()) { HostingUnitUserControl h = new HostingUnitUserControl(host, true); AdminHostingUnitGrid.Children.Add(h); var rowDefinition = new RowDefinition(); rowDefinition.Height = GridLength.Auto; AdminHostingUnitGrid.RowDefinitions.Add(rowDefinition); Grid.SetRow(h, i++); } lsvAdminOrders.ItemsSource = MainWindow.bl.GetReadableListOfOrder(); txbNumOfGuestRequests.Text = MainWindow.bl.getListGuestRequest().Count().ToString(); txbNumOfHostes.Text = MainWindow.bl.getListHosts().Count().ToString(); txbNumOfHostingUnits.Text = MainWindow.bl.getListHostingUnit().Count().ToString(); txbNumOfOrders.Text = MainWindow.bl.getListOrders().Count().ToString(); txbNumOfSuccessfulOrders.Text = MainWindow.bl.SumOfApprovedOrderOfAllHosts().ToString(); txbSumMaildedGuestRequests.Text = MainWindow.bl.getSumMaildedOrders().ToString(); txbNumOfProfit.Text = MainWindow.bl.getAdminProfit().ToString(); }
public AddChildWindow() { try { InitializeComponent(); child = new BE.Child(); this.DataContext = child; errorMessages = new List <string>(); bl = BL.FactoryBL.GetBL(); this.momIdComboBox.ItemsSource = null; this.momIdComboBox.ItemsSource = bl.getMothersList(); this.momIdComboBox.DisplayMemberPath = "Id"; this.momIdComboBox.SelectedValuePath = "Id"; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public UpdateContractWindow() { try { InitializeComponent(); contract = null; errorMessages = new List <string>(); bl = BL.FactoryBL.GetBL(); refreshData(); this.updateContractConboBox.DisplayMemberPath = "ContractNum"; this.updateContractConboBox.SelectedValuePath = "ContractNum"; this.hourOrMonthComboBox.ItemsSource = Enum.GetValues(typeof(BE.Salary)); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public BL.IBL bl; // connect to BL layer public getAllChild() { InitializeComponent(); bl = BL.FactoryBL.GetBL(); try { allNanniesBox.ItemsSource = child_list; child_list = bl.getAllChildren(); if (child_list != null && child_list.GetEnumerator().MoveNext()) { allNanniesBox.ItemsSource = child_list; } else { throw new Exception("no children in database"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public BL.IBL bl; // connect to BL layer public getAllNannies() { InitializeComponent(); bl = BL.FactoryBL.GetBL(); try { allNanniesBox.ItemsSource = nanny_list; nanny_list = bl.getAllNanny(); if (nanny_list != null /*&& nanny_list.GetEnumerator().MoveNext()*/) { allNanniesBox.ItemsSource = nanny_list; } else { throw new Exception("no nannies in database"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public BestContracts(int motherid) { InitializeComponent(); bl = BL.FactoryBL.GetBL(); M = new BE.Mother(); M = bl.findMother(motherid); this.DataContext = M; nannys = bl.workRightTimeforMother(M); //A list of nannies that work exactly at the times the mother needs if (nannys.Count() < 5) //If the number of nannies who work exactly when the mother needs it is less than 5 { N = bl.bestNannysForMother(M); //find the 5 nannies that are suitable for Mom (but their hours do not coincide exactly with the hours she needs) foreach (BE.Nanny item in N) { this.nannyDataGrid.Items.Add(item); // find the 5 nannies that are suitable for Mom(but their hours do not coincide exactly with the hours she needs) } } else { foreach (BE.Nanny item in nannys) { this.nannyDataGrid.Items.Add(item); } } }
public AddContractUserControl() { InitializeComponent(); contract = new BE.Contract(); nanny = new BE.Nanny(); bl = BL.FactoryBL.GetBL(); errorMessages = new List <string>(); try { this.DataContext = this; this.NannyDataGrid.DataContext = this; this.contractDetailsGrid.DataContext = contract; this.selectMotherComboBox.DataContext = this; this.selectMotherComboBox.ItemsSource = bl.GetMotherList(); this.selectMotherComboBox.DisplayMemberPath = "FirstName"; this.selectMotherComboBox.SelectedValuePath = "Id"; this.selectChildComboBox.DataContext = this; this.selectChildComboBox.DisplayMemberPath = "FirstName"; this.selectChildComboBox.SelectedValuePath = "Id"; this.DistanceComboBox.ItemsSource = new int[] { 1, 2, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 }; this.DistanceComboBox.SelectedValue = 50; //this.nannyIdTextBox.DataContext = this; this.paidByComboBox.ItemsSource = Enum.GetValues(typeof(BE.WayOfPayment)); this.payPerHourOrMonthComboBox.ItemsSource = Enum.GetValues(typeof(BE.PaymentPer)); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public AddTester() { InitializeComponent(); bl = BL.BlFactory.GetBL(); TempTester = new Tester { BirthDate = DateTime.Now.AddYears(-Configuration.TesterMinAge) }; try { grid1.DataContext = TempTester; grid2.DataContext = address; } catch (Exception a) { MessageBox.Show(a.Message); } TempTester.Id = Data.UserID; car_typeComboBox.ItemsSource = Enum.GetValues(typeof(CarType)); genderComboBox.ItemsSource = Enum.GetValues(typeof(Gender)); }
public AddHostingUnitGUI() { InitializeComponent(); bl = BL.Factory.GetInstance(); HUshow = new BE.HostingUnit() { Owner = new BE.Host() { BankBranchDetails = new BE.BankBranch() } }; this.DataContext = HUshow; //this.GuestRequestGrid.DataContext =GRShow; //הקשר הדטה לפי GuestRequest this.typeComboBox.ItemsSource = Enum.GetValues(typeof(BE.Enums.TypeEnum)); this.areaComboBox.ItemsSource = Enum.GetValues(typeof(BE.Enums.AreaEnum)); List <string> bankNames = (from bank in bankAccunts select bank.BankName).Distinct().ToList(); BankNameComboBox.ItemsSource = bankNames; }
public GuestGUI() { InitializeComponent(); bl = BL.Factory.GetInstance(); GRShow = new BE.GuestRequest(); this.DataContext = GRShow; //this.GuestRequestGrid.DataContext =GRShow; //הקשר הדטה לפי GuestRequest this.typeComboBox.ItemsSource = Enum.GetValues(typeof(BE.TypeEnum)); this.areaComboBox.ItemsSource = Enum.GetValues(typeof(BE.AreaEnum)); this.poolComboBox.ItemsSource = Enum.GetValues(typeof(BE.AttractionsEnum)); this.jacuzziComboBox.ItemsSource = Enum.GetValues(typeof(BE.AttractionsEnum)); this.gardenComboBox.ItemsSource = Enum.GetValues(typeof(BE.AttractionsEnum)); this.childrensAttractionsComboBox.ItemsSource = Enum.GetValues(typeof(BE.AttractionsEnum)); #region calander //עבור לוח שנה MyCalendar = CreateCalendar(); vbCalendar.Child = null; //מחיקה מהתצוגה של החלון הקודם vbCalendar.Child = MyCalendar; // הצגה של החלון הנוכחי שיצרנו //SetBlackOutDates(); }
/// <summary> /// C-tor switching which grouping to create in the list... /// </summary> /// <param name="index"></param> public PrintAllTesters(int index) { InitializeComponent(); BL.IBL bl = BL.BlFactory.GetBL(); if (index == 0) { testerListView.DataContext = bl.GetTesters(); } else if (index == 2) { var DataSource = bl.TestersOver60YO();; if (!DataSource.Any()) { MessageBox.Show("אין בוחנים מתאימים לתנאי זה", "", MessageBoxButton.OK, MessageBoxImage.None, MessageBoxResult.OK , MessageBoxOptions.RtlReading); return; } testerListView.DataContext = DataSource; } else if (index == 1) { foreach (var item in bl.TestersGroupedByCarType(true)) { foreach (var tester in item) { testerListView.Items.Add(tester); } var split = new GridSplitter(); testerListView.Items.Add(new GridSplitter()); } } }
public EraseContract(BL.IBL Bl) { this.bl = Bl; InitializeComponent(); bl = BL.FactoryBL.GetBL(); }
public MenuEmployee() { InitializeComponent(); bl = BL.FactoryBL.GetBL(); }
public MENU_CONTRACT() { InitializeComponent(); bl = BL.FactoryBL.GetBL(); }
public Password() { InitializeComponent(); bl = BL.FactoryBL.GetBL(); }
public AddEmployeeWindow() { InitializeComponent(); bl = BL.Factory_BL.GetBL(); loadEducationComboBox(); }
public static void initBL() { bl = BL.FactoryBL.GetBL(); }
public OrdersListWindow() { InitializeComponent(); bl = BL.FactoryBL.GetBL(); this.orderlistListBox.ItemsSource = bl.GetOrderList(); }
public UpdateSpecializationWindow() { InitializeComponent(); bl = BL.Factory_BL.GetBL(); InitializeComboBoxSpecField(); }
public ContractGroupByDistanceUC() { InitializeComponent(); bl = BL.FactoryBL.GetBL(); this.DataContext = this; }
public HostingUnitKeyDialogGUI() { InitializeComponent(); bl = BL.Factory.GetInstance(); }
public AllTest() { InitializeComponent(); bl = BL.FactoryBL.getBL(); Tests.ItemsSource = bl.getAllTest(); }