Пример #1
0
 // add child button click event
 private void AddChild_CLick(object sender, RoutedEventArgs e)
 {
     try
     {
         bl.AddChild(child.Clone());
         child = new Child();
         AddChild.DataContext = child;
         Close();
     }
     catch (BLException ex)
     {
         MessageBox.Show(ex.Message, "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Пример #2
0
 // delete child button click event
 private void Delete_Click(object sender, RoutedEventArgs e)
 {
     if (child != null)
     {
         try
         {
             bl.DeleteChild(child.Clone());
             Close();
         }
         catch (BLException ex)
         {
             MessageBox.Show(ex.Message, "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
 }