已阅读5页,还剩14页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
A 动态网站设计报告动态网站设计报告 设计题目设计题目 图书信息管理系统设计图书信息管理系统设计 学院 学院 班级 班级 姓名 姓名 学号 学号 摘摘 要要 在科技发达的今天 图书馆还是在现在中占了很大部分 大多数学 生都把图书馆当成了一个很好的学习的地方 里面的图书可以丰富我们 的只是 所以对图书的管理也就很重要了 我们对图书的管理可以让同 学们更好的了解到图书是否借出 对书籍好查看 通过本系统达到以下目的 1 使用 ASP NET 操作数据库 2 使用数据绑定控件显示和同步数据库数据 3 在多个窗体之间交换数据 4 熟悉运用 SQL SERVER 数据库软件 关键词 关键词 图书管理 数据库 控件 目 录 1 1 软件需求分析说明书软件需求分析说明书 1 1 2 2 系统分析与设计系统分析与设计 1 1 2 1 系统功能设计 1 2 2 数据库设计 2 2 2 1 图书管理系统中有 2 个表需要建立 2 2 2 2 实际操作 3 3 3 系统实现系统实现 3 3 3 1 建库代码 3 3 2 数据库连接 4 3 3 A 后台主要代码 5 3 3 1 注册模块 5 3 3 2 登陆界面 7 3 3 3 用户管理 9 3 3 4 管理员界面 11 3 3 5 其他人员界面 13 4 4 软件使用说明书软件使用说明书 1414 总总 结结 1515 参考文献参考文献 1616 0 1 软件需求分析说明书软件需求分析说明书 软件需求分析 其目的是用于说明软件产品或软件项目需要满足的条件和限制 在软件工程项目中 首先要获取用户的需求 通过对软件需要的提取 分析 文档 化和验证 为进一步的设计和实现提供数据 软件需求与其他活动也密切相关 如 软件测试 配置管理和质量管理等 图书管理系统 主要提供图书信息和读者基本信息的维护以及借阅等功能 本 系统是提高图书管理工作的效率 减少相关人员的工作量 使学校的图书管理工作 真正做到科学 合理的规划 系统 高效的实施 2 系统分析与设计系统分析与设计 2 1 系统功能设计系统功能设计 本系统实现了图书管理系统 总体分为以下几个模块 管理员界面 图书添加 修改 查询 删除 其他人员界面 查看 图 1 系统功能模块图 1 2 2 数据库设计数据库设计 在图书管理系统中 一本书只能被一个同学借出 一个用户可以多次登录 但 只能注册一次 因此 图书管理系统设计的对象有同学 借书 书本信息 2 2 1 图书管理系统中有 2 个表需要建立 用户表 student 包括学生编号 sno 学生账号 users 密码 pass 姓名 sname 性别 sex 年龄 age 地址 address 电话 tell 管理员 Role 图书表 包括图书编号 bid 图书号 bno 图书名 bname 作者 writer 价 格 money 借出 lend 2 2 2 实际操作 建立数据库book 建立如下各表 1 1 用户表 用户表 包括编号 账号 密码 姓名 年龄 性别 地址 联系电话 家庭住址 用 于存储用户的主要信息 可以通过前台对学生表数据进行增加 删除 修改 查询 操作 用户的主键是 users 用户账号 用户表表是本数据库的重要信息表 表1 用户表 字段名数据类型大小字段描述 Snoint编号 自动递增 作主键 UserChar10账号 PassNvarchar15密码 Snamevarchar2姓名 Sexvarchar15性别 Ageint年龄 Addressvarchar15地址 TellNvarchar15电话 RoleBit是否为管理员 2 2 2 图书表 图书表 包括图书编号 图书号 图书名 作者 价格等 用于图书的主要信息 可以 通过前台对图书表数据进行增加 删除 修改 查询操作 图书表的主键是 bno 图书号 图书表是本数据库的重要信息表 表2 图书表 字段名数据类型大小字段描述 BidInt列表编号 Bnochar10图书编号 bnamevarchar15图书姓名 writernvarchar20作者 moneynchar10价格 3 系统实现系统实现 3 1 建库代码建库代码 创建数据库 book create database book 连接数据库 book use book 创建 student 表 CREATE TABLE student sno int users char 5 primary key pass varchar 8 not null sex char 2 check sex in 男 女 sname varchar 20 not null age int address varchar 50 not null tell varchar 15 role bit 创建 book 表 CREATE TABLE bok bid int not null bno char 5 primary key bname varchar 10 writer varchar 15 monry char 5 not null 3 3 2 数据库连接数据库连接 该系统所有的数据库的连接参数都在配置文件 web config 文件中 4 3 3 A 后台主要代码后台主要代码 3 3 1 注册模块 只有注册成为用户之后才能使用本系统 注册需要输入用户名 密码 再次输 入密码等等 然后点击注册按钮 其具体效果图如图 2 所示 图 2 用户注册界面 namespace report lib 5 public partial class regist System Web UI Page protected void Page Load object sender EventArgs e protected void Button1 Click object sender EventArgs e string users this TextBox1 Text Trim string pass this TextBox2 Text Trim string pass1 this TextBox3 Text Trim string sname this TextBox4 Text Trim string sex string age this TextBox5 Text Trim string address this TextBox6 Text Trim string tell this TextBox7 Text Trim if RadioButton1 Checked true sex RadioButton1 Text else sex RadioButton2 Text string sqlStr select users from student where users users DB db new DB bool count db GetReader sqlStr HasRows if count Response Write alert 账号存在 location 注册 aspx else if this TextBox1 Text string sqlStr1 insert into student users pass sname sex age address tell values users pass sname sex age address tell int count1 db ExectSql sqlStr1 if count1 0 Response Write alert 注册成功 Clear else Response Write alert 注册失败 location 注册 aspx 6 public void Clear this TextBox1 Text this TextBox2 Text this TextBox3 Text this TextBox4 Text this TextBox5 Text this TextBox6 Text this TextBox7 Text protected void Button2 Click object sender EventArgs e Response Redirect 登录 aspx 3 3 2 登陆界面 用户注册后便可登录 输入用户名和密码 点击登录按钮便可成功登陆 具体 效果如图 3 所示 图 3 登陆界面 namespace report lib public partial class second System Web UI Page protected void Page Load object sender EventArgs e 7 protected void Button1 Click object sender EventArgs e string users this TextBox1 Text Trim string pass this TextBox2 Text Trim string sqlStr select users from student where users users and pass pass DB db new DB SqlDataReader dr db GetReader sqlStr dr Read if dr HasRows Session sno dr GetValue 0 Session Role dr GetValue 0 if dr GetValue 0 null Response Redirect about aspx else Response Redirect main aspx else Response Write alert 登陆失败 location 登陆 aspx dr Close protected void Button2 Click object sender EventArgs e Response Redirect 注册 aspx 3 3 3 用户管理 用户登陆成功后便可进入用户管理页面 选择是否为管理员 具体效果如图 4 8 所示 图 4 用户管理界面 namespace report lib public partial class user System Web UI Page protected void Page Load object sender EventArgs e if IsPostBack dbind public void dbind SqlConnection myCon DB GetConnection myCon Open string sqlStr select from student SqlDataAdapter myDa new SqlDataAdapter sqlStr myCon DataSet myDs new DataSet myDa Fill myDs GridView1 DataSource myDs GridView1 DataBind myCon Close protected void GridView1 RowEditing1 object sender GridViewEditEventArgs e GridView1 EditIndex e NewEditIndex this dbind protected void GridView1 OnRowUpdating1 object sender GridViewUpdateEventArgs e 9 int id Convert ToInt32 GridView1 DataKeys e RowIndex Value ToString string sname TextBox GridView1 Rows e RowIndex Cells 0 Controls 0 Text ToString string tell TextBox this GridView1 Rows e RowIndex Cells 1 Controls 0 Text ToString string Role CheckBox this GridView1 Rows e RowIndex Cells 2 Controls 0 Checked ToString string sqlStr update student set sname sname tell tell Role Role where users id DB db new DB db ExectSql sqlStr GridView1 EditIndex 1 dbind protected void GridView1 OnRowCancelingEdit1 object sender GridViewCancelEditEventArgs e GridView1 EditIndex 1 this dbind protected void GridView1 OnRowDeleting object sender GridViewDeleteEventArgs e DB db new DB int id Convert ToInt32 GridView1 DataKeys e RowIndex Value ToString string sqlStr delete from student where users id db ExectSql sqlStr GridView1 EditIndex 1 dbind protected void LinkButton1 Click object sender EventArgs e Response Redirect second aspx protected void GridView1 OnRowDataBound object sender GridViewRowEventArgs e if e Row RowType DataControlCellType DataRow LinkButton e Row Cells 4 Controls 0 Attributes Add onclick return confirm 确定删除 dbind 10 3 3 4 管理员界面 用户通过输入账号密码 为管理员进入此页面 具体效果如图 6 所示 图 5 管理员界面 namespace report lib public partial class adminu System Web UI Page protected void Page Load object sender EventArgs e if IsPostBack dbind public void dbind SqlConnection myCon DB GetConnection myCon Open string sqlStr select from student SqlDataAdapter myDa new SqlDataAdapter sqlStr myCon DataSet myDs new DataSet myDa Fill myDs GridView1 DataSource myDs GridView1 DataBind myCon Close 11 protected void GridView1 RowEditing1 object sender GridViewEditEventArgs e GridView1 EditIndex e NewEditIndex this dbind protected void GridView1 OnRowUpdating1 object sender GridViewUpdateEventArgs e int id Convert ToInt32 GridView1 DataKeys e RowIndex Value ToString string sname TextBox GridView1 Rows e RowIndex Cells 0 Controls 0 Text ToString string tell TextBox this GridView1 Rows e RowIndex Cells 1 Controls 0 Text ToString string Role CheckBox this GridView1 Rows e RowIndex Cells 2 Controls 0 Checked ToString string sqlStr update student set sname sname tell tell Role Role where users id DB db new DB db ExectSql sqlStr GridView1 EditIndex 1 dbind protected void GridView1 OnRowCancelingEdit1 object sender GridViewCancelEditEventArgs e GridView1 EditIndex 1 this dbind protected void GridView1 OnRowDeleting object sender GridViewDeleteEventArgs e DB db new DB int id Convert ToInt32 GridView1 DataKeys e RowIndex Value ToString string sqlStr delete from student where users id db ExectSql sqlStr GridView1 EditIndex 1 dbind protected void LinkButton1 Click object sender EventArgs e Response Redirect second aspx 12 3 3 5其他人员界面 用户可查看图书是否借出 具体效果如图 7 所示 图 6 房间删除界面 namespace report lib public partial class about System Web UI Page protected void Page Load object sender EventArgs e dbind public SqlConnection getConnectio
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年热轧产线智能排程AI自动排程使用率超70%实施方案
- 2026年长三角枢纽算力调度平台建设与“东数西算”工程落地
- 2026年行业特色数商培育引进实施方案
- 2026年人形机器人脑机接口人工智能在失能失智预防中应用
- 2026年棉花田激光除草机器人零农残作业操作实务
- 2026年汽车行业全供应链零碳协同管理体系建设
- 2026北京大学力学与工程科学学院招聘1名劳动合同制工作人员备考题库及答案详解(必刷)
- 2026重庆青年镇招聘公益性岗位人员4人备考题库及完整答案详解【易错题】
- 2026江西萍建工程建设有限公司招聘11人备考题库含答案详解(综合卷)
- 2026长鑫存储科技集团股份有限公司招聘16人备考题库附完整答案详解(名校卷)
- 建筑装饰装修工程监理旁站方案
- 化工泵技术要求
- 船舶内部审核-审核要素
- 2024年常州信息职业技术学院单招职业适应性测试题库及答案一套
- 康复医学人体运动学
- 电梯维保服务投标方案
- 贵州源鑫矿业有限公司煤矸石洗选综合利用项目环评报告
- 八年级下册音乐复习题及答案(湘艺版)
- 高中地理(湘教版2019版)必修二 全册知识点
- 1993年物理高考试卷与答案
- GB/T 19326-2012锻制承插焊、螺纹和对焊支管座
评论
0/150
提交评论