コード例 #1
0
 private void btnReturn_Click(object sender, EventArgs e)
 {
     if (loanBindingSource.Current != null)
     {
         using (frmReturn frm = new frmReturn(loanBindingSource.Current as Loan, readerBindingSource.DataSource as Reader))
         {
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 _controller.BookReturned(loanBindingSource.Current as Loan);
             }
             loanBindingSource.DataSource = _controller.GetByReaders(readerBindingSource.DataSource as Reader);
         }
     }
 }