|
|
|
@ -298,11 +298,11 @@ def update_stu():
|
|
|
|
|
# 删除学生信息
|
|
|
|
|
def del_stu():
|
|
|
|
|
stus = read_stu_csv()
|
|
|
|
|
stu_names = stus['学号ID'].values.tolist()
|
|
|
|
|
stu_phones = stus['电话'].values.tolist()
|
|
|
|
|
stu_IDs = stus['学号ID'].values.tolist()
|
|
|
|
|
|
|
|
|
|
while True:
|
|
|
|
|
stu_input = eval(input("请输入学生学号:"))
|
|
|
|
|
if stu_input in stu_names:
|
|
|
|
|
if stu_input in stu_IDs:
|
|
|
|
|
print_message("您确定删除此学生吗?")
|
|
|
|
|
confirm_flag = input("y/n:")
|
|
|
|
|
if confirm_flag == 'y':
|
|
|
|
@ -337,23 +337,23 @@ if __name__=="__main__":
|
|
|
|
|
break
|
|
|
|
|
if x==1:
|
|
|
|
|
read_someone_by_name()
|
|
|
|
|
elif x==0:
|
|
|
|
|
read_all_stus()
|
|
|
|
|
elif x==2:
|
|
|
|
|
read_someone_by_phone()
|
|
|
|
|
elif x==3:
|
|
|
|
|
elif x==4:
|
|
|
|
|
read_stu()
|
|
|
|
|
elif x==4:
|
|
|
|
|
elif x==5:
|
|
|
|
|
update_by_name()
|
|
|
|
|
elif x==5:
|
|
|
|
|
update_by_phone()
|
|
|
|
|
elif x==6:
|
|
|
|
|
add_stu()
|
|
|
|
|
update_by_phone()
|
|
|
|
|
elif x==7:
|
|
|
|
|
update_stu()
|
|
|
|
|
elif x==0:
|
|
|
|
|
read_all_stus()
|
|
|
|
|
add_stu()
|
|
|
|
|
elif x==8:
|
|
|
|
|
del_stu()
|
|
|
|
|
update_stu()
|
|
|
|
|
elif x==9:
|
|
|
|
|
del_stu()
|
|
|
|
|
elif x==3:
|
|
|
|
|
read_stu_by_number()
|
|
|
|
|
else:
|
|
|
|
|
print('输入错误,重新输入')
|
|
|
|
|