1、) thisform.text1.value= thisform.text2.value= thisform.text1.setfocus() else cyonghu=allt(thisform.text1.value) cmima=allt(thisform.text2.value) do menu.mpr thisform.release endif“退出”按钮的代码:thisform.releaseclea eventquitDZLR.SCX表单:“读者编号”文本的代码:thisform.text1.setfocus“性别”文本的代码:this.displayvalue=男this.a
2、dditem(女use readerinfo请输入完整的必要信息! if allt(thisform.text4.value)= thisform.text3.setfocus if allt(thisform.text5.value)= thisform.text4.setfocus append blank repl 读者编号 with allt(thisform.text1.value) repl 姓名 with allt(thisform.text2.value) repl 年龄 with allt(thisform.text3.value) repl 联系电话 with allt(t
3、hisform.text4.value) repl 详细住址 with allt(thisform.text5.value) repl 压金 with val(allt(thisform.text6.value) repl 备注 with allt(thisform.edit1.value) repl 注册日期 with date() if allt(bo1.value)= repl 性别 with allt(bo1.displayvalue) repl 性别 with allt(bo1.value) mand2.clickuse“重填”按钮的代码:thisform.text1.value=t
4、hisform.text2.value=thisform.text3.value=thisform.text4.value=thisform.text5.value=bo1.value=bo1.displayvalue=thisform.edit1.value=“返回”按钮的代码:DZXG.SCX表单:“快速定位”按钮的代码:sele readerinfoif allt(thisform.text6.value)=请输入姓名或编号! thisform.text6.setfocus locate for allt(姓名)=allt(thisform.text6.value); .or. allt
5、(读者编号)=allt(thisform.text6.value)没有此记录,请重新输入! go nhere thisform.init nhere=recno()“第一条”按钮的代码:go topnhere=recno()mand4.enabled=.t.mand6.enabled=.t.thisform.init“最后一条”按钮的代码:go bottommand3.enabled=.t.mand5.enabled=.t.“上一条”按钮的代码:skip -1if bof() go top this.enabled=.f. mand3.enabled=.f.已经到第一条记录了!“下一条”按钮的
6、代码:skip 1if eof() go bottom mand4.enabled=.f.已经到最后一条记录了!“修改”按钮的代码:thisform.text1.readonly=.f.thisform.text2.readonly=.f.thisform.text3.readonly=.f.thisform.text4.readonly=.f.thisform.text5.readonly=.f.bo1.readonly=.f.thisform.edit1.readonly=.f.“删除”按钮的代码:use readerinfo exclusivego nheremb=messagebox(
7、确定要删除吗?,1+64,if mb=1 delete pack count all to num if nherenumJHCX.SCX表单:“查询”按钮的代码:请输入读者编号! sele readerinfo locate for 读者编号=allt(thisform.text1.value)编号错误,请重新输入! thisform.label9.caption=allt(thisform.text1.value) thisform.label11.caption=allt(姓名) sele 书号,借阅日期,归还日期 from lendinfo into cursor lendls; wh
8、ere allt(读者编号)=allt(thisform.text1.value); .and.(allt(借阅情况)=借阅.or.allt(借阅情况)=已还 thisform.grid1.init日期标识label12的代码:this.caption=今天是:+allt(str(year(date()+年; +allt(str(month(date()+月 +allt(str(day(date()+日表格Grid1按钮的代码:this.columncount=4this.column1.header1.caption=书号this.column2.header1.caption=借阅日期th
9、is.column3.header1.caption=归还日期this.column4.header1.caption=是否延期if !allt(thisform.text1.value)= this.recordsource=lendls this.recordsourcetype=1 this.column1.controlsource= this.column2.controlsource= this.column3.controlsource=*thisform.text1.value=day(归还日期)*dd=day(date()-day(借阅日期)*daycount=dd*mm=m
10、onth(date()-month(借阅日期)*mon=month(借阅日期)*for n=0 to mm* do case* case mon=1,3,5,7,8,10,12* daycount=daycount+31* case mon=4,6,9,11 * daycount=daycount+30 * case mon=2* daycount=daycount+28* endcase*endfor“归还”按钮的代码:sele lendinfoif allt(thisform.text5.value)=请选择要归还的图书! locate for allt(读者编号)=allt(thisfo
11、rm.text1.value); .and.allt(书号)=allt(thisform.text5.value); .and.allt(借阅情况)= if !eof() repl 归还日期 with date() repl 借阅情况 with where allt(读者编号)=allt(thisform.label9.caption); .and. allt(借阅情况)=TSCX.SCX表单:查询选择框Optiongroup1的代码:if this.option1.value=1 thisform.label2.caption=请输入要查询的书名:if this.option2.value=
12、1请输入要查询的作者:if this.option3.value=1请输入要查询的出版社:借书选择框Optiongroup2的代码:LPARAMETERS cName, cClass表格grid1的代码:LPARAMETERS nColIndexshuhao=allt(thisform.grid1.column1.text1.value)thisform.text2.value=shuhaolocate for allt(书号)=shuhao.and.allt(借阅情况)=预约 thisform.check1.value=1 thisform.optiongroup2.option2.valu
13、e=1 thisform.optiongroup2.option1.value=0 thisform.check1.value=0 thisform.optiongroup2.option1.value=1 thisform.optiongroup2.option2.value=0sele booksinfo请输入要查询的内容! if thisform.optiongroup1.option1.value=1 sele 书号,书名,作者,出版社 from booksinfo into cursor booksls; where allt(书名)=allt(thisform.text1.valu
14、e) if thisform.optiongroup1.option2.value=1 where allt(作者)=allt(thisform.text1.value) if thisform.optiongroup1.option3.value=1 where allt(出版社)=allt(thisform.text1.value) sele booksinfo sele bookslsif allt(thisform.text3.value)=请输入你的编号! locate for allt(读者编号)=allt(thisform.text3.value)您还没有注册,请先注册.,48,
15、警告 thisform.text3.value= sele lendinfo if thisform.optiongroup2.option2.value=1 count for allt(读者编号)=allt(thisform.text3.value); to cn if cn3 locate for allt(读者编号)=allt(thisform.text3.value); .and.allt(书号)=allt(thisform.text2.value); repl 书号 with allt(thisform.text2.value) repl 读者编号 with allt(thisform.text3.value) repl 预约日期 with date()您已经预约此本书!最多只能预约3本图书,您已经预约3本了! if thisform.optiongroup2.option1.value=1 if thisform.check1.value=0 repl 借阅日期 with date()您没有预约此本图书!最多只能借3本图书,您已经借了3本图书! endif “取消”按钮的代码:请输入您的编号!您没有预约此本书! thisform.ch
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1