




已阅读5页,还剩25页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
图书馆管理信息系统设计说明书1. 设计任务书1.1项目目的当今时代是飞速发展的信息时代。在各行各业中离不开信息处理,这正是计算机被广泛应用于信息管理系统的环境。计算机的最大好处在于利用它能够进行信息管理。使用计算机进行信息控制,不仅提高了工作效率,而且大大的提高了其安全性。图书馆作为一种信息资源的集散地,图书和用户借阅资料繁多,包含很多的信息数据的管理,现今,有很多的图书馆都是初步开始使用,甚至尚未使用计算机进行信息管理。根据调查得知,他们以前对信息管理的主要方式是基于文本、表格等纸介质的手工处理,对于图书借阅情况(如借书天数、超过限定借书时间的天数)的统计和核实等往往采用对借书卡的人工检查进行,对借阅者的借阅权限、以及借阅天数等用人工计算、手抄进行。数据信息处理工作量大,容易出错;由于数据繁多,容易丢失,且不易查找。总的来说,缺乏系统,规范的信息管理手段。尽管有的图书馆有计算机,但是尚未用于信息管理,没有发挥它的效力,资源闲置比较突出,这就是管理信息系统的开发的基本环境。数据处理手工操作,工作量大,出错率高,出错后不易更改。图书馆采取手工方式对图书借阅情况进行人工管理,由于信息比较多,图书借阅信息的管理工作混乱而又复杂;一般借阅情况是记录在借书证上,图书的数目和内容记录在文件中,图书馆的工作人员和管理员也只是当时对它比较清楚,时间一长,如再要进行查询,就得在众多的资料中翻阅、查找了,造成查询费时、费力。如要对很长时间以前的图书进行更改就更加困难了。基于这此问题,我认为有必要建立一个图书管理系统,使图书管理工作规范化,系统化,程序化,避免图书管理的随意性,提高信息处理的速度和准确性,能够及时、准确、有效的查询和修改图书情况。1.2题目与要求本人计划与刘贺和王刘英编写一个图书馆管理信息系统,主要用来管理研究生的基本信息及成绩信息。本图书馆管理信息系统具有以下特点:1. 实现图书馆的归档、借出、归还和查找等操作;2. 实现对图书馆的借阅、读者的管理、书库的增减等操作;3. 界面设计简单、操作方便。本系统的功能主要包括以下几个方面:1. 能随时查询图书的库存量,以便准确、及时、方便地为读者提供借阅信息。但不能修改数据,无信息处理权,即只可以浏览数据,管理权限由系统管理员掌握和分配;2. 图书馆各项信息必须保证安全性和完整性;3. 系统管理员定时整理系统数据库,实现对图书的借阅、读者的管理、书库的增减等操作,并将运行结果归档。1.3本系统设计的知识点 WinForm常用控件、属性、方法,ADO.NET技术。2. 功能设计2.1.系统功能概述图书馆管理信息系统是典型的信息管理系统,其开发主要包括后台数据库的建立和维护以及前台应用程序的开发两个方面,一方面要求建立起数据一致性和完善性强、数据安全性好的数据库;另一方面则要求应用程序具有功能完备,易使用等特点。 原来的图书管理处理中心进行信息管理主要是基于手工处理,信息处理工作量大,容易出错,缺乏系统、规范的信息管理手段。现在准备建立的图书管理系统,要对图书馆的图书管理、读书借阅等日常管理工作实行计算机统一管理,以提高工作效率和管理水平。 图书馆作为提供学习的场所,不仅要求便于管理,而且要求给读者和借阅者提供方便快速的查找、借阅和登记手续。 图书馆需要统一图书的管理,对各类书籍的借阅情况和图书馆现有藏书的数量、种类要及时掌握,这就要求它具有很强的时效性。既要减少旧书和大量内容重复的图书占用有限的空间而又尽量做到图书种类的齐全,作为图书馆的管理人员需要及时地对图书进行上架和注销处理。 2.2功能设计 本图书馆管理信息系统的功能由登录界面和主窗体界面两部分的功能组成。其中主窗体界面的功能由系统管理、图书管理、用户管理等模块组成。具体如下:(1)主界面设计首页设计应该清晰简单、美观大方,同时还要做到信息充足,突出图书馆的特点和操作的入口。(2)系统管理在系统设置中可以对借阅设置、图书借阅时限设置、类别设置、图书借阅数量设置。(3)用户管理只有登录后的用户才可以对图书进行管理,登录人员姓名/密码组合来进行验证。(4)图书管理对图书增加、删除、修改、注销、遗失等事件的处理。以便管理员对图书的信息直观而且有效的进行处理。3. 数据库设计3.1数据库分析本系统利用Visual Studio 2008处理数据库的功能,实现对图书馆信息的管理。主要功能为管理有关用户、管理员、书籍和借阅的信息等。本系统的结构分为用户信息管理模块、书籍信息管理模块、借阅信息管理模块、管理者管理信息模块和查询处理模块。图书馆管理系统框图如图2.1所示 图2.1 图书馆管理系统框图3.2系统的E-R模型该图书管理系统的E-R模型,如图2.2所示2.2 系统的E-R模型 3.3创建数据表创建数据库后,为BookManage数据库添加数据表,步骤如下。 (1)在服务器资源管理器中右击数据库BookManage下的“表”文件夹在弹出的快捷菜单中执行“新建表”命令。 (2)添加表的字段和其他详细资料。各表数据结构如下表所示。表3-1用户信息(userinfo)列 名含 义数据类型说明UID用户IDint自动,主键UName用户名vchar(50)不为空UPwd密码vchar(50)不为空UState用户权限,管理员=1,普通用户=2int不为空,默认值为2UBookID借阅证号bigint可以为空表3-2图书信息(bookinfo)列 名含 义数据类型主 键BookID图书IDbigint自动,主键BookName图书名称Varchar(50)不为空BookType类别Varchar(100)不为空BookAuthor作者Varchar(100)不为空BookPrice价格smallmoney不为空BookPic封面Varchar(200)允许为空BookContent内容简介text不为空BookIssue图书制定访问码Varchar(50)不为空表3-3借阅信息(issueinfo)列 名含 义数据类型说明IssID借阅IDbigint自动,主键BookID图书IDbigint外键IssBookID借阅证号bigint不为空IssDateTime借书日期datetime不为空3.4 数据库中表的关系在数据库中新建BookManage数据库的数据库关系图如图2.4所示图 2.4 数据库关系图4.系统实现4.1登陆界面4.1.1登陆界面编码using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Data.OleDb;namespace LibraryMISpublic class Login : System.Windows.Forms.Formprivate System.Windows.Forms.Button btClose;private System.Windows.Forms.Button btAdd;private System.Windows.Forms.TextBox password;private System.Windows.Forms.TextBox name;private System.Windows.Forms.Label label3;private System.Windows.Forms.Label label2;private System.Windows.Forms.Label label1;private System.Windows.Forms.GroupBox groupBox1;private System.Windows.Forms.RadioButton radioPerson;private System.Windows.Forms.RadioButton radioManage;private System.ComponentModel.Container components = null;private OleDbConnection oleConnection1 = null;public Login()InitializeComponent();this.oleConnection1 = new OleDbConnection(LibraryMIS.database.dbConnection.connection);protected override void Dispose( bool disposing )if( disposing )if (components != null) components.Dispose();base.Dispose( disposing );static void Main() Application.Run(new main();private void btAdd_Click(object sender, System.EventArgs e)if(name.Text.Trim()=|password.Text.Trim()=)MessageBox.Show(请输入用户名和密码,提示);elseoleConnection1.Open();OleDbCommand cmd=new OleDbCommand(,oleConnection1);if (radioManage.Checked=true)string sql=select * from manager where MName=+name.Text.Trim()+ and MCode=+password.Text.Trim()+;cmd.CommandText=sql;if (null!=cmd.ExecuteScalar()this.Visible=false; main main=new main();main.Tag=this.FindForm();OleDbDataReader dr;cmd.CommandText=sql;dr=cmd.ExecuteReader();dr.Read();main.menuItem1.Visible=(bool)(dr.GetValue(2);main.menuItem2.Visible=(bool)(dr.GetValue(2);main.menuItem3.Visible=(bool)(dr.GetValue(2);main.menuItem5.Visible=(bool)(dr.GetValue(4);main.menuItem4.Visible=(bool)(dr.GetValue(3);main.menuItem5.Visible=(bool)(dr.GetValue(4);main.statusBarPanel2.Text=name.Text.Trim();main.statusBarPanel6.Text=管理员;main.ShowDialog(); elseMessageBox.Show(用户名或密码错误,警告);else if (radioPerson.Checked=true)string sql=select * from person where PID=+name.Text.Trim()+ and PCode=+password.Text.Trim()+;cmd.CommandText=sql;if (null!=cmd.ExecuteScalar() this.Visible=false; main main=new main();main.Tag=this.FindForm();OleDbDataReader dr;cmd.CommandText=sql;dr=cmd.ExecuteReader();dr.Read();main.menuItem1.Visible=(bool)(dr.GetValue(9);main.menuItem2.Visible=(bool)(dr.GetValue(9);main.menuItem3.Visible=(bool)(dr.GetValue(9);main.menuItem4.Visible=(bool)(dr.GetValue(9);main.statusBarPanel2.Text=name.Text.Trim();main.statusBarPanel6.Text=读者;main.ShowDialog(); elseMessageBox.Show(用户名或密码错误,警告); elseMessageBox.Show(没有选择角色,提示);oleConnection1.Close();private void btClose_Click(object sender, System.EventArgs e)this.Close(); private void Login_Load(object sender, EventArgs e) 4.2应用程序主界面4.3图书查询操作 4.3.1图书查询设计 在主界面中选择【查询管理】|【图书查询】命令菜单,即可进入查询图书界面,如图所示。在该界面上共有三个查询条件:图书编号、图书名和作者。单击【查询】按钮,根据查询条件得出的图书信息将显示在DataGrid控件中,并且计算出该图书目前在库中的数量。该窗体中设计了3个TextBox控件、2个Button控件和1个DataGrid控件。4.3.2图书查询代码using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Data.OleDb;namespace LibraryMISpublic BookQuery()InitializeComponent();this.oleConnection1 = new OleDbConnection(LibraryMIS.database.dbConnection.connection);protected override void Dispose( bool disposing )if( disposing )if(components != null)components.Dispose();base.Dispose( disposing );private void btQuery_Click(object sender, System.EventArgs e)string sql1 = (BNum-(select count(*) from bookOut where ;string sql = select BID as “图书编号”BName as 图书名,BWriter as 作者,BPublish as 出版社,BDatete as 出版日期,BPrice as 价格,BNum as 数量,type as 类型,BRemark as 备注;if (textID.Text.Trim() != )sql1 = sql1+ BID= +textID.Text.Trim()+) as 库存数量;sql = sql+sql1+from book where BID= +textID.Text.Trim()+;else if (textName.Text.Trim() != )sql1 = sql1+ BID=(select BID from book where BName=+textName.Text+) as 库存数量;sql = sql+sql1+from book where BName= +textName.Text+;else if (textWriter.Text.Trim() != )sql1 = sql1+ BID=(select BID from book where BWriter=+textWriter.Text+) as 库存数量 ;sql = sql+sql1+from book where BWriter= +textWriter.Text+;elseMessageBox.Show(请输入查询条件,提示);return;oleConnection1.Open();OleDbDataAdapter adp = new OleDbDataAdapter(sql,oleConnection1);DataSet ds = new DataSet();ds.Clear();adp.Fill(ds,book);dataGrid1.DataSource=ds.Tables0.DefaultView;dataGrid1.CaptionText=共有+ds.Tables0.Rows.Count+条查询记录;oleConnection1.Close();private void btClear_Click(object sender, System.EventArgs e)textID.Text=;textName.Text=;textWriter.Text=;private void btClose_Click(object sender, System.EventArgs e)this.Close(); 4.4借阅查询操作 4.4.1借阅查询设计 选择【查询管理】|【借阅管理】命令菜单,即可进入查询借阅界面,显示当前登录用户的个人信息和已借图书信息,如图所示。该窗体中设计了3个DataGrid控件,其中一个控件用来传递数据,不显示。4.4.2借阅查询编码using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Data.OleDb;namespace LibraryMISpublic class PersonQuery : System.Windows.Forms.Formprivate System.Windows.Forms.GroupBox groupBox1;private System.Windows.Forms.DataGrid dataGrid2;private System.Windows.Forms.GroupBox groupBox2;private System.Windows.Forms.DataGrid dataGrid1;private System.ComponentModel.Container components = null;private System.Windows.Forms.DataGrid dataGrid3;private OleDbConnection oleConnection1 = null;public PersonQuery()InitializeComponent();this.oleConnection1 = new oleDbConnection(LibraryMIS.database.dbConnection.connection);protected override void Dispose( bool disposing )if( disposing )if(components != null)components.Dispose();base.Dispose( disposing );DataSet ds;private void PersonQuery_Load(object sender, System.EventArgs e)oleConnection1.Open();string sql1 = select PName as 姓名,PSex as 性别,PN as 身份证,PMoney as 罚款,identity as 身份 from person where PID=+this.Tag.ToString().Trim()+;string sql3 = select BID from bookOut where PID = +this.Tag.ToString().Trim()+;OleDbDataAdapter adp = new OleDbDataAdapter(sql1,oleConnection1);OleDbDataAdapter adp3 = new OleDbDataAdapter(sql3,oleConnection1);ds = new DataSet();ds.Clear();adp.Fill(ds,person);adp3.Fill(ds,bookid);dataGrid2.DataSource = ds.Tablesperson.DefaultView;dataGrid2.CaptionText = 共有+ds.Tablesperson.Rows.Count+条记录;dataGrid3.DataSource = ds.Tablesbookid.DefaultView;for (int x=0;xds.Tablesbookid.Rows.Count;x+)string sql2=select book.BID as 图书编号,BName as 图书名,BWriter as 作者,BPublish as 出版社,BDate as 出版日期,BPrice as 价格,type as 类型,ODate as 借书日期,(select longTime from identityinfo where identity=(select identity from person where PID=+this.Tag.ToString().Trim()+) as 最长借书时间,dateAdd(m,最长借书时间,ODate) as 应还日期 from book,bookOut where book.BID = bookOut.BID and book.BID = +ds.Tablesbookid.Rowsx0+ and PID=+this.Tag.ToString().Trim()+;OleDbDataAdapter adp2 = new OleDbDataAdapter(sql2,oleConnection1);adp2.Fill(ds,bookout);dataGrid1.DataSource = ds.Tablesbookout.DefaultView;dataGrid1.CaptionText = 已借图书+ds.Tablesbookout.Rows.Count+本;oleConnection1.Close();4.5 用户管理 4.5.1用户管理设计 在主界面中选择【用户管理】|【修改密码】命令菜单,即可进入修改密码界面,如图所示:单击【确定】按钮,如果密码正确并且新密码和确认密码相同,则显示修改成功,否则修改失败。在该窗体中设计了4个TextBox控件和2个Button 控件。4.5.2用户管理编码using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data.OleDb;namespace LibraryMIS/ / ModifyCode 的?摘a要a说明。/ public class ModifyCode : System.Windows.Forms.Formprivate System.Windows.Forms.Label label4;private System.Windows.Forms.TextBox textPWDNew;private System.Windows.Forms.TextBox textPWDNew2;private System.Windows.Forms.Label label3;private System.Windows.Forms.TextBox textPWD;private System.Windows.Forms.TextBox textName;private System.Windows.Forms.Label label2;private System.Windows.Forms.Label label1;private System.Windows.Forms.Button btClose;private System.Windows.Forms.Button btSave;private System.ComponentModel.Container components = null;public System.Windows.Forms.Label label5;private OleDbConnection oleConnection1 = null;public ModifyCode()InitializeComponent();this.oleConnection1 = new OleDbConnection(LibraryMIS.database.dbConnection.connection);protected override void Dispose( bool disposing )if( disposing )if(components != null)components.Dispose();base.Dispose( disposing );private void btSave_Click(object sender, System.EventArgs e)if (textName.Text.Trim()=|textPWD.Text.Trim()=|textPWDNew.Text.Trim()=|textPWDNew2.Text.Trim()=)MessageBox.Show(请填写完整信息!,提示);elseoleConnection1.Open();OleDbCommand cmd = new OleDbCommand(,oleConnection1);string sql1 = select * from person where PID=+textName.Text.Trim()+ and PCode=+textPWD.Text.Trim()+;string sql2 = select * from manager where MName=+textName.Text.Trim()+ and MCode=+textPWD.Text.Trim()+;if (label5.Text = 管理员)cmd.CommandText = sql2;elsecmd.CommandText = sql1;if (null!=cmd.ExecuteScalar()if (textPWDNew.Text.Trim()!=textPWDNew2.Text.Trim()MessageBox.Show(两次密码输入不致!,警告);elsesql1 = update person set PCode=+textPWDNew.Text.Trim()+ where PID=+textName.Text.Trim()+;sql2 = update manager set MCode=+textPWDNew.Text.Trim()+ where MName=+textName
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 押题宝典教师招聘之《幼儿教师招聘》试题及答案详解【易错题】
- 2025年教师招聘之《幼儿教师招聘》练习题包带答案详解
- 2025年教师招聘之《小学教师招聘》通关练习试题附完整答案详解【易错题】
- 教师招聘之《小学教师招聘》复习提分资料(考点精练)附答案详解
- 2025年教师招聘之《幼儿教师招聘》检测卷及一套完整答案详解
- 教师招聘之《小学教师招聘》能力提升试题打印带答案详解(综合题)
- 互联网医疗数据共享与交换协议
- 2025-2026学年重庆市沙坪坝区南开中学九年级(上)开学数学试卷(含答案)
- 2025年教师招聘之《幼儿教师招聘》综合提升测试卷附答案详解(轻巧夺冠)
- 2025年教师招聘之《小学教师招聘》通关练习题库包含答案详解(研优卷)
- 幼儿园健康预防蚊虫叮咬
- 三级安全教育培训试题(含答案)
- 绿城好房子建设的理念与实践
- 【课件】有理数的概念+课件+2025-2026学年人教版数学七年级上册
- 中文版儿童睡眠习惯问卷CSHQ 含评分维度
- 癌痛的治疗与护理
- 专递课堂反向专递赋能:农村教师专业成长路径探究
- 2025年烟台市中考语文试卷真题(含答案及解析)
- 英语教学案例范文(6篇)
- 项目质量保障与承诺方案
- DB13(J)∕T 268-2018 建筑施工安全风险辨识与管控技术标准
评论
0/150
提交评论