$PBExportHeader$w_publ_easyq.srw
$PBExportComments$报表窗口
forward
global type w_publ_easyq from w_publ_base
end type
type cb_2 from uo_imflatbutton within w_publ_easyq
end type
type cb_psetup from uo_imflatbutton within w_publ_easyq
end type
type cb_1 from uo_imflatbutton within w_publ_easyq
end type
type st_3 from statictext within w_publ_easyq
end type
type st_4 from statictext within w_publ_easyq
end type
type em_1 from editmask within w_publ_easyq
end type
type em_2 from editmask within w_publ_easyq
end type
type ddlb_yl from dropdownlistbox within w_publ_easyq
end type
type cbx_yl from checkbox within w_publ_easyq
end type
type dw_1 from u_dw_rbtnfilter within w_publ_easyq
end type
type sle_mtrl from singlelineedit within w_publ_easyq
end type
type sle_cust from singlelineedit within w_publ_easyq
end type
type st_mtrl from statictext within w_publ_easyq
end type
type st_cust from statictext within w_publ_easyq
end type
type cbx_loginretr from checkbox within w_publ_easyq
end type
type pb_em1 from picturebutton within w_publ_easyq
end type
type pb_em2 from picturebutton within w_publ_easyq
end type
type pb_2 from picturebutton within w_publ_easyq
end type
type cb_help from uo_imflatbutton within w_publ_easyq
end type
type cb_copyself from uo_imflatbutton within w_publ_easyq
end type
type gb_1 from groupbox within w_publ_easyq
end type
type ln_bar from line within w_publ_easyq
end type
type ln_bar2 from line within w_publ_easyq
end type
type r_bar from rectangle within w_publ_easyq
end type
type ln_1 from line within w_publ_easyq
end type
type ln_2 from line within w_publ_easyq
end type
type ln_3 from line within w_publ_easyq
end type
type ln_4 from line within w_publ_easyq
end type
end forward

global type w_publ_easyq from w_publ_base
integer x = 270
integer y = 136
integer width = 3639
integer height = 2404
string title = "统计表"
boolean maxbox = true
boolean resizable = true
windowstate windowstate = maximized!
event ue_filter ( )
event ue_sort ( )
event ue_sentdataout ( )
event ue_date1 ( )
event ue_date2 ( )
event ue_date3 ( )
event ue_help ( )
event user_key ( )
cb_2 cb_2
cb_psetup cb_psetup
cb_1 cb_1
st_3 st_3
st_4 st_4
em_1 em_1
em_2 em_2
ddlb_yl ddlb_yl
cbx_yl cbx_yl
dw_1 dw_1
sle_mtrl sle_mtrl
sle_cust sle_cust
st_mtrl st_mtrl
st_cust st_cust
cbx_loginretr cbx_loginretr
pb_em1 pb_em1
pb_em2 pb_em2
pb_2 pb_2
cb_help cb_help
cb_copyself cb_copyself
gb_1 gb_1
ln_bar ln_bar
ln_bar2 ln_bar2
r_bar r_bar
ln_1 ln_1
ln_2 ln_2
ln_3 ln_3
ln_4 ln_4
end type
global w_publ_easyq w_publ_easyq

type variables
Boolean if_mdf_title = TRUE
Boolean cb_reol
Boolean if_retrieveing = FALSE //是否正在retrieve

String cur_vspos
Boolean if_power_sendout = true
Boolean if_power_print = true

end variables

forward prototypes
public function integer days_in_month (integer month, integer year)
end prototypes

event ue_filter;call super::ue_filter;OPENWITHPARM(w_filter_query,dw_1)
STRING LS_EXPR
LS_EXPR=Message.StringParm	

if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return

dw_1.setfilter(LS_EXPR)
dw_1.SetRedraw (false)
dw_1.filter()
dw_1.SetRedraw (TRUE)
end event

event ue_sort();OPENwithparm(w_sortrow,DW_1)
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_1.setsort(LS_EXPR)

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

event ue_sentdataout; 
OpenWithParm(w_sentdataout,DW_1)

end event

event ue_date1();//IF THIS.Text = "本日" THEN
	em_1.text = string(today(),"yyyy-mm-dd")
	em_2.text = string(today(),"yyyy-mm-dd")
//ELSEIF THIS.Text = "本周" THEN
//	int li_DayNum
//	li_DayNum =  DayNumber(today())
//	em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
//	em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
//ELSEIF THIS.Text = "本月" THEN
//	int li_Month, li_Year, li_Days
//	li_Month = Month(today())
//	li_Year = Year(today())
//	li_Days = days_in_month(li_Month, li_Year)
//	em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
//	em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
//END IF
end event

event ue_date2();//IF THIS.Text = "本日" THEN
//	em_1.text = string(today(),"yyyy-mm-dd")
//	em_2.text = string(today(),"yyyy-mm-dd")
//ELSEIF THIS.Text = "本周" THEN
	int li_DayNum
	li_DayNum =  DayNumber(today())
	em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
	em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
//ELSEIF THIS.Text = "本月" THEN
//	int li_Month, li_Year, li_Days
//	li_Month = Month(today())
//	li_Year = Year(today())
//	li_Days = days_in_month(li_Month, li_Year)
//	em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
//	em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
//END IF
end event

event ue_date3();//IF THIS.Text = "本日" THEN
//	em_1.text = string(today(),"yyyy-mm-dd")
//	em_2.text = string(today(),"yyyy-mm-dd")
//ELSEIF THIS.Text = "本周" THEN
//	int li_DayNum
//	li_DayNum =  DayNumber(today())
//	em_1.text = string(RelativeDate ( today(), 1 - li_DayNum ),"yyyy-mm-dd")
//	em_2.text = string(RelativeDate ( today(), 7 - li_DayNum ),"yyyy-mm-dd")
//ELSEIF THIS.Text = "本月" THEN
	int li_Month, li_Year, li_Days
	li_Month = Month(today())
	li_Year = Year(today())
	li_Days = days_in_month(li_Month, li_Year)
	em_1.text = string(Date(li_Year, li_Month, 1),"yyyy-mm-dd")
	em_2.text = string(Date(li_Year, li_Month, li_Days),"yyyy-mm-dd")
//END IF
end event

event ue_help();Int i
i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".htm")

end event

event user_key();IF KeyDown(KeyF1!) THEN
	THIS.TriggerEvent('ue_help')
end if
end event

public function integer days_in_month (integer month, integer year);//Most cases are straight forward in that there are a fixed number of 
//days in 11 of the 12 months.  February is, of course, the problem.
//In a leap year February has 29 days, otherwise 28.

Integer		li_DaysInMonth, li_Days[12] = {31,28,31,30,31,30,31,31,30,31,30,31}

// Get the number of days per month for a non leap year.
li_DaysInMonth = li_Days[Month]

// Check for a leap year.
If Month = 2 Then
	// If the year is a leap year, change the number of days.
	// Leap Year Calculation:
	//	Year divisible by 4, but not by 100, unless it is also divisible by 400
	If ( (Mod(Year,4) = 0 And Mod(Year,100) <> 0) Or (Mod(Year,400) = 0) ) Then
		li_DaysInMonth = 29
	End If
End If

//Return the number of days in the relevant month
Return li_DaysInMonth
end function

on w_publ_easyq.create
int iCurrent
call super::create
this.cb_2=create cb_2
this.cb_psetup=create cb_psetup
this.cb_1=create cb_1
this.st_3=create st_3
this.st_4=create st_4
this.em_1=create em_1
this.em_2=create em_2
this.ddlb_yl=create ddlb_yl
this.cbx_yl=create cbx_yl
this.dw_1=create dw_1
this.sle_mtrl=create sle_mtrl
this.sle_cust=create sle_cust
this.st_mtrl=create st_mtrl
this.st_cust=create st_cust
this.cbx_loginretr=create cbx_loginretr
this.pb_em1=create pb_em1
this.pb_em2=create pb_em2
this.pb_2=create pb_2
this.cb_help=create cb_help
this.cb_copyself=create cb_copyself
this.gb_1=create gb_1
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
this.ln_3=create ln_3
this.ln_4=create ln_4
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.cb_2
this.Control[iCurrent+2]=this.cb_psetup
this.Control[iCurrent+3]=this.cb_1
this.Control[iCurrent+4]=this.st_3
this.Control[iCurrent+5]=this.st_4
this.Control[iCurrent+6]=this.em_1
this.Control[iCurrent+7]=this.em_2
this.Control[iCurrent+8]=this.ddlb_yl
this.Control[iCurrent+9]=this.cbx_yl
this.Control[iCurrent+10]=this.dw_1
this.Control[iCurrent+11]=this.sle_mtrl
this.Control[iCurrent+12]=this.sle_cust
this.Control[iCurrent+13]=this.st_mtrl
this.Control[iCurrent+14]=this.st_cust
this.Control[iCurrent+15]=this.cbx_loginretr
this.Control[iCurrent+16]=this.pb_em1
this.Control[iCurrent+17]=this.pb_em2
this.Control[iCurrent+18]=this.pb_2
this.Control[iCurrent+19]=this.cb_help
this.Control[iCurrent+20]=this.cb_copyself
this.Control[iCurrent+21]=this.gb_1
this.Control[iCurrent+22]=this.ln_bar
this.Control[iCurrent+23]=this.ln_bar2
this.Control[iCurrent+24]=this.r_bar
this.Control[iCurrent+25]=this.ln_1
this.Control[iCurrent+26]=this.ln_2
this.Control[iCurrent+27]=this.ln_3
this.Control[iCurrent+28]=this.ln_4
end on

on w_publ_easyq.destroy
call super::destroy
destroy(this.cb_2)
destroy(this.cb_psetup)
destroy(this.cb_1)
destroy(this.st_3)
destroy(this.st_4)
destroy(this.em_1)
destroy(this.em_2)
destroy(this.ddlb_yl)
destroy(this.cbx_yl)
destroy(this.dw_1)
destroy(this.sle_mtrl)
destroy(this.sle_cust)
destroy(this.st_mtrl)
destroy(this.st_cust)
destroy(this.cbx_loginretr)
destroy(this.pb_em1)
destroy(this.pb_em2)
destroy(this.pb_2)
destroy(this.cb_help)
destroy(this.cb_copyself)
destroy(this.gb_1)
destroy(this.ln_bar)
destroy(this.ln_bar2)
destroy(this.r_bar)
destroy(this.ln_1)
destroy(this.ln_2)
destroy(this.ln_3)
destroy(this.ln_4)
end on

event resize;ln_bar.endx = this.width
ln_bar2.endx = this.width
ln_1.endx = this.width
ln_2.endx = this.width
ln_3.endx = this.width
ln_4.endx = this.width
r_bar.width = this.width

dw_1.width=this.width - dw_1.x - 40
dw_1.height=this.height - dw_1.y - 150
end event

event open;call super::open;dw_1.SetTransObject (sqlca)

EM_1.Text = String(Today(),'YYYY-MM-DD')
EM_2.Text = EM_1.Text

dw_1.RBUTTON_FILTER_USE = TRUE //右键查询功能开关

IF Trim(dw_1.DataObject) <> '' THEN
	dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_TOP",   "110"))
	dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_LEFT", "96" ))
	
	dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_BOTTOM",   "110"))
	dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_RIGHT", "96" ))
END IF

//IF cbx_loginretr.Checked THEN
//	cb_1.TriggerEvent(Clicked!)
//END IF

s_edit_index_tran s_tran
s_tran = Message.PowerObjectParm
IF isValid(s_tran) THEN
	if_power_sendout = s_tran.if_sendout 
	if_power_print = s_tran.if_print
END IF


end event

event activate;IF Trim(dw_1.DataObject) <> '' THEN
	IF cbx_yl.Enabled AND cbx_yl.Visible THEN cbx_yl.TriggerEvent(Clicked!)
END IF

end event

event key;call super::key;this.TRIGGEREVENT('USER_KEY')
end event

type cb_func from w_publ_base`cb_func within w_publ_easyq
integer x = 151
integer width = 151
integer height = 164
string normalpicname = "setting.bmp"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

type cb_exit from w_publ_base`cb_exit within w_publ_easyq
integer x = 1115
integer width = 151
integer height = 164
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

type cb_2 from uo_imflatbutton within w_publ_easyq
integer x = 814
integer width = 151
integer height = 164
integer taborder = 90
string text = "打印"
string normalpicname = "print.bmp"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

event clicked;call super::clicked; 

IF DW_1.RowCount() >= 1 THEN
	cbx_YL.Checked = TRUE
	cbx_YL.TriggerEvent(Clicked!)
	OpenWithParm(w_sys_printpagesetting,DW_1)
ELSE
	MessageBox('NO','数据窗口中没有任何记录，不能打印！')
END IF


IF Trim(DW_1.DataObject) = '' THEN RETURN
SetProfileString (sys_inifilename,DW_1.DataObject, "MARGIN_TOP",   String(DW_1.Object.DataWindow.Print.MARGIN.Top))
SetProfileString (sys_inifilename,DW_1.DataObject, "MARGIN_LEFT", String(DW_1.Object.DataWindow.Print.MARGIN.Left))

SetProfileString (sys_inifilename,DW_1.DataObject, "MARGIN_BOTTOM",   String(DW_1.Object.DataWindow.Print.MARGIN.BOTTOM))
SetProfileString (sys_inifilename,DW_1.DataObject, "MARGIN_RIGHT", String(DW_1.Object.DataWindow.Print.MARGIN.Right))



end event

type cb_psetup from uo_imflatbutton within w_publ_easyq
integer x = 558
integer width = 256
integer height = 164
integer taborder = 80
string text = "页面设置"
string normalpicname = "PRINTFLD.BMP"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

event clicked;call super::clicked;s_print_value s_print

s_print.obj_dw = DW_1
s_print.dft_printername = ''

OpenWithParm(w_sys_printpage_value,s_print)



end event

type cb_1 from uo_imflatbutton within w_publ_easyq
integer width = 151
integer height = 164
integer taborder = 40
string text = "刷新"
string normalpicname = "refresh.bmp"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

event clicked;call super::clicked;//DateTime first_date,end_date
//
//first_date = DateTime(Date(em_1.Text),Time(0))
//end_date = DateTime(Date(em_2.Text),Time('23:59:59'))

//String ls_cust_str, ls_mtrl_str
//IF Pos(sle_cust.Text,"%") <> 0 THEN
//	ls_cust_str = trim(sle_cust.Text)
//ELSE
//	ls_cust_str = "%"+trim(sle_cust.Text)+"%"
//END IF
//IF Pos(sle_mtrl.Text,"%") <> 0 THEN
//	ls_mtrl_str = trim(sle_mtrl.Text)
//ELSE
//	ls_mtrl_str = "%"+trim(sle_mtrl.Text)+"%"
//END IF
//dw_1.Retrieve(DATE(EM_1.TEXT),DATE(EM_2.TEXT),ls_cust_str,ls_mtrl_str)
//dw_1.OBJECT.date_mid.TEXT=EM_1.TEXT+'~~'+EM_2.TEXT


end event

type st_3 from statictext within w_publ_easyq
integer x = 18
integer y = 208
integer width = 201
integer height = 60
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
boolean enabled = false
string text = "日期从:"
alignment alignment = right!
boolean focusrectangle = false
end type

type st_4 from statictext within w_publ_easyq
integer x = 727
integer y = 208
integer width = 105
integer height = 60
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 134217739
boolean enabled = false
string text = "到:"
alignment alignment = right!
boolean focusrectangle = false
end type

type em_1 from editmask within w_publ_easyq
integer x = 219
integer y = 192
integer width = 407
integer height = 88
integer taborder = 100
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
maskdatatype maskdatatype = datemask!
string mask = "yyyy-mm-dd"
boolean spin = true
end type

event rbuttondown;s_calender_arg s_calender
s_calender.PointerX = THIS.PointerX()
s_calender.PointerY = THIS.PointerY()
s_calender.X = THIS.X
s_calender.Y = THIS.Y


OpenWithParm(w_calendar,s_calender)
THIS.Text = String(id_date_selected)


end event

type em_2 from editmask within w_publ_easyq
integer x = 832
integer y = 192
integer width = 407
integer height = 88
integer taborder = 110
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
maskdatatype maskdatatype = datemask!
string mask = "yyyy-mm-dd"
boolean spin = true
end type

event rbuttondown;s_calender_arg s_calender
s_calender.PointerX = THIS.PointerX()
s_calender.PointerY = THIS.PointerY()
s_calender.X = THIS.X
s_calender.Y = THIS.Y


OpenWithParm(w_calendar,s_calender)
THIS.Text = String(id_date_selected)


end event

type ddlb_yl from dropdownlistbox within w_publ_easyq
integer x = 1536
integer y = 16
integer width = 261
integer height = 532
integer taborder = 60
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
boolean enabled = false
string text = "适当大小"
boolean vscrollbar = true
string item[] = {"100%","75%","50%","25%","200%","150%"}
borderstyle borderstyle = stylelowered!
end type

event selectionchanged;dw_1.Object.DataWindow.Print.Preview.Zoom	= INTEGER(LEFT(TRIM(this.text),LEN(TRIM(this.text)) - 1))

dw_1.object.DataWindow.Print.Preview = 'yes'

end event

event constructor;if THIS.TotalItems ( )>=1 then THIS.SelectItem(1)
end event

type cbx_yl from checkbox within w_publ_easyq
integer x = 1317
integer y = 20
integer width = 206
integer height = 76
integer taborder = 70
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;ddlb_yl.Enabled = THIS.Checked
IF THIS.Checked THEN
	IF Lower(dw_1.Object.DataWindow.Print.Preview) = 'yes' THEN RETURN
	dw_1.Object.DataWindow.Print.Preview = 'yes'
	dw_1.Object.DataWindow.Print.Preview.Rulers = "yes"
ELSE
	IF Lower(dw_1.Object.DataWindow.Print.Preview) = 'no' THEN RETURN
	dw_1.Object.DataWindow.Print.Preview = 'NO'
END IF


end event

event constructor;THIS.BackColor = 14215660

end event

type dw_1 from u_dw_rbtnfilter within w_publ_easyq
integer y = 412
integer width = 3538
integer height = 1820
boolean bringtotop = true
boolean hscrollbar = true
boolean vscrollbar = true
boolean hsplitscroll = true
boolean rbutton_filter_use = true
boolean rbutton_setposition_use = true
boolean titleclick_sort_use = true
end type

event constructor;call super::constructor; titleclick_sort_use=true  //单击标题排序功能开关
 RBUTTON_FILTER_USE=true  //右键查询功能开关

end event

event retrievestart;call super::retrievestart;cb_reol = cb_1.Enabled
cb_1.Enabled = FALSE
if_retrieveing = TRUE

cur_vspos = THIS.Describe("DataWindow.VerticalScrollPosition")

end event

event retrieveend;call super::retrieveend;cb_1.Enabled = cb_reol
if_retrieveing = FALSE

IF Dec(cur_vspos) > 0 THEN
	THIS.Modify("DataWindow.VerticalScrollPosition="+cur_vspos)
END IF

end event

event doubleclicked;call super::doubleclicked;if  if_mdf_title then
if LOWER(LEFT(dwo.type,4))='text'  then
 s_inputbox S_SREU
 STRING LS_STR,column_name
 S_SREU.TITLE='目前标题为: '+dwo.TEXT+' 。请输入新标题: '
 S_SREU.OLD_TEXT=dwo.TEXT
 column_name=DWO.NAME

	openwithparm(w_inputbox,S_SREU)
	LS_STR=Message.StringParm
	if trim(LS_STR)<>'' AND dwo.TEXT<>LS_STR then
 		THIS.Modify(column_name+'.text="'+LS_STR+'"')
	END IF

end if
end if
end event

event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
	THIS.SelectRow(0,FALSE)
	THIS.SelectRow(currentrow,TRUE)
END IF
end event

event dwnkey;call super::dwnkey;PARENT.TRIGGEREVENT('USER_KEY')
end event

type sle_mtrl from singlelineedit within w_publ_easyq
boolean visible = false
integer x = 1637
integer y = 308
integer width = 677
integer height = 84
integer taborder = 120
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type sle_cust from singlelineedit within w_publ_easyq
boolean visible = false
integer x = 475
integer y = 308
integer width = 677
integer height = 84
integer taborder = 130
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
borderstyle borderstyle = stylelowered!
end type

type st_mtrl from statictext within w_publ_easyq
boolean visible = false
integer x = 1179
integer y = 324
integer width = 453
integer height = 48
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 = "物料编码/名称含:"
alignment alignment = right!
boolean focusrectangle = false
end type

type st_cust from statictext within w_publ_easyq
boolean visible = false
integer x = 14
integer y = 324
integer width = 453
integer height = 48
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 = "客户编号/名称含:"
boolean focusrectangle = false
end type

type cbx_loginretr from checkbox within w_publ_easyq
string tag = "此项勾选时,报表打开自动按缺省条件刷新数据,但会耗费系统资源[建议不勾选]"
boolean visible = false
integer x = 1317
integer y = 104
integer width = 521
integer height = 60
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 = "报表打开自动刷新"
boolean checked = true
end type

event clicked;Long ll_loginretr
IF THIS.Checked THEN
	ll_loginretr = 1
ELSE
	ll_loginretr = 0
END IF
SetProfileString(sys_inifilename,DW_1.DataObject, "LOGIN_RETRIEVE", String(ll_loginretr))

end event

event constructor;THIS.BackColor = 14215660

Int ll_loginretr
ll_loginretr = Integer(ProfileString(sys_inifilename,DW_1.DataObject, "LOGIN_RETRIEVE",   "1"))
IF ll_loginretr = 1 THEN
	THIS.Checked = TRUE
ELSE
	THIS.Checked = FALSE
END IF


end event

type pb_em1 from picturebutton within w_publ_easyq
integer x = 635
integer y = 192
integer width = 101
integer height = 92
integer taborder = 120
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "date.BMP"
alignment htextalign = left!
end type

event clicked;em_1.triggerevent(rbuttondown!)
end event

type pb_em2 from picturebutton within w_publ_easyq
integer x = 1248
integer y = 192
integer width = 101
integer height = 92
integer taborder = 110
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "date.BMP"
alignment htextalign = left!
end type

event clicked;em_2.triggerevent(rbuttondown!)
end event

type pb_2 from picturebutton within w_publ_easyq
integer x = 1358
integer y = 192
integer width = 101
integer height = 92
integer taborder = 120
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "date1.BMP"
alignment htextalign = left!
end type

event clicked;m_Dfc_Control_PopupMenu dmPopupMenu
string menustr


menustr="Text=本日~tEvent=ue_date1"
menustr = menustr + "|" + "Text=本周~tEvent=ue_date2"
menustr = menustr + "|" + "Text=本月~tEvent=ue_date3"
	
if len(trim(menustr))<>0 then
	dmPopupMenu = Create m_Dfc_Control_PopupMenu
	dmPopupMenu.mf_BuildMenu(This, menustr)
	dmPopupMenu.mf_PopMenu()
	Destroy dmPopupMenu
end if
end event

type cb_help from uo_imflatbutton within w_publ_easyq
integer x = 965
integer width = 151
integer height = 164
integer taborder = 20
boolean bringtotop = true
string text = "帮助"
string normalpicname = "help.bmp"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

event clicked;call super::clicked;PARENT.TriggerEvent('ue_help')

end event

type cb_copyself from uo_imflatbutton within w_publ_easyq
integer x = 302
integer width = 256
integer height = 164
integer taborder = 30
boolean bringtotop = true
string text = "打开副本"
string normalpicname = "COPY.BMP"
integer picsize = 16
toolbaralignment pic_align = alignattop!
boolean border = false
end type

event clicked;call super::clicked;window lw_win
s_edit_index_tran s_rpinfo
s_rpinfo.if_sendout = if_power_sendout
s_rpinfo.if_print = if_power_print
OpenWithParm(lw_win,s_rpinfo,PARENT.ClassName())
lw_win.WindowState = Normal!

end event

type gb_1 from groupbox within w_publ_easyq
boolean visible = false
integer x = 357
integer y = 524
integer width = 1125
integer height = 148
integer taborder = 80
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 15793151
end type

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

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

type r_bar from rectangle within w_publ_easyq
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_publ_easyq
long linecolor = 268435456
integer linethickness = 4
integer beginy = 292
integer endx = 2016
integer endy = 292
end type

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

type ln_3 from line within w_publ_easyq
long linecolor = 268435456
integer linethickness = 4
integer beginy = 404
integer endx = 2016
integer endy = 404
end type

type ln_4 from line within w_publ_easyq
long linecolor = 16777215
integer linethickness = 4
integer beginy = 408
integer endx = 2048
integer endy = 408
end type

