()
| 449 | |
| 450 | # defining a function whose makes a update entry and submit butoon side to name button |
| 451 | def update_name(): |
| 452 | # def a function eho updates name in database |
| 453 | def update_name_in_database(): |
| 454 | new_name = entry_name.get() |
| 455 | r = check_string_in_account_no(new_name) |
| 456 | if len(new_name) != 0: |
| 457 | # function in backend that updates name in table |
| 458 | backend.update_name_in_bank_table(new_name, acc_no) |
| 459 | entry_name.destroy() |
| 460 | submit_button.destroy() |
| 461 | name_label.destroy() |
| 462 | else: |
| 463 | tkinter.messagebox.showinfo("Error", "Please fill blanks") |
| 464 | entry_name.destroy() |
| 465 | submit_button.destroy() |
| 466 | name_label.destroy() |
| 467 | |
| 468 | global entry_name |
| 469 | global name_label |
| 470 | name_label = Label(update_customer_frame, text="Enter new name") |
| 471 | name_label.grid(row=1, column=1) |
| 472 | entry_name = Entry(update_customer_frame) |
| 473 | entry_name.grid(row=1, column=2, padx=2) |
| 474 | global submit_button |
| 475 | submit_button = Button( |
| 476 | update_customer_frame, text="Update", command=update_name_in_database |
| 477 | ) |
| 478 | submit_button.grid(row=1, column=3) |
| 479 | |
| 480 | # defing a function who make gui fro age |
| 481 | def update_age(): |
nothing calls this directly
no outgoing calls
no test coverage detected