()
| 814 | |
| 815 | |
| 816 | def update_employee(): |
| 817 | def update_details_of_staff_member(): |
| 818 | def back_to_page1(): |
| 819 | show_employee_frame.grid_forget() |
| 820 | page1() |
| 821 | |
| 822 | def update_that_particular_employee(): |
| 823 | show_employee_frame.grid_forget() |
| 824 | |
| 825 | def back_to_page1_from_update(): |
| 826 | update_frame.destroy() |
| 827 | page1() |
| 828 | |
| 829 | def update_name_in_database(): |
| 830 | def database_calling(): |
| 831 | new_name = entry19.get() |
| 832 | if len(new_name) != 0: |
| 833 | old_name = staff_name.get() |
| 834 | backend.update_employee_name(new_name, old_name) |
| 835 | entry19.destroy() |
| 836 | update_button.destroy() |
| 837 | else: |
| 838 | entry19.destroy() |
| 839 | update_button.destroy() |
| 840 | tkinter.messagebox.showinfo("Error", "Please fill entry") |
| 841 | |
| 842 | global entry19 |
| 843 | entry19 = Entry(update_frame) |
| 844 | entry19.grid(row=1, column=1, padx=4) |
| 845 | global update_button |
| 846 | update_button = Button( |
| 847 | update_frame, text="Update", command=database_calling |
| 848 | ) |
| 849 | update_button.grid(row=1, column=2, padx=4) |
| 850 | |
| 851 | def update_password_in_database(): |
| 852 | def database_calling(): |
| 853 | new_password = entry19.get() |
| 854 | old_name = staff_name.get() |
| 855 | if len(new_password) != 0: |
| 856 | backend.update_employee_password(new_password, old_name) |
| 857 | entry19.destroy() |
| 858 | update_button.destroy() |
| 859 | else: |
| 860 | entry19.destroy() |
| 861 | update_button.destroy() |
| 862 | tkinter.messagebox.showinfo("Error", "Please Fill Entry") |
| 863 | |
| 864 | global entry19 |
| 865 | entry19 = Entry(update_frame) |
| 866 | entry19.grid(row=2, column=1, padx=4) |
| 867 | global update_button |
| 868 | update_button = Button( |
| 869 | update_frame, text="Update", command=database_calling |
| 870 | ) |
| 871 | update_button.grid(row=2, column=2, padx=4) |
| 872 | |
| 873 | def update_salary_in_database(): |
nothing calls this directly
no outgoing calls
no test coverage detected