图书馆管理系统读者功能模块.docx
《图书馆管理系统读者功能模块.docx》由会员分享,可在线阅读,更多相关《图书馆管理系统读者功能模块.docx(11页珍藏版)》请在冰豆网上搜索。
图书馆管理系统读者功能模块
图书馆管理系统之读者功能模块
一、引言
1.1系统概述
对于图书馆来说,如何简化图书流通的操作流程,提高图书管理的工作效率是关键因素。
因此,需要引入图书馆管理系统来实现图书馆的现代化管理。
作为一个图书馆管理系统,首先,必须要有友好的、美观的操作界面,人机对话操作方式简单。
其次,图书信息和读者信息分类管理,能实现综合查询。
再次,对图书借阅信息,图书借阅排行榜信息实现全程数据跟踪,保证数据的真实性和及时性。
最后,能实现及时的提醒用户归还即将到期的图书,做到图书借阅管理流程规范且流畅。
更具图书管日常图书管理的需求和图书借阅的管理流程,如下图,图书馆管理系统功能模块主要包括系统设置、读者管理功能、图书管理功能、图书借阅功能和相关的查询功能。
其中管理员和读者的功能模块如下图:
读者功能模块
1.2系统开发运行环境
系统开发环境:
MicrosoftVisualStudio2010
系统开发语言:
c#
运行平台:
Windows8
数据库:
sql2012
二、功能模块分析
2.1、读者数据流图
(1)图书借阅系统完成用户的借书过程其数据流图如图3-2所示。
图3-1借阅系统的数据流图
(2)还书系统完成图书的归还过程其数据流图如图3-3所示。
图3-2归还系统的数据流图
2.2读者用例图
2.3读者E-R图
读者功能E-R图
三、读者的功能及实现
3.1读者登录功能
protectedvoidButton1_Click(objectsender,EventArgse)
{
/*取得帐号密码信息*/
stringuserName=this.txtName.Text;
stringpassword=this.txtPwd.Text;
stringidentify=this.Identify.SelectedValue;
、
{
ReaderModelreaderModel=newReaderModel();
readerModel.ReaderId=userName;
readerModel.ReaderPassword=password;
ReaderLogicreaderLogic=newReaderLogic();
/*如果读者帐号信息正确*/
if(readerLogic.IsExistReaderInfo(readerModel))
{
Session["readerFlag"]=true;
Session["readerId"]=userName;
Response.Redirect("Reader/index.aspx");
}
/*如果读者帐号信息不正确*/
else
{
Response.Write("");
}
}
}
}
3.2查询信息
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.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();
}
protectedvoidGridView1_RowDataBound(objectsender,GridViewRowEventArgse)
{
if(e.Row.RowType==DataControlRowType.DataRow)
{
//当鼠标选择某行时变颜色
e.Row.Attributes.Add("onmouseover","c=this.style.backgroundColor;this.style.backgroundColor='#00ffee';");
e.Row.Attributes.Add("onmouseout","this.style.backgroundColor=c;");
/*如果出版社的文字长度够长就剪切些
stringpublishing=e.Row.Cells[4].Text;
if(publishing.Length>6)
{
e.Row.Cells[4].Text=publishing.Substring(0,6)+"...";
}
*/
}
}
protectedvoidGridView1_PageIndexChanging(objectsender,GridViewPageEventArgse)
{
/*取得查询的各个参数*/
stringkeyword=this.Keyword.Text;
intdiskTypeId=Int32.Parse(this.DiskType.SelectedValue);
stringisRecommend=this.IsRecommend.SelectedValue;
/*调用业务层得到查询的结果数据集*/
DataSetds=newDataSet();
ds=(newDiskLogic()).QueryDiskInfo(keyword,diskTypeId,isRecommend);
/*将查询结果集绑定到gridview控件上*/
this.GridView1.DataSourceID=null;
this.GridView1.DataSource=ds;
this.GridView1.PageIndex=e.NewPageIndex;;
this.GridView1.DataBind();
}
3.3读者借阅信息
protectedvoidPage_Load(objectsender,EventArgse)
{
/*验证是否登陆了系统*/
if(Session["readerFlag"]==null)
{
Response.Write("");
return;
}
/*得到该读者的所有借阅图书信息*/
DataSetds=LoanLogic.GetDiskLoanInfo(Session["readerId"].ToString());
if(ds.Tables[0].Rows.Count==0)
{
this.Result.Text+="
你还没有图书借阅信息!
";
}
/*遍历输出该读者的所有借阅信息*/
for(inti=0;i{
DataRowdr=ds.Tables[0].Rows[i];
DiskLogicdiskLogic=newDiskLogic();
DiskModeldiskModel=diskLogic.GetDiskInfo(Convert.ToInt32(dr["diskId"]));
this.Result.Text+="
"+diskModel.DiskIndex+" | ";this.Result.Text+="
"+diskModel.DiskName+" | ";this.Result.Text+="
"+Convert.ToDateTime(dr["borrowTime"]).ToShortDateString()+" | ";/*如果该图书还没有续借*/
if(Convert.ToInt32(dr["isContinue"])==0)
{
/*如果没有续借但已经超过归还时间了*/
if(LoanLogic.IsOverdue(Convert.ToInt32(dr["loanId"])))
{
this.Result.Text+="
没续借但超期,请速还! | ";}
/*如果没有续借并且还没有超过归还时间*/
else
{
this.Result.Text+="
没续借,可以 loanId="+dr["loanId"]+"'>续借 "; } } /*如果该图书已经续借了*/ else { if(LoanLogic.IsOverdue(Convert.ToInt32(dr["loanId"]))) { /*如果已经办理了续借但是超期了*/ this.Result.Text+=" | 已续借但超期,请速还! | ";} else { /*如果已经办理了续借并且还没有超期*/ this.Result.Text+=" 已续借并且还没到期! | ";} } } } 四、程序运行截图 4.1登录界面 4.2主界面 4.3图书信息查询 4.4图书预约信息 4.5系统设置 五、心得 通过这次设计和开发真切地体会到课程设计的目的在于学习新的知识并掌握具体的方法。 回
展开阅读全文
相关搜索
|