Пример #1
0
        private void btnBookID_Click(object sender, EventArgs e)
        {
            SearchBooksDialogue searchBooksDialogue = new SearchBooksDialogue();

            searchBooksDialogue.ShowDialog();
            if (searchBooksDialogue.DialogResult == DialogResult.OK)
            {
                txtBookID.Text = searchBooksDialogue.booksid.ToString();
            }
        }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            SearchBooksDialogue searchBooks = new SearchBooksDialogue();

            searchBooks.ShowDialog();
            if (searchBooks.DialogResult == DialogResult.OK)
            {
                tbBookID.Text = searchBooks.booksid.ToString();
            }
        }
Пример #3
0
        private void btnSearchBooks_Click(object sender, EventArgs e)
        {
            SearchBooksDialogue searchBooksDialogue = new SearchBooksDialogue();

            searchBooksDialogue.ShowDialog();
            if (searchBooksDialogue.DialogResult == DialogResult.OK)
            {
                Books books = context.Books.Where(x => x.BookID == searchBooksDialogue.booksid).First();
                tbBooksID.Text    = books.BookID.ToString();
                tbTitle.Text      = books.Title.ToString();
                tbAuthor.Text     = books.Author.ToString();
                tbCallNumber.Text = books.CallNumber.ToString();
                cmbGenre.Text     = books.Genre.ToString();
            }
        }