12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583 |
- $PBExportHeader$w_publ_edit_index.srw
- $PBExportComments$定义窗口
- forward
- global type w_publ_edit_index from w_publ_base
- end type
- type sle_usual_query from u_sleedit within w_publ_edit_index
- end type
- type cb_nextpage from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_priorpage from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_firstpage from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_retrieveall from uo_imflatbutton within w_publ_edit_index
- end type
- type em_pagerowno from editmask within w_publ_edit_index
- end type
- type st_pagerowno from statictext within w_publ_edit_index
- end type
- type st_1 from statictext within w_publ_edit_index
- end type
- type cb_add from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_edit from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_delet from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_choice from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_cancel from uo_imflatbutton within w_publ_edit_index
- end type
- type cbx_mlselect from checkbox within w_publ_edit_index
- end type
- type cbx_allselect from checkbox within w_publ_edit_index
- end type
- type cb_mode_itfchg_b from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_mode_itfchg from uo_imflatbutton within w_publ_edit_index
- end type
- type gb_1 from groupbox within w_publ_edit_index
- end type
- type dw_uc from datawindow within w_publ_edit_index
- end type
- type cb_retrieve from uo_imflatbutton within w_publ_edit_index
- end type
- type cb_print from uo_imflatbutton within w_publ_edit_index
- end type
- type ln_bar from line within w_publ_edit_index
- end type
- type ln_bar2 from line within w_publ_edit_index
- end type
- type r_bar from rectangle within w_publ_edit_index
- end type
- type ln_1 from line within w_publ_edit_index
- end type
- type ln_2 from line within w_publ_edit_index
- end type
- type dw_index from u_dw_rbtnfilter within w_publ_edit_index
- end type
- type cb_help from uo_imflatbutton within w_publ_edit_index
- end type
- end forward
- global type w_publ_edit_index from w_publ_base
- integer width = 2926
- integer height = 1784
- string title = "编缉"
- boolean minbox = false
- windowtype windowtype = response!
- event ue_usual_query_filt ( )
- event ue_usual_query_retr ( )
- event user_key ( )
- event retrieve_uc ( )
- event ue_mode_itfchg ( )
- event refresh_interface ( )
- event ue_help ( )
- event ue_page1 ( )
- event ue_page2 ( )
- event ue_page3 ( )
- event ue_page4 ( )
- sle_usual_query sle_usual_query
- cb_nextpage cb_nextpage
- cb_priorpage cb_priorpage
- cb_firstpage cb_firstpage
- cb_retrieveall cb_retrieveall
- em_pagerowno em_pagerowno
- st_pagerowno st_pagerowno
- st_1 st_1
- cb_add cb_add
- cb_edit cb_edit
- cb_delet cb_delet
- cb_choice cb_choice
- cb_cancel cb_cancel
- cbx_mlselect cbx_mlselect
- cbx_allselect cbx_allselect
- cb_mode_itfchg_b cb_mode_itfchg_b
- cb_mode_itfchg cb_mode_itfchg
- gb_1 gb_1
- dw_uc dw_uc
- cb_retrieve cb_retrieve
- cb_print cb_print
- ln_bar ln_bar
- ln_bar2 ln_bar2
- r_bar r_bar
- ln_1 ln_1
- ln_2 ln_2
- dw_index dw_index
- cb_help cb_help
- end type
- global w_publ_edit_index w_publ_edit_index
- type variables
- boolean ls_update_flag=true
- long modifyrow_no=0,crl_row //当前行记录
- s_edit_tran para_obj //环境信息用于查询
- string keyword_string //关键字 未用
- date first_date //查询开始日
- date end_date //查询结束日,比表达日后一天
- int child_column_int //明细dw锁定列数
- string ins_sqlerrtext
- boolean if_retrieveing=false
- datastore ds_curquery //缓存查询条件
- string ori_oldselect //保存原始select
- string ls_newselect //保存加入查询条件后的select
- string pkcolumndbtname //pk列数据库中列名
- long onepage_rowlmno=100 //页行最大行数
- boolean retrieve_all=false //是否全部retrieve(不分页)
- int mode=0 //工作模式:0-编辑 1-带字符串参数预选择的选择/编辑
- long arg_pkid //目标定位id //备用
- string arg_string_code //默认常用查询内容
- string old_title=''
- int retrmode=0 // 0 retrieve all;1 first page ;2 prior page;3 next page;4 last page
- boolean if_select_all=false
- boolean if_changeselect=true
- int if_mlselect=0
- end variables
- forward prototypes
- public function integer wf_editindex_lockf ()
- public function integer wf_retrieveuc (datawindow arg_dw, string arg_newselect, integer arg_retrmode)
- public function string wf_get_pkcolumndbtname (datawindow arg_dw)
- public function integer wf_index_uc ()
- public function integer wf_face_change ()
- public function window getparentwin ()
- end prototypes
- event ue_usual_query_filt();//if dw_edit_mode or keydown(keyf4!) or keydown(keyf5!) then return
- //string obj_expr=''
- //if trim(sle_usual_query.text)<>'' then
- // if pos(trim(sle_usual_query.text),'%')=0 then
- // obj_expr=obj_expr+'( name like "%'+trim(sle_usual_query.text)+'%" )'
- // else
- // obj_expr=obj_expr+'( name like "'+trim(sle_usual_query.text)+'" )'
- // end if
- //end if
- //
- //dw_uc.setfilter(obj_expr)
- //
- //dw_uc.setredraw(false)
- //dw_index.setredraw(false)
- //dw_uc.filter()
- //if dw_index.rowcount()>=1 then
- // dw_index.selectrow(0,false)
- // dw_index.selectrow(1,true)
- //end if
- //dw_uc.setredraw(true)
- //dw_index.setredraw(true)
- end event
- event ue_usual_query_retr();//if dw_edit_mode or keydown(keyf4!) or keydown(keyf5!) then return
- //string ls_querystrpart=''
- //ls_newselect=lower(ori_oldselect)
- //if trim(sle_usual_query.text)<>'' then
- // if pos(trim(sle_usual_query.text),'%')=0 then
- // ls_querystrpart=ls_querystrpart + "(name like '%"+trim(sle_usual_query.text)+"%')"
- // else
- // ls_querystrpart=ls_querystrpart + "(name like '"+trim(sle_usual_query.text)+"')"
- // end if
- //
- // if pos(ls_newselect," where ") <> 0 then
- // ls_newselect=ls_newselect+" and ("+ls_querystrpart+')'
- // else
- // ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
- // end if
- //end if
- // wf_retrieveuc(dw_uc,ls_newselect,1)
- //this.triggerevent('retrieve_uc') //注意必须有此句
- end event
- event user_key();if keydown(Keypageup!) then
- if cb_priorpage.enabled then cb_priorpage.triggerevent(clicked!)
- elseif keydown(Keypagedown!) then
- if cb_nextpage.enabled then cb_nextpage.triggerevent(clicked!)
- elseif keydown(Keyenter!) and keydown(keycontrol!) then
- if mode = 1 and not dw_edit_mode and cb_choice.enabled then cb_choice.triggerevent(clicked!)
- end if
- if keydown(keyshift!) then
- if cbx_mlselect.visible then
- cbx_mlselect.checked = not cbx_mlselect.checked
- cbx_mlselect.triggerevent(clicked!)
- end if
- end if
- if keydown(keycontrol!) and keydown(keya!) then
- if cbx_allselect.visible and cbx_allselect.enabled then
- cbx_allselect.checked = not cbx_allselect.checked
- cbx_allselect.triggerevent(clicked!)
- end if
- end if
- end event
- event retrieve_uc();boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
- boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
- cb_firstpage_enabled=cb_firstpage.enabled
- cb_nextpage_enabled=cb_nextpage.enabled
- cb_retrieveall_enabled=cb_retrieveall.enabled
- cb_priorpage_enabled=cb_priorpage.enabled
- cb_func_enabled=cb_func.enabled
- cb_retrieve_enabled=cb_retrieve.enabled
- cb_firstpage.enabled=false
- cb_nextpage.enabled=false
- cb_retrieveall.enabled=false
- cb_priorpage.enabled=false
- cb_func.enabled=false
- cb_retrieve.enabled=false
- dw_UC.setredraw(false)
- dw_index.ShareDataOff()
- SetPointer(HourGlass!)
- dw_UC.retrieve()
- SetPointer(Arrow!)
- dw_uc.sharedata(dw_index)
- dw_UC.setredraw(true)
- if dw_index.rowcount()>=1 then
- dw_index.selectrow(0,false)
- dw_index.selectrow(1,true)
- end if
- cb_firstpage.enabled=cb_firstpage_enabled
- cb_nextpage.enabled=cb_nextpage_enabled
- cb_retrieveall.enabled=cb_retrieveall_enabled
- cb_priorpage.enabled=cb_priorpage_enabled
- cb_func.enabled=cb_func_enabled
- cb_retrieve.enabled=cb_retrieve_enabled
- end event
- event ue_mode_itfchg();//因工作模式(选择\非选择)改变界面布局
- IF mode = 1 THEN
- // IF cb_mode_itfchg.Text = '<<' THEN
- // cb_add.Enabled = FALSE
- // cb_delet.Enabled = FALSE
- // cb_edit.Enabled = FALSE
-
- // cb_choice.Enabled = TRUE
-
-
- // IF if_select_all THEN
- // cbx_mlselect.Visible = TRUE
- // cbx_allselect.Visible = TRUE
- // ELSE
- // cbx_mlselect.Visible = FALSE
- // cbx_allselect.Visible = FALSE
- // END IF
- // ELSE
- // cb_add.Enabled = TRUE
- // cb_delet.Enabled = TRUE
- // cb_edit.Enabled = TRUE
-
- // cb_choice.Enabled = FALSE
-
- // cbx_mlselect.Visible = FALSE
- // cbx_allselect.Visible = FALSE
- // IF if_select_all THEN
- // cbx_mlselect.Checked = FALSE
- // cbx_mlselect.TriggerEvent(Clicked!)
- // END IF
- // END IF
- END IF
- end event
- event ue_help();Int i
- i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".html")
- end event
- event ue_page1();wf_retrieveuc(dw_uc,ls_newselect,1)
- this.triggerevent('retrieve_uc')
- end event
- event ue_page2();wf_retrieveuc(dw_uc,ls_newselect,2)
- this.triggerevent('retrieve_uc')
- end event
- event ue_page3();wf_retrieveuc(dw_uc,ls_newselect,3)
- this.triggerevent('retrieve_uc')
- end event
- event ue_page4();wf_retrieveuc(dw_uc,ls_newselect,4)
- THIS.TriggerEvent('RETRIEVE_pageretr')
- end event
- public function integer wf_editindex_lockf ();//wf_editindex_lockf
- if retrieve_all or dw_edit_mode then
- cb_firstpage.enabled=false
- cb_nextpage.enabled=false
- cb_priorpage.enabled=false
- cb_retrieveall.enabled=false
- em_pagerowno.enabled=false
- Else
- cb_firstpage.enabled=true
- cb_nextpage.enabled=true
- cb_priorpage.enabled=true
- cb_retrieveall.enabled=TRUE
- em_pagerowno.enabled=true
- end if
- IF dw_edit_mode THEN
- sle_usual_query.enabled=false
- cb_func.enabled=FALSE
- ELSE
- sle_usual_query.enabled=TRUE
- cb_func.enabled=TRUE
- END IF
- return 1
- end function
- public function integer wf_retrieveuc (datawindow arg_dw, string arg_newselect, integer arg_retrmode);//====================================================================
- // Function: wf_retrieveuc()
- //--------------------------------------------------------------------
- // Description: 分页拼retr语句
- //--------------------------------------------------------------------
- // Arguments:
- // integer arg_retrmode: 0 retrieve all;1 first page ;2 prior page;3 next page;4 last page
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2003.10.17
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- //取得当前的最大\最小ID
- //按上下翻页命令,拼接最新SELECT语句
- retrmode=arg_retrmode
- IF arg_retrmode=0 or retrieve_all THEN
- arg_dw.Modify("datawindow.table.select = ~"" + arg_newselect+ "~"")
- GOTO EXT
- END IF
- string cur_page_newselect,ls_pkcolname,LS_PAGE_ter=''
- cur_page_newselect=lower(trim(arg_newselect))
- LONG MAX_ID=0,MIN_ID=0,LS_I,ls_id
- ls_pkcolname=arg_dw.Describe("#1.name") //取得ID列名称
- if arg_retrmode<>1 then
- MAX_ID=0
- Min_ID=0
- FOR LS_I=1 TO arg_dw.ROWCOUNT()
- ls_id=arg_dw.GetItemNumber(ls_i, ls_pkcolname)
- if LS_I=1 then
- MAX_ID=ls_id
- Min_ID=ls_id
- end if
- if not isnull(ls_id) then
- if MAX_ID<ls_id then MAX_ID=ls_id
- if Min_ID>ls_id then Min_ID=ls_id
- end if
- NEXT
- FOR LS_I=1 TO arg_dw.FilteredCount()
- ls_id=arg_dw.GetItemNumber(ls_i, ls_pkcolname,filter!,true)
- if LS_I=1 and MAX_ID=0 and Min_ID=0 then
- MAX_ID=ls_id
- Min_ID=ls_id
- end if
- if not isnull(ls_id) then
- if MAX_ID<ls_id then MAX_ID=ls_id
- if Min_ID>ls_id then Min_ID=ls_id
- end if
- NEXT
- end if
- cur_page_newselect=trim(cur_page_newselect)
- IF not (retrieve_all or retrmode=0) then
- cur_page_newselect='select top '+string(onepage_rowlmno)+' '+mid( cur_page_newselect , 8)
- end if
- CHOOSE CASE arg_retrmode
- CASE 1 //第一页
- LS_PAGE_ter=''
- CASE 2 //上一页
- LS_PAGE_ter=pkcolumndbtname+'>'+STRING(MAX_ID)
- CASE 3 //下一页
- LS_PAGE_ter=pkcolumndbtname+'<'+STRING(Min_ID)
- CASE 4 //末页
- LS_PAGE_ter=''
- END CHOOSE
- IF TRIM(LS_PAGE_ter)<>'' THEN
- if Pos(cur_page_newselect," where ") <> 0 then
- cur_page_newselect=cur_page_newselect+" AND ("+LS_PAGE_ter+')'
- else
- cur_page_newselect=cur_page_newselect+" WHERE ("+LS_PAGE_ter+')'
- end if
- END IF
- IF arg_retrmode=2 or arg_retrmode=4 THEN
- cur_page_newselect=cur_page_newselect+' ORDER BY '+pkcolumndbtname
- ELSE
- cur_page_newselect=cur_page_newselect+' ORDER BY '+pkcolumndbtname+' DESC'
- END IF
- arg_dw.Modify("datawindow.table.select = ~"" + cur_page_newselect+ "~"")
- EXT:
- RETURN 1
- end function
- public function string wf_get_pkcolumndbtname (datawindow arg_dw);//====================================================================
- // Function: wf_get_pkcolumndbtname()
- //--------------------------------------------------------------------
- // Description:取第一列为关键字
- //--------------------------------------------------------------------
- // Arguments:(None)
- //--------------------------------------------------------------------
- // Returns: string
- //--------------------------------------------------------------------
- // Author: yyx Date: 2003.10.17
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- string ls_pkcolumndbtname,ls_str,tmp_oldselect
- long l_pos
- ls_pkcolumndbtname=arg_dw.Describe("#1.dbname")
- if pos(ls_pkcolumndbtname,'.')<=0 then
- tmp_oldselect=trim(arg_dw.Describe("DataWindow.Table.Select"))
- ls_str=mid(tmp_oldselect,8)
- if pos(ls_str,'.')>pos(ls_str,',') then
- goto ext
- else
- ls_pkcolumndbtname=left(ls_str,pos(ls_str,',') - 1)
- end if
- end if
-
- ext:
- return ls_pkcolumndbtname
- end function
- public function integer wf_index_uc ();//WF_INDEX_UC
- LONG LS_LONG
- LS_LONG=DW_UC.GETROW()
- dw_index.SETROW(LS_LONG)
- dw_index.ScrollToRow(LS_LONG)
- dw_index.selectrow(0,false)
- dw_index.selectrow(LS_LONG,true)
- RETURN 0
- end function
- public function integer wf_face_change ();if dw_edit_mode then
- cb_func.enabled = false
- cb_retrieve.enabled = false
- cb_delet.enabled = false
- cb_print.enabled = false
- cb_choice.Enabled = FALSE
- sle_usual_query.Enabled = FALSE
-
- cb_edit.text = "放弃&E"
- cb_add.text = "保存&S"
- cb_edit.normalpicname = 'Undo.bmp'
- cb_add.normalpicname = 'Save.bmp'
- else
-
- cb_retrieve.enabled = true
- cb_delet.enabled = true
- cb_print.enabled = true
- cb_func.enabled = true
-
- sle_usual_query.Enabled = TRUE
- IF mode = 1 THEN
- cb_choice.Enabled = TRUE
- ELSE
-
- cb_choice.Enabled = FALSE
- END IF
-
- cb_edit.text = "修改&E"
- cb_add.text = "新建&S"
- cb_edit.normalpicname = 'OPEN.bmp'
- cb_add.normalpicname = 'new.bmp'
- end if
- cb_edit.of_init_draw()
- cb_add.of_init_draw()
- cb_edit.of_paint()
- cb_add.of_paint()
- cb_edit.triggerevent('ue_textchange')
- cb_add.triggerevent('ue_textchange')
- this.triggerevent('refresh_interface')
- return 1
- end function
- public function window getparentwin ();//GetParentWin()
- return this
- end function
- on w_publ_edit_index.create
- int iCurrent
- call super::create
- this.sle_usual_query=create sle_usual_query
- this.cb_nextpage=create cb_nextpage
- this.cb_priorpage=create cb_priorpage
- this.cb_firstpage=create cb_firstpage
- this.cb_retrieveall=create cb_retrieveall
- this.em_pagerowno=create em_pagerowno
- this.st_pagerowno=create st_pagerowno
- this.st_1=create st_1
- this.cb_add=create cb_add
- this.cb_edit=create cb_edit
- this.cb_delet=create cb_delet
- this.cb_choice=create cb_choice
- this.cb_cancel=create cb_cancel
- this.cbx_mlselect=create cbx_mlselect
- this.cbx_allselect=create cbx_allselect
- this.cb_mode_itfchg_b=create cb_mode_itfchg_b
- this.cb_mode_itfchg=create cb_mode_itfchg
- this.gb_1=create gb_1
- this.dw_uc=create dw_uc
- this.cb_retrieve=create cb_retrieve
- this.cb_print=create cb_print
- 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.dw_index=create dw_index
- this.cb_help=create cb_help
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.sle_usual_query
- this.Control[iCurrent+2]=this.cb_nextpage
- this.Control[iCurrent+3]=this.cb_priorpage
- this.Control[iCurrent+4]=this.cb_firstpage
- this.Control[iCurrent+5]=this.cb_retrieveall
- this.Control[iCurrent+6]=this.em_pagerowno
- this.Control[iCurrent+7]=this.st_pagerowno
- this.Control[iCurrent+8]=this.st_1
- this.Control[iCurrent+9]=this.cb_add
- this.Control[iCurrent+10]=this.cb_edit
- this.Control[iCurrent+11]=this.cb_delet
- this.Control[iCurrent+12]=this.cb_choice
- this.Control[iCurrent+13]=this.cb_cancel
- this.Control[iCurrent+14]=this.cbx_mlselect
- this.Control[iCurrent+15]=this.cbx_allselect
- this.Control[iCurrent+16]=this.cb_mode_itfchg_b
- this.Control[iCurrent+17]=this.cb_mode_itfchg
- this.Control[iCurrent+18]=this.gb_1
- this.Control[iCurrent+19]=this.dw_uc
- this.Control[iCurrent+20]=this.cb_retrieve
- this.Control[iCurrent+21]=this.cb_print
- 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.dw_index
- this.Control[iCurrent+28]=this.cb_help
- end on
- on w_publ_edit_index.destroy
- call super::destroy
- destroy(this.sle_usual_query)
- destroy(this.cb_nextpage)
- destroy(this.cb_priorpage)
- destroy(this.cb_firstpage)
- destroy(this.cb_retrieveall)
- destroy(this.em_pagerowno)
- destroy(this.st_pagerowno)
- destroy(this.st_1)
- destroy(this.cb_add)
- destroy(this.cb_edit)
- destroy(this.cb_delet)
- destroy(this.cb_choice)
- destroy(this.cb_cancel)
- destroy(this.cbx_mlselect)
- destroy(this.cbx_allselect)
- destroy(this.cb_mode_itfchg_b)
- destroy(this.cb_mode_itfchg)
- destroy(this.gb_1)
- destroy(this.dw_uc)
- destroy(this.cb_retrieve)
- destroy(this.cb_print)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- destroy(this.r_bar)
- destroy(this.ln_1)
- destroy(this.ln_2)
- destroy(this.dw_index)
- destroy(this.cb_help)
- end on
- event open;call super::open;if_ue_retr = True
- if_ue_filter = True
- if_ue_sort = True
- old_title = This.Title
- s_edit_index_tran s_tran //传递参数使用
- s_tran = Message.PowerObjectParm
- IF Not IsNull(s_tran) THEN
- retrieve_all = s_tran.if_retrieve_all
- mode = s_tran.work_mode
- arg_pkid = s_tran.arg_pkid
- arg_string_code = s_tran.arg_string_code
- if_select_all = s_tran.if_select_all
- END IF
- //choose case mode
- // case 0
- // this.title = old_title+' 编辑模式 [f4-新建/保存 f5-编辑/放弃]'
- // case 1
- // this.title = old_title+' 选择模式 [f4-新建/保存 f5-编辑/放弃]'
- //end choose
- dw_uc.SetTransObject (sqlca)
- dw_index.SetTransObject (sqlca)
- dw_index.rbutton_filter_use = True //右键查询功能开关
- pkcolumndbtname = wf_get_pkcolumndbtname(dw_uc) //取第一列为关键字
- ori_oldselect = dw_uc.Describe("datawindow.table.select")
- ls_newselect = ori_oldselect
- ds_curquery = Create datastore
- ds_curquery.DataObject = 'd_extr_find'
- ds_curquery.SetTransObject (sqlca)
- IF mode = 1 THEN
- cbx_mlselect.Visible = True
- cbx_allselect.Visible = True
- cb_choice.Enabled = True
- ELSE
- cbx_mlselect.Visible = False
- cbx_allselect.Visible = False
- cb_choice.Enabled = False
- END IF
- //IF mode = 1 THEN cb_mode_itfchg.TriggerEvent(Clicked!)
- wf_editindex_lockf()
- IF Not retrieve_all And Trim(arg_string_code) <> '' THEN
- sle_usual_query.Text = Trim(arg_string_code)
- This.TriggerEvent("ue_usual_query_retr") //修改ls_newselect,retrieve
- ELSE
- wf_retrieveuc(dw_uc,ls_newselect,1) //retrieve
- This.TriggerEvent('retrieve_uc')
- END IF
- IF retrieve_all And Trim(arg_string_code) <> '' THEN
- This.TriggerEvent("ue_usual_query_filt")
- END IF
- end event
- event ue_retr;call super::ue_retr;s_extrtriequery_tran s_dbdw
- s_dbdw.query_dw=dw_UC
- s_dbdw.ptn_ds=ds_curquery
- s_dbdw.query_oldselect=ori_oldselect
- string ls_select=''
- OPENWITHPARM(w_extr_query,s_dbdw)
- ls_select = Message.StringParm
- if TRIM(ls_select)="" OR ISNULL(ls_select) then
- return
- else
- ls_newselect=ls_select
- END IF
- DW_index.SetRedraw(FALSE)
- wf_retrieveuc(dw_uc,ls_newselect,1)
- DW_index.SetRedraw(TRUE)
- end event
- event close;call super::close;//CLOSEWITHRETURN(THIS,<INS_RT_STRU>)
- //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
- end event
- event closequery;call super::closequery;if dw_edit_mode then
- dw_UC.ACCEPTTEXT()
- int ls_row=0
- ls_row=dw_UC.GetNextModified(0, Primary!)+&
- dw_UC.GetNextModified(0, FILTER!)+dw_UC.DeletedCount()
- if ls_row>0 then
- if messagebox('是否保存','数据已经改变,是否放弃保存?',Question!,YesNo!,1 ) = 2 THEN
- RETURN 1
- END IF
- end if
- else
- if if_retrieveing then
- messagebox("系统提示",'系统正在查询数据,请稍后再退出!')
- return 1
- end if
- end if
- end event
- event key;call super::key;THIS.TRIGGEREVENT('USER_KEY')
- end event
- event ue_filter;call super::ue_filter;OPENWITHPARM(w_filter_query,dw_uc)
- STRING LS_EXPR
- LS_EXPR=Message.StringParm
- if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
- dw_uc.setfilter(LS_EXPR)
- dw_uc.SetRedraw (false)
- dw_uc.filter()
- dw_uc.SetRedraw (true)
- end event
- event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,dw_UC)
- 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_UC.setsort(LS_EXPR)
- dw_UC.SetRedraw (false)
- dw_UC.sort()
- dw_UC.SetRedraw (true)
- end event
- event ue_sentdataout;call super::ue_sentdataout;OPENWITHPARM(w_sentdataout,dw_index)
- 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_base`cb_func within w_publ_edit_index
- integer x = 151
- integer width = 151
- integer height = 164
- integer taborder = 30
- end type
- type cb_exit from w_publ_base`cb_exit within w_publ_edit_index
- integer x = 1426
- integer width = 151
- integer height = 164
- integer taborder = 20
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type sle_usual_query from u_sleedit within w_publ_edit_index
- integer x = 206
- integer y = 184
- integer height = 92
- end type
- event inputchanged;call super::inputchanged;IF retrieve_all THEN
- PARENT.TRIGGEREVENT("ue_usual_query_filt")
- END IF
- end event
- event keyup;call super::keyup;IF NOT dw_edit_mode THEN
- If Key = KeyDownArrow! Then //
- dw_INDEX.ScrollNextRow()
- End If
- If Key = KeyUPArrow! Then //
- dw_INDEX.ScrollPriorRow()
- End If
- END IF
- end event
- event modified;call super::modified;IF retrieve_all or retrmode=0 THEN
- PARENT.TRIGGEREVENT("ue_usual_query_filt")
- ELSE
- PARENT.TRIGGEREVENT("ue_usual_query_RETR")
- END IF
- end event
- type cb_nextpage from uo_imflatbutton within w_publ_edit_index
- boolean visible = false
- integer x = 2331
- integer width = 64
- integer height = 164
- integer taborder = 140
- string text = "▼"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;//wf_retrieveuc(dw_uc,ls_newselect,4)
- //parent.triggerevent('retrieve_uc')
- m_Dfc_Control_PopupMenu dmPopupMenu
- string menustr
- menustr="Text=下页~tEvent=ue_page3"
- menustr = menustr + "|" + "Text=上页~tEvent=ue_page2"
- menustr = menustr + "|" + "Text=末页~tEvent=ue_page4"
-
- 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_priorpage from uo_imflatbutton within w_publ_edit_index
- boolean visible = false
- integer x = 2181
- integer width = 151
- integer height = 164
- integer taborder = 130
- string text = "下页"
- string normalpicname = "p3.ico"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;wf_retrieveuc(dw_uc,ls_newselect,3)
- parent.triggerevent('retrieve_uc')
- end event
- type cb_firstpage from uo_imflatbutton within w_publ_edit_index
- boolean visible = false
- integer x = 2030
- integer width = 151
- integer height = 164
- integer taborder = 120
- string text = "上页"
- string normalpicname = "p2.ico"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;wf_retrieveuc(dw_uc,ls_newselect,2)
- parent.triggerevent('retrieve_uc')
- end event
- type cb_retrieveall from uo_imflatbutton within w_publ_edit_index
- boolean visible = false
- integer x = 1879
- integer width = 151
- integer height = 164
- integer taborder = 70
- string text = "首页"
- string normalpicname = "p1.ico"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;PARENT.TriggerEvent('ue_page1')
- //wf_retrieveuc(dw_uc,ls_newselect,1)
- //parent.triggerevent('retrieve_uc')
- end event
- type em_pagerowno from editmask within w_publ_edit_index
- boolean visible = false
- integer x = 1577
- integer y = 32
- integer width = 302
- integer height = 96
- integer taborder = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "1000"
- borderstyle borderstyle = stylelowered!
- string mask = "#####0"
- boolean spin = true
- end type
- event constructor;this.text=f_profilestring (sys_empid,dw_uc.dataobject, "pagerowno",'1000000')
- onepage_rowlmno=long(this.text)
- end event
- event modified;if long(this.text) > 0 then
- else
- this.text = '1'
- end if
- onepage_rowlmno = long(this.text)
- f_setprofilestring (sys_empid,dw_uc.dataobject, "pagerowno", this.text)
- end event
- type st_pagerowno from statictext within w_publ_edit_index
- boolean visible = false
- integer x = 434
- integer y = 748
- integer width = 197
- integer height = 48
- 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 = "页行数"
- boolean focusrectangle = false
- end type
- type st_1 from statictext within w_publ_edit_index
- integer x = 14
- integer y = 204
- integer width = 219
- integer height = 48
- 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 cb_add from uo_imflatbutton within w_publ_edit_index
- integer x = 302
- integer width = 192
- integer height = 164
- integer taborder = 150
- boolean bringtotop = true
- string text = "新建&S"
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF dw_edit_mode THEN
- String ls_errmsg
- IF dw_uc.Update() = -1 THEN
- IF Pos(ins_sqlerrtext,"cannot insert duplicate key row") > 0 Or Pos(ins_sqlerrtext,"unique key") > 0 THEN
- ls_errmsg = "关键内容重复"
- ELSE
- ls_errmsg = "因为网络或其他原因>"+ins_sqlerrtext
- END IF
- ROLLBACK;
- MessageBox ("系统提示",ls_errmsg+",保存操作失败!",exclamation!,ok!)
- ls_update_flag = False
- RETURN
- ELSE
- COMMIT;
- ls_update_flag = True
- END IF
- ins_sqlerrtext = ""
- dw_uc.Enabled = False
- ELSE
- Long li_row, li_cur_row
- li_cur_row = dw_uc.GetRow()
- li_row = dw_uc.InsertRow (li_cur_row)
- dw_uc.ScrollToRow (li_row)
- dw_uc.Enabled = True
- dw_uc.SetFocus()
- modifyrow_no = li_row
- END IF
- dw_edit_mode = Not dw_edit_mode
- wf_face_change()
- IF dw_edit_mode THEN
- IF cb_mode_itfchg.Text = '<<' THEN
- cb_mode_itfchg.TriggerEvent(Clicked!)
- END IF
- ELSE
- wf_index_uc()
- END IF
- dw_index.rbutton_filter_use = Not dw_edit_mode
- wf_editindex_lockf()
- end event
- type cb_edit from uo_imflatbutton within w_publ_edit_index
- integer x = 494
- integer width = 192
- integer height = 164
- integer taborder = 170
- boolean bringtotop = true
- string text = "修改&E"
- string normalpicname = "open.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;if dw_edit_mode then
-
- IF MessageBox ("IF","当前资料,是否放弃保存?",Question!,YesNo! ) = 2 THEN RETURN
-
- if dw_uc.getitemstatus(dw_uc.getrow(), 0, primary!) = newmodified! or dw_uc.getitemstatus(dw_uc.getrow(), 0, primary!) = new! then
- dw_uc.deleterow(dw_uc.getrow())
- else
- dw_uc.reselectrow(dw_uc.getrow())
- end if
- dw_uc.enabled = false
- modifyrow_no = 0
- else
- dw_uc.enabled = true
- dw_uc.setfocus()
- modifyrow_no = dw_uc.getrow()
- end if
- dw_edit_mode = not dw_edit_mode
- wf_face_change()
- if dw_edit_mode then
- if cb_mode_itfchg.text = '<<' then
- cb_mode_itfchg.triggerevent(clicked!)
- end if
- else
- wf_index_uc()
- end if
- dw_index.rbutton_filter_use = not dw_edit_mode
- wf_editindex_lockf()
- end event
- type cb_delet from uo_imflatbutton within w_publ_edit_index
- integer x = 686
- integer width = 151
- integer height = 164
- integer taborder = 180
- boolean bringtotop = true
- string text = "删除"
- string normalpicname = "delete.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;//IF MessageBox ("IF","是否确定要删除当前记录?(选择确定后记录将不可恢复)",Question!,YesNo! ) = 2 THEN
- //RETURN
- //END IF
- //dw_uc.SetRedraw (false)
- //dw_UC.DeleteRow (0)
- //dw_UC.TriggerEvent (rowfocuschanged!)
- //
- //if dw_UC.Update() = -1 then
- // rollback;
- // MessageBox ("NO","删除记录操作失败!",Exclamation!,OK!)
- //else
- // commit;
- //end if
- //dw_uc.SetRedraw (true)
- //
- //WF_INDEX_UC()
- end event
- type cb_choice from uo_imflatbutton within w_publ_edit_index
- string tag = "选定[C^+Enter]"
- integer x = 1275
- integer width = 151
- integer height = 164
- integer taborder = 190
- 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_uc.getrow()
- ////if LS_ROW<=0 then
- //// messagebox('系统提示','请先选择目标行!',StopSign!)
- //// return
- ////end if
- ////
- ////INS_RT_STRU.scustid=dw_INDEX.OBJECT.custid[LS_ROW]
- ////...
- ////CLOSE(PARENT)
- /////多选代码
- //LONG ROW,ls_i,chC=0
- //ROW=dw_pageretr.GETROW()
- //if ROW<=0 then
- // messagebox('系统提示','请先选择目标行!',StopSign!)
- // return
- //end if
- //
- //for ls_i=1 to dw_pageretr.rowcount()
- // if dw_pageretr.isselected(ls_i) then
- // chC++
- // INS_RT_STRU.mtrlwareid[ls_i]=dw_pageretr.OBJECT.mtrlwareid[ls_i]
- // INS_RT_STRU.mtrlid[ls_i]=dw_pageretr.OBJECT.mtrlid[ls_i]
- // INS_RT_STRU.u_mtrldef_mtrlcode[ls_i]=dw_pageretr.OBJECT.u_mtrldef_mtrlcode[ls_i]
- // INS_RT_STRU.u_mtrldef_mtrlname[ls_i]=dw_pageretr.OBJECT.u_mtrldef_mtrlname[ls_i]
- // INS_RT_STRU.u_mtrldef_mtrltype[ls_i]=dw_pageretr.OBJECT.u_mtrldef_mtrltype[ls_i]
- // INS_RT_STRU.u_mtrldef_unit[ls_i]=dw_pageretr.OBJECT.u_mtrldef_unit[ls_i]
- // INS_RT_STRU.noallocqty[ls_i]=dw_pageretr.OBJECT.noallocqty[ls_i]
- // INS_RT_STRU.cost[ls_i]=dw_pageretr.OBJECT.cost[ls_i]
- // INS_RT_STRU.planprice[ls_i]=dw_pageretr.OBJECT.planprice[ls_i]
- // INS_RT_STRU.storageid[ls_i]=dw_pageretr.OBJECT.storageid[ls_i]
- // INS_RT_STRU.plancode[ls_i]=dw_pageretr.OBJECT.plancode[ls_i]
- // INS_RT_STRU.billtype[ls_i]=dw_pageretr.OBJECT.billtype[ls_i]
- // INS_RT_STRU.noauditingqty[ls_i]=dw_pageretr.OBJECT.noauditingqty[ls_i]
- // if isnull(INS_RT_STRU.noauditingqty[ls_i]) then INS_RT_STRU.noauditingqty[ls_i]=0
- // end if
- //
- //next
- //if chC=0 then
- // messagebox('系统提示','请至少选择一个目标行!',StopSign!)
- // return
- //end if
- //
- //CLOSE(PARENT)
- end event
- type cb_cancel from uo_imflatbutton within w_publ_edit_index
- string tag = "取消[&Esc]"
- boolean visible = false
- integer x = 270
- integer y = 592
- integer width = 329
- integer height = 112
- integer taborder = 200
- boolean bringtotop = true
- boolean enabled = false
- string text = "取消"
- end type
- event clicked;call super::clicked;CLOSE(PARENT)
- end event
- type cbx_mlselect from checkbox within w_publ_edit_index
- integer x = 1458
- integer y = 204
- integer width = 215
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- string text = "多选"
- end type
- event clicked;if this.checked then
- if_mlselect=1
- cbx_allselect.enabled=true
- else
- if_mlselect=0
- cbx_allselect.enabled=false
- cbx_allselect.checked=false
- cbx_allselect.triggerevent(clicked!)
- end if
- f_SetProfileString (sys_empid,dw_index.DATAOBJECT, "if_mlselect", string(if_mlselect))
- end event
- type cbx_allselect from checkbox within w_publ_edit_index
- integer x = 1774
- integer y = 204
- integer width = 229
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- string text = "全选"
- end type
- event clicked;if dw_index.rowcount()<=0 then return
- long li
- if this.checked then
- for li =1 to dw_index.rowcount()
- dw_index.selectrow(li,true)
- next
- else
- for li =1 to dw_index.rowcount()
- dw_index.selectrow(li,false)
- next
- end if
- end event
- type cb_mode_itfchg_b from uo_imflatbutton within w_publ_edit_index
- boolean visible = false
- integer x = 709
- integer y = 1004
- integer width = 78
- integer height = 132
- integer taborder = 160
- boolean bringtotop = true
- boolean enabled = false
- string text = ">>"
- end type
- event clicked;call super::clicked;cb_mode_itfchg.TRIGGEREVENT(clicked!)
- this.text=cb_mode_itfchg.text
- cb_mode_itfchg.triggerevent('ue_textchange')
- end event
- type cb_mode_itfchg from uo_imflatbutton within w_publ_edit_index
- integer x = 1179
- integer width = 96
- integer height = 164
- integer taborder = 80
- boolean bringtotop = true
- string text = ">>"
- boolean border = false
- end type
- event clicked;call super::clicked;IF This.Text = '<<' THEN
- This.Text = '>>'
- dw_index.Width = dw_uc.X+1 - dw_index.X
- dw_index.Y = dw_uc.Y
- ELSE
- This.Text = '<<'
- dw_index.Width = dw_uc.X+1+dw_uc.Width - dw_index.X
- dw_index.Y = dw_uc.Y
- END IF
- //PARENT.TriggerEvent('ue_mode_itfchg')
- cb_mode_itfchg_b.Text = This.Text
- cb_mode_itfchg_b.TriggerEvent('ue_textchange')
- end event
- type gb_1 from groupbox within w_publ_edit_index
- boolean visible = false
- integer x = 87
- integer y = 844
- integer width = 1184
- integer height = 148
- integer taborder = 50
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- boolean enabled = false
- end type
- type dw_uc from datawindow within w_publ_edit_index
- event key pbm_dwnkey
- event ue_dw_scroll pbm_vscroll
- integer x = 1362
- integer y = 292
- integer width = 1495
- integer height = 1372
- integer taborder = 90
- boolean enabled = false
- string title = "none"
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event key;PARENT.TRIGGEREVENT('USER_KEY')
- boolean cancel_key=false
- If key = KeyEnter! or key = Keydownarrow! Then //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- cancel_key=true
- elseif key = Keyuparrow! then
- keybd_event ( 16, 0, 0 , 0 )
- keybd_event ( 9, 0, 0 , 0 )
- keybd_event ( 9, 0, 2, 0 )
- keybd_event ( 16, 0, 2, 0 )
- cancel_key=true
- End If
- this.ScrollToRow(this.getrow())
- if cancel_key then return 1
- end event
- event ue_dw_scroll;return 1
- end event
- event dberror;ins_sqlerrtext=sqlerrtext
- return 1
- end event
- event rowfocuschanged;IF modifyrow_no >0 AND dw_edit_mode THEN
- THIS.SETROW(modifyrow_no)
- THIS.ScrollToRow(modifyrow_no)
- END IF
- end event
- event rowfocuschanging;IF dw_edit_mode THEN RETURN 1
- end event
- event rbuttondown;if not dw_edit_mode then return
- Long ll_row,ll_column
- ll_row = THIS.GetRow()
- ll_column = THIS.GetColumn()
- IF ll_row <= 0 THEN RETURN
- IF ll_column <= 0 THEN RETURN
- IF Left( THIS.Describe( dwo.Name+ ".coltype"),4) = 'date' THEN
- s_calender_arg s_calender
-
- s_calender.PointerX = xpos
- s_calender.PointerY = ypos
- s_calender.X = THIS.X + PARENT.X
- s_calender.Y = THIS.Y + PARENT.Y
-
- OpenWithParm(w_calendar,s_calender)
- THIS.SetItem(ll_row,ll_column,id_date_selected)
-
- END IF
- end event
- type cb_retrieve from uo_imflatbutton within w_publ_edit_index
- integer width = 151
- integer height = 164
- integer taborder = 100
- 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('retrieve_uc')
- wf_index_uc()
- end event
- type cb_print from uo_imflatbutton within w_publ_edit_index
- integer x = 987
- integer width = 192
- integer height = 164
- integer taborder = 110
- boolean bringtotop = true
- string text = "预览&P"
- string normalpicname = "preview.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;//S_print_MSG LS_PRMSG
- //
- //LS_PRMSG.obj_dwNAME='dwrp_zl_lsdzl'
- //LS_PRMSG.SHARE_DW=DW_UC
- //LS_PRMSG.TAG_TEXT='零售点资料表'
- //LS_PRMSG.SETUP_FLAG=0
- //LS_PRMSG.PAGECH_FLAG=1
- //
- //Openwithparm(w_publ_preview,LS_PRMSG)
- //
- end event
- type ln_bar from line within w_publ_edit_index
- long linecolor = 268435456
- integer linethickness = 4
- integer beginx = -46
- integer beginy = 172
- integer endx = 1961
- integer endy = 172
- end type
- type ln_bar2 from line within w_publ_edit_index
- long linecolor = 16777215
- integer linethickness = 4
- integer beginx = -46
- integer beginy = 176
- integer endx = 1993
- integer endy = 176
- end type
- type r_bar from rectangle within w_publ_edit_index
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 2629
- 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_edit_index
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 284
- integer endx = 2016
- integer endy = 284
- end type
- type ln_2 from line within w_publ_edit_index
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 288
- integer endx = 2048
- integer endy = 288
- end type
- type dw_index from u_dw_rbtnfilter within w_publ_edit_index
- integer y = 292
- integer width = 1362
- integer height = 1372
- integer taborder = 40
- boolean bringtotop = true
- boolean minbox = true
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- end type
- event clicked;call super::clicked;IF row > 0 THEN
- This.SetRow(row)
- IF if_mlselect = 1 THEN
- IF if_changeselect THEN
- This.SelectRow(row,Not This.IsSelected(row))
- ELSE
- if_changeselect = True
- END IF
- ELSE
- IF dw_edit_mode THEN RETURN
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- END IF
- END IF
- end event
- event rowfocuschanged;call super::rowfocuschanged;IF if_mlselect = 1 THEN
- IF currentrow <= 0 THEN RETURN
- IF KeyDown(keycontrol!) THEN
- IF This.IsSelected(currentrow) THEN
- This.SelectRow(currentrow,False)
- if_changeselect = False
- ELSE
- if_changeselect = True
- END IF
- ELSE
- IF Not This.IsSelected(currentrow) THEN
- This.SelectRow(currentrow,True)
- if_changeselect = False
- ELSE
- if_changeselect = True
- END IF
- END IF
- ELSE
- IF dw_edit_mode THEN RETURN
- IF currentrow <= 0 THEN RETURN
- This.SelectRow(0,False)
- This.SelectRow(currentrow,True)
- dw_uc.SetRow(currentrow)
- dw_uc.ScrollToRow (currentrow)
- END IF
- end event
- event constructor;call super::constructor;titleclick_sort_use=true //单击标题排序功能开关
- end event
- event doubleclicked;call super::doubleclicked;IF mode=1 AND NOT dw_edit_mode THEN
- cb_choice.TRIGGEREVENT(CLICKED!)
- END IF
- end event
- event dwnkey;call super::dwnkey;if keydown(Keyenter!) and keydown(keycontrol!) then return 1
- PARENT.POSTEVENT('USER_KEY')
- end event
- type cb_help from uo_imflatbutton within w_publ_edit_index
- integer x = 837
- integer width = 151
- integer height = 164
- integer taborder = 40
- 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
|