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()