文档介绍:【教师管理操作流程】教师管理操作流程使用Teacher账号登陆——教师管理系统代码区域:if(loginType=="教师"){stringsql=("selectcount(*)fromteacherwhereLoginId='{0}'ANDLoginPwd='{1}'",loginId,loginPwd);try{mand=mand(sql,);();count=(int)();if(count==1){isValidUser=true;}else{index++;if(index<=3){message="用户名或密码不存在!";}elseif(index>=3){();}isValidUser=false;}}catch(Exceptionex){message=;();}查询修改信息查询教师基本信息(代码区域:)TeacherBaseFormteacherBaseForm=newTeacherBaseForm();();TeacherBaseForm(教师基本信息窗体)查询及修改学生信息(代码区域:)UpdateStudentFormupdateStudentForm=newUpdateStudentForm();();(查询及修改信息窗体)AddScoreForm(学生成绩录入窗体)录入按钮代码:stringsql=("selectStudentId,StudentNo,StudentNamefromStudentwhereStudentId='{0}'",);try{mand=mand(sql,);();SqlDataReaderreader=();while(()){id=(int)reader["StudentId"];no=(string)reader["StudentNo"];name=(string)reader["StudentName"];}();}catch(Exceptionex){();}finally{();}if(TianJia()){if(==(id)&&==no&&==name){stringstudentName=;stringsdudentNo=;stringsubject=;stringscore=;intclassId=GetClassId();stringstudentId=;stringsql1=("insertintoScore(StudentNo,Subject,SScore,SName,ClassId,StudentId)values('{0}','{1}','{2}','{3}','{4}',{5})",sdudentNo,subject,score,studentName,classId,studentId);try{mand=mand(sql1,);();intresult=();if(result!=1){("添加失败","输入提示",,);}else{("添加成功","输入提示",,);}}catch(Exceptionex){//("操作数据库出错!","输入提示",,);//();();}finally{();}}else{("您输入的学生在数据库中没有,请重新输入","输入提示",,);}}}privatevoidAddScoreForm_Load(objectsender,