电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

【教务管理员操作流程】VIP免费

【教务管理员操作流程】_第1页
1/9
【教务管理员操作流程】_第2页
2/9
【教务管理员操作流程】_第3页
3/9
第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){message="用户名或密码不存在!";}elseif(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(教务管理员窗体)用户管理→新增用户→新增学生信息(代码如下:)AddStudentFormaddstudnetForm=newAddStudentForm();addstudnetForm.MdiParent=this;addstudnetForm.Show();→弹出窗口(学生信息添加)→Student表AdminStudentForm.cs保存按钮代码如下:if(TianJia()){try{SqlCommandcommand=newSqlCommand(sql,DBHelper.connection);DBHelper.connection.Open();intresult=command.ExecuteNonQuery();if(result!=1){MessageBox.Show("添加失败","输入提示",MessageBoxButtons.OK,MessageBoxIcon.Information);}else{MessageBox.Show("添加成功","输入提示",MessageBoxButtons.OK,MessageBoxIcon.Information);}}catch(Exceptionex)第3页共9页第2页共9页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第3页共9页{MessageBox.Show(ex.Message);}finally{DBHelper.connection.Close();}}}privatevoidAddStudentForm_Load(objectsender,EventArgse){stringsql="selectgradeNamefromGrade";try{SqlCommandcommand=newSqlCommand(sql,DBHelper.connection);DBHelper.connection.Open();SqlDataReaderreader=command.ExecuteReader();while(reader.Read()){stringgradeName=(string)reader[0];cboGrade.Items.Add(gradeName);}reader.Close();}catch(Exceptionex){MessageBox.Show(ex.Message);}finally{DBHelper.connection.Close();}}privatevoidcboGrade_SelectedIndexChanged(objectsender,EventArgse){if(cboGrade.Text.Trim()!=""){intgradeId=-1;stringsql=string.Format("selectGradeIdfromGradewhereGradeName='{0}'",cboGrade.Text);SqlCommandcommand=newSqlCommand(sql,DBHelper.connection);try{DBHelper.connection.Open();SqlDataReaderreader=command.ExecuteReader();if(reader.Read())第4页共9页第3页共9页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第4页共9页{gradeId=(int)reader[0];}reader.Close();}catch(Exceptionex){MessageBox.Show("操作数据库出错");Console.WriteLine(ex.Message);}finally{DBHelper.connection.Close();}sql="SELECTClassNameFROMClassWHEREGradeId="+gradeId;command.CommandText=sql;try{DBHelper.connection.Open();SqlDataReaderreader=command.ExecuteReader();stringclassName="";cboClass.Items.Clear();while(reader.Read()){className=(string)reader["ClassName"];cboClass.Items.Add(className);}reader.Close();}catch(Exceptionex){MessageBox.Show("操作数据库出错");Console.WriteLine(ex.Message);}finally{DBHelper.connection.Close();}}}privatevoidtxtStudentPassword_TextChanged(objectsender,EventArgse)第5页共9页第4页共9页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第5页共9页{}}AdminTeacherForm.cs(教师信息添加窗体)新增教师信息→弹出窗口(教师信息添加)→Teacher表保存按...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

【教务管理员操作流程】

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部