第1页共9页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第1页共9页教务管理员操作流程1、使用Admin账号登陆——教务管理员系统代码区域:intcount=0;boolisValidUser=false;if(loginType=="教务管理员"){stringsql=string
Format("selectcount(*)fromAdminwhereLoginId='{0}'ANDLoginPwd='{1}'",loginId,loginPwd);try{SqlCommandcommand=newSqlCommand(sql,DBHelper
connection);DBHelper
connection
Open();count=(int)command
ExecuteScalar();if(count==1){isValidUser=true;}else{index++;if(index=3){Application
Exit();}isValidUser=false;}}catch(Exceptionex){message=ex
Message;Console
WriteLine(ex
Message);}finally{DBHelper
connection
Close();第2页共9页第1页共9页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第2页共9页}if(cboType
Text=="教务管理员"){AdminFormadminForm=newAdminForm();adminForm
Show();returntrue;}成功进入后可以进行AdminForm
cs(教务管理员窗体)用户管理→新增用户→新增学生信息(代码如下:)AddStudentFormaddstudn