$PBExportHeader$w_publ_input_num.srw
forward
global type w_publ_input_num from w_publ_base
end type
type cb_add from uo_imflatbutton within w_publ_input_num
end type
type cb_repl from uo_imflatbutton within w_publ_input_num
end type
type cbx_else from checkbox within w_publ_input_num
end type
type ddlb_op from dropdownlistbox within w_publ_input_num
end type
type sle_nr from editmask within w_publ_input_num
end type
type ddlb_opa from dropdownlistbox within w_publ_input_num
end type
type ddlb_opb from dropdownlistbox within w_publ_input_num
end type
type sle_nre from editmask within w_publ_input_num
end type
type cbx_area from checkbox within w_publ_input_num
end type
end forward

global type w_publ_input_num from w_publ_base
integer x = 407
integer y = 224
integer width = 1358
integer height = 352
string title = "请填入补充内容"
boolean minbox = false
windowtype windowtype = response!
cb_add cb_add
cb_repl cb_repl
cbx_else cbx_else
ddlb_op ddlb_op
sle_nr sle_nr
ddlb_opa ddlb_opa
ddlb_opb ddlb_opb
sle_nre sle_nre
cbx_area cbx_area
end type
global w_publ_input_num w_publ_input_num

type variables

string cur_filter_expr
 //当前FILTER表达式

string cur_filter_expr_INCHA 
//当前FILTER表达式中文表示
s_esq_tran ls_esq_tran
//返回结构

INT SHORTHEIGHT=336,LONGHEIGHT=1000
end variables

on w_publ_input_num.create
int iCurrent
call super::create
this.cb_add=create cb_add
this.cb_repl=create cb_repl
this.cbx_else=create cbx_else
this.ddlb_op=create ddlb_op
this.sle_nr=create sle_nr
this.ddlb_opa=create ddlb_opa
this.ddlb_opb=create ddlb_opb
this.sle_nre=create sle_nre
this.cbx_area=create cbx_area
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.cb_add
this.Control[iCurrent+2]=this.cb_repl
this.Control[iCurrent+3]=this.cbx_else
this.Control[iCurrent+4]=this.ddlb_op
this.Control[iCurrent+5]=this.sle_nr
this.Control[iCurrent+6]=this.ddlb_opa
this.Control[iCurrent+7]=this.ddlb_opb
this.Control[iCurrent+8]=this.sle_nre
this.Control[iCurrent+9]=this.cbx_area
end on

on w_publ_input_num.destroy
call super::destroy
destroy(this.cb_add)
destroy(this.cb_repl)
destroy(this.cbx_else)
destroy(this.ddlb_op)
destroy(this.sle_nr)
destroy(this.ddlb_opa)
destroy(this.ddlb_opb)
destroy(this.sle_nre)
destroy(this.cbx_area)
end on

event open;call super::open;ls_esq_tran=Message.PowerObjectParm	
this.title='查询项目: '+ls_esq_tran.title 
sle_nr.text=ls_esq_tran.cur_data
cur_filter_expr=ls_esq_tran.cur_filter_expr
cur_filter_expr_INCHA=ls_esq_tran.cur_filter_expr_INCHA
//THIS.HEIGHT=SHORTHEIGHT


environment   exerun_env
GetEnvironment(exerun_env ) 

this.x=ls_esq_tran.x - 200
this.y=ls_esq_tran.y - 130
if this.x < 0 then this.x=0
if this.y < 0 then this.y=0
if this.x > PixelsToUnits(exerun_env.screenwidth, XPixelsToUnits!) - this.Width then this.x = PixelsToUnits(exerun_env.screenwidth, XPixelsToUnits!) - this.Width
if this.y > PixelsToUnits(exerun_env.screenheight, yPixelsToUnits!) - this.HeighT then this.y = PixelsToUnits(exerun_env.screenheight, yPixelsToUnits!) - this.HeighT

ls_esq_tran.return_flag=0

sle_nr.text=string(ls_esq_tran.num_data)
sle_nr.SelectText(1,len(sle_nr.text))

sle_nre.text=string(ls_esq_tran.num_data)
end event

event close;CloseWithReturn(THIS,ls_esq_tran)
end event

event rbuttondown;call super::rbuttondown;cb_exit.triggerEvent(clicked!)
end event

type cb_func from w_publ_base`cb_func within w_publ_input_num
boolean visible = false
integer x = 1289
integer y = 348
integer taborder = 40
boolean enabled = false
end type

type cb_exit from w_publ_base`cb_exit within w_publ_input_num
integer x = 855
integer y = 144
integer width = 325
integer taborder = 30
string text = "取消"
end type

type cb_add from uo_imflatbutton within w_publ_input_num
integer x = 457
integer y = 144
integer width = 325
integer height = 96
integer taborder = 60
string text = "增加条件"
end type

event clicked;call super::clicked;ls_esq_tran.num_data = Dec(sle_nr.Text)

IF cbx_area.Checked THEN
	ls_esq_tran.comp_op = ddlb_opa.Text
ELSE
	ls_esq_tran.comp_op = ddlb_op.Text
END IF

ls_esq_tran.ELSE_BOOLEAN = cbx_else.Checked
ls_esq_tran.return_flag = 1

ls_esq_tran.if_area = cbx_area.Checked
ls_esq_tran.num_datab = Dec(sle_nre.Text)
ls_esq_tran.comp_opb = ddlb_opb.Text
Close(parent)
end event

type cb_repl from uo_imflatbutton within w_publ_input_num
integer x = 59
integer y = 144
integer width = 325
integer height = 96
integer taborder = 20
string text = "重新查询"
boolean default = true
end type

event clicked;call super::clicked;ls_esq_tran.num_data = Dec(sle_nr.Text)

IF cbx_area.Checked THEN
	ls_esq_tran.comp_op = ddlb_opa.Text
ELSE
	ls_esq_tran.comp_op = ddlb_op.Text
END IF

ls_esq_tran.ELSE_BOOLEAN = cbx_else.Checked
ls_esq_tran.return_flag = 2

ls_esq_tran.if_area = cbx_area.Checked
ls_esq_tran.num_datab = Dec(sle_nre.Text)
ls_esq_tran.comp_opb = ddlb_opb.Text

Close(PARENT)

end event

type cbx_else from checkbox within w_publ_input_num
integer x = 1097
integer width = 224
integer height = 76
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "除外"
end type

type ddlb_op from dropdownlistbox within w_publ_input_num
integer x = 73
integer y = 20
integer width = 265
integer height = 440
integer taborder = 50
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
string text = "="
boolean sorted = false
boolean hscrollbar = true
string item[] = {"=",">",">=","<","<="}
borderstyle borderstyle = stylelowered!
end type

type sle_nr from editmask within w_publ_input_num
integer x = 379
integer y = 16
integer width = 663
integer height = 88
integer taborder = 10
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
alignment alignment = right!
borderstyle borderstyle = stylelowered!
string mask = "#########0.##########"
end type

type ddlb_opa from dropdownlistbox within w_publ_input_num
boolean visible = false
integer x = 73
integer y = 20
integer width = 265
integer height = 440
integer taborder = 60
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
string text = ">="
boolean sorted = false
boolean hscrollbar = true
string item[] = {">=",">"}
borderstyle borderstyle = stylelowered!
end type

type ddlb_opb from dropdownlistbox within w_publ_input_num
boolean visible = false
integer x = 73
integer y = 136
integer width = 265
integer height = 440
integer taborder = 70
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
string text = "<="
boolean sorted = false
boolean hscrollbar = true
string item[] = {"<=","<"}
borderstyle borderstyle = stylelowered!
end type

type sle_nre from editmask within w_publ_input_num
boolean visible = false
integer x = 379
integer y = 132
integer width = 663
integer height = 88
integer taborder = 10
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
alignment alignment = right!
borderstyle borderstyle = stylelowered!
string mask = "#########0.##########"
end type

type cbx_area from checkbox within w_publ_input_num
integer x = 1097
integer y = 64
integer width = 224
integer height = 76
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
string text = "范围"
end type

event clicked;IF THIS.Checked THEN
	PARENT.Height = 470
	cb_repl.Y = 234
	cb_add.Y = 234
	cb_exit.Y = 234
	ddlb_op.visible = false
	ddlb_opa.visible = true
	ddlb_opb.visible = true
	sle_nre.visible = true	
ELSE
	PARENT.Height = 380
	cb_repl.Y = 144
	cb_add.Y = 144
	cb_exit.Y = 144
	ddlb_op.visible = true
	ddlb_opa.visible = false
	ddlb_opb.visible = false
	sle_nre.visible = false
END IF

end event

