Update add_student.py

master
pxes2r4ab 1 month ago
parent ac76680fe0
commit 5d9d87e994

@ -511,7 +511,32 @@ def main():
# 创建用户界面
tui = StudentTUI(bll)
tui.run()
def fun(self):
"""运行UI"""
while True:
self.display_menu()
choice = input("请选择操作: ").strip()
if choice == '1':
self.add_student()
elif choice == '2':
self.delete_student()
elif choice == '3':
self.update_student()
elif choice == '5':
self.show_stats()
elif choice == '6':
self.import_export_data()
elif choice == '7':
self.clear_students()
elif choice == '8':
self.query_student()
elif choice == '4':
print("感谢使用学生信息管理系统!")
break
else:
print("无效的选择,请重新输入!")
if __name__ == "__main__":
main()
Loading…
Cancel
Save