Beispiel #1
0
    def create_emp_in_database():
        def back_to_main_page1_from_create_emp():
            frame_create_emp.grid_forget()
            page1()

        name = entry3.get()
        password = entry4.get()
        salary = entry16.get()
        position = entry17.get()
        if (len(name) != 0 and len(password) != 0 and len(salary) != 0
                and len(position) != 0):
            backend.create_employee(name, password, salary, position)
            frame_create_emp.grid_forget()
            page1()
        else:
            label = Label(frame_create_emp, text="Please fill all entries")
            label.grid(pady=2)

            button = Button(
                frame_create_emp,
                text="Exit",
                command=back_to_main_page1_from_create_emp,
                bg="red",
            )
            button.grid()
Beispiel #2
0
    def create_emp_in_database():
        def back_to_main_page1_from_create_emp():
            frame_create_emp.grid_forget()
            page1()

        name = entry3.get()
        password = entry4.get()
        salary = entry16.get()
        position = entry17.get()
        if len(name) != 0 and len(password) != 0 and len(salary) != 0 and len(position) != 0:
            backend.create_employee(name, password, salary, position)
            frame_create_emp.grid_forget()
            page1()
        else:
            label = Label(frame_create_emp, text="Please fill all entries")
            label.grid(pady=2)

            button = Button(frame_create_emp, text="Exit", command=back_to_main_page1_from_create_emp, bg='red')
            button.grid()