private void btnBorrow_Click(object sender, EventArgs e) { if (_controller.IsAvailable(bookBindingSource.Current as Book)) { using (frmConfirmBorrow frm = new frmConfirmBorrow(bookBindingSource.Current as Book, readerid)) { if (frm.ShowDialog() == DialogResult.OK) { _controller.ChangeAvailability(bookBindingSource.Current as Book); bookBindingSource.DataSource = _controller.GetAll(); } } } else { MessageBox.Show("Book is not available.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnConfirm_Click(object sender, EventArgs e) { _controller.ChangeAvailability(bookBindingSource.Current as Book); }