private void AddLoc()
        {
            Add win = new PostgreSQL_APP.Add("location");

            authorDt = pgsql.OutTable("get_author()");
            win.comboBox1.ItemsSource       = authorDt.DefaultView;
            win.comboBox1.DisplayMemberPath = "name";
            win.comboBox1.SelectedValuePath = "id";
            bookDt = pgsql.OutTable("get_book()");
            win.comboBox2.ItemsSource       = bookDt.DefaultView;
            win.comboBox2.DisplayMemberPath = "name";
            win.comboBox2.SelectedValuePath = "id";
            shelfDt = pgsql.OutTable("get_shelf()");
            win.comboBox3.ItemsSource       = shelfDt.DefaultView;
            win.comboBox3.DisplayMemberPath = "name";
            win.comboBox3.SelectedValuePath = "id";
            win.ShowDialog();
            if (win.ok)
            {
                Location l = win.Location();
                pgsql.SetParamsLocation(l.GetProcName, l.AuthorId, l.BookId, l.ShelfId, l.BooksCount);
                pgsql.Query();
                MessageBox.Show("Успешно добавлено");
            }
        }
        private void AddPub()
        {
            Add win = new PostgreSQL_APP.Add("pub");

            win.ShowDialog();
            if (win.ok)
            {
                Publishing p = win.Publishing();
                pgsql.SetParamsPublishing(p.GetProcName, p.PublishingName, p.PublishingCity);
                pgsql.Query();
                MessageBox.Show("Успешно добавлено");
            }
        }
        private void AddAuthor()
        {
            Add win = new PostgreSQL_APP.Add("author");

            win.ShowDialog();
            if (win.ok)
            {
                Author a = win.Author();
                pgsql.SetParamsAuthor(a.GetProcName, a.AuthorFirstName, a.AuthorName, a.AuthorPatronymic, a.AuthorCity);
                pgsql.Query();
                MessageBox.Show("Успешно добавлено");
            }
        }
        private void AddShelf()
        {
            Add win = new PostgreSQL_APP.Add("shelf");

            win.ShowDialog();
            if (win.ok)
            {
                BookShelf bs = win.BookShelf();
                pgsql.SetParamsBookShelf(bs.GetProcName, bs.ShelfName, bs.ShelfPosition);
                pgsql.Query();
                MessageBox.Show("Успешно добавлено");
            }
        }
        private void AddBook()
        {
            Add win = new PostgreSQL_APP.Add("book");

            pubDt = pgsql.OutTable("get_pub()");
            win.comboBox2.ItemsSource       = pubDt.DefaultView;
            win.comboBox2.DisplayMemberPath = "name";
            win.comboBox2.SelectedValuePath = "id";
            win.ShowDialog();
            if (win.ok)
            {
                Book b = win.Book();
                pgsql.SetParamsBook(b.GetProcName, b.BookName, b.BookPublishing, b.PublishingDate, b.PagesCount);
                pgsql.Query();
                MessageBox.Show("Успешно добавлено");
            }
        }