private void returnButton_Click(object sender, EventArgs e)//还书 { Book book = lendBindingSource.Current as Book; if (book == null) { MessageBox.Show("请选择一本书进行操作!"); return; } BookShelfService.ReturnBooks(book, currentClient); lendBooks = new List <Book>(); lendBindingSource.DataSource = lendBooks; lendBooks = BookShelfService.GetAllLentBooks(currentClient); lendBindingSource.ResetBindings(false); lendBindingSource.DataSource = lendBooks; }