Example #1
0
 private void ДобавитьНаряд(object sender, RoutedEventArgs e)
 {
     try
     {
         var dlg = new NewNaryad();
         dlg.ShowDialog();
         if (dlg.Obj != null)
         {
             App.Модель.Наряды.Add(dlg.Obj);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(string.Format("{0}\n{1}", ex.Message, ex.StackTrace), "Исключение");
     }
 }
Example #2
0
 private void  едактироватьНаряд(object sender, RoutedEventArgs e)
 {
     try
     {
         var item = narydsGrid.SelectedItem as Наряд;
         if (item == null)
         {
             return;
         }
         var dlg = new NewNaryad(item);
         dlg.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(string.Format("{0}\n{1}", ex.Message, ex.StackTrace), "Исключение");
     }
 }