()
| 639 | |
| 640 | |
| 641 | def delete(): |
| 642 | frame1.grid_forget() |
| 643 | |
| 644 | def search_in_database(): |
| 645 | def back_page2(): |
| 646 | search_frame.grid_forget() |
| 647 | page2() |
| 648 | |
| 649 | global result |
| 650 | global acc_no |
| 651 | acc_no = entry11.get() |
| 652 | r = check_string_in_account_no(acc_no) |
| 653 | if len(acc_no) != 0 and r: |
| 654 | result = backend.check_acc_no(acc_no) |
| 655 | print(result) |
| 656 | if not result: |
| 657 | label = Label(search_frame, text="invalid account number") |
| 658 | label.grid(pady=2) |
| 659 | button = Button(search_frame, text="Exit", command=back_page2) |
| 660 | button.grid() |
| 661 | mainloop() |
| 662 | else: |
| 663 | backend.delete_acc(acc_no) |
| 664 | search_frame.grid_forget() |
| 665 | page2() |
| 666 | else: |
| 667 | label = Label(search_frame, text="Enter correct account number") |
| 668 | label.grid(pady=2) |
| 669 | button = Button(search_frame, text="Exit", command=back_page2) |
| 670 | button.grid() |
| 671 | |
| 672 | def search_acc(): |
| 673 | global search_frame |
| 674 | search_frame = Frame(tk) |
| 675 | search_frame.grid(padx=500, pady=300) |
| 676 | |
| 677 | label = Label(search_frame, text="Enter account number", font="bold") |
| 678 | label.grid(row=0, pady=6) |
| 679 | |
| 680 | global entry11 |
| 681 | entry11 = Entry(search_frame) |
| 682 | entry11.grid(row=1, pady=6) |
| 683 | |
| 684 | button = Button(search_frame, text="Delete", command=search_in_database) |
| 685 | button.grid(row=3) |
| 686 | |
| 687 | mainloop() |
| 688 | |
| 689 | search_acc() |
| 690 | |
| 691 | |
| 692 | # main page for employees |
nothing calls this directly
no test coverage detected