版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、数据库课程设计 设计选题:图书管理系统系别 信息工程系专业 计算机网络技术班级 2010022201姓名 马斌龙 学号 201002220137姓名 王贤宽 学号 201002220137姓名 黄晓辉 学号 201002220140指导老师 2011年12月29日 一 系统需求分析 图书管理工作繁琐,借阅频繁,包含大量的信息数据,因此就需要一个完善的图书管理系统来实现对这些数据的有效管理。本系统主要任务就是对图书、读者、借阅信息、查询进行统一管理,满足各类用户的需求。本系统在功能上要实现借阅图书、续借图书、归还图书、催还图书、信息查询等功能。二 数据库分析图书管理系统就是要求图书管理人员通过该
2、系统对图书、读者、借阅信息等进行统一管理,从而实现功能上的借阅图书、续借图书、归还图书、催还图书以及信息查询。这就要求管理人员能够对数据库进行熟练操作而简单的表查询、触发器的建立、存储过程的建立以及用户自定义函数的建立等等这些管理数据库的方法都能对图书馆里系统的管理起到事半功倍的效果。 三、图书馆管理系统 E-R 图请输入图书名称确定图书基本信息图书信息图书信息读者信息读者基本信息请输入名字确定书本借还信息请输入图书名称确定借还信息四、前后与后台连接示意图图书信息表图书信息读者信息表读者信息借还信息表借还信息五、图书馆管理系统功能算法实现5.1 前台算法实现5.1.1 主界面<!DOCT
3、YPE html PUBLIC "-/W3C/DTD XHTML 1.0 Transitional/EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml" ><head> <title>欢迎使用图书管理系统</title></head><body style="text-align: center"
4、;> <span style="font-size: 24pt"> <br /> <br /> <br /> <a href=".book.aspx">图书信息查询</a><br /> <br /> <a href=".reader.aspx">读者信息查询</a><br /> <br /> <a href=".record.aspx">借还信息记录<
5、;/a></span></body></html>5.1.2 图书信息<!DOCTYPE html PUBLIC "-/W3C/DTD XHTML 1.0 Transitional/EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml" ><head runat="server"> <
6、title>无标题页</title></head><body> <form id="form1" runat="server"> <div style="text-align: center"> <asp:Label ID="Label1" runat="server" Text="书名"></asp:Label> <asp:TextBox ID="TextBox1&qu
7、ot; runat="server"></asp:TextBox> <br /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click1" Text="查询" /><br /> <asp:GridView ID="GridView1" runat="server" OnSelectedIndexChanged="Gr
8、idView1_SelectedIndexChanged"> </asp:GridView> </div> </form></body></html>5.1.3 读者信息<!DOCTYPE html PUBLIC "-/W3C/DTD XHTML 1.0 Transitional/EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http:/www.w3.
9、org/1999/xhtml" ><head id="Head1" runat="server"> <title>无标题页</title></head><body> <form id="form1" runat="server"> <div style="text-align: center"> <asp:Label ID="Label1" runat="ser
10、ver" Text="姓名"></asp:Label> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <br /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click1" Text="查询" /><br /> <asp:Gr
11、idView ID="GridView1" runat="server" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"> </asp:GridView> </div> </form></body></html>5.1.4 借还信息表<!DOCTYPE html PUBLIC "-/W3C/DTD XHTML 1.0 Transitional/EN" "http:/www
12、./TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="/1999/xhtml" ><head runat="server"> <title>无标题页</title></head><body> <form id="form1" runat="server"> <div> </div> </fo
13、rm></body></html>5.1.5添加图书using System;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;bControls.WebParts;using System.Web.UI.HtmlControls; protected void Button1_Cl
14、ick1(object sender, EventArgs e) string s1, s2, s3; s1 = TextBox1.Text; s2 = TextBox2.Text; s3 = TextBox3.Text; string str = "server=WINKS80;database=图书管理系统;integrated security=true" SqlConnection con = new SqlConnection(str); SqlCommand com = new SqlCommand(); try com.Connection = con; co
15、m.CommandText = "insert 图书信息表 values ('" + s1 + "','" + s2 + "','" + s3 + "')" con.Open(); com.ExecuteNonQuery(); con.Close(); Response.Write("插入成功"); catch (Exception a1) Response.Write("插入失败"); finally con.Close();
16、 5.1.6 删除图书 protected void Button3_Click(object sender, EventArgs e) string s4; s4 = TextBox4.Text; string str = "server=WINKS80;database=图书管理系统;integrated security=true" SqlConnection con = new SqlConnection(str); SqlCommand com = new SqlCommand(); try com.Connection = con; com.CommandTex
17、t = "delete 图书信息表 where bname = '" + s4 + "'" con.Open(); com.ExecuteNonQuery(); con.Close(); Response.Write("删除成功"); catch (Exception a1) Response.Write("删除失败"); finally con.Close(); 5.1.7添加读者using System.Web.UI;using System.Web.UI.WebControls;using S
18、ystem.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls; protected void Button1_Click(object sender, EventArgs e) string s1, s2, s3; s1 = TextBox1.Text; s2 = TextBox2.Text; s3 = TextBox3.Text; string str = "server=WINKS80;database=图书管理系统;integrated security=true" SqlConnection c
19、on = new SqlConnection(str); SqlCommand com = new SqlCommand(); try com.Connection = con; com.CommandText = "insert 读者信息表 values ('" + s1 + "','" + s2 + "','" + s3 + "')" con.Open(); com.ExecuteNonQuery(); con.Close(); Response.Write(&q
20、uot;添加成功"); catch (Exception a1) Response.Write("添加失败"); finally con.Close(); 5.1.7删除读者、using System;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web
21、.UI.WebControls.WebParts;using System.Web.UI.HtmlControls; protected void Button2_Click(object sender, EventArgs e) string s4; s4 = TextBox4.Text; string str = "server=WINKS80;database=图书管理系统;integrated security=true" SqlConnection con = new SqlConnection(str); SqlCommand com = new SqlCommand(); try com.Connection = con; com.CommandText = "delete 读者信息表 where rname = '" + s4 + "'" con.Open(); com.ExecuteNonQuery(); con.Close(); Response.Write("删除成功"); catch (Exce
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 中医内科学深度学习笔记
- 前列腺特异性抗原信号通路的分子机制研究-洞察及研究
- 多相催化反应机理-第1篇-洞察及研究
- 合金功能材料和高温合金生产项目建设工程方案
- 小学绘本阅读教学反思报告
- PEEK新材料生产线项目技术方案
- 共享经济中的资源浪费与节约对策研究-洞察及研究
- 营销团队季度业绩总结报告
- 2025年长沙实验高裕学校春季公开招聘校聘教师3人笔试模拟试题及答案
- 连锁餐饮成本核算与控制方案
- 2022河湖无人机巡查作业技术导则
- 《突发事件概述》课件
- 初中物理实验教学专题讲座
- 对外汉语教学的测试和评估教学课件
- 大脑的奥秘:神经科学导论学习通超星课后章节答案期末考试题库2023年
- 环境保护税课件
- 课本剧林教头风雪山神庙剧本
- 农业生态与环境保护教案
- NY 623-2002内蒙古白绒山羊
- 甲状腺微创消融治疗手术知情同意书
- 初中道德与法治人教九年级上册 文明与家园九年级道法导学案《构筑中国价值》
评论
0/150
提交评论