【asp源码栏目提醒】:网学会员asp源码为您提供信息技术系《ASP.NET项目实训》课程论文-学生信息管理系统的设计(含源代码)-毕业设计学位论文范文模板参考资料 - 毕业设计参考,解决您在信息技术系《ASP.NET项目实训》课程论文-学生信息管理系统的设计(含源代码)-毕业设计学位论文范文模板参考资料 - 毕业设计学习中工作中的难题,参考学习。
信息技术系 2009-2010 第一学期 《
ASP.NET 项目实训》课程论文 题目 学生信息管理系统 级: 负责模块: 学生管理,课程管理模块 小组成员: 成 绩: 评阅教师: 2009 年 12 月 9 日摘要 学生管理系统用于对学生信息管理,教师信息管理,班级管理,成绩管理,学生所在院系,专业管理等。
目录:系统功能分析………………………………………………………………2数据库设计…………………………………………………………………2各个数据表创建……………………………………………………………3存储过程创建………………………………………………………………5学生信息管理系统总括……………………………………………………6登录模块……………………………………………………………………7教师管理模块………………………………………………………………8学生管理模块………………………………………………………………10课程管理模块………………………………………………………………18成绩管理模块………………………………………………………………20班级管理模块………………………………………………………………22退出管理……………………………………………………………………24一、系统功能分析功能分析:学生信息管理系统属应用系统。
系统是一个集成多功能的信息管理系统,有教师资料管理、学生管理、班级管理、专业管理、课程管理、成绩管理和院系管理功能模块。
本系统将大大提高学生信息的管理效率,带来数据共享、网络查询和网络管理等便利,实现学生信息管理的数字化和智能化。
1. 模块划分(整个系统功能结构图)2. 各模块功能简介 登录模块:本模块主要为用户登录,权限验证,管理员添加,实现系统的多用户管理功能,不同权限的用户,可对其进行不同功能的管理。
教师管理模块:本模块主要对教师的资料信息进行查询,删除,修改和添加。
学生管理模块:本模块主要对学生资料信息进行相应的查询,删除,修改和添加。
添加了学生所在院系资料与学生所在专业资料,同时可对院系资料与专业资料进行相应的添加, 修改,查询。
课程管理模块:本模块主要对课程资料进行管理,对其进行查询,添加,修改和删除。
又详细划分了课程类别资料,对其进行如上操作。
成绩管理模块:本模块对学生成绩进行查询操作,如发现成绩有输入错误,可对其进行相应的修改,还可对学生的成绩进行录入‘ 班级管理模块:本模块班级资料信息进行管理,对其进行相应的查询,修改,删除和添加。
二、数据库设计根据学生管理系统所要求的数据信息,创建数据库 SMSStudent ,根据各模块可创建如下 10个数据表,其字段名,数据类型等内容如下:1. 各表及字段Class 表:Course 表:Coursetype 表:Department 表:Grade 表:Speciality 表:Speciality_course 表:Student 表:Teacher 表:Users 表:添加:class_stu_view 视图表。
2. 系统中模块使用的存储过程本数据库共创建 3 处存储过程,其存储过程为:教师资料查询(teacher.aspx 页面)Employess_Sel 存储过程:CREATE PROCEDURE dbo.Employess_Sellastname nvarchar 20department varchar 30ASselectteacheridteachernamedepartment.departmentiddepartment.departmentnamesextelephone from teacherdepartment whereteacher.departmentiddepartment.departmentid and teachername like lastname and department.departmentnamedepartment学生资料查询(student.aspx 页面)Student_Sel 存储过程:CREATE PROCEDURE dbo.Student_Sellastname nvarchar 20department varchar 30studentid varchar10ASselect from studentclass where student.classidclass.classid and studentname like lastname or studentidstudentid andclass.classnamedepartment管理员添加(register.aspx 页面)procAdmin 存储过程:CREATE procedure dbo.procAdminAuser char10Apwd varchar50Atype varchar20ASinsert into usersusernamemypasswordusertypevaluesAuserApwdAtype三、各模块页面设计,具体功能实现1. 学生信息管理系统总括: 开发环境:Microsoft Visual Studio 2005 开发语言:C,JavaScript 数据库: Microsoft SQL Server 2005 辅助工具:Adobe Photoshop CS2,Dreamweaver MX 2004 整体页面架构: 框架集(crm_admin_main.htm)(Width763) 如上图所示 四个框架内容文件: (top.htm left.htm switch.htm body.htm) 1. top.htm 页面:JavaScript 特效 rain.js详细代码见项目; 2. left.htm 页面:JavaScript 级联菜单,全部由 JavaScript 生成,通过数组定义子菜单, 可任意添加目录项与级联子项,程序可扩展性良好。
3. switch .htm 页面:JavaScript 作开关按钮,实现框架的展开与合并功能。
4. body.htm 页面: 定位框架的主内容文件。
(主要是 aspx 文件的定位: 后面加 xxx.aspx target’mainFrame’。
例如:item_link20quotstudent.aspx targetmainFramequot) 注:本页面由 Dreamweaver MX 2004 实现,经 JavaScript 代码进行修改而成。
2. 全局配置文件: 数据库访问类 connDB.cs public static SqlConnection createConn string sms_connstr System.Configuration.ConfigurationManager.ConnectionStringsquotconquot.ToString SqlConnection conn new SqlConnectionsms_connstr return conn 3. Web.Config 文件 配置信息:数据库连接字符串ltconnectionStringsgt ltadd namequotconquot connectionStringquotserverlocalInitial CatalogSMSStudentIntegratedSecuritytruequot /gtlt/connectionStringsgt4. Web.sitemap 文件 配置整个站点的层次结构 以学生管理为例,站点地图代码如下: ltsiteMapNode urlquotquot titlequot主页quot descriptionquotquotgt ltsiteMapNode urlquotquot titlequot学生管理quot descriptionquotquot gt ltsiteMapNode urlquot/student.aspxquot titlequot学生信息管理quot descriptionquotquot /gt ltsiteMapNode urlquot/addstu.aspxquot titlequot学生信息添加quot descriptionquotquot /gt lt/siteMapNodegt lt/siteMapNodegt lt/siteMapgt5. SiteMapPath 控件 SiteMapPath 控件数据内容由 Web.sitemap 文件自动导航一、登录模块: 1. 用户注册页面(register.aspx) 如下图:本页面可向系统注册管理员,通过身份验证获得整个系统的管理权限。
注册是同过 MD5 加密算法对密码框(txtpwd.Text)进行加密。
调用加密算法:String str_pwd System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFilethis.mypassword.Text quotmd5quot.ToString实现方法:首先定义 ExecuteInsert 方法代码详见项目,在点击添加按钮时调用,但在调用前必须判断该注册用户是否已存在或注册的用户和密码不能为空,代码如下 string str_user txtuser.Text string str_sel quotselect countusername from users where usernamequot str_user quotquot int count data.ExecuteSelstr_sel if count gt 0//用户已存在 Page.ClientScript.RegisterStartupScriptthis.GetType quotshow_messagequot quotltscriptlanguagejavascriptgtalert用户已存在!lt/scriptgtquot else if this.txtuser.Text quotquot this.txtpwd.Text quotquot Page.ClientScript.RegisterStartupScriptthis.GetType quotshow_messagequotquotltscript languagejavascriptgtalert用户名和密码不能为空!lt/scriptgtquot else this.ExecuteInsert 2. 用户登录页面(logoin.aspx) 如下图:本页面主要实现用户登录,通过 MD5 加密算法,确保数据库访问安全性。
三、教师管理模块: 1. 教师资料管理页面 teacher.aspx本页面主要对教师资料管理,查询和删除。
2. 教师资料添加页面(addteacher.aspx) 本页面主要对教师资料进行添加功能,对应 teacher 表。
3. 教师信息修改页面(Editteacher.aspx) 此页面通过 teacher.aspx 页面传值,来对教师详细资料信息进行数据绑定。
保存按钮主要代码:string sms_sqlstr quotupdate teacher set Teachernamequot TextBox2.Text quotsexquot RadioButtonList1.SelectedItem.Text quottechnicalpostquot DropDownList2.SelectedItem.Text quottelephonequot TextBox8.Text quothomeaddrquot TextBox7.Text quotpwdquot TextBox9.Text quotremarkquot TextBox6.Text quotdepartmentidquot DropDownList3.SelectedValue.ToString quotwhere Teacheridquot TextBox1.Text quotquot SqlCommand sms_comm new SqlCommandsms_sqlstr sms_conn sms_comm.Connection.Open四、学生管理模块: 1. 学生资料管理页面(student.aspx) 如下图所示: 数据绑定控件 GridView ,掌握该控件的灵活用法,掌握常用属性设置,主要实现 其数据绑定功能与分页功能。
数据绑定的实现方式很多,可选用直接绑定 BoundField ,或选用 TemplateField 等,如学号,姓名,选择删除字段用的是 TemplateField ,在 TemplateField 区域中放入相应的控件,作成如图效果,掌握数 据集对控件数据的填充方法,代码如下: sms_conn.Open sms_sqlstr quotselect from studentclass where student.classidclass.classidquot SqlDataAdapter sms_adp new SqlDataAdaptersms_sqlstrsms_conn DataSet sms_ds new DataSet sms_adp.Fillsms_ds sms_conn.Close sms_stutent.DataSource sms_ds sms_stutent.DataBind sms_ds.Clear sms_ds.Dispose 实现选择删除列的方法:全选、反选全选代码:for int i 0 i lt sms_stutent.Rows.Count i CheckBox chkSelect CheckBoxsms_stutent.Rowsi.FindControlquotchkSelectquot chkSelect.Checked true 反选代码:for int i 0 i lt sms_stutent.Rows.Count i CheckBox chkSelect CheckBoxsms_stutent.Rowsi.FindControlquotchkSelectquot chkSelect.Checked chkSelect.Checked 重点难点为:删除按钮的事件,如何取 studentid 的键值,实现方法的代码为: for int i 0 i lt sms_stutent.Rows.Count i CheckBox chkSelect CheckBoxsms_stutent.Rowsi.FindControlquotchkSelectquot if chkSelect.Checked //如何选中ID列?str string str Labelsms_stutent.Rowsi.FindControlquotLabel3quot.Text string sms_sqlstr quotdelete from student where studentidquot str quotquot SqlCommand sms_comm new SqlCommandsms_sqlstr sms_conn sms_comm.Connection.Open try sms_comm.ExecuteNonQuery sms_lbl_note.Text quot删除成功quot catch SqlException sms_lbl_note.Text quot删除失败quot sms_lbl_note.Stylequotcolorquot quotredquot sms_comm.Connection.Close SMS_BindGrid分页中用到ltPagerTemplategtlt/PagerTemplategt其它分页均用该方式: ltPagerTemplategt lttablegt lttrgt lttd alignquotrightquot nowrapquotnowrapquot gt ltasp:Label IDquotLabelCurrentPagequot runatquotserverquot Font-SizequotSmallquot gt当前页:lt GridViewContainer.NamingContainer.PageIndex1 gtlt/
asp:Labelgtlt/tdgt lttd alignquotrightquotnowrapquotnowrapquot gt ltasp:Label IDquotLaberPageCountquot runatquotserverquot Font-SizequotSmallquotgt总页数:ltGridViewContainer.NamingContainer.PageCount gtlt/
asp:Labelgtlt/tdgt lttdgt ltasp:LinkButton IDquotLinkButtonFirstPagequot runatquotserverquot CommandArgumentquotFirstquot CommandNamequotPagequot Enablequotlt GridViewContainer.NamingContainer.PageIndex 0 gtquot Font-SizequotSmallquotgt首页 lt/
asp:LinkButtongtlt/tdgt lttdgt ltasp:LinkButton IDquotLinkButtonPreviousPagequot runatquotserverquot CommandArgumentquotPrevquot CommandNamequotPagequot EnablequotltGridViewContainer.NamingContainer.PageIndex0 gtquot Font-SizequotSmallquotgt上一页lt/
asp:LinkButtongtlt/tdgt lttd alignquotrightquot nowrapquotnowrapquot gt ltasp:LinkButton IDquotLinkButtonNextPagequot runatquotserverquot CommandArgumentquotNextquot CommandNamequotPagequot EnablequotltGridViewContainer.NamingContainer.PageIndex0 gtquot Font-SizequotSmallquotgt下一页lt/
asp:LinkButtongtlt/tdgt lttd alignquotrightquot nowrapquotnowrapquot gt ltasp:LinkButton IDquotLinkButtonLastPagequot runatquotserverquot CommandArgumentquotLastquot CommandNamequotPagequot EnablequotltGridViewContainer.NamingContainer.PageIndex0 gtquot Font-SizequotSmallquot gt尾页lt/
asp:LinkButtongtlt/tdgt lt/trgt lt/tablegt lt/PagerTemplategt 实现分页的事件: protected void sms_stutent_PageIndexChangingobject sender GridViewPageEventArgs e try sms_stutent.PageIndex e.NewPageIndex SMS_BindGrid catch 本页面的查询按钮运用的是存储过程进行查询存储过程见数据库设计,调用存储过程的代码如下: sms_conn.Open SqlCommand sms_comm new SqlCommandquotStudent_Selquotsms_conn sms_comm.CommandType CommandType.StoredProcedure sms_comm.CommandText quotStudent_Selquot sms_comm.Connection sms_conn SqlDataAdapter sms_da new SqlDataAdaptersms_comm sms_da.SelectCommand.Parameters.AddquotlastnamequotSqlDbType.NVarChar sms_da.SelectCommand.Parameters.Addquotdepartmentquot SqlDbType.VarChar30 sms_da.SelectCommand.Parameters.Addquotstudentidquot SqlDbType.VarChar10 sms_da.SelectCommand.Parametersquotlastnamequot.Value this.txtStuName.Text.Trim.Replacequotquotquotquot sms_da.SelectCommand.Parametersquotdepartmentquot.Value this.DropDownList1.SelectedValue.ToString sms_da.SelectCommand.Parametersquotstudentidquot.Value this.txtStuID.Text.Trim.Replacequotquotquotquot DataSet sms_ds new DataSet sms_da.Fillsms_ds sms_conn.Close sms_stutent.DataSource sms_ds sms_stutent.DataBind GridView 控件中 RowDataBound 事件,可对其样式进行设置。
鼠标经过行时颜色的变化。
其代码如下: if e.Row.RowType DataControlRowType.DataRow //鼠标经过时,行背景色变 e.Row.Attributes.Addquotonmouseoverquot quotthis.style.backgroundColorE6F5FAquot //鼠标移出时,行背景色变 e.Row.Attributes.Addquotonmouseoutquot quotthis.style.backgroundColorFFFFFFquot //如果是绑定数据行 注:其他也面凡是用到 GridView 控件均用到该事件。
2. 学生资料编辑页面(Editstu.aspx) 主要对所对应得学生信息进行编辑修改,本页面的重点为页面之间的传值,在 student.aspx 页面中设置学号列中 HyperLink 控件的属性: NavigateUrllt Evalquotstudentidquot quotEditstu.aspxid0quot gt 在该页面中获取其 id 并对其他控件进行数据绑定,其方法为: string id Request.QueryStringquotidquot string sqlstr quotselect from class_stu_view where studentidquot id quot quot SqlCommand cmd new SqlCommandsqlstr conn SqlDataAdapter ads new SqlDataAdaptercmd DataSet ds new DataSet ads.Fillds quotsquot this.txtStudentID.Text ds.Tablesquotsquot.Rows00.ToString this.txtStudentName.Text ds.Tablesquotsquot.Rows01.ToString this.rbtnlSex.SelectedValue ds.Tablesquotsquot.Rows02.ToString this.ddlClass.DataSource ds.Tablesquotsquot this.ddlClass.SelectedItem.Text ds.Tablesquotsquot.Rows012.ToString this.txtBirthdate.Text ds.Tablesquotsquot.Rows03.ToString this.txtTelephone.Text ds.Tablesquotsquot.Rows05.ToString this.txtCredithour.Text ds.Tablesquotsquot.Rows06.ToString this.ddlRu_date.DataSource ds.Tablesquotsquot this.ddlRu_date.SelectedItem.Text ds.Tablesquotsquot.Rows07.ToString this.txtPwd.Text ds.Tablesquotsquot.Rows09.ToString this.txtAddr.Text ds.Tablesquotsquot.Rows08.ToString this.txtRemark.Text ds.Tablesquotsquot.Rows010.ToString 数据绑定之后,可对其相应的信息进行修改、更新,其代码为: string sms_sqlstr quotupdate student set studentnamequot txtStudentName.Text quotsexquot rbtnlSex.SelectedItem.Text quottelephonequot txtTelephone.Text quotaddressquot txtAddr.Text quotcredithourquot txtCredithour.Text quotpwdquot txtPwd.Text quotremarkquot txtRemark.Text quotru_datequot ddlRu_date.SelectedValue.ToString quotbirthdayquot txtBirthdate.Text quot where studentidquot txtStudentID.Text quotquot SqlCommand sms_comm new SqlCommandsms_sqlstr conn sms_comm.Connection.Open try sms_comm.Ex.
上一篇:
动态网页设计ASP
下一篇:
投简历到国外的公司需考虑哪些东西?