ImageVerifierCode 换一换
格式:DOCX , 页数:11 ,大小:16.96KB ,
资源ID:2916962      下载积分:12 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/2916962.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(代码清单.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

代码清单.docx

1、代码清单代码清单1借书业务Private Sub cmdissue_Click() If trim(txtmemid) =or Trim(txtbookid)=ThenMsgbox缺少会员编号或书本编号!、binformation、 注意 Else检测是否超出最大允许帐户欠款数额If val(lblfinebal.caption)M.maxfinebal Then Msgbox 您的帐户欠款超额,借书前请付清罚款。,vbinformation,注意 txtbookid.text = txtmemid.stfocus exit subEnd if 检测是否超出最大允许借书数量If val(lbo

2、oks.caption)=M.totalissuebook then Msgbox您的借书数量已超出最大允许值。、vbinformantion、注意 Txtbookid.text = Txtmemid.setfocus Exit subEnd ifIf Ucase(lblisin.caption)=FALSEthen Msgbox图书馆中没这本书。、vbinformation、注意 Txtbookid.text = Txtmemid.setfocus Exit subEnd ifIf Ucase(lblisin.caption)=MISSINGthen Msgbox书籍已丢失、vbinform

3、ation、注意 Txtmemid.setfocus Exit subEnd ifIf not lblres.caption=0And Trim(lbres.caption) _ Trim(txtmemid.text) then msgbox这本书已破损& lbres.caption &预定、_ vbinformation、注意 Txtbookid.text = Txtmemid.setfocus Exit subEnd if获取当前书本所属主题dim adoprimaryrsl As recordsetset adoprimaryrsl =new recordsetadoprimaryrsl

4、.openslect subject from titles where&_ titleid =&lbltitle.caption &、_ db、adopenstatic、 adlockoptimisticsubj = adoprimarysl.fields(0)获取此主题的最大出借天数dim adoprimaryrs2 As recordsetset adoprimaryrs2 =new recordsetadoprimaryrs2.openslect issuedays、nooks、finecharge,&_ resecharge、issuedays from sbjects &_ whe

5、re subject=& sbj &、_ db、adopenstatic、 adlockoptimisticnootfdaysx = adoprimaryrs2.fidldset(4)dim adoprimaryrs3 As recordsetset adoprimaryrs3 =new recordsetadoprimaryrs4.openslect titleid from books where & _memberid=& trim(txtmend.text) &、_db、adopenstatic、 adlockoptimisticdim adoprimaryrs4 As records

6、etset adoprimaryrs4 =new recordset获取用户借阅当前主题的册书while not adoprimaryrs3.EOF adoprimaryrs4.openslect subject from titles where&_ titleid =& adoprimaryrs3. fields(0) & _ 、db、adopenstatic、 adlockoptimistic if subj = adoprimaryrs4. fields(0) then counter = counter + 1 End if adoprimaryrs3.movenext adopri

7、maryrs4.closeWendIf counter = adoprimaryrs2. fields(1) then Msgbox 用户已在当前主题借阅的图书超出最大允许值。、_ vbinformation、注意 Txtbookid.text = Txtmemid.setfocus Exit subEnd if可以借书更新所借书本的信息dim adoprimaryrs5 As recordsetset adoprimaryrs5 =new recordsetadoprimaryrs5.openslect memberd、bookid ISIN、returndate&_ from books、

8、db、adopenstatic、 adlockoptimisticadoprimaryrs5.find(bookid=& txtbookid.text &)adoprimaryrs5.finds(0) = trim(textmid)adoprimaryrs5.finds(2) = False计算归还日期adoprimaryrs5.finds(3) = dataadd(d、noofdaysx、data)adoprimaryrs5.update计算归还日期lbreturn.caption = dataadd(d、noofdaysx、data)更新会员的借阅信息dim adoprimaryrs6 A

9、s recordsetset adoprimaryrs6 =new recordsetadoprimaryrs6.openslect membeid、booksinhand、finebal&_ from members where memberd=&_ trim(textmid. Text) &、ab、_ adopenstatic、 adlockoptimisticIf lblres.caption= Trim(txtmemid.text) then adoprimaryrs6.finds(2) = adoprimaryrs6.finds(1) +_ adoprimaryrs2.finds(4

10、)End ifadoprimaryrs6.finds(1) = adoprimaryrs6.finds(1) +_adoprimaryrs6.updatetxtbookid_lostfocustxtbookid.setfocusEnd if End sub2.还书业务Private Sub cmdreturn Click() dim adoprimaryrsl As recordset dim adoprimaryrs11 As recordset dim adoprimaryrs12 As recordset dim adoprimaryrsl3 As recordset set adopr

11、imaryrsl =new recordset adoprimaryrs1.openslect memberid、bookid ISIN、returndate&_issuecounter from books where memberd=&_trim(textmid. Text) &and bookid=&_trim(textmid. Text) &、ab、_adopenstatic、 adlockoptimisticIf adoprimaryrsl.recount = 0 then Msgbox 会员:& textmid & 并没有借这本书:&_ Txtbookid、vbinformatio

12、n Exit subEnd ifIf adoprimaryrsl. finds(2) = trun then Msgbox 书:& txtbookid & 已经归还图书馆.vbinformation Exit subEnd if获取书籍原定归还日期returndate = adoprimaryrs1.finds(3)If returndate data then 借书超期 获取超期天数 Finedays = datadiff(d、returndate 、data) 获取当前书籍的主题 set adoprimaryrsl1 =new recordset adoprimaryrs11.opensl

13、ect subject form tiles where&_ tileid =& lbitle.caption &、_ db、adopenstatic、 adlockoptimisticsubj = adoprimaryrs11.finds(0)adoprimaryrs12.openslect issuedays、subject、finecharge&_ form subject where subject =& subj &_ 、db、adopenstatic、 adlockoptimistic获取超期单位罚款数额Finecharge = adoprimaryrs12.finds(2)Msg

14、box 当前会员持有书籍:& txtbookid & 超过&_ 天、需要支付:& Finedays * finecharge &_ vbinformation、超期set adoprimaryrsl3 =new recordsetadoprimaryrsl3 openslect membeid、booksinhand、finebal&_ from members where memberd=&_ trim(textmid. Text) &、ab、_ adopenstatic、 adlockoptimistic借书数_1adoprimaryrs13.finds(1) = adoprimaryrs13.finds(1) 1罚款数额计算adoprimaryrs13.finds(2) = adoprimaryrs13.finds(2) + _ (Finedays * finecharge)书籍存在于图书馆中adoprimaryrs1.finds(2) = turnadoprimaryrs1.finds(0) = 0adoprimaryrs13.updateadoprimaryrs1. updateElse书籍按时归还set adoprimaryrs13 =new recordsetadoprimaryrsl3 openslect membei

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

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