表4 存储过程表 存储过程 存储过程参数 内容来自www.paper51.com
存储过程说明 copyright paper51.com BookAdd 内容来自www.paper51.com CREATE PROCEDURE [BookAdd] http://www.paper51.com (@BID[int],@BISBN[varchar](50),@BName[varchar](50),@BAuthor[varchar](50),@BTheme[varchar](50), copyright paper51.com @BClassifyText[varchar](50),@BIndex[varchar](50), paper51.com
@BPress[varchar](50),@BPrice[money], http://www.paper51.com @BSeriesName[varchar](50),@BDescribe[varchar](500)) paper51.com
新书加入 paper51.com BookDelete paper51.com
CREATE PROCEDURE [bookdelete] copyright paper51.com (@BID[int]) 内容来自论文无忧网 www.paper51.com
删除图书 copyright paper51.com
BookInLibCheck 内容来自www.paper51.com CREATE PROCEDURE [BookInLibCheck] paper51.com @BID INT paper51.com 图书在馆查询 http://www.paper51.com BookList http://www.paper51.com CREATE PROCEDURE BookMaxBIDGet paper51.com @maxbid 内容来自www.paper51.com
新书查询 http://www.paper51.com
BookMaxBIDGet 内容来自www.paper51.com REATE PROCEDURE [BookModify](@BID[int],@BISBN [varchar](50),@BName[varchar](50),@BAuthor[varchar](50), 内容来自论文无忧网 www.paper51.com @BTheme[varchar](50),@BClassifyText[varchar](50),@BIndex [varchar](50),@BPress[varchar](50),@BPrice [money], 内容来自论文无忧网 www.paper51.com @BSeriesName[varchar](50),@BDescribe [varchar](500)) http://www.paper51.com 读取书目最大值 http://www.paper51.com
BookModify http://www.paper51.com CREATE PROCEDURE [BookNotInLibCheck] @IBID INT http://www.paper51.com 图书信息修改 http://www.paper51.com
BookNotInLibCheck 内容来自论文无忧网 www.paper51.com
CREATE PROCEDURE [BorrowInformAdd] paper51.com
(@IUID[varchar](50),@IBID[int],@IBeginDate [datetime], copyright paper51.com @IEndDate[datetime], @IState [int]) 内容来自www.paper51.com 图书不在馆查询 内容来自www.paper51.com BorrowInformAdd 内容来自论文无忧网 www.paper51.com CREATE PROCEDURE [BorrowInformModify] copyright paper51.com (@IBID[int],@IState [int]) http://www.paper51.com
借书记录添加 paper51.com ReaderBorrowHis paper51.com
CREATE PROCEDURE [ReaderBorrowState] 内容来自www.paper51.com @UID VARCHAR(50) http://www.paper51.com 借阅历史查询 copyright paper51.com
ReaderBorrowState 内容来自www.paper51.com CREATE PROCEDURE [UsersAdd] (@UID[varchar](50), paper51.com @UPassword [varchar](50),@UPower [int],@USex [bit], paper51.com @UName [varchar](50), @UAddress [varchar](50), 内容来自论文无忧网 www.paper51.com @UTel [varchar](50),@UEmail [varchar](50), copyright paper51.com @UCorporation [varchar](50)) copyright paper51.com 借阅情况查询 copyright paper51.com UsersAdd 内容来自www.paper51.com CREATE PROCEDURE [UsersDelete](@UID[varchar](50)) copyright paper51.com 用户添加 http://www.paper51.com UsersDelete 内容来自论文无忧网 www.paper51.com CREATE PROCEDURE [UsersDetail] http://www.paper51.com @UID [varchar](50) 内容来自www.paper51.com 删除用户 内容来自www.paper51.com UsersDetail 内容来自论文无忧网 www.paper51.com
CREATE PROCEDURE [UsersList] 内容来自www.paper51.com 用户信息查询 paper51.com UsersList 内容来自论文无忧网 www.paper51.com CREATE PROCEDURE [UsersModify] paper51.com (@UID[varchar](50),@UPower [int], 内容来自论文无忧网 www.paper51.com @UName [varchar](50), @UAddress [varchar](50), copyright paper51.com @UTel [varchar](50),@UEmail [varchar](50), paper51.com
@UCorporation [varchar](50)) 内容来自www.paper51.com 用户信息查询 paper51.com UsersModify copyright paper51.com CREATE PROCEDURE [UsersPasswdModify] 内容来自论文无忧网 www.paper51.com
(@UID[varchar](50),@UPassword[varchar](50)) copyright paper51.com 用户信息修改 copyright paper51.com UsersPasswdModify paper51.com
密码修改 内容来自www.paper51.com 5.系统设计实现 5.1系统首页实现 http://www.paper51.com 首页画面是为了给用户一个良好的印象,意在让用户直接能理解网站的性质和功能。用户能很快找到自己所需要的信息和服务,容易操作和实现。。系统的首页如图3: copyright paper51.com
http://www.paper51.com
图3 图书馆系统首页 http://www.paper51.com 用户可以通过不同的链接进入不同的页面。 内容来自www.paper51.com 5.2 借阅者服务模块的实现 内容来自www.paper51.com
5.2.1 图书查询功能的实现 http://www.paper51.com 在本系统中,任何人都有权限使用查询功能,不做任何限制。 由于实现的查询功能有多种,如按图书编号、图书名称等字段进行完全体配查找和部分体配的模糊查找。图书查询界面如图4所示: http://www.paper51.com
内容来自论文无忧网 www.paper51.com 图4 图书查询界面 http://www.paper51.com 点击确定以后跳转页面显示查询结果,如图5: 内容来自论文无忧网 www.paper51.com
http://www.paper51.com
图5 查询结果图 paper51.com
具体代码如下: copyright paper51.com public void BindGrid() copyright paper51.com
{ //从文件Web.config中读取连接字符串 copyright paper51.com string strConn = ConfigurationManager.AppSettings["dsn"]; 内容来自论文无忧网 www.paper51.com
//连接本地计算机的LMS数据库 paper51.com SqlConnection cn= newSqlConnection (strConn); paper51.com //根据提交上来的表单创建SQL语句 http://www.paper51.com string booklist="select* from book "; http://www.paper51.com string strSearchText=Request.Form ["strSearchText"]; copyright paper51.com string match_flag=Request.Form ["match_flag"]; 内容来自论文无忧网 www.paper51.com
if(match_flag=="0")//完全匹配 内容来自论文无忧网 www.paper51.com { http://www.paper51.com if (Request.Form ["strSearchType"].ToString()=="01") //书目编号 内容来自www.paper51.com
{ http://www.paper51.com booklist=booklist+ "where bid="+ strSearchText; paper51.com
} paper51.com else if (Request.Form["strSearchType"].ToString ()=="02") //题名 内容来自www.paper51.com { http://www.paper51.com booklist=booklist+ "where bname='"+ strSearchText +"'"; copyright paper51.com } 内容来自www.paper51.com else if (Request.Form["strSearchType"].ToString ()=="03") //作者 copyright paper51.com { 内容来自www.paper51.com
booklist=booklist+ "where bauthor='"+ strSearchText+"'"; copyright paper51.com
} …… copyright paper51.com else paper51.com { Response.Write ("类型选择错误"); paper51.com
Response.End(); http://www.paper51.com
} copyright paper51.com } copyright paper51.com else if(match_flag=="1")//模糊匹配 内容来自论文无忧网 www.paper51.com { http://www.paper51.com if (Request.Form ["strSearchType"].ToString()=="01") //书目编号 内容来自论文无忧网 www.paper51.com { http://www.paper51.com booklist=booklist+ "where bid ="+ strSearchText; copyright paper51.com } http://www.paper51.com else if (Request.Form["strSearchType"].ToString ()=="02") //题名 paper51.com { paper51.com
booklist=booklist+ "where bname like '%"+strSearchText +"%'"; paper51.com
} copyright paper51.com …… http://www.paper51.com else 内容来自论文无忧网 www.paper51.com { Response.Write ("类型选择错误"); 内容来自www.paper51.com Response.End(); 内容来自www.paper51.com } copyright paper51.com } paper51.com
//创建SqlDataAdapter对象,调用视图 http://www.paper51.com SqlDataAdapter da=newSqlDataAdapter (booklist,cn); http://www.paper51.com //创建并填充DataSet paper51.com DataSet ds=new DataSet (); 内容来自www.paper51.com da.Fill(ds); http://www.paper51.com dgd_booklist.DataSource=ds; http://www.paper51.com dgd_booklist.DataBind(); http://www.paper51.com cn.Close(); copyright paper51.com 内容来自www.paper51.com |