name=:a;
updatebook
setflag='未借出'
wherebook_name=:a;
endif
ifcbx_2.checked=truethen
a=dw_1.getitemstring(dw_1.getrow(),'book2')
updatenamebook
setbook2=null
wherename=:ls_name;
updatebook
setbook_jname=null
wherebook_name=:a;
updatebook
setflag='未借出'
wherebook_name=:a;
endif
ifcbx_3.checked=truethen
a=dw_1.getitemstring(dw_1.getrow(),'book3')
updatenamebook
setbook3=null
wherename=:ls_name;
updatebook
setbook_jname=null
wherebook_name=:a;
updatebook
setflag='未借出'
wherebook_name=:a;
endif
ifcbx_4.checked=truethen
a=dw_1.getitemstring(dw_1.getrow(),'book4')
updatenamebook
setbook4=null
wherename=:ls_name;
updatebook
setbook_jname=null
wherebook_name=:a;
updatebook
setflag='未借出'
wherebook_name=:a;
endif
ifcbx_5.checked=truethen
a=dw_1.getitemstring(dw_1.getrow(),'book5')
updatenamebook
setbook5=null
wherename=:ls_name;
updatebook
setbook_jname=null
wherebook_name=:a;
updatebook
setflag='未借出'
wherebook_name=:a;
endif
ifcbx_1.checked=trueorcbx_2.checked=trueorcbx_3.checked=trueorcbx_4.checked=trueorcbx_5.checked=truethen
messagebox('提示','成功!')
else
messagebox('提示','您还没有还书!')
endif
close(parent)
放弃:close(parent)
3书库管理功能模块
书库一览功能模块
书库管理窗口及其代码:
OPEN:
this.X=(w_main.WorkSpaceWidth()-this.Width)/2
this.Y=(w_main.WorkSpaceHeight()-w_main.mdi_1.MicroHelpHeight-this.Height)/2-50
dw_1.SetTransObject(SQLCA)
dw_1.Retrieve()
新增记录:
dw_1.ScrollToRow(dw_1.InsertRow(0))
dw_1.SetFocus()
删除记录:
deleterow(dw_1,dw_1.getrow())
保存:
ifupdate(dw_1)=1then
dw_1.resetupdate()
commit;
messagebox('成功','数据已成功保存!')
else
rollback;
messagebox('失败','数据保存失败!')
endif
退出:
close(w_book)
现有图书窗口及其代码:
OPEN:
this.X=(w_main.WorkSpaceWidth()-this.Width)/2
this.Y=(w_main.WorkSpaceHeight()-w_main.mdi_1.MicroHelpHeight-this.Height)/2-50
dw_1.SetTransObject(SQLCA)
dw_1.Retrieve()
打印:dw_1.print()
确认:close(w_book_brow)
:
查找图书窗口及其代码
OPEN:
this.X=(w_main.WorkSpaceWidth()-this.Width)/2
this.Y=(w_main.WorkSpaceHeight()-w_main.mdi_1.MicroHelpHeight-this.Height)/2-50
dw_1.settransobject(sqlca)
查找:
按书号:
stringlookforcondition
lookforcondition='book_no'+'='+"'"+sle_1.text+"'"
dw_1.setfilter(lookforcondition)
filter(dw_1)
ifdw_1.retrieve()=0thenmessagebox('提示','图书馆没有此书!')
按书名:
stringlookforcondition
lookforcondition='book_name'+'='+"'"+sle_3.text+"'"
dw_1.setfilter(lookforcondition)
filter(dw_1)
ifdw_1.retrieve()=0thenmessagebox('提示','图书馆没有此书!')
按价格
stringlookforcondition
lookforcondition='book_jg'+ddplb_1.text+sle_4.text
dw_1.setfilter(lookforcondition)
filter(dw_1)
ifdw_1.retrieve()=0thenmessagebox('提示','图书馆没有此书!')
按作者
stringlookforcondition
lookforcondition='book_zname'+'='+"'"+sle_5.text+"'"
dw_1.setfilter(lookforcondition)
filter(dw_1)
ifdw_1.retrieve()=0thenmessagebox('提示','图书馆没有此书!')
4读者操作功能模块
读者管理窗口及其代码:
OPEN:
this.X=(w_main.WorkSpaceWidth()-this.Width)/2
this.Y=(w_main.WorkSpaceHeight()-w_main.mdi_1.MicroHelpHeight-this.Height)/2-50
dw_1.SetTransObject(SQLCA)
dw_1.Retrieve()
新增
上一篇:
PB图书管理系统(论文和程序)
下一篇:
HTML基础教程:学习掌握HTML 元素