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; Books = new List <Book>(); booksBindingSource.DataSource = Books; Books = BookShelfService.AllBooks(); booksBindingSource.ResetBindings(false); booksBindingSource.DataSource = Books; Query(1); }