private void AddDoc_Click(object sender, RoutedEventArgs e) { EditDocs editDocs = new EditDocs(); editDocs.EditDocsButton.Visibility = Visibility.Hidden; editDocs.OkEditDocs.Visibility = Visibility.Visible; editDocs.Show(); }
private void EditDoc_Click(object sender, RoutedEventArgs e) { EditDocs editDocs = new EditDocs(); editDocs.OkEditDocs.Visibility = Visibility.Hidden; editDocs.EditDocsButton.Visibility = Visibility.Visible; try { editDocs.DocName.Text = tmp.Name; editDocs.DocOffice.Text = tmp.Office; editDocs.DocPhone.Text = tmp.Phone; editDocs.DocPosition.Text = tmp.Position; editDocs.DocIdLabel.Content = tmp.Id; editDocs.ShowDialog(); } catch (Exception) { MessageBox.Show("Ничего не выбрано", "Ошибка"); } }