MCPcopy Index your code
hub / github.com/geekcomputers/Python / update_employee_submit

Function update_employee_submit

bank_managment_system/QTFrontend.py:1678–1706  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1676 )
1677
1678 def update_employee_submit():
1679 try:
1680 user_data = backend.get_details(
1681 int(update_empolyee_search_other[0].text().strip())
1682 )
1683 name = name_edit.text().strip()
1684 age = int(Age_edit.text().strip())
1685 address = Address_edit.text().strip()
1686 mobile_number = int(Mobile_number_edit.text().strip())
1687 account_type = account_type_dropdown.currentText()
1688 print(name, age, address, mobile_number, account_type)
1689 backend.update_name_in_bank_table(name, user_data[0])
1690 backend.update_age_in_bank_table(age, user_data[0])
1691 backend.update_address_in_bank_table(address, user_data[0])
1692 backend.update_address_in_bank_table(address, user_data[0])
1693 backend.update_mobile_number_in_bank_table(mobile_number, user_data[0])
1694 backend.update_acc_type_in_bank_table(account_type, user_data[0])
1695
1696 show_popup_message(
1697 stacked_widget,
1698 "Employee details updated successfully",
1699 EMPLOYEE_MENU_PAGE,
1700 )
1701 stacked_widget.setCurrentIndex(EMPLOYEE_MENU_PAGE)
1702 except ValueError as e:
1703 print(e)
1704 show_popup_message(
1705 stacked_widget, "Enter valid numeric employee ID.", EMPLOYEE_MENU_PAGE
1706 )
1707
1708 stacked_widget.addWidget(home_page) # 0
1709 stacked_widget.addWidget(admin_page) # 1

Callers 1

setup_main_windowFunction · 0.85

Calls 2

show_popup_messageFunction · 0.85
get_detailsMethod · 0.80

Tested by

no test coverage detected