def retrurnBook(self, SID: str, BID: str, isPunished: int): if isPunished > 0: database.pay(BID, SID, isPunished) ans = database.return_book(BID, SID) # 刷新表格 if ans: self.searchFunction('BID')
def pay(self, BID: str, PUNISH): ans = database.pay(BID, self.stu_mes['SID'], PUNISH) # 刷新表格 if ans: self.book_list = database.get_borrowing_books(self.stu_mes['SID']) self.table.deleteLater() self.setTable()