private void addContract_Click(object sender, RoutedEventArgs e)
        {
            contractsButtonsClicks();
            Window AddContractWindow = new AddContractWindow();

            AddContractWindow.Show();
        }
        /// <summary>
        /// open the next window (adding contract window)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Click_addContract(object sender, RoutedEventArgs e)
        {
            IEnumerable <Child> untreatedChilds = myBl.UntreatedChilds();  // checks is there is untreated child. Because if there is no untreated child there is no point in opening this window

            if (untreatedChilds.Count() == 0)
            {
                MessageBox.Show("There is no untreated child!", "Error 404", MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }

            Window nextWindow = new AddContractWindow(untreatedChilds);

            this.Close();
            nextWindow.ShowDialog();
        }
예제 #3
0
 public Constraints(AddContractWindow window, Mother m)//constructor that get the mother from the AddContractWindow
 {
     InitializeComponent();
     myBL   = BL.FactoryBL.GetInstance;
     Nannys = new List <Nanny>();
     mother = m;
     this.startSunday.Text    = this.startSunday1.Text = m.HoursNeed[DayOfWeek.Sunday].Key.ToString();
     this.endSunday.Text      = this.endSunday1.Text = m.HoursNeed[DayOfWeek.Sunday].Value.ToString();
     this.startMonday.Text    = this.startMonday1.Text = m.HoursNeed[DayOfWeek.Monday].Key.ToString();
     this.endMonday.Text      = this.endMonday1.Text = m.HoursNeed[DayOfWeek.Monday].Value.ToString();
     this.startTuesday.Text   = this.startTuesday1.Text = m.HoursNeed[DayOfWeek.Tuesday].Key.ToString();
     this.endTuesday.Text     = this.endTuesday1.Text = m.HoursNeed[DayOfWeek.Tuesday].Value.ToString();
     this.startWednesday.Text = this.startWednesday1.Text = m.HoursNeed[DayOfWeek.Wednesday].Key.ToString();
     this.endWednesday.Text   = this.endWednesday1.Text = m.HoursNeed[DayOfWeek.Wednesday].Value.ToString();
     this.startThursday.Text  = this.startThursday1.Text = m.HoursNeed[DayOfWeek.Thursday].Key.ToString();
     this.endThursday.Text    = this.endThursday1.Text = m.HoursNeed[DayOfWeek.Thursday].Value.ToString();
     addcontractwindow        = window;
 }
        private void AddContractBtn_Click(object sender, RoutedEventArgs e)
        {
            var addContractWindow = new AddContractWindow(MotherOption);

            addContractWindow.ShowDialog();
        }
예제 #5
0
        private void AddContractButton_Click(object sender, RoutedEventArgs e)
        {
            Window AddContractWindow = new AddContractWindow();

            AddContractWindow.Show();
        }
예제 #6
0
        private void AddContractButton_Click(object sender, RoutedEventArgs e)
        {
            Window addcontractwindow = new AddContractWindow();

            addcontractwindow.ShowDialog();
        }