图书馆管理系统读者功能模块Word格式.docx

上传人:b****1 文档编号:14395163 上传时间:2022-10-22 格式:DOCX 页数:11 大小:358.10KB
下载 相关 举报
图书馆管理系统读者功能模块Word格式.docx_第1页
第1页 / 共11页
图书馆管理系统读者功能模块Word格式.docx_第2页
第2页 / 共11页
图书馆管理系统读者功能模块Word格式.docx_第3页
第3页 / 共11页
图书馆管理系统读者功能模块Word格式.docx_第4页
第4页 / 共11页
图书馆管理系统读者功能模块Word格式.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

图书馆管理系统读者功能模块Word格式.docx

《图书馆管理系统读者功能模块Word格式.docx》由会员分享,可在线阅读,更多相关《图书馆管理系统读者功能模块Word格式.docx(11页珍藏版)》请在冰豆网上搜索。

图书馆管理系统读者功能模块Word格式.docx

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;

readerId"

]=userName;

Response.Redirect("

Reader/index.aspx"

);

}

/*如果读者帐号信息不正确*/

else

Response.Write("

<

script>

alert('

"

+readerLogic.ErrMessage+"

'

/script>

}

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)

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

protectedvoidGridView1_RowDataBound(objectsender,GridViewRowEventArgse)

if(e.Row.RowType==DataControlRowType.DataRow)

//当鼠标选择某行时变颜色

e.Row.Attributes.Add("

onmouseover"

"

c=this.style.backgroundColor;

this.style.backgroundColor='

#00ffee'

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)

/*调用业务层得到查询的结果数据集*/

DataSetds=newDataSet();

ds=(newDiskLogic()).QueryDiskInfo(keyword,diskTypeId,isRecommend);

/*将查询结果集绑定到gridview控件上*/

this.GridView1.DataSourceID=null;

this.GridView1.DataSource=ds;

this.GridView1.PageIndex=e.NewPageIndex;

;

3.3读者借阅信息

protectedvoidPage_Load(objectsender,EventArgse)

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

if(Session["

]==null)

top.location.href='

../login.aspx'

return;

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

DataSetds=LoanLogic.GetDiskLoanInfo(Session["

].ToString());

if(ds.Tables[0].Rows.Count==0)

this.Result.Text+="

tr>

tdcolspan=4align=center>

fontcolor=red>

你还没有图书借阅信息!

/font>

/td>

/tr>

/*遍历输出该读者的所有借阅信息*/

for(inti=0;

i<

ds.Tables[0].Rows.Count;

i++)

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

DiskLogicdiskLogic=newDiskLogic();

DiskModeldiskModel=diskLogic.GetDiskInfo(Convert.ToInt32(dr["

diskId"

]));

td>

+diskModel.DiskIndex+"

+diskModel.DiskName+"

+Convert.ToDateTime(dr["

borrowTime"

]).ToShortDateString()+"

/*如果该图书还没有续借*/

if(Convert.ToInt32(dr["

isContinue"

])==0)

/*如果没有续借但已经超过归还时间了*/

if(LoanLogic.IsOverdue(Convert.ToInt32(dr["

loanId"

])))

没续借但超期,请速还!

/*如果没有续借并且还没有超过归还时间*/

没续借,可以&

nbsp;

ahref='

diskContinueBorrow.aspx?

loanId="

+dr["

]+"

>

续借<

/a>

/*如果该图书已经续借了*/

/*如果已经办理了续借但是超期了*/

已续借但超期,请速还!

/*如果已经办理了续借并且还没有超期*/

已续借并且还没到期!

四、程序运行截图

4.1登录界面

4.2主界面

4.3图书信息查询

4.4图书预约信息

4.5系统设置

五、心得

通过这次设计和开发真切地体会到课程设计的目的在于学习新的知识并掌握具体的方法。

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

当前位置:首页 > 教学研究 > 教学反思汇报

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

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