()
| 117 | |
| 118 | |
| 119 | def show(): |
| 120 | def clear_show_frame(): |
| 121 | show_frame.grid_forget() |
| 122 | page2() |
| 123 | |
| 124 | def back_page2(): |
| 125 | search_frame.grid_forget() |
| 126 | page2() |
| 127 | |
| 128 | acc_no = entry11.get() |
| 129 | r = check_string_in_account_no(acc_no) |
| 130 | if len(acc_no) != 0 and r: |
| 131 | details = backend.get_details(acc_no) |
| 132 | if details != False: |
| 133 | search_frame.grid_forget() |
| 134 | global show_frame |
| 135 | show_frame = Frame(tk) |
| 136 | show_frame.grid(padx=400, pady=200) |
| 137 | |
| 138 | label = Label( |
| 139 | show_frame, text="Account_number:\t{}".format(details[0]), font="bold" |
| 140 | ) |
| 141 | label.grid(row=0, pady=6) |
| 142 | label = Label(show_frame, text="Name:\t{}".format(details[1]), font="bold") |
| 143 | label.grid(row=1, pady=6) |
| 144 | label = Label(show_frame, text="Age:\t{}".format(details[2]), font="bold") |
| 145 | label.grid(row=2, pady=6) |
| 146 | label = Label( |
| 147 | show_frame, text="Address:\t{}".format(details[3]), font="bold" |
| 148 | ) |
| 149 | label.grid(row=3, pady=6) |
| 150 | label = Label( |
| 151 | show_frame, text="Balance:\t{}".format(details[4]), font="bold" |
| 152 | ) |
| 153 | label.grid(row=4, pady=6) |
| 154 | label = Label( |
| 155 | show_frame, text="Account_type:\t{}".format(details[5]), font="bold" |
| 156 | ) |
| 157 | label.grid(row=5, pady=6) |
| 158 | label = Label( |
| 159 | show_frame, text="Mobile Number:\t{}".format(details[6]), font="bold" |
| 160 | ) |
| 161 | label.grid(row=6, pady=6) |
| 162 | button = Button( |
| 163 | show_frame, |
| 164 | text="Exit", |
| 165 | command=clear_show_frame, |
| 166 | width=20, |
| 167 | height=2, |
| 168 | bg="red", |
| 169 | fg="white", |
| 170 | ) |
| 171 | button.grid(row=7, pady=6) |
| 172 | mainloop() |
| 173 | else: |
| 174 | label = Label(search_frame, text="Account Not Found") |
| 175 | label.grid() |
| 176 | button = Button(search_frame, text="Exit", command=back_page2) |
nothing calls this directly
no test coverage detected