




已阅读5页,还剩3页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
图书管理系统系统设计报告一、 引言 1 摘要:中学图书馆管理系统 目的:方便图书馆对书籍借阅的管理 主要功能: 学生基本信息查询 书籍借阅管理 书籍管理 2 背景:第十小组承担开发任务 3 工作条件与限制:windows操作平台,visual basic6.0和sql sserver2000等软件为开发工具,利用上课时间和课外时间做成。由于现在图书管理系统已经比叫完善,所以我们暂时没有能做出比以前有先进技术的管理系统。 4 参考和引用资料:数据库系统概论,vb应用 5 专门术语定义: 二、系统总体技术方案 1 计算机系统配置:windows平台,vb/sqlserver2000,winnt server操作系统, sql server2000关系数据库管理系统 ,vb操作软件,局域网。 2 模块设计:主要分为三个模块:即学生基本信息模块,书籍借阅模块,书籍管理模块 代码设计:读者信息查询 public connstr as adodb.connection private sub command1_click() end sub private sub cmdadd_click() if trim(list1.text) then list2.additem (list1.text) end if end sub private sub cmdmove_click() if trim(list2.text) then list2.removeitem (list2.listindex) end if end sub private sub cmdsearch_click() dim cmdstr as string if list2.listcount = 0 then msgbox 请选择输出列!, vbokonly, 提示 exit sub end if cmdstr = select for i = 0 to list2.listcount - 1 if trim(list2.list(i) = 图书证号 then cmdstr = cmdstr + reader_data. + trim(list2.list(i) + , else if trim(list2.list(i) = 书号 then cmdstr = cmdstr + marc_data. + trim(list2.list(i) + , else cmdstr = cmdstr + trim(list2.list(i) + , end if end if next cmdstr = left(cmdstr, len(cmdstr) - 1) if opbook.value = true then cmdstr = cmdstr + from marc_data where end if if opreader.value = true then cmdstr = cmdstr + from reader_data where end if if oplend.value = true then cmdstr = cmdstr + from marc_data,reader_data,lend_data & where marc_data.书号=lend_data. 书号 and & reader_data.图书证号=lend_data.图书证号 and end if if trim(comkey.text) = then msgbox 请选择查询关键字!, vbokonly, 提示 exit sub end if if trim(txtkey.text) = then msgbox 请设置查询关键字的值!, vbokonly, 提示 exit sub end if if comtype.text = 精确匹配 then cmdstr = cmdstr + trim(comkey.text) + = + trim(txtkey.text) + else cmdstr = cmdstr + trim(comkey.text) + like + trim(txtkey.text) + % end if adodc1.recordsource = cmdstr adodc1.refresh datagrid1.refresh end sub private sub form_load() set connstr = new adodb.connection connstr.open driver=sql server; server=syslab000;uid=jj138;pwd=;database=计教(1)班38号 adodc1.connectionstring = connstr comtype.additem (精确匹配) comtype.additem (前方一致匹配) end sub private sub label3_click() end sub private sub list2_click() end sub private sub opbook_click() dim rs as adodb.recordset set rs = new adodb.recordset rs.open marc_data, connstr, adopenkeyset, adlockreadonly, adcmdtable comkey.clear list1.clear for i = 0 to rs.fields.count - 1 comkey.additem (rs.fields(i).name) list1.additem (rs.fields(i).name) next rs.close list2.clear txtkey.text = end sub private sub oplend_click() comkey.clear list1.clear comkey.additem (图书证号) comkey.additem (姓名) comkey.additem (书号) comkey.additem (书名) comkey.additem (出版社) comkey.additem (借出日期) comkey.additem (还书日期) list1.additem (图书证号) list1.additem (姓名) list1.additem (书号) list1.additem (书名) list1.additem (出版社) list1.additem (借出日期) list1.additem (还书日期) list2.clear txtkey.text = end sub private sub opreader_click() dim rs as adodb.recordset set rs = new adodb.recordset rs.open reader_data, connstr, adopenkeyset, adlockreadonly, adcmdtable comkey.clear list1.clear for i = 0 to rs.fields.count - 1 comkey.additem (rs.fields(i).name) list1.additem (rs.fields(i).name) next rs.close list2.clear txtkey.text = end sub 借还书处理 private sub cmdlend_click() dim rs as adodb.recordset set rs = new adodb.recordset if trim(txtbid.text) = or trim(txtrid_1.text) = then msgbox 请输入图书证号和书号!, vbokonly, 提示信息 else rs.open lend_data, connstr, adopenkeyset, adlockoptimistic, adcmdtable rs.addnew rs(书号) = txtbid.text rs(借出日期) = date rs(图书证号) = txtrid.text rs.update adodc1.refresh end if end sub private sub cmdreturn_click() dim rs as adodb.recordset set rs = new adodb.recordset if trim(txtbid.text) = or trim(txtrid_1.text) = then msgbox 请输入图书证号和书号!, vbokonly, 提示信息 else cmdstr = update lend_data set 还书日期= _ & date & where 书号= & trim(txtbid.text) & rs.open cmdstr, connstr, adopenkeyset, adlockoptimistic, adcmdtext adodc1.refresh end if end sub private sub cmds_click() dim rs as adodb.recordset set rs = new adodb.recordset cmdstr = select * from reader_data where 图书证号 = & trim(txtrid_1.text) & rs.open cmdstr, connstr, adopenforwardonly, adlockreadonly, adcmdtext if not rs.eof then txtrid.text = rs(图书证号) txtname.text = rs(姓名) if not isnull(rs(性别) then txtxb.text = rs(性别) end if if not isnull(rs(系名) then txtxm.text = rs(系名) end if else msgbox 未找到该读者信息!, vbokonly, 提示信息 end if cmdstr = select 借出日期,还书日期,lend_data.书号,书名,作者,出版社 & from lend_data,marc_data & where lend_data.书号=marc_data.书号 and & 还书日期 is null and 图书证号= & trim(txtrid_1.text) & adodc1.recordsource = cmdstr adodc1.refresh end sub private sub cmdsearch_click() cmdstr = select 借出日期,还书日期,lend_data.书号,书名,作者,出版社 & from lend_data,marc_data & where lend_data.书号=marc_data.书号 and 图书证号= & trim(txtrid_1.text) & adodc1.recordsource = cmdstr adodc1.refresh end sub private sub datagrid1_click() if not adodc1.recordset.bof and not adodc1.recordset.bof then txtbid.text = adodc1.recordset(书号) end if end sub private sub form_load() set connstr = new adodb.connection connstr.open driver=sql server; server=syslab000;uid=jj138;pwd=;database=计教(1)班38号 adodc1.connectionstring = connstr end sub 图书馆详细信息 private sub txt_refresh() if not adodc1.recordset.eof and not adodc1.recordset.bof then txtbid.text = adodc1.recordset(书号) txtbname.text = adodc1.recordset(书名) txtwrite.text = adodc1.recordset(作者) txtpublisher.text = adodc1.recordset(出版社) txtyear.text = adodc1.recordset(出版时间) txtgb.text = adodc1.recordset(国别代码) txtdate.text = adodc1.recordset(进馆时间) txtcallno.text = adodc1.recordset(分类号) end if end sub private sub cmddele_click() dim deletxt as string deletxt = 是否删除图书 & adodc1.recordset(书名) & 的记录? if not adodc1.recordset.eof and not adodc1.recordset.bof then if msgbox(deletxt, vbokcancel, 提示信息) = vbok then adodc1.recordset.delete adodc1.refresh end if end if end sub private sub cmdnew_click() if cmdnew.caption = 新增 then txt_enable (2) cmdnew.caption = 保存 txtbid.text = txtbname.text = txtwrite.text = txtpublisher.text = txtyear.text = txtgb.text = txtdate.text = txtcallno.text = else adodc1.recordset.addnew adodc1.recordset(书号) = trim(txtbid.text) adodc1.recordset(书名) = trim(txtbname.text) adodc1.recordset(作者) = trim(txtwrite.text) adodc1.recordset(出版社) = trim(txtpublisher.text) adodc1.recordset(出版时间) = trim(txtyear.text) adodc1.recordset(国别代码) = trim(txtgb.text) 4 adodc1.recordset(进馆时间) = trim(txtdate.text) adodc1.recordset(分类号) = trim(txtcallno.text) adodc1.recordset.updatebatch adodc1.refresh txt_enable (1) cmdnew.caption = 新增 adodc1.recordset.movefirst txt_refresh end if private sub cmdnext_click() if not adodc1.recordset.eof then adodc1.recordset.movenext txt_refresh end if end sub private sub cmdpre_click() if not adodc1.recordset.bof then adodc1.recordset.mo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年中国无阻力轴向补偿器数据监测研究报告
- 2025年中国数码控制箱市场调查研究报告
- 2025-2030年中国亚氯酸钠项目投资风险研究报告
- 2025至2031年中国绒把手记数跳绳行业投资前景及策略咨询研究报告
- 2025至2031年中国绝缘油介电强度自动测定仪行业投资前景及策略咨询研究报告
- 小学一年级语文下册《口语交际:一起做游戏》指导
- 新疆司法警官职业学院《毕业论文写作与作品设计》2023-2024学年第二学期期末试卷
- 2025-2030年中国4,4′行业运行态势及投资风险评估报告
- 新疆伊犁州2025年初三下学期第一次模拟考试语文试题试卷含解析
- 2025-2030年中国TETRA数字集群无线电系统行业发展现状分析及投资前景预测研究报告
- 中国传统文化知到课后答案智慧树章节测试答案2025年春杭州师范大学
- 物业撤场方案
- 2025年山西杏花村汾酒集团有限责任公司招聘笔试参考题库含答案解析
- 石化石油行业安全
- 外研版(三起)(2024)三年级下册英语Unit 4 单元测试卷(含答案)
- 《资治通鉴》与为将之道知到课后答案智慧树章节测试答案2025年春武警指挥学院
- 哪吒2+deepseek爆火彰显文化自信和科技创新
- 第九章-人类与自然地理环境.课件
- 中考动员大会校长演讲稿
- 课题申报书:产教融合视域下职业教育赋能新质生产力的模型构建和实现路径研究
- 跨国合作:应对全球传染病挑战
评论
0/150
提交评论