$PBExportHeader$w_pageretr_ch.srw
$PBExportComments$分页选择窗口
forward
global type w_pageretr_ch from w_publ_pageretr
end type
type cb_choice from uo_imflatbutton within w_pageretr_ch
end type
type cb_refresh from uo_imflatbutton within w_pageretr_ch
end type
type ln_bar from line within w_pageretr_ch
end type
type ln_bar2 from line within w_pageretr_ch
end type
type r_bar from rectangle within w_pageretr_ch
end type
type ln_1 from line within w_pageretr_ch
end type
type ln_2 from line within w_pageretr_ch
end type
end forward

global type w_pageretr_ch from w_publ_pageretr
integer width = 2999
integer height = 1916
string title = "翻页选择"
boolean minbox = false
windowtype windowtype = response!
cb_choice cb_choice
cb_refresh cb_refresh
ln_bar ln_bar
ln_bar2 ln_bar2
r_bar r_bar
ln_1 ln_1
ln_2 ln_2
end type
global w_pageretr_ch w_pageretr_ch

on w_pageretr_ch.create
int iCurrent
call super::create
this.cb_choice=create cb_choice
this.cb_refresh=create cb_refresh
this.ln_bar=create ln_bar
this.ln_bar2=create ln_bar2
this.r_bar=create r_bar
this.ln_1=create ln_1
this.ln_2=create ln_2
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.cb_choice
this.Control[iCurrent+2]=this.cb_refresh
this.Control[iCurrent+3]=this.ln_bar
this.Control[iCurrent+4]=this.ln_bar2
this.Control[iCurrent+5]=this.r_bar
this.Control[iCurrent+6]=this.ln_1
this.Control[iCurrent+7]=this.ln_2
end on

on w_pageretr_ch.destroy
call super::destroy
destroy(this.cb_choice)
destroy(this.cb_refresh)
destroy(this.ln_bar)
destroy(this.ln_bar2)
destroy(this.r_bar)
destroy(this.ln_1)
destroy(this.ln_2)
end on

event user_key;call super::user_key;	IF KeyDown(KeyD!) and KeyDown(KeyControl!) THEN 
		if cb_choice.enabled then	cb_choice.TRIGGEREVENT(CLICKED!)
	ELSEIF KeyDown(KeyEnter!) and (KeyDown(KeyControl!) or retrieve_all) THEN 
		if cb_choice.enabled then	cb_choice.TRIGGEREVENT(CLICKED!)
	END IF

end event

event key;this.TRIGGEREVENT('user_key')
end event

event close;//CLOSEWITHRETURN(THIS,<INS_RT_STRU>)
//<INS_RT_STRU> 窗体级子定义结构变量,用于返回
end event

event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,DW_pageretr)
STRING LS_EXPR
LS_EXPR=Message.StringParm	
IF ISNULL(LS_EXPR) THEN LS_EXPR='   '
if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return

DW_pageretr.setsort(LS_EXPR)

DW_pageretr.SetRedraw (false)
DW_pageretr.sort()
DW_pageretr.SetRedraw (true)
end event

event open;call super::open;if_ue_sort=true
end event

event resize;call super::resize;ln_bar.endx = this.width
ln_bar2.endx = this.width
ln_1.endx = this.width
ln_2.endx = this.width
r_bar.width = this.width
end event

type cb_func from w_publ_pageretr`cb_func within w_pageretr_ch
integer x = 151
integer y = 0
integer width = 151
integer height = 164
integer taborder = 110
string normalpicname = "setting.bmp"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

type cb_exit from w_publ_pageretr`cb_exit within w_pageretr_ch
integer x = 453
integer y = 0
integer width = 151
integer height = 164
string text = "取消"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

type sle_usual_query from w_publ_pageretr`sle_usual_query within w_pageretr_ch
integer y = 180
boolean bringtotop = true
end type

type cb_retrieveall from w_publ_pageretr`cb_retrieveall within w_pageretr_ch
integer x = 905
integer width = 151
integer height = 164
boolean bringtotop = true
string normalpicname = "p1.ico"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

type em_pagerowno from w_publ_pageretr`em_pagerowno within w_pageretr_ch
integer x = 603
integer y = 36
integer width = 302
integer height = 96
boolean bringtotop = true
end type

type dw_pageretr from w_publ_pageretr`dw_pageretr within w_pageretr_ch
integer y = 288
integer width = 2935
integer height = 1508
boolean bringtotop = true
boolean titlebar = false
boolean resizable = false
boolean border = true
borderstyle borderstyle = stylelowered!
end type

event dw_pageretr::doubleclicked;call super::doubleclicked;//IF mode=1 AND NOT dw_edit_mode THEN
cb_choice.TRIGGEREVENT(CLICKED!)
//END IF
end event

event dw_pageretr::retrieveend;call super::retrieveend;IF RowCount > 0 THEN
	dw_pageretr.SelectRow(0,FALSE)
	dw_pageretr.SetRow(1)
	dw_pageretr.SelectRow(1,TRUE)
END IF


end event

type st_1 from w_publ_pageretr`st_1 within w_pageretr_ch
integer y = 200
string text = "编码含"
end type

type cb_nextpage from w_publ_pageretr`cb_nextpage within w_pageretr_ch
integer x = 1056
integer width = 78
integer height = 164
string normalpicname = "p4.ico"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

type cb_choice from uo_imflatbutton within w_pageretr_ch
integer x = 302
integer width = 151
integer height = 164
integer taborder = 110
boolean bringtotop = true
string text = "选定"
string normalpicname = "ok.bmp"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

event clicked;call super::clicked;////LONG LS_ROW
////LS_ROW=dw_pageretr.getrow()
////if LS_ROW<=0 then 
////	messagebox('系统提示','请先选择目标行!',StopSign!)
////	return
////end if
//
////INS_RT_STRU.scustid=dw_INDEX.OBJECT.custid[LS_ROW]
////...

////CLOSE(PARENT)
end event

type cb_refresh from uo_imflatbutton within w_pageretr_ch
integer width = 151
integer height = 164
integer taborder = 10
boolean bringtotop = true
string text = "刷新"
string normalpicname = "refresh.bmp"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

event clicked;call super::clicked;PARENT.TRIGGEREVENT("ue_usual_query_RETR")
end event

type ln_bar from line within w_pageretr_ch
long linecolor = 268435456
integer linethickness = 4
integer beginy = 168
integer endx = 2007
integer endy = 168
end type

type ln_bar2 from line within w_pageretr_ch
long linecolor = 16777215
integer linethickness = 4
integer beginy = 172
integer endx = 2039
integer endy = 172
end type

type r_bar from rectangle within w_pageretr_ch
long linecolor = 16777215
integer linethickness = 4
long fillcolor = 1073741824
integer x = 2139
integer width = 146
integer height = 68
end type

event constructor;this.fillcolor = 14215660
this.linecolor = 14215660
this.x = -1
this.y = -1
this.height = ln_bar.beginy - 5

end event

type ln_1 from line within w_pageretr_ch
long linecolor = 268435456
integer linethickness = 4
integer beginy = 280
integer endx = 2016
integer endy = 280
end type

type ln_2 from line within w_pageretr_ch
long linecolor = 16777215
integer linethickness = 4
integer beginy = 284
integer endx = 2048
integer endy = 284
end type

