Пример #1
0
        private void BtnAddBook_Click(object sender, RoutedEventArgs e)
        {
            BooksWindowEditor bookEditor = new BooksWindowEditor();

            bookEditor.ShowDialog();
            if (!bookEditor.Manager.IsOk)
            {
                return;
            }

            RefreshBooks();
        }
Пример #2
0
        private void BtnEditBook_Click(object sender, RoutedEventArgs e)
        {
            if (dgBooks.SelectedItem == null)
            {
                return;
            }

            BooksWindowEditor bookEditor = new BooksWindowEditor
            {
                SelectedBook = ((BOOK)dgBooks.SelectedItems[0])
            };

            bookEditor.ShowDialog();
            if (!bookEditor.Manager.IsOk)
            {
                return;
            }

            RefreshBooks();
        }