예제 #1
0
 private void DeleteSoldier()
 {
     try
     {
         bl.DeleteSoldier(curentSoldier.Id);
         Obs.Clear();
         meneger meneger = bl.GetMeneger();
         ObservableCollection <Soldier> newObs = new ObservableCollection <Soldier>(meneger.soldiers);
         newObs.ToList().ForEach(s => Obs.Add(s));
         Close();
     }
     catch
     {
         MessageBox.Show("חייל זה לא קיים במערכת",
                         "שים לב",
                         MessageBoxButton.OKCancel, MessageBoxImage.Hand, MessageBoxResult.Cancel);
     }
 }