()
| 1188 | |
| 1189 | # Login form for employee |
| 1190 | def employee_login(): |
| 1191 | def back_to_main3(): |
| 1192 | employee_frame.grid_forget() |
| 1193 | global frame |
| 1194 | frame = Frame(tk, bg="black") |
| 1195 | frame.grid(padx=400, pady=250) |
| 1196 | |
| 1197 | button = Button(frame, text="Admin", command=admin_login) |
| 1198 | button.grid(row=0, pady=20) |
| 1199 | |
| 1200 | button = Button(frame, text="Employee", command=employee_login) |
| 1201 | button.grid(row=1, pady=20) |
| 1202 | |
| 1203 | button = Button(frame, text="Exit", command=tk.destroy) |
| 1204 | button.grid(row=2, pady=20) |
| 1205 | tk.mainloop() |
| 1206 | |
| 1207 | mainloop() |
| 1208 | |
| 1209 | def check_emp(): |
| 1210 | name = entry1.get() |
| 1211 | password = entry2.get() |
| 1212 | if len(name) != 0 and len(password) != 0: |
| 1213 | result = backend.check_employee(name, password) |
| 1214 | print(result) |
| 1215 | if result: |
| 1216 | employee_frame.grid_forget() |
| 1217 | page2() |
| 1218 | else: |
| 1219 | label = Label(employee_frame, text="Invalid id and pasasword") |
| 1220 | label.grid(row=6, pady=10) |
| 1221 | button = Button(employee_frame, text="Exit", command=back_to_main3) |
| 1222 | button.grid(row=7) |
| 1223 | |
| 1224 | mainloop() |
| 1225 | else: |
| 1226 | label = Label(employee_frame, text="Please Fill All Entries") |
| 1227 | label.grid(row=6, pady=10) |
| 1228 | button = Button(employee_frame, text="Exit", command=back_to_main3) |
| 1229 | button.grid(row=7) |
| 1230 | |
| 1231 | mainloop() |
| 1232 | |
| 1233 | frame.grid_forget() |
| 1234 | |
| 1235 | global employee_frame |
| 1236 | employee_frame = Frame(tk, bg="black") |
| 1237 | employee_frame.grid(padx=500, pady=200) |
| 1238 | |
| 1239 | label = Label(employee_frame, text="Employee Login", font="bold") |
| 1240 | label.grid(row=0, pady=20) |
| 1241 | |
| 1242 | label1 = Label(employee_frame, text="Name:") |
| 1243 | label1.grid(row=1, pady=10) |
| 1244 | |
| 1245 | label2 = Label(employee_frame, text="Password:") |
| 1246 | label2.grid(row=3, pady=10) |
| 1247 | global entry1 |
nothing calls this directly
no outgoing calls
no test coverage detected