public void UpdateTable(DataGrid dataGrid, IMilitaryIDRepository militaryIDRepository)
 {
     if (SearchTextBox.Text.Length > 0)
     {
         dataGrid.ItemsSource = militaryIDRepository.GetAllBySearchString(SearchTextBox.Text);
         return;
     }
     dataGrid.ItemsSource = militaryIDRepository.GetAll();
 }
 public override void UpdateData()
 {
     UpdateTable(MilitaryIDsDataGrid, _militaryIDRepository);
     MilitaryIDsAmountLabel.Content = "Усього в системі зареєстрованно " + _militaryIDRepository.GetAll().Count;
 }