Exemplo n.º 1
0
        public void GofrmBorrowBooks_BookID(frmDetails f, string userNameFromLogin, string userCategory)
        {
            f.Hide();
            frmBorrowBook_BookID frm = new frmBorrowBook_BookID(userNameFromLogin, userCategory);

            frm.ShowDialog();
            f.Close();
        }
        private void btnSearchBID_Click(object sender, EventArgs e)
        {
            //n.GofrmBorrowBooks_BookID(this, UserNameFromLogin, UserCategory);
            frmBorrowBook_BookID frm = new frmBorrowBook_BookID();
            DialogResult         r   = frm.ShowDialog();

            if (r == DialogResult.OK)
            {
                txtBoxBookID.Text   = frm.SelectedBookID;
                txtBoxBookName.Text = frm.SelectedBookTitle;
                int booksQuantityAvailable = GetAvailableQuantity();
                txtBoxAvailableQuantity.Text = booksQuantityAvailable.ToString();
            }
            // We get here when newform's DialogResult gets set
        }