资源描述:
《【教务管理员操作流程】》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、教务管理员操作流程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=(in
2、t)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();}he"governingforthepeople
3、","Nomattertheinterestsofthemasses"conceptunderstandingisnotinplace.Thespecificworktreatswiththedeployment,afewleadingcadrescomplainthatworkistoocomplicated,toomuchresponsibility,thepressureistoolarge,toomuchemphasisonthedifficultyofthework.Forexample,noncoalmineif(cboType.Text=="教务管理员"){Adm
4、inFormadminForm=newAdminForm();adminForm.Show();returntrue;}成功进入后可以进行AdminForm.cs(教务管理员窗体)用户管理→新增用户→新增学生信息(代码如下:)AddStudentFormaddstudnetForm=newAddStudentForm();addstudnetForm.MdiParent=this;addstudnetForm.Show();→弹出窗口(学生信息添加)→Student表AdminStudentForm.cs保存按钮代码如下:if(TianJia()){try{SqlCommand
5、command=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);}}ca
6、tch(Exceptionex){MessageBox.Show(ex.Message);he"governingforthepeople","Nomattertheinterestsofthemasses"conceptunderstandingisnotinplace.Thespecificworktreatswiththedeployment,afewleadingcadrescomplainthatworkistoocomplicated,toomuchresponsibility,thepressureistoolarge,toomuchemphasisonthedi
7、fficultyofthework.Forexample,noncoalmine}finally{DBHelper.connection.Close();}}}privatevoidAddStudentForm_Load(objectsender,EventArgse){stringsql="selectgradeNamefromGrade";try{SqlCommandcommand=newSqlCommand(sql,DBHelper.connection);DBHelper.conne