Пример #1
0
    def create_customer_in_database():
        def delete_create():
            create_employee_frame.grid_forget()
            page2()

        name = entry5.get()
        age = entry6.get()
        address = entry7.get()
        balance = entry8.get()
        acc_type = entry9.get()
        mobile_number = entry10.get()
        if len(name) != 0 and len(age) != 0 and len(address) != 0 and len(
                balance) != 0 and len(acc_type) != 0 and len(
                    mobile_number) != 0:

            acc_no = backend.create_customer(name, age, address, balance,
                                             acc_type, mobile_number)

            label = Label(create_employee_frame,
                          text='Your account number is {}'.format(acc_no))
            label.grid(row=14)

            button = Button(create_employee_frame,
                            text="Exit",
                            command=delete_create)
            button.grid(row=15)
        else:
            label = Label(create_employee_frame,
                          text='Please fill all entries')
            label.grid(row=14)

            button = Button(create_employee_frame,
                            text="Exit",
                            command=delete_create)
            button.grid(row=15)
Пример #2
0
    def create_customer_in_database():
        def delete_create():
            create_employee_frame.grid_forget()
            page2()
        name = entry5.get()
        age = entry6.get()
        address = entry7.get()
        balance = entry8.get()
        acc_type = entry9.get()
        mobile_number = entry10.get()
        if len(name) != 0 and len(age) != 0 and len(address) != 0 and len(balance) != 0 and len(acc_type) != 0 and len(
                mobile_number) != 0:

            acc_no = backend.create_customer(name, age, address, balance, acc_type, mobile_number)

            label = Label(create_employee_frame, text='Your account number is {}'.format(acc_no))
            label.grid(row=14)

            button = Button(create_employee_frame, text="Exit", command=delete_create)
            button.grid(row=15)
        else:
            label = Label(create_employee_frame, text='Please fill all entries')
            label.grid(row=14)

            button = Button(create_employee_frame, text="Exit", command=delete_create)
            button.grid(row=15)