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); } }
public menegerSignIn() { meneger = bl.GetMeneger(); InitializeComponent(); id.Text = meneger.Id; foolName.Text = meneger.Name; email.Text = meneger.Email.ToString(); password.Text = meneger.password; }
public ReportScreen() { meneger meneger = bl.GetMeneger(); Obs = new ObservableCollection <Soldier>(meneger.soldiers); InitializeComponent(); soldier.ItemsSource = Obs; }
public MainWindow() { meneger meneger = bl.GetMeneger(); Obs = new ObservableCollection <Soldier>(meneger.soldiers); InitializeComponent(); deatal.Text = meneger.deatales; soldier.ItemsSource = Obs; DataContext = meneger; }