()
| 1543 | name_field, balance_field, action_button = form_widgets |
| 1544 | |
| 1545 | def on_search_submit(): |
| 1546 | try: |
| 1547 | account_number = int(search_input.text().strip()) |
| 1548 | except ValueError: |
| 1549 | show_popup_message( |
| 1550 | stacked_widget, "Please enter a valid account number.", search_index |
| 1551 | ) |
| 1552 | return |
| 1553 | |
| 1554 | if backend.check_acc_no(account_number): |
| 1555 | account_data = backend.get_details(account_number) |
| 1556 | name_field.setText(str(account_data[1])) |
| 1557 | balance_field.setText(str(account_data[4])) |
| 1558 | stacked_widget.setCurrentIndex(page_index) |
| 1559 | else: |
| 1560 | show_popup_message( |
| 1561 | stacked_widget, |
| 1562 | "Account not found", |
| 1563 | search_index, |
| 1564 | show_cancel=True, |
| 1565 | cancel_page=EMPLOYEE_MENU_PAGE, |
| 1566 | ) |
| 1567 | |
| 1568 | def on_action_submit(): |
| 1569 | try: |
nothing calls this directly
no test coverage detected