From 5d9d87e994c0ec3130fb53b6eab58cb0208e657e Mon Sep 17 00:00:00 2001 From: pxes2r4ab <2721873872@qq.com> Date: Wed, 25 Jun 2025 10:14:06 +0800 Subject: [PATCH] Update add_student.py --- ui/add_student.py | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/ui/add_student.py b/ui/add_student.py index 56c2ad7..b1eb724 100644 --- a/ui/add_student.py +++ b/ui/add_student.py @@ -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() \ No newline at end of file + main()