//добавить новый направление
 private void button_Click(object sender, RoutedEventArgs e)
 {
     _FOSCard                = new FOSCard();
     _FOSCard.Owner          = this;
     _FOSCard.button.Content = "Сохранить";
     if (_FOSCard.ShowDialog() == true)
     {
         client.GetListFOSAsync();
     }
     else
     {
         client.GetListFOSAsync();
     }
 }
 private void bt_updatefos_Click(object sender, RoutedEventArgs e)
 {
     ServiceReference1.FiledsOfScience temp = dataGrid.SelectedItem as ServiceReference1.FiledsOfScience;
     _FOSCard                = new FOSCard();
     _FOSCard.Owner          = this;
     _FOSCard.id_fos         = temp.id_fos;
     _FOSCard.textBox.Text   = temp.name_fos;
     _FOSCard.button.Content = "Изменить";
     if (_FOSCard.ShowDialog() == true)
     {
         client.GetListFOSAsync();
     }
     else
     {
         client.GetListFOSAsync();
     }
 }