⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w_borrow.srw

📁 PB9.0生成的图书管理系统
💻 SRW
字号:
$PBExportHeader$w_borrow.srw
forward
global type w_borrow from window
end type
type cb_all from commandbutton within w_borrow
end type
type cb_2 from commandbutton within w_borrow
end type
type st_2 from statictext within w_borrow
end type
type sle_2 from singlelineedit within w_borrow
end type
type cb_1 from commandbutton within w_borrow
end type
type sle_1 from singlelineedit within w_borrow
end type
type st_1 from statictext within w_borrow
end type
type dw_1 from datawindow within w_borrow
end type
end forward

global type w_borrow from window
integer width = 4078
integer height = 1396
boolean titlebar = true
string title = "Untitled"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_all cb_all
cb_2 cb_2
st_2 st_2
sle_2 sle_2
cb_1 cb_1
sle_1 sle_1
st_1 st_1
dw_1 dw_1
end type
global w_borrow w_borrow

on w_borrow.create
this.cb_all=create cb_all
this.cb_2=create cb_2
this.st_2=create st_2
this.sle_2=create sle_2
this.cb_1=create cb_1
this.sle_1=create sle_1
this.st_1=create st_1
this.dw_1=create dw_1
this.Control[]={this.cb_all,&
this.cb_2,&
this.st_2,&
this.sle_2,&
this.cb_1,&
this.sle_1,&
this.st_1,&
this.dw_1}
end on

on w_borrow.destroy
destroy(this.cb_all)
destroy(this.cb_2)
destroy(this.st_2)
destroy(this.sle_2)
destroy(this.cb_1)
destroy(this.sle_1)
destroy(this.st_1)
destroy(this.dw_1)
end on

type cb_all from commandbutton within w_borrow
integer x = 2327
integer y = 36
integer width = 457
integer height = 128
integer taborder = 20
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "浏览全部"
end type

event clicked;dw_1.SetTransObject(SQLCA)
string null_str

SetNull(null_str)
dw_1.SetFilter("")
dw_1.Filter()
dw_1.retrieve()
end event
type cb_2 from commandbutton within w_borrow
integer x = 1472
integer y = 1120
integer width = 457
integer height = 128
integer taborder = 30
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "借阅图书"
end type

event clicked;integer i
int flag
date borrowdate
string borrowname
string selname
string err

borrowdate=today()
borrowname=sle_2.text

if borrowname="" then
	messagebox("警告:","没有借阅人姓名,不能借出!")
	return;
end if	

for i=1 to dw_1.getrow()
	flag=dw_1.GetItemNumber(i,"flag")

	if IsNull(dw_1.GetItemDate(i,"returndate")) then
	  //如果没有归还日期,说明已借出
	  	err=err + " " + dw_1.GetItemString(i,"number") +"~n"
   else
	 //如果有归还日期,说明在库中
	 //如果选中,将该记录的借阅人,借阅日期,归还日期更改
		if flag=1 then
			selname=dw_1.GetItemString(i,"number")
			UPDATE maindata 
			SET borrowdate = :borrowdate,
				 borrowname =:borrowname,
				 returndate =null
			WHERE number=:selname
			USING SQLCA;
		end if
	end if
next
if err<>"" then
	messagebox("Error","下列图书不能借:~n"  + err)
end if
dw_1.retrieve()
end event

type st_2 from statictext within w_borrow
integer x = 32
integer y = 1152
integer width = 672
integer height = 72
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "输入借阅者的姓名:"
boolean focusrectangle = false
end type

type sle_2 from singlelineedit within w_borrow
integer x = 722
integer y = 1132
integer width = 471
integer height = 116
integer taborder = 20
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type cb_1 from commandbutton within w_borrow
integer x = 1829
integer y = 36
integer width = 375
integer height = 128
integer taborder = 10
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "搜索"
end type

event clicked;string filterStr
string bookname
integer rc

bookname=sle_1.text
filterStr="bookname = '" + bookname + "'"

dw_1.setTransobject(SQLCA)
dw_1.setFilter(filterStr)
dw_1.Filter()
dw_1.Retrieve()

rc=dw_1.getrow()

if rc<=0 then
	messagebox("提示:","没有该书记录!")
	return 1
else
	dw_1.title="书名=" +bookname +"的记录如下:"
end if
end event
type sle_1 from singlelineedit within w_borrow
integer x = 649
integer y = 40
integer width = 1001
integer height = 92
integer taborder = 10
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_1 from statictext within w_borrow
integer x = 101
integer y = 48
integer width = 526
integer height = 72
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "根据书名检索:"
boolean focusrectangle = false
end type

type dw_1 from datawindow within w_borrow
integer x = 59
integer y = 196
integer width = 3904
integer height = 856
integer taborder = 10
boolean titlebar = true
string title = "符合条件的记录如下:"
string dataobject = "d_borrow"
boolean hscrollbar = true
boolean vscrollbar = true
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -