?? w_borrow.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 = "根據(jù)書名檢索:"
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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -