/// <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(); }
private void AddContractBtn_Click(object sender, RoutedEventArgs e) { var addContractWindow = new AddContractWindow(MotherOption); addContractWindow.ShowDialog(); }
private void AddContractButton_Click(object sender, RoutedEventArgs e) { Window addcontractwindow = new AddContractWindow(); addcontractwindow.ShowDialog(); }