12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796 |
- $PBExportHeader$w_dw_update2.srw
- forward
- global type w_dw_update2 from w_publ_base
- end type
- type lb_1 from listbox within w_dw_update2
- end type
- type lb_2 from listbox within w_dw_update2
- end type
- type dw_list from u_dw_rbtnfilter within w_dw_update2
- end type
- type dw_lib from u_dw_rbtnfilter within w_dw_update2
- end type
- type cb_add from uo_imflatbutton within w_dw_update2
- end type
- type cb_retrieve from uo_imflatbutton within w_dw_update2
- end type
- type dw_pb from u_dw_rbtnfilter within w_dw_update2
- end type
- type cb_saveupload from uo_imflatbutton within w_dw_update2
- end type
- type cbx_1 from checkbox within w_dw_update2
- end type
- type cb_save from uo_imflatbutton within w_dw_update2
- end type
- type cbx_2 from checkbox within w_dw_update2
- end type
- type cb_del from commandbutton within w_dw_update2
- end type
- type cb_upload from uo_imflatbutton within w_dw_update2
- end type
- type cb_1 from commandbutton within w_dw_update2
- end type
- type cb_2 from uo_imflatbutton within w_dw_update2
- end type
- type cb_3 from uo_imflatbutton within w_dw_update2
- end type
- type cb_4 from commandbutton within w_dw_update2
- end type
- type cbx_3 from checkbox within w_dw_update2
- end type
- type cbx_4 from checkbox within w_dw_update2
- end type
- type cb_5 from commandbutton within w_dw_update2
- end type
- type cb_6 from commandbutton within w_dw_update2
- end type
- type cb_7 from commandbutton within w_dw_update2
- end type
- type cb_8 from commandbutton within w_dw_update2
- end type
- type cb_9 from commandbutton within w_dw_update2
- end type
- type gb_1 from groupbox within w_dw_update2
- end type
- type ln_bar2 from line within w_dw_update2
- end type
- type ln_bar from line within w_dw_update2
- end type
- type r_bar from rectangle within w_dw_update2
- end type
- end forward
- global type w_dw_update2 from w_publ_base
- integer width = 3625
- integer height = 2376
- string title = "新打印格式上传"
- boolean maxbox = true
- boolean resizable = true
- windowstate windowstate = maximized!
- event ue_f7 ( )
- event ue_pset1 ( )
- event ue_import ( )
- lb_1 lb_1
- lb_2 lb_2
- dw_list dw_list
- dw_lib dw_lib
- cb_add cb_add
- cb_retrieve cb_retrieve
- dw_pb dw_pb
- cb_saveupload cb_saveupload
- cbx_1 cbx_1
- cb_save cb_save
- cbx_2 cbx_2
- cb_del cb_del
- cb_upload cb_upload
- cb_1 cb_1
- cb_2 cb_2
- cb_3 cb_3
- cb_4 cb_4
- cbx_3 cbx_3
- cbx_4 cbx_4
- cb_5 cb_5
- cb_6 cb_6
- cb_7 cb_7
- cb_8 cb_8
- cb_9 cb_9
- gb_1 gb_1
- ln_bar2 ln_bar2
- ln_bar ln_bar
- r_bar r_bar
- end type
- global w_dw_update2 w_dw_update2
- type variables
- String ls_path,lib_path,lib_name
- long dw_lib_h,dw_list_h,dw_list_w
- long cur_type = 0
- long j
- DataWindowChild dw_child
- DataWindowChild dw_child2
- long if_update = 0
- end variables
- forward prototypes
- public subroutine wf_addexplore (long arg_type)
- public subroutine wf_retrdw (string arg_path)
- public subroutine wf_retrpb ()
- public function integer wf_check (ref string arg_msg)
- end prototypes
- event ue_f7();Long lib_row
- Long list_row
- str_rpt s_parm
- dw_lib.accepttext()
- dw_list.accepttext()
- lib_row = dw_lib.GetRow()
- list_row = dw_list.GetRow()
- IF lib_row <= 0 OR list_row <= 0 THEN RETURN
- dw_list.accepttext()
- s_parm.auto = "auto"
- s_parm.transation = sqlca//数据库连接
- s_parm.oname = dw_list.object.ctag[list_row]
- s_parm.otype = lib_path
- s_parm.rcname = dw_list.object.ctag[list_row]
- s_parm.retr_pram_falg = -1
- s_parm.retr_flag = true
- s_parm.import_flag = true
- s_parm.pblpath = dw_lib.object.lib_path[lib_row]
- OpenWithParm(w_rpt_main,s_parm)
- end event
- event ue_pset1();Long i
- if dw_list.RowCount() < 2 then return
- FOR i = 2 TO dw_list.RowCount()
- dw_list.Object.fromtype[i] = dw_list.Object.fromtype[1]
- NEXT
- end event
- event ue_import();Long i
- String ls_ctag,ls_dwname,ls_wname
- IF dw_list.RowCount() = 0 THEN RETURN
- FOR i = 1 TO dw_list.RowCount()
- ls_ctag = dw_list.Object.ctag[i]
- SELECT chnname,
- dwtype
- INTO :ls_dwname,
- :ls_wname
- FROM sys_dft_dwprint_dynamic
- WHERE dft_new_dwname = :ls_ctag ;
- IF sqlca.SQLCode = 0 THEN
- dw_list.Object.dwname[i] = ls_dwname
- dw_list.Object.wname[i] = ls_wname
- dw_list.Object.fromtype[i] = 0
- END IF
- NEXT
- end event
- public subroutine wf_addexplore (long arg_type);
- String ls_label
- Int li_count,i = 1
- Integer li_FileNum
- Blob ls_str
- j = 1
- LS_PATH = sys_cur_path + "*.pbl"
- lb_1.Reset()
- lb_1.DirList(LS_PATH, 0)
- li_count = lb_1.TotalItems()
- dw_lib.Reset()
- IF li_count > 0 THEN
- FOR i = li_count TO 1 STEP -1
- ls_label = lb_1.Text(i)
- li_FileNum = FileOpen(sys_cur_path + ls_label,StreamMode!)
- FileRead(li_FileNum,ls_str)
- ls_str = BlobMid(ls_str,29,100)
- FileClose(li_FileNum)
- IF Pos(sys_system_id,Trim(String(ls_str))) > 0 THEN //企精灵为ewiserp,L1为ljerp
- dw_lib.Object.lib_name[j] = ls_label
- dw_lib.Object.lib_path[j] = sys_cur_path + ls_label
- dw_lib.Object.flag[j] = 0
- j++
- END IF
- NEXT
- END IF
- IF dw_lib.RowCount() > 0 THEN
- lib_path = dw_lib.Object.lib_path[1]
- wf_retrdw(lib_path)
- ELSE
- dw_list.Reset()
- END IF
- end subroutine
- public subroutine wf_retrdw (string arg_path);if arg_path = '' then return
- ///////////////
- String ls_data,s[]
- Long ll_row,k
- String ls_msm[]
- s[4] = LibraryDirectory(arg_path,DirDataWindow!) //name ~t date/time modified ~t comments ~n
- dw_list.Reset()
- dw_list.SetRedraw(FALSE)
- DO WHILE TRUE
- k = Pos(s[4],'~t')
- IF k = 0 THEN EXIT
- s[1] = Left(s[4],k -1)
- s[4] = Mid(s[4],k+1)
- k = Pos(s[4],'~t')
- s[3] = Left(s[4],k -1)
- s[4] = Mid(s[4],k+1)
- k = Pos(s[4],'~n')
- s[2] = Left(s[4],k -1)
- s[4] = Mid(s[4],k+1)
- k = dw_list.InsertRow(0)
- dw_list.SetItem(k,1,s[1])
- dw_list.SetItem(k,3,s[3])
- IF Len(Trim(s[2])) > 1 THEN
- dw_list.object.comments[k] = left(s[2],len(s[2]) - 1 )
- ll_row = 0
- DO WHILE Pos(s[2],'&') > 0
- ll_row++
- ls_msm[ll_row] = Mid(s[2],1,Pos(s[2],'&') - 1)
- s[2] = Mid(s[2],Pos(s[2],'&') + 1)
- LOOP
-
-
- IF ll_row = 2 THEN
- dw_list.object.product[k] = long(ls_msm[1])
- dw_list.object.fromtype[k] = long(ls_msm[2] )
- end if
- if ll_row > 2 then
- dw_list.object.product[k] = long(ls_msm[1])
- dw_list.object.fromtype[k] = long(ls_msm[2] )
- dw_list.object.wname[k] = ls_msm[3]
- dw_list.object.dwname[k] = ls_msm[4]
- END IF
- END IF
-
- LOOP
- dw_list.SetRedraw(TRUE)
- datawindowchild childdw
- dw_list.SetTransObject (sqlca)
- childdw.SetTransObject (sqlca)
- childdw.Retrieve()
- end subroutine
- public subroutine wf_retrpb ();Long i,ll_row
- string ls_msm[]
- dw_pb.retrieve()
- IF dw_pb.RowCount() = 0 THEN RETURN
- string ls_comments
- FOR i = 1 TO dw_pb.RowCount()
- ls_comments = dw_pb.object.comments[i]
- IF Len(Trim(ls_comments)) > 1 THEN
- ll_row = 0
- DO WHILE Pos(ls_comments,'&') > 0
- ll_row++
- ls_msm[ll_row] = Mid(ls_comments,1,Pos(ls_comments,'&') - 1)
- ls_comments = Mid(ls_comments,Pos(ls_comments,'&') + 1)
- LOOP
- IF ll_row = 2 THEN
- dw_pb.object.product[i] = long(ls_msm[1])
- dw_pb.object.fromtype[i] = long(ls_msm[2] )
- end if
- if ll_row > 2 then
- dw_pb.object.product[i] = long(ls_msm[1])
- dw_pb.object.fromtype[i] = long(ls_msm[2] )
- dw_pb.object.wname[i] = ls_msm[3]
- dw_pb.object.dwname[i] = ls_msm[4]
- END IF
- END IF
- NEXT
- end subroutine
- public function integer wf_check (ref string arg_msg);Long rslt = 1,i
- dw_list.AcceptText()
- FOR i = 1 TO dw_list.RowCount()
- IF dw_list.Object.fromtype[i] = 0 AND dw_list.Object.ch[i] = 1 THEN
- IF dw_list.Object.wname[i] = '' THEN
- arg_msg = '第' + String(i) + '行,请填写所属窗口名称'
- rslt = 0
- GOTO ext
- END IF
- IF dw_list.Object.dwname[i] = '' THEN
- arg_msg = '第' + String(i) + '行,请填写打印格式名称'
- rslt = 0
- GOTO ext
- END IF
-
-
- END IF
- NEXT
- ext:
- RETURN rslt
- end function
- on w_dw_update2.create
- int iCurrent
- call super::create
- this.lb_1=create lb_1
- this.lb_2=create lb_2
- this.dw_list=create dw_list
- this.dw_lib=create dw_lib
- this.cb_add=create cb_add
- this.cb_retrieve=create cb_retrieve
- this.dw_pb=create dw_pb
- this.cb_saveupload=create cb_saveupload
- this.cbx_1=create cbx_1
- this.cb_save=create cb_save
- this.cbx_2=create cbx_2
- this.cb_del=create cb_del
- this.cb_upload=create cb_upload
- this.cb_1=create cb_1
- this.cb_2=create cb_2
- this.cb_3=create cb_3
- this.cb_4=create cb_4
- this.cbx_3=create cbx_3
- this.cbx_4=create cbx_4
- this.cb_5=create cb_5
- this.cb_6=create cb_6
- this.cb_7=create cb_7
- this.cb_8=create cb_8
- this.cb_9=create cb_9
- this.gb_1=create gb_1
- this.ln_bar2=create ln_bar2
- this.ln_bar=create ln_bar
- this.r_bar=create r_bar
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.lb_1
- this.Control[iCurrent+2]=this.lb_2
- this.Control[iCurrent+3]=this.dw_list
- this.Control[iCurrent+4]=this.dw_lib
- this.Control[iCurrent+5]=this.cb_add
- this.Control[iCurrent+6]=this.cb_retrieve
- this.Control[iCurrent+7]=this.dw_pb
- this.Control[iCurrent+8]=this.cb_saveupload
- this.Control[iCurrent+9]=this.cbx_1
- this.Control[iCurrent+10]=this.cb_save
- this.Control[iCurrent+11]=this.cbx_2
- this.Control[iCurrent+12]=this.cb_del
- this.Control[iCurrent+13]=this.cb_upload
- this.Control[iCurrent+14]=this.cb_1
- this.Control[iCurrent+15]=this.cb_2
- this.Control[iCurrent+16]=this.cb_3
- this.Control[iCurrent+17]=this.cb_4
- this.Control[iCurrent+18]=this.cbx_3
- this.Control[iCurrent+19]=this.cbx_4
- this.Control[iCurrent+20]=this.cb_5
- this.Control[iCurrent+21]=this.cb_6
- this.Control[iCurrent+22]=this.cb_7
- this.Control[iCurrent+23]=this.cb_8
- this.Control[iCurrent+24]=this.cb_9
- this.Control[iCurrent+25]=this.gb_1
- this.Control[iCurrent+26]=this.ln_bar2
- this.Control[iCurrent+27]=this.ln_bar
- this.Control[iCurrent+28]=this.r_bar
- end on
- on w_dw_update2.destroy
- call super::destroy
- destroy(this.lb_1)
- destroy(this.lb_2)
- destroy(this.dw_list)
- destroy(this.dw_lib)
- destroy(this.cb_add)
- destroy(this.cb_retrieve)
- destroy(this.dw_pb)
- destroy(this.cb_saveupload)
- destroy(this.cbx_1)
- destroy(this.cb_save)
- destroy(this.cbx_2)
- destroy(this.cb_del)
- destroy(this.cb_upload)
- destroy(this.cb_1)
- destroy(this.cb_2)
- destroy(this.cb_3)
- destroy(this.cb_4)
- destroy(this.cbx_3)
- destroy(this.cbx_4)
- destroy(this.cb_5)
- destroy(this.cb_6)
- destroy(this.cb_7)
- destroy(this.cb_8)
- destroy(this.cb_9)
- destroy(this.gb_1)
- destroy(this.ln_bar2)
- destroy(this.ln_bar)
- destroy(this.r_bar)
- end on
- event open;call super::open;Long i,ll_row,ll_row2
- dw_list.SetTransObject(sqlca)
- dw_list.GetChild('wname',dw_child)
- dw_pb.SetTransObject(sqlca)
- dw_pb.GetChild('wname',dw_child2)
- FOR i = 1 TO UpperBound(s_sys_bill)
- IF s_sys_bill[i].versiontype = sys_version_type OR s_sys_bill[i].versiontype = -1 THEN
- ll_row = dw_child.InsertRow(0)
- dw_child.SetItem(ll_row2,1,s_sys_bill[i].winname)
- dw_child.SetItem(ll_row2,2,s_sys_bill[i].billname)
-
- ll_row2 = dw_child2.InsertRow(0)
- dw_child2.SetItem(ll_row2,1,s_sys_bill[i].winname)
- dw_child2.SetItem(ll_row2,2,s_sys_bill[i].billname)
- END IF
- NEXT
- dw_pb.SetTransObject(sqlca)
- wf_addexplore(cur_type)
- wf_retrpb()
- end event
- event resize;call super::resize;ln_bar.EndX = THIS.Width
- ln_bar2.EndX = THIS.Width
- r_bar.Width = THIS.Width
- long w_width,w_height
- w_width = 3600
- w_height = 2350
- if newwidth < w_width then this.width = w_width
- if newheight < w_height then this.height = w_height
- dw_lib.height = this.height - (w_height - dw_lib_h)
- dw_list.width=this.width - (w_width - dw_list_w)
- dw_pb.width=this.width - (w_width - dw_list_w)
- dw_list.height= dw_lib.height/2 - 50
- dw_pb.height= dw_lib.height/2 - 50
- cbx_2.y = dw_list.y+dw_list.height+10
- cb_1.y = dw_list.y+dw_list.height+5
- cb_del.y = dw_list.y+dw_list.height+5
- cb_4.y = dw_list.y+dw_list.height+5
- dw_pb.y = dw_list.y+dw_list.height + 100
- cbx_4.y = dw_list.y+dw_list.height+10
- end event
- type cb_func from w_publ_base`cb_func within w_dw_update2
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_dw_update2
- integer x = 347
- integer width = 151
- integer height = 164
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type lb_1 from listbox within w_dw_update2
- boolean visible = false
- integer x = 3291
- integer y = 128
- integer width = 878
- integer height = 544
- integer taborder = 20
- 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 lb_2 from listbox within w_dw_update2
- boolean visible = false
- integer x = 3291
- integer y = 832
- integer width = 878
- integer height = 544
- integer taborder = 30
- 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 dw_list from u_dw_rbtnfilter within w_dw_update2
- integer x = 1321
- integer y = 236
- integer width = 2194
- integer height = 996
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_dw_list_update"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean rbutton_filter_use = true
- boolean titleclick_sort_use = true
- end type
- event rowfocuschanged;call super::rowfocuschanged;THIS.SetRow(currentrow)
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- end event
- event constructor;call super::constructor;dw_list_h = this.height
- dw_list_w = this.width
- end event
- event doubleclicked;call super::doubleclicked;parent.triggerevent('ue_f7')
- end event
- event clicked;call super::clicked;IF row > 0 THEN THIS.SetRow(row)
- end event
- type dw_lib from u_dw_rbtnfilter within w_dw_update2
- integer x = 18
- integer y = 232
- integer width = 1303
- integer height = 996
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_lib_list"
- boolean vscrollbar = true
- boolean rbutton_filter_use = true
- boolean titleclick_sort_use = true
- boolean setcolumn_visible_use = false
- boolean autosave_setlayout_use = false
- boolean autosave_columnvisible_use = false
- end type
- event constructor;call super::constructor;dw_lib_h = this.height
- end event
- event clicked;call super::clicked;IF row = 0 THEN RETURN
- THIS.SetRow(row)
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(row,TRUE)
- end event
- event rowfocuschanged;IF currentrow > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- END IF
-
- dw_lib.AcceptText()
- IF currentrow > 0 THEN
- lib_name = dw_lib.Object.lib_name[currentrow]
- lib_path = dw_lib.Object.lib_path[currentrow]
- wf_retrdw(lib_path)
- ELSE
- dw_list.Reset()
- END IF
- end event
- type cb_add from uo_imflatbutton within w_dw_update2
- integer width = 197
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "附加库"
- string normalpicname = "imexport.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Integer i
- String Pathname
- String Filename
- Integer li_FileNum
- Blob ls_str
- Boolean lb_find = FALSE
- i = GetFileOpenName("Select File",Pathname,Filename,"pbl","Pb Files,*.pbl")
- dw_lib.AcceptText()
- IF i = 1 AND Trim(Pathname) <> "" AND Trim(Filename) <> "" THEN
- FOR j = 1 TO dw_lib.RowCount()
- IF Filename = dw_lib.Object.lib_name[j] THEN RETURN
- NEXT
-
- // li_FileNum = FileOpen(Pathname,StreamMode!)
- // FileRead(li_FileNum,ls_str)
- // ls_str = BlobMid(ls_str,29,100)
- // FileClose(li_FileNum)
- // IF Pos(sys_system_id,Trim(String(ls_str))) > 0 THEN //企精灵为ewiserp,L1为ljerp
- dw_lib.Object.lib_name[j] = Filename
- dw_lib.Object.lib_path[j] = Pathname
- dw_lib.Object.flag[j] = 1
- j++
- // ELSE
- // MessageBox('提示','所选PBL不是本产品格式库文件')
- // END IF
- END IF
- dw_lib.SetRow(j)
- lib_name = Filename
- lib_path = Pathname
- wf_retrdw(lib_path)
- RETURN
- end event
- type cb_retrieve from uo_imflatbutton within w_dw_update2
- integer x = 197
- integer width = 151
- integer height = 164
- integer taborder = 40
- 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;wf_addexplore(cur_type)
- wf_retrpb()
- end event
- type dw_pb from u_dw_rbtnfilter within w_dw_update2
- integer y = 1524
- integer width = 3511
- integer height = 660
- integer taborder = 30
- boolean bringtotop = true
- string dataobject = "dw_dw_list_pb"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean rbutton_filter_use = true
- boolean titleclick_sort_use = true
- end type
- event clicked;call super::clicked;IF row > 0 THEN THIS.SetRow(row)
- end event
- event rowfocuschanged;call super::rowfocuschanged;THIS.SetRow(currentrow)
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- end event
- type cb_saveupload from uo_imflatbutton within w_dw_update2
- integer x = 2190
- integer width = 311
- integer height = 164
- integer taborder = 30
- boolean bringtotop = true
- string text = "保存并上传"
- string normalpicname = "mx1.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;String ls_temp ,ls_dwsyn,ls_msg
- DateTime ld_moddate
- Long k
- Long rslt = 1,i
- String ls_ctag,ls_ctype,ls_product,ls_fromtype,ls_dwname,ls_wname,ls_comments
- dw_list.AcceptText()
- dw_lib.AcceptText()
- IF wf_check(ls_msg) = 0 THEN
- rslt = 0
- GOTO ext
- END IF
- ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
- FOR i = 1 TO dw_list.RowCount()
- IF dw_list.Object.ch[i] = 1 THEN
- ls_ctag = dw_list.Object.ctag[i]
- ls_ctype = dw_list.Object.ctype[i]
- ls_product = String(dw_list.Object.product[i])
- ls_fromtype = String(dw_list.Object.fromtype[i])
- ls_dwname = dw_list.Object.dwname[i]
- ls_wname = dw_list.Object.wname[i]
- ls_dwsyn = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
- ld_moddate = DateTime(Date(Left(ls_ctype,Pos(ls_ctype,' ',1))),Time(Right(ls_ctype,8)))
- ls_comments = ls_product + '&' + ls_fromtype + '&'
- IF ls_dwname <> '' THEN
- ls_comments = ls_comments + ls_wname + '&' + ls_dwname + '&'
- END IF
-
- IF LibraryImport(ls_temp, ls_ctag, ImportDataWindow!, ls_dwsyn, ls_msg,ls_comments ) = -1 THEN
- ls_msg = ls_ctag + '写入文件' + ls_temp + '失败'
- rslt = 0
- GOTO ext
- END IF
-
- Blob lb_dwsyn
- UPDATE sys_autoudpb
- SET buildtime = :ld_moddate,
- uploadtime = getdate(),
- comments = :ls_comments
- Where Filename = :ls_ctag;
- IF sqlca.SQLCode = 0 THEN
- IF sqlca.SQLNRows = 0 THEN
- INSERT INTO sys_autoudpb
- ( filename,
- buildtime,
- uploadtime,
- comments )
- VALUES ( :ls_ctag,
- :ld_moddate,
- getdate(),
- :ls_comments ) ;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '插入数据窗口列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- commit;
- lb_dwsyn = Blob(ls_dwsyn)
- UPDATEBLOB sys_autoudpb
- SET filedata = :lb_dwsyn
- Where Filename = :ls_ctag;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '更新数据窗口列表失败(1)' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
-
- IF ls_fromtype = '0' AND if_update = 1 THEN
- UPDATE sys_dft_dwprint_dynamic
- SET chnname = :ls_dwname,
- dwtype = :ls_wname ,
- pblname = :sys_pblname
- Where dft_new_dwname = :ls_ctag;
- IF sqlca.SQLCode = 0 THEN
- IF sqlca.SQLNRows = 0 THEN
- Long ll_newid
- ll_newid = f_sys_scidentity(0,"sys_dft_dwprint_dynamic","dwprintid",ls_msg,FALSE,sqlca)
- IF ll_newid <= 0 THEN
- rslt = 0
- GOTO ext
- END IF
- INSERT INTO sys_dft_dwprint_dynamic
- ( dwprintid,
- dft_new_dwname,
- chnname,
- dwtype,
- ifuse,
- ifdefault ,
- pblname)
- VALUES ( :ll_newid,
- :ls_ctag,
- :ls_dwname,
- :ls_wname,
- 1,
- 0 ,
- :sys_pblname) ;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '插入单据格式重定向列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- ELSE
- ls_msg = '更新单据格式重定向列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
-
-
- ELSE
- ls_msg = '更新数据窗口列表失败(2)' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
- ROLLBACK;
- MessageBox('错误',ls_msg, StopSign!, OK! )
-
- ELSE
- COMMIT;
- MessageBox('提示','保存并上传成功', Information!, OK! )
- wf_retrdw(ls_temp)
- dw_pb.Retrieve()
- wf_retrpb()
- END IF
-
- end event
- type cbx_1 from checkbox within w_dw_update2
- integer x = 649
- integer y = 48
- integer width = 247
- 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 = 67108864
- string text = "全选"
- boolean checked = true
- end type
- event clicked;Long i
- dw_list.accepttext()
- IF THIS.Checked THEN
- FOR i = 1 TO dw_list.RowCount()
- dw_list.object.ch[i] = 1
- NEXT
-
- ELSE
- FOR i = 1 TO dw_list.RowCount()
- dw_list.object.ch[i] = 0
- NEXT
- END IF
- end event
- event constructor;this.backcolor = 14215660
- end event
- type cb_save from uo_imflatbutton within w_dw_update2
- integer x = 1509
- integer y = 4
- integer width = 151
- integer height = 164
- integer taborder = 60
- boolean bringtotop = true
- string text = "保存"
- string normalpicname = "save.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;String ls_temp ,ls_dwsyn,ls_msg
- DateTime ld_moddate
- Long k
- Long rslt = 1,i
- String ls_ctag,ls_ctype,ls_dwname,ls_wname,ls_comments,ls_dwsyn_old
- dw_list.AcceptText()
- dw_lib.AcceptText()
- Long ls_product,ls_fromtype
- ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
- FOR i = 1 TO dw_list.RowCount()
- IF dw_list.Object.ch[i] = 1 THEN
- ls_ctag = dw_list.Object.ctag[i]
- ls_ctype = dw_list.Object.ctype[i]
- ls_product = dw_list.Object.product[i]
- ls_fromtype = dw_list.Object.fromtype[i]
- ls_dwname = dw_list.Object.dwname[i]
- ls_wname = dw_list.Object.wname[i]
- ls_dwsyn = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
- ld_moddate = DateTime(Date(Left(ls_ctype,Pos(ls_ctype,' ',1))),Time(Right(ls_ctype,8)))
- ls_comments = String(ls_product) + '&' + String(ls_fromtype) + '&'
- IF ls_dwname <> '' THEN
- ls_comments = ls_comments + ls_wname + '&' + ls_dwname + '&'
- END IF
-
- ls_dwsyn_old = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
- IF ls_dwsyn_old <> ls_dwsyn or dw_list.Object.comments[i] <> ls_comments THEN
- IF LibraryImport(ls_temp, ls_ctag, ImportDataWindow!, ls_dwsyn, ls_msg,ls_comments ) = -1 THEN
- ls_msg = ls_ctag + '写入文件' + ls_temp + '失败'
- rslt = 0
- GOTO ext
- END IF
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
- MessageBox('错误',ls_msg, StopSign!, OK! )
- ELSE
- MessageBox('提示','保存成功', Information!, OK! )
- wf_retrdw(ls_temp)
- END IF
- end event
- type cbx_2 from checkbox within w_dw_update2
- integer x = 1673
- integer y = 1416
- integer width = 357
- 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 = 67108864
- string text = "全选主窗口"
- end type
- event clicked;Long i
- dw_pb.AcceptText()
- IF THIS.Checked THEN
- FOR i = 1 TO dw_pb.RowCount()
- IF dw_pb.Object.fromtype[i] = 0 THEN dw_pb.Object.ch[i] = 1
- NEXT
-
- ELSE
- FOR i = 1 TO dw_pb.RowCount()
- dw_pb.Object.ch[i] = 0
- NEXT
- END IF
- end event
- type cb_del from commandbutton within w_dw_update2
- integer x = 494
- integer y = 1408
- integer width = 229
- integer height = 84
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "↓删除"
- end type
- event clicked;IF MessageBox ("询问","是否确定要删除当前数据窗口资料吗?删除后将不能恢复",question!,yesno! ) = 2 THEN RETURN
- String ls_msg,ls_filename
- Int i,rslt = 1
- dw_pb.AcceptText()
- FOR i = 1 TO dw_pb.RowCount()
- IF dw_pb.Object.ch[i] = 1 THEN
- ls_filename = dw_pb.Object.Filename[i]
- DELETE FROM sys_autoudpb
- Where Filename = :ls_filename;
- IF sqlca.SQLCode <> 0 THEN
-
- ls_msg = '删除失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
-
- MessageBox('错误',ls_msg, StopSign!, OK! )
- ROLLBACK;
- ELSE
-
- MessageBox('提示','删除成功', Information!, OK! )
- COMMIT;
- dw_pb.Retrieve()
- wf_retrpb()
- END IF
- end event
- type cb_upload from uo_imflatbutton within w_dw_update2
- integer x = 2039
- integer width = 151
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "上传"
- string normalpicname = "mx.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;String ls_temp ,ls_dwsyn,ls_msg
- DateTime ld_moddate
- Long k
- Long rslt = 1,i
- String ls_ctag,ls_ctype,ls_product,ls_fromtype,ls_dwname,ls_wname,ls_comments
- dw_list.AcceptText()
- dw_lib.AcceptText()
- IF wf_check(ls_msg) = 0 THEN
- rslt = 0
- GOTO ext
- END IF
- ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
- FOR i = 1 TO dw_list.RowCount()
- IF dw_list.Object.ch[i] = 1 THEN
- ls_ctag = dw_list.Object.ctag[i]
- ls_ctype = dw_list.Object.ctype[i]
- ls_product = String(dw_list.Object.product[i])
- ls_fromtype = String(dw_list.Object.fromtype[i])
- ls_dwname = dw_list.Object.dwname[i]
- ls_wname = dw_list.Object.wname[i]
- ls_dwsyn = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
- ld_moddate = DateTime(Date(Left(ls_ctype,Pos(ls_ctype,' ',1))),Time(Right(ls_ctype,8)))
- ls_comments = ls_product + '&' + ls_fromtype + '&'
- IF ls_dwname <> '' THEN
- ls_comments = ls_comments + ls_wname + '&' + ls_dwname + '&'
- END IF
-
- Blob lb_dwsyn
- UPDATE sys_autoudpb
- SET buildtime = :ld_moddate,
- uploadtime = getdate(),
- comments = :ls_comments
- Where Filename = :ls_ctag;
- IF sqlca.SQLCode = 0 THEN
- IF sqlca.SQLNRows = 0 THEN
- INSERT INTO sys_autoudpb
- ( filename,
- buildtime,
- uploadtime,
- comments )
- VALUES ( :ls_ctag,
- :ld_moddate,
- getdate(),
- :ls_comments ) ;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '插入数据窗口列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- COMMIT;
- lb_dwsyn = Blob(ls_dwsyn)
- UPDATEBLOB sys_autoudpb
- Set filedata = :lb_dwsyn
- Where Filename = :ls_ctag;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '更新数据窗口列表失败(1)' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
-
- IF ls_fromtype = '0' AND if_update = 1 THEN
- UPDATE sys_dft_dwprint_dynamic
- SET chnname = :ls_dwname,
- dwtype = :ls_wname ,
- pblname = :sys_pblname
- Where dft_new_dwname = :ls_ctag;
- IF sqlca.SQLCode = 0 THEN
- IF sqlca.SQLNRows = 0 THEN
- Long ll_newid
- ll_newid = f_sys_scidentity(0,"sys_dft_dwprint_dynamic","dwprintid",ls_msg,FALSE,sqlca)
- IF ll_newid <= 0 THEN
- rslt = 0
- GOTO ext
- END IF
- INSERT INTO sys_dft_dwprint_dynamic
- ( dwprintid,
- dft_new_dwname,
- chnname,
- dwtype,
- ifuse,
- ifdefault ,
- pblname)
- VALUES ( :ll_newid,
- :ls_ctag,
- :ls_dwname,
- :ls_wname,
- 1,
- 0 ,
- :sys_pblname) ;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '插入单据格式重定向列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- ELSE
- ls_msg = '更新单据格式重定向列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
-
- END IF
-
- ELSE
- ls_msg = '更新数据窗口列表失败(2)' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
- ROLLBACK;
- MessageBox('错误',ls_msg, StopSign!, OK! )
- ELSE
- COMMIT;
- MessageBox('提示','上传成功', Information!, OK! )
- wf_retrdw(ls_temp)
- dw_pb.Retrieve()
- wf_retrpb()
- END IF
- end event
- type cb_1 from commandbutton within w_dw_update2
- integer x = 219
- integer y = 1408
- integer width = 274
- integer height = 84
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "↓重定向"
- end type
- event clicked;Long i,ll_newid
- Long rslt = 1
- String ls_wname
- String ls_dwname
- String ls_filename,errmsg
- dw_pb.AcceptText()
- FOR i = 1 TO dw_pb.RowCount()
- IF dw_pb.Object.fromtype[i] = 0 AND dw_pb.Object.ch[i] = 1 and dw_pb.Object.wname[i] <> '' and dw_pb.Object.dwname[i] <> '' THEN
- ls_filename = dw_pb.Object.Filename[i]
- ls_wname = dw_pb.Object.wname[i]
- ls_dwname = dw_pb.Object.dwname[i]
- UPDATE sys_dft_dwprint_dynamic
- SET chnname = :ls_dwname,
- dwtype = :ls_wname ,
- pblname = :sys_pblname
- Where dft_new_dwname = :ls_filename;
- IF sqlca.SQLCode = 0 THEN
- IF sqlca.SQLNRows = 0 THEN
- ll_newid = f_sys_scidentity(0,"sys_dft_dwprint_dynamic","dwprintid",errmsg,FALSE,sqlca)
- IF ll_newid <= 0 THEN
- rslt = 0
- GOTO ext
- END IF
- INSERT INTO sys_dft_dwprint_dynamic
- ( dwprintid,
- dft_new_dwname,
- chnname,
- dwtype,
- ifuse,
- ifdefault ,
- pblname)
- VALUES ( :ll_newid,
- :ls_filename,
- :ls_dwname,
- :ls_wname,
- 1,
- 0 ,
- :sys_pblname) ;
- IF sqlca.SQLCode <> 0 THEN
- errmsg = '插入单据格式重定向列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- ELSE
- errmsg = '更新单据格式重定向列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
-
- END IF
-
- NEXT
- ext:
- IF rslt = 0 THEN
- MessageBox('错误',errmsg,stopsign!,ok!)
- ROLLBACK;
- ELSE
- MessageBox('提示','重定向成功', Information!, OK! )
- COMMIT;
- END IF
- end event
- type cb_2 from uo_imflatbutton within w_dw_update2
- integer x = 2775
- integer width = 151
- integer height = 164
- integer taborder = 40
- 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 ("询问","是否确定要删除当前数据窗口吗?删除后将不能恢复",question!,yesno! ) = 2 then return
-
- String ls_temp ,ls_dwsyn,ls_msg
- DateTime ld_moddate
- Long k
- Long rslt = 1,i
- String ls_ctag
- dw_list.AcceptText()
- dw_lib.AcceptText()
- Long ls_product,ls_fromtype
- ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
- FOR i = 1 TO dw_list.RowCount()
- IF dw_list.Object.ch[i] = 1 THEN
- ls_ctag = dw_list.Object.ctag[i]
- IF LibraryDelete(ls_temp, ls_ctag, ImportDataWindow! ) = -1 THEN
- ls_msg = '删除' + ls_ctag + '失败'
- rslt = 0
- GOTO ext
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
- MessageBox('错误',ls_msg, StopSign!, OK! )
- ELSE
- MessageBox('提示','删除成功', Information!, OK! )
- wf_retrdw(ls_temp)
- END IF
- end event
- type cb_3 from uo_imflatbutton within w_dw_update2
- integer x = 2501
- integer width = 274
- integer height = 164
- integer taborder = 40
- boolean bringtotop = true
- string text = "其他功能"
- string normalpicname = "audit.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
- string menustr
- menustr="Text=导入重定向设置~tEvent=ue_import"
- 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_4 from commandbutton within w_dw_update2
- integer y = 1408
- integer width = 219
- integer height = 84
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "↓刷新"
- end type
- event clicked;wf_retrpb()
- end event
- type cbx_3 from checkbox within w_dw_update2
- integer x = 933
- integer y = 48
- integer width = 466
- 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 = 67108864
- string text = "上传自动重定向"
- boolean checked = true
- end type
- event constructor;THIS.BackColor = 14215660
- if_update = Long(f_ProfileString (sys_empid,dw_list.DataObject, "if_update", '0'))
- IF if_update = 1 THEN
- THIS.Checked = TRUE
- ELSE
- THIS.Checked = FALSE
- END IF
- end event
- event clicked;if this.checked then
- if_update = 1
- else
- if_update = 0
- end if
-
- f_SetProfileString (sys_empid,dw_list.DATAOBJECT, "if_update", string(if_update))
- end event
- type cbx_4 from checkbox within w_dw_update2
- integer x = 1294
- integer y = 1416
- integer width = 357
- 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 = 67108864
- string text = "全选窗口"
- end type
- event clicked;Long i
- dw_pb.AcceptText()
- IF THIS.Checked THEN
- FOR i = 1 TO dw_pb.RowCount()
- dw_pb.Object.ch[i] = 1
- NEXT
-
- ELSE
- FOR i = 1 TO dw_pb.RowCount()
- dw_pb.Object.ch[i] = 0
- NEXT
- END IF
- end event
- type cb_5 from commandbutton within w_dw_update2
- integer y = 1272
- integer width = 219
- integer height = 84
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "↑刷新"
- end type
- event clicked;wf_addexplore(cur_type)
- wf_retrpb()
- end event
- type cb_6 from commandbutton within w_dw_update2
- integer x = 219
- integer y = 1272
- integer width = 210
- integer height = 84
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "↑保存"
- end type
- event clicked;String ls_temp ,ls_dwsyn,ls_msg
- DateTime ld_moddate
- Long k
- Long rslt = 1,i
- String ls_ctag,ls_ctype,ls_dwname,ls_wname,ls_comments,ls_dwsyn_old
- dw_list.AcceptText()
- dw_lib.AcceptText()
- Long ls_product,ls_fromtype
- ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
- FOR i = 1 TO dw_list.RowCount()
- IF dw_list.Object.ch[i] = 1 THEN
- ls_ctag = dw_list.Object.ctag[i]
- ls_ctype = dw_list.Object.ctype[i]
- ls_product = dw_list.Object.product[i]
- ls_fromtype = dw_list.Object.fromtype[i]
- ls_dwname = dw_list.Object.dwname[i]
- ls_wname = dw_list.Object.wname[i]
- ls_dwsyn = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
- ld_moddate = DateTime(Date(Left(ls_ctype,Pos(ls_ctype,' ',1))),Time(Right(ls_ctype,8)))
- ls_comments = String(ls_product) + '&' + String(ls_fromtype) + '&'
- IF ls_dwname <> '' THEN
- ls_comments = ls_comments + ls_wname + '&' + ls_dwname + '&'
- END IF
-
- ls_dwsyn_old = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
- IF ls_dwsyn_old <> ls_dwsyn or dw_list.Object.comments[i] <> ls_comments THEN
- IF LibraryImport(ls_temp, ls_ctag, ImportDataWindow!, ls_dwsyn, ls_msg,ls_comments ) = -1 THEN
- ls_msg = ls_ctag + '写入文件' + ls_temp + '失败'
- rslt = 0
- GOTO ext
- END IF
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
- MessageBox('错误',ls_msg, StopSign!, OK! )
- ELSE
- MessageBox('提示','保存成功', Information!, OK! )
- wf_retrdw(ls_temp)
- END IF
- end event
- type cb_7 from commandbutton within w_dw_update2
- integer x = 430
- integer y = 1272
- integer width = 229
- integer height = 84
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "↑上传"
- end type
- event clicked;String ls_temp ,ls_dwsyn,ls_msg
- DateTime ld_moddate
- Long k
- Long rslt = 1,i
- String ls_ctag,ls_ctype,ls_product,ls_fromtype,ls_dwname,ls_wname,ls_comments
- dw_list.AcceptText()
- dw_lib.AcceptText()
- IF wf_check(ls_msg) = 0 THEN
- rslt = 0
- GOTO ext
- END IF
- ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
- FOR i = 1 TO dw_list.RowCount()
- IF dw_list.Object.ch[i] = 1 THEN
- ls_ctag = dw_list.Object.ctag[i]
- ls_ctype = dw_list.Object.ctype[i]
- ls_product = String(dw_list.Object.product[i])
- ls_fromtype = String(dw_list.Object.fromtype[i])
- ls_dwname = dw_list.Object.dwname[i]
- ls_wname = dw_list.Object.wname[i]
- ls_dwsyn = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
- ld_moddate = DateTime(Date(Left(ls_ctype,Pos(ls_ctype,' ',1))),Time(Right(ls_ctype,8)))
- ls_comments = ls_product + '&' + ls_fromtype + '&'
- IF ls_dwname <> '' THEN
- ls_comments = ls_comments + ls_wname + '&' + ls_dwname + '&'
- END IF
-
- Blob lb_dwsyn
- UPDATE sys_autoudpb
- SET buildtime = :ld_moddate,
- uploadtime = getdate(),
- comments = :ls_comments
- Where Filename = :ls_ctag;
- IF sqlca.SQLCode = 0 THEN
- IF sqlca.SQLNRows = 0 THEN
- INSERT INTO sys_autoudpb
- ( filename,
- buildtime,
- uploadtime,
- comments )
- VALUES ( :ls_ctag,
- :ld_moddate,
- getdate(),
- :ls_comments ) ;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '插入数据窗口列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- COMMIT;
- lb_dwsyn = Blob(ls_dwsyn)
- UPDATEBLOB sys_autoudpb
- Set filedata = :lb_dwsyn
- Where Filename = :ls_ctag;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '更新数据窗口列表失败(1)' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
-
- IF ls_fromtype = '0' AND if_update = 1 THEN
- UPDATE sys_dft_dwprint_dynamic
- SET chnname = :ls_dwname,
- dwtype = :ls_wname ,
- pblname = :sys_pblname
- Where dft_new_dwname = :ls_ctag;
- IF sqlca.SQLCode = 0 THEN
- IF sqlca.SQLNRows = 0 THEN
- Long ll_newid
- ll_newid = f_sys_scidentity(0,"sys_dft_dwprint_dynamic","dwprintid",ls_msg,FALSE,sqlca)
- IF ll_newid <= 0 THEN
- rslt = 0
- GOTO ext
- END IF
- INSERT INTO sys_dft_dwprint_dynamic
- ( dwprintid,
- dft_new_dwname,
- chnname,
- dwtype,
- ifuse,
- ifdefault ,
- pblname)
- VALUES ( :ll_newid,
- :ls_ctag,
- :ls_dwname,
- :ls_wname,
- 1,
- 0 ,
- :sys_pblname) ;
- IF sqlca.SQLCode <> 0 THEN
- ls_msg = '插入单据格式重定向列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- ELSE
- ls_msg = '更新单据格式重定向列表失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
-
- END IF
-
- ELSE
- ls_msg = '更新数据窗口列表失败(2)' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
- ROLLBACK;
- MessageBox('错误',ls_msg, StopSign!, OK! )
- ELSE
- COMMIT;
- MessageBox('提示','上传成功', Information!, OK! )
- wf_retrdw(ls_temp)
- dw_pb.Retrieve()
- wf_retrpb()
- END IF
- end event
- type cb_8 from commandbutton within w_dw_update2
- integer x = 658
- integer y = 1272
- integer width = 384
- integer height = 84
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "↑保存并上传"
- end type
- event clicked;IF MessageBox ("询问","是否确定要删除当前数据窗口资料吗?删除后将不能恢复",question!,yesno! ) = 2 THEN RETURN
- String ls_msg,ls_filename
- Int i,rslt = 1
- dw_pb.AcceptText()
- FOR i = 1 TO dw_pb.RowCount()
- IF dw_pb.Object.ch[i] = 1 THEN
- ls_filename = dw_pb.Object.Filename[i]
- DELETE FROM sys_autoudpb
- Where Filename = :ls_filename;
- IF sqlca.SQLCode <> 0 THEN
-
- ls_msg = '删除失败' + sqlca.SQLErrText
- rslt = 0
- GOTO ext
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
-
- MessageBox('错误',ls_msg, StopSign!, OK! )
- ROLLBACK;
- ELSE
-
- MessageBox('提示','删除成功', Information!, OK! )
- COMMIT;
- dw_pb.Retrieve()
- wf_retrpb()
- END IF
- end event
- type cb_9 from commandbutton within w_dw_update2
- integer x = 1042
- integer y = 1272
- integer width = 229
- integer height = 84
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "↑删除"
- end type
- event clicked;if messagebox ("询问","是否确定要删除当前数据窗口吗?删除后将不能恢复",question!,yesno! ) = 2 then return
-
- String ls_temp ,ls_dwsyn,ls_msg
- DateTime ld_moddate
- Long k
- Long rslt = 1,i
- String ls_ctag
- dw_list.AcceptText()
- dw_lib.AcceptText()
- Long ls_product,ls_fromtype
- ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
- FOR i = 1 TO dw_list.RowCount()
- IF dw_list.Object.ch[i] = 1 THEN
- ls_ctag = dw_list.Object.ctag[i]
- IF LibraryDelete(ls_temp, ls_ctag, ImportDataWindow! ) = -1 THEN
- ls_msg = '删除' + ls_ctag + '失败'
- rslt = 0
- GOTO ext
- END IF
- END IF
- NEXT
- ext:
- IF rslt = 0 THEN
- MessageBox('错误',ls_msg, StopSign!, OK! )
- ELSE
- MessageBox('提示','删除成功', Information!, OK! )
- wf_retrdw(ls_temp)
- END IF
- end event
- type gb_1 from groupbox within w_dw_update2
- integer y = 184
- integer width = 3538
- integer height = 1196
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "格式库数据"
- end type
- type ln_bar2 from line within w_dw_update2
- long linecolor = 16777215
- integer linethickness = 4
- integer beginx = 9
- integer beginy = 172
- integer endx = 3273
- integer endy = 172
- end type
- type ln_bar from line within w_dw_update2
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 168
- integer endx = 3200
- integer endy = 168
- end type
- type r_bar from rectangle within w_dw_update2
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 3351
- integer width = 87
- 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
|