#Python 用Sqlite3做模拟银行系统(4)

今天的时间略短,就不做讲解了,直接上干货:

def deposit_submit(account_entry, amount_entry, note_entry):
    account_name = account_entry.get()
    amount = float(amount_entry.get())
    note = note_entry.get()
    deposit(account_name, amount, note)
    messagebox.showinfo("Success", f"Successfully deposited {amount} to account {account_name}")
    account_entry.delete(0, tk.END)  # Clear account entry
    amount_entry.delete(0, tk.END)  # Clear amount entry
    note_entry.delete(0, tk.END)  # Clear note entry

def withdraw_submit(account_entry, amount_entry, note_entry):
    account_name = account_entry.get()
    amount = float(amount_entry.get())
    note = note_entry.get()
    withdraw(account_name, amount, note)
    messagebox.showinfo("Success", f"Successfully withdrew {amount} from account

你可能感兴趣的:(前端,数据库,javascript,python,sqlite,开发语言)