asp课程设计之图书管理系统.docx

上传人:b****5 文档编号:6410116 上传时间:2023-01-06 格式:DOCX 页数:19 大小:381.87KB
下载 相关 举报
asp课程设计之图书管理系统.docx_第1页
第1页 / 共19页
asp课程设计之图书管理系统.docx_第2页
第2页 / 共19页
asp课程设计之图书管理系统.docx_第3页
第3页 / 共19页
asp课程设计之图书管理系统.docx_第4页
第4页 / 共19页
asp课程设计之图书管理系统.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

asp课程设计之图书管理系统.docx

《asp课程设计之图书管理系统.docx》由会员分享,可在线阅读,更多相关《asp课程设计之图书管理系统.docx(19页珍藏版)》请在冰豆网上搜索。

asp课程设计之图书管理系统.docx

asp课程设计之图书管理系统

图书馆管理系统

一、系统概述

1.1引言

对于图书馆来说,如何简化图书流通的操作流程,提高图书管理的工作效率是关键因素。

因此,需要引入图书馆管理系统来实现图书馆的现代化管理。

作为一个图书馆管理系统,首先,必须要有友好的、美观的操作界面,人机对话操作方式简单。

其次,图书信息和读者信息分类管理,能实现综合查询。

再次,对图书借阅信息,图书借阅排行榜信息实现全程数据跟踪,保证数据的真实性和及时性。

最后,能实现及时的提醒用户归还即将到期的图书,做到图书借阅管理流程规范且流畅。

更具图书管日常图书管理的需求和图书借阅的管理流程,如下图,图书馆管理系统功能模块主要包括系统设置、读者管理功能、图书管理功能、图书借阅功能和相关的查询功能。

其中管理员和读者的功能模块如下图:

读者功能模块

管理员功能模块

1.2图书管理系统的可行性分析

本次课程设计题目:

“图书管理系统的开发”主要目的是利用数据库软件编制一个管理软件,用以实现图书、读者以及日常工作等多项管理。

同时对整个系统的分析、设计过程给出一个完整论证。

图书管理系统是一种基于集中统一规划的数据库数据管理新模式。

在对图书、读者的管理,其实是对图书、读者数据的管理。

本系统的建成无疑会为管理者对图书管理系统提供极大的帮助。

本系统的设计主要从以下几方面做起:

系统业务流程分析、系统的功能设计、系统的数据库结构设计等。

作这些工作需对数据库知识有足够认识,并深入的了解c#的使用和管理系统的相关知识。

在信息时代的今天,人类需要对在政治、经济、军事、文化、科研、教育等领域产生的大量信息进行管理,并对数据进行加工处理,数据库技术则是信息管理与数据处理的先进技术。

随着信息量的不断增加,作为计算机的三大主要应用(科学计算、过程控制和数据处理)之一的数据处理,已迅速上升为计算机应用的主要方面,数据库技术则成为人们日常生活中处理数据不可缺少的有力工具,并且现代的信息管理系统几乎都以数据库技术作为核心。

现在大多数的图书管理方式为手工处理,重复劳动多,劳动强度大,而且容易出错,新系统的使用能否可以很好的解决这些问题要看系统的可行性,可行性研究的目的是用最小的代价在尽可能短的时间内确定问题是否能够解决。

系统的可行性分析有以下几个方面:

(1)技术可行性:

处理速度快、准确通过权限的设置,数据的安全性好、方便查询、借阅管理等。

(2)经济可行性:

系统建设不需要很大的投入、可缩减人力投入。

(3)运行上可行性:

本系统作为一个小型的图书馆信息管理系统,所耗费的

资源非常的小。

(4)从各种社会因素可行性分析:

可降低工作人员工作强度,提高效率,会

得到学校工作人员的一致同意的。

综上所述通过可行性分析认为新系统的开发方案切实可行,可进行开发。

1.3系统开发运行环境

系统开发环境:

MicrosoftVisualStudio2010

系统开发语言:

c#

运行平台:

Windows8

数据库:

sql2012

二、图书馆管理系统模块分析

2.1、数据流图

(1)图书借阅系统完成用户的借书过程其数据流图如图3-2所示。

图3-1借阅系统的数据流图

(2)还书系统完成图书的归还过程其数据流图如图3-3所示。

图3-2归还系统的数据流图

(3)图书档案管理系统为用户提供图书档案信息其数据流图如图3-4所示。

图3-3图书档案管理数据流图

(4)读者档案系统用于记录读者的详细信息其数据流图如图3-5所示。

图3-4读者档案管理数据流图

2.2、图书管理系统用例图

2.2.1读者用例图

2.2.2管理员用例图

2.3图书馆管理系统ER图

三、各模块的具体功能与实现

3.1系统设置

系统设置主要包括的功能有:

修改密码、用户添加、用户修改功能,核心代码如下:

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

/*验证是否登陆了系统*/

if(Session["adminFlag"]==null)

{

Response.Write("");

return;

}

}

}

protectedvoidBtn_ChangePassword_Click(objectsender,EventArgse)

{

AdminModeladminModel=newAdminModel();

adminModel.AdminUsername=Session["adminUsername"].ToString();

adminModel.AdminPassword=this.NewPassword.Text.ToString();

AdminLogicadminLogic=newAdminLogic();

if(adminLogic.ChangePassword(adminModel))

this.ErrMessage.Text="密码修改成功!

";

else

this.ErrMessage.Text="密码修改失败!

";

}

3.2读者管理

读者管理主要包括:

添加读者类别、读者类别管理、添加读者信息、读者信息管理等功能;部分核心代码如下

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

/*验证是否登陆了系统*/

if(Session["adminFlag"]==null)

{

Response.Write("");

return;

}

stringadminUsername=Session["adminUsername"].ToString();

AdminModeladminModel=(newAdminLogic()).GetAdmin(adminUsername);

if(adminModel.ReaderTypeFlag==0)

{

Response.Write("");

return;

}

}

}

protectedvoidBtn_Add_Click(objectsender,EventArgse)

{

/*建立读者类型对象模型并传入界面上的各个参数*/

ReaderTypeModelreaderModel=newReaderTypeModel();

readerModel.ReaderTypeName=this.ReaderTypeName.Text;

readerModel.LoanNum=Int32.Parse(this.LoanNum.Text);

readerModel.LoanDays=Int32.Parse(this.LoanDays.Text);

readerModel.ContinueDays=Int32.Parse(this.ContinueDays.Text);

readerModel.ReserverNum=Int32.Parse(this.ReserveNum.Text);

/*调用业务层进行添加*/

ReaderTypeLogicreaderTypeLogic=newReaderTypeLogic();

if(readerTypeLogic.AddNewReaderType(readerModel))

{

Response.Write("");

}

else

{

Response.Write("");

}

}

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

/*验证是否登陆了系统*/

if(Session["adminFlag"]==null)

{

Response.Write("");

return;

}

stringadminUsername=Session["adminUsername"].ToString();

AdminModeladminModel=(newAdminLogic()).GetAdmin(adminUsername);

if(adminModel.ReaderTypeFlag==0)

{

Response.Write("");

return;

}

}

}

3.3图书管理

图书管理主要包括:

添加图书类别、图书类别管理、添加图书信息、图书信息管理等功能;部分核心代码如下

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

/*验证是否登陆了系统*/

if(Session["adminFlag"]==null)

{

Response.Write("");

return;

}

stringadminUsername=Session["adminUsername"].ToString();

AdminModeladminModel=(newAdminLogic()).GetAdmin(adminUsername);

if(adminModel.DiskTypeFlag==0)

{

Response.Write("");

return;

}

}

}

protectedvoidBtn_Add_Click(objectsender,EventArgse)

{

DiskTypeModeldiskTypeModel=newDiskTypeModel();

diskTypeModel.DiskTypeName=this.DiskTypeName.Text;

DiskTypeLogicdiskTypeLogic=newDiskTypeLogic();

if(diskTypeLogic.InsertDiskTypeInfo(diskTypeModel))

{

Response.Write("");

}

else

{

Response.Write("");

}

}

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

/*验证是否登陆了系统*/

if(Session["adminFlag"]==null)

{

Response.Write("");

return;

}

stringadminUsername=Session["adminUsername"].ToString();

AdminModeladminModel=(newAdminLogic()).GetAdmin(adminUsername);

if(adminModel.DiskFlag==0)

{

Response.Write("");

return;

}

}

}

protectedvoidBtn_Add_Click(objectsender,EventArgse)

{

/*首先构造图书对象的模型,并将界面输入的各个信息保存模型的对应属性中*/

DiskModeldiskModel=newDiskModel();

diskModel.DiskIndex=this.DiskIndex.Text;

diskModel.DiskTypeId=Convert.ToInt32(this.DiskType.SelectedValue);

diskModel.DiskName=this.DiskName.Text;

diskModel.DiskIntroduce=this.DiskIntroduce.Text;

diskModel.DiskNum=Convert.ToInt32(this.DiskNum.Text);

diskModel.DiskPublish=this.Publishing.Text.ToString().Trim();

diskModel.DiskAuthor=this.Author.Text.ToString().Trim();

diskModel.DiskShelf=this.BookShelf.Text.ToString().Trim();

diskModel.DiskAddress=this.DiskAddress.Text;

diskModel.IsRecommend=this.IsRecommend.SelectedValue;

/*然后调用业务层将此图书信息加入系统中*/

DiskLogicdiskLogic=newDiskLogic();

if(diskLogic.AddNewDisk(diskModel))

{

Response.Write("");

}

else

{

Response.Write("");

}

}

protectedvoidBtn_Cancle_Click(objectsender,EventArgse)

{

Response.Write("");

}

3.4图书借阅

图书借阅主要包括:

图书借阅、图书归还、图书预约查询、图书借阅统计、统计超期图书等功能;部分核心代码如下

protectedvoidBtn_Add_Click(objectsender,EventArgse)

{

stringreaderId=this.ReaderId.Text;

stringdiskIndex=this.DiskIndex.Text;

DiskLogicdiskLogic=newDiskLogic();

DiskModeldiskModel=diskLogic.GetDiskInfo(diskIndex);

LoanLogicloanLogic=newLoanLogic();

if(loanLogic.ReturnDisk(diskModel.Id,readerId,Session["adminUsername"].ToString()))

this.Result.Text="读者:

"+ReaderLogic.GetReaderNameById(readerId)+"归还图书:

"+diskModel.DiskName+"成功!

";

else

this.Result.Text=loanLogic.ErrMessage;

this.ReaderId.Text="";

this.DiskIndex.Text="";

}

protectedvoidBtn_Add_Click(objectsender,EventArgse)

{

stringreaderId=this.ReaderId.Text;

stringdiskIndex=this.DiskIndex.Text;

DiskLogicdiskLogic=newDiskLogic();

DiskModeldiskModel=diskLogic.GetDiskInfo(diskIndex);

LoanLogicloanLogic=newLoanLogic();

if(loanLogic.AddNewLoanInfo(diskIndex,readerId,Session["adminUsername"].ToString()))

{

diskLogic.UpdateDiskLoanNum(diskModel.Id);

(newReaderLogic()).UpdateReaderLoanNum(readerId);

this.Result.Text="读者:

"+ReaderLogic.GetReaderNameById(readerId)+"借阅图书:

"+DiskLogic.GetDiskNameById(diskModel.Id)+"成功!

";

}

else

this.Result.Text=loanLogic.ErrMessage;

this.ReaderId.Text="";

this.DiskIndex.Text="";

}

protectedvoidPage_Load(objectsender,EventArgse)

{

/*验证是否登陆了系统*/

if(Session["adminFlag"]==null)

{

Response.Write("");

return;

}

/*得到该读者的所有借阅图书信息*/

DataSetds=LoanLogic.GetDiskLoanInfo();

this.GridView1.DataSource=ds;

this.GridView1.DataBind();

}

publicstringGetISReturn(stringstr)

{

if(str=="1")

{

return"是";

}

else

return"否";

}

protectedvoidbtnSearch_Click(objectsender,EventArgse)

{

DataSetds=LoanLogic.GetLoanInfo(this.txtKey.Text.ToString());

this.GridView1.DataSource=ds;

this.GridView1.DataBind();

}

3.5图书查询

图书查询用于对各模块从数据库获取图书的相关信息,核心代码如下:

protectedvoidPage_Load(objectsender,EventArgse)

{

if(!

IsPostBack)

{

/*验证是否登陆了系统*/

if(Session["readerFlag"]==null)

{

Response.Write("");

return;

}

/*初始化图书类别下拉框的信息*/

this.DiskType.Items.Add(newListItem("请选择图书类别","0"));

DataSetds=(newDiskTypeLogic()).GetDiskTypeInfo();

for(inti=0;i

{

DataRowdr=ds.Tables[0].Rows[i];

ListItemli=newListItem(dr["diskTypeName"].ToString(),dr["diskTypeId"].ToString());

this.DiskType.Items.Add(li);

}

BindData();

}

}

protectedvoidBindData()

{

stringkeyword=this.Keyword.Text;

intdiskTypeId=Int32.Parse(this.DiskType.SelectedValue);

stringisRecommend=this.IsRecommend.SelectedValue;

/*调用业务层进行查询*/

this.GridView1.DataSourceID="";

this.GridView1.DataSource=(newDiskLogic()).QueryDiskInfo(keyword,diskTypeId,isRecommend);

this.GridView1.DataBind();

}

protectedvoidBtn_Query_Click(objectsender,EventArgse)

{

/*取得查询的各个参数*/

stringkeyword=this

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1