Esempio n. 1
0
def show():
    def clear_show_frame():
        show_frame.grid_forget()
        page2()
    def back_page2():
        search_frame.grid_forget()
        page2()

    acc_no=entry11.get()
    r=check_string_in_account_no(acc_no)
    if len(acc_no)!=0 and r:
        details=backend.get_details(acc_no)
        if details!=False:
            search_frame.grid_forget()
            global show_frame
            show_frame=Frame(tk)
            show_frame.grid(padx=400,pady=200)

            label=Label(show_frame,text="Account_number:\t{}".format(details[0]),font='bold')
            label.grid(row=0,pady=6)
            label = Label(show_frame, text="Name:\t{}".format(details[1]),font='bold')
            label.grid(row=1,pady=6)
            label = Label(show_frame, text="Age:\t{}".format(details[2]),font='bold')
            label.grid(row=2,pady=6)
            label = Label(show_frame, text="Address:\t{}".format(details[3]),font='bold')
            label.grid(row=3,pady=6)
            label = Label(show_frame, text="Balance:\t{}".format(details[4]),font='bold')
            label.grid(row=4,pady=6)
            label = Label(show_frame, text="Account_type:\t{}".format(details[5]),font='bold')
            label.grid(row=5,pady=6)
            label = Label(show_frame, text="Mobile Number:\t{}".format(details[6]),font='bold')
            label.grid(row=6,pady=6)
            button=Button(show_frame,text='Exit',command=clear_show_frame,width=20,height=2,bg='red',fg='white')
            button.grid(row=7,pady=6)
            mainloop()
        else:
            label=Label(search_frame,text="Account Not Found")
            label.grid()
            button=Button(search_frame,text='Exit',command=back_page2)
            button.grid()

    else:
        label = Label(search_frame, text="Enter correct account number")
        label.grid()
        button = Button(search_frame, text='Exit', command=back_page2)
        button.grid()
Esempio n. 2
0
def show():
    def clear_show_frame():
        show_frame.grid_forget()
        page2()

    def back_page2():
        search_frame.grid_forget()
        page2()

    acc_no = entry11.get()
    r = check_string_in_account_no(acc_no)
    if len(acc_no) != 0 and r:
        details = backend.get_details(acc_no)
        if details != False:
            search_frame.grid_forget()
            global show_frame
            show_frame = Frame(tk)
            show_frame.grid(padx=400, pady=200)

            label = Label(show_frame,
                          text="Account_number:\t{}".format(details[0]),
                          font='bold')
            label.grid(row=0, pady=6)
            label = Label(show_frame,
                          text="Name:\t{}".format(details[1]),
                          font='bold')
            label.grid(row=1, pady=6)
            label = Label(show_frame,
                          text="Age:\t{}".format(details[2]),
                          font='bold')
            label.grid(row=2, pady=6)
            label = Label(show_frame,
                          text="Address:\t{}".format(details[3]),
                          font='bold')
            label.grid(row=3, pady=6)
            label = Label(show_frame,
                          text="Balance:\t{}".format(details[4]),
                          font='bold')
            label.grid(row=4, pady=6)
            label = Label(show_frame,
                          text="Account_type:\t{}".format(details[5]),
                          font='bold')
            label.grid(row=5, pady=6)
            label = Label(show_frame,
                          text="Mobile Number:\t{}".format(details[6]),
                          font='bold')
            label.grid(row=6, pady=6)
            button = Button(show_frame,
                            text='Exit',
                            command=clear_show_frame,
                            width=20,
                            height=2,
                            bg='red',
                            fg='white')
            button.grid(row=7, pady=6)
            mainloop()
        else:
            label = Label(search_frame, text="Account Not Found")
            label.grid()
            button = Button(search_frame, text='Exit', command=back_page2)
            button.grid()

    else:
        label = Label(search_frame, text="Enter correct account number")
        label.grid()
        button = Button(search_frame, text='Exit', command=back_page2)
        button.grid()