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

📄 w_return.srw

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

global type w_return from window
integer width = 2843
integer height = 1488
boolean titlebar = true
string title = "图书归还界面"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_2 cb_2
dw_1 dw_1
cb_1 cb_1
sle_name sle_name
st_1 st_1
end type
global w_return w_return

on w_return.create
this.cb_2=create cb_2
this.dw_1=create dw_1
this.cb_1=create cb_1
this.sle_name=create sle_name
this.st_1=create st_1
this.Control[]={this.cb_2,&
this.dw_1,&
this.cb_1,&
this.sle_name,&
this.st_1}
end on

on w_return.destroy
destroy(this.cb_2)
destroy(this.dw_1)
destroy(this.cb_1)
destroy(this.sle_name)
destroy(this.st_1)
end on

type cb_2 from commandbutton within w_return
integer x = 1413
integer y = 1196
integer width = 576
integer height = 132
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;int i
int flag
date returndate
string BookNo

returndate=today()

for i=1 to dw_1.getrow()
	flag=dw_1.GetItemNumber(i,"flag")
	//如果选中,将条记录的归还日期更改
	if flag=1 then
		BookNo=dw_1.GetItemString(i,"number")
		UPDATE maindata 
		SET returndate = :returndate,
			 borrowname=null
		WHERE number=:BookNo
		USING SQLCA;
	end if
next
messagebox("提示:","归还图书操作成功!")
dw_1.retrieve()
end event
type dw_1 from datawindow within w_return
integer x = 46
integer y = 292
integer width = 2734
integer height = 840
integer taborder = 20
boolean titlebar = true
string title = "选中你要归还的图书"
string dataobject = "d_return"
boolean hscrollbar = true
boolean vscrollbar = true
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

type cb_1 from commandbutton within w_return
integer x = 901
integer y = 96
integer width = 750
integer height = 108
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;string filterStr
string name
integer rc
name=sle_name.text
//filterStr="lendname = '" + name + "' and IsNull(lenddate)"
filterStr="borrowname = '" + name + "' and IsNull(returndate)"
dw_1.setTransobject(SQLCA)
dw_1.setFilter(filterStr)
dw_1.Filter()
dw_1.Retrieve()

rc=dw_1.getrow()
if rc<=0 then
	messagebox("提示:","没有 姓名="+name+" 的借书记录!")
	return 1
else
  dw_1.title="此人借书记录如下(共"+string(rc)+"):"  
end if	
end event
type sle_name from singlelineedit within w_return
integer x = 279
integer y = 100
integer width = 489
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_return
integer x = 82
integer y = 108
integer width = 183
integer height = 92
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

⌨️ 快捷键说明

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