12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277 |
- $PBExportHeader$w_rep_group.srw
- forward
- global type w_rep_group from w_publ_choice
- end type
- type cb_1 from uo_imflatbutton within w_rep_group
- end type
- type cb_2 from uo_imflatbutton within w_rep_group
- end type
- type cb_3 from uo_imflatbutton within w_rep_group
- end type
- type cb_4 from uo_imflatbutton within w_rep_group
- end type
- type dw_1 from u_dw_rbtnfilter within w_rep_group
- end type
- type dw_2 from u_dw_rbtnfilter within w_rep_group
- end type
- type cb_5 from uo_imflatbutton within w_rep_group
- end type
- type cb_7 from uo_imflatbutton within w_rep_group
- end type
- type cb_ext from uo_imflatbutton within w_rep_group
- end type
- type cb_13 from uo_imflatbutton within w_rep_group
- end type
- type cb_8 from uo_imflatbutton within w_rep_group
- end type
- type cb_9 from uo_imflatbutton within w_rep_group
- end type
- type cb_6 from uo_imflatbutton within w_rep_group
- end type
- type cb_10 from uo_imflatbutton within w_rep_group
- end type
- type dw_3 from u_dw_rbtnfilter within w_rep_group
- end type
- type cb_11 from uo_imflatbutton within w_rep_group
- end type
- type st_2 from statictext within w_rep_group
- end type
- type ln_3 from line within w_rep_group
- end type
- type s_kh from structure within w_rep_group
- end type
- type s_group_cust_spt from structure within w_rep_group
- end type
- end forward
- type s_kh from structure
- integer l_star
- integer l_end
- end type
- type s_group_cust_spt from structure
- string name
- string email
- string phone
- end type
- global type w_rep_group from w_publ_choice
- integer width = 4398
- integer height = 2956
- string title = "邮件短信接收人自定义分组"
- boolean controlmenu = true
- boolean minbox = true
- boolean maxbox = true
- boolean resizable = true
- windowtype windowtype = main!
- windowstate windowstate = maximized!
- cb_1 cb_1
- cb_2 cb_2
- cb_3 cb_3
- cb_4 cb_4
- dw_1 dw_1
- dw_2 dw_2
- cb_5 cb_5
- cb_7 cb_7
- cb_ext cb_ext
- cb_13 cb_13
- cb_8 cb_8
- cb_9 cb_9
- cb_6 cb_6
- cb_10 cb_10
- dw_3 dw_3
- cb_11 cb_11
- st_2 st_2
- ln_3 ln_3
- end type
- global w_rep_group w_rep_group
- type variables
- string s_col="",s_text=""
- integer l_row=0
- long groupid
- datastore dw_group_u_cust,dw_group_u_cust_rep,dw_group_u_spt,dw_group_u_spt_rep
- end variables
- forward prototypes
- public subroutine p_clearmx ()
- public function integer cancel (ref string arg_msg)
- public function integer acceptmx (long arg_rpid, integer arg_rowcode, string arg_rowname, integer arg_rowtype, integer arg_rowcmpltype, string arg_rowformula1, string arg_rowformula2)
- public subroutine f_bulid_rp (integer row)
- public function string of_globalreplace (string as_source, string as_old, string as_new)
- public function integer f_writefile (blob ib_file, string is_filename)
- public function integer f_get_rpid ()
- public subroutine f_readfile ()
- public subroutine f_create_zcfzb ()
- public subroutine f_creat_lrb ()
- public subroutine wf_face ()
- public function string of_globalreplace1 (string as_source, string as_old, string as_new)
- public function integer save ()
- public subroutine f_add (integer arg_i, string arg_s)
- public subroutine wf_init_dw ()
- public subroutine wf_init (integer arg_dw)
- public function s_group_cust_spt wf_cusorspt_name (long arg_reltype, long arg_relid, long arg_repid)
- end prototypes
- public subroutine p_clearmx ();groupid=0
- end subroutine
- public function integer cancel (ref string arg_msg);int rslt=1
- return rslt
- end function
- public function integer acceptmx (long arg_rpid, integer arg_rowcode, string arg_rowname, integer arg_rowtype, integer arg_rowcmpltype, string arg_rowformula1, string arg_rowformula2);Int rslt = 1
- p_clearmx()
- //
- //if isnull(arg_rpid) then arg_rpid=0
- //if isnull(arg_rowcode) then arg_rowcode=0
- //if isnull(arg_rowname) then arg_rowname=""
- //if isnull( arg_rowtype ) then arg_rowtype=0
- //if isnull(rowcmpltype) then rowcmpltype=0
- //if isnull(arg_Rowformula1) then arg_Rowformula1=""
- //if isnull(arg_Rowformula2) then arg_Rowformula2=""
- //
- //
- //rpid = arg_rpid
- //rowcode = arg_rowcode
- //rowname = arg_rowname
- //rowtype = arg_rowtype
- //rowcmpltype = arg_rowcmpltype
- //Rowformula1 = arg_Rowformula1
- //Rowformula2 = arg_Rowformula2
- //
- //IF rpid = 0 THEN
- // MessageBox("Error","报表id错误")
- // rslt = 0
- // GOTO ext
- //END IF
- //
- //
- //
- //
- //
- //
- //
- //
- //ext:
- IF rslt = 0 THEN p_clearmx()
- RETURN rslt
- end function
- public subroutine f_bulid_rp (integer row);
- end subroutine
- public function string of_globalreplace (string as_source, string as_old, string as_new);long ll_oldlen, ll_newlen, ll_pos
- ll_pos = Pos(as_source,as_old)
- IF ll_pos > 0 Then
- ll_oldlen = Len(as_old)
- ll_newlen = Len(as_new)
- as_source = Replace(as_source,ll_pos,ll_oldlen,as_new)
- ll_pos = Pos(as_source,as_old,ll_pos + ll_newlen)
- END IF
- RETURN as_source
- end function
- public function integer f_writefile (blob ib_file, string is_filename);uLONG ll_len,li_count,loops
- int li_FileNum
- blob lblb_b,b_x
- int liResult = 1
- ////f_readfile(b_x,is_filename)
- ////ib_file=blob(string(ib_file) +char(13) +char(10) + string(b_x))
- //////////////////////////////////////////////////////////////
- //ll_len=len(ib_file)
- //IF ll_len > 32765 THEN
- // IF Mod(ll_len, 32765) = 0 THEN
- // loops = ll_len/32765
- // ELSE
- // loops = (ll_len/32765) + 1
- // END IF
- //ELSE
- // loops = 1
- //END IF
- //
- //
- //li_FileNum = FileOpen(is_filename,StreamMode!, write!, shared!,Replace!)
- //if li_FileNum = -1 then
- // messagebox("系统提示","无法打开文件"+is_filename)
- // return 0
- //end if
- //FOR li_count = 1 to loops
- // lblb_b = blobmid( ib_file , ( li_count - 1) * 32765 + 1 , 32765 )
- // if FileWrite(li_FileNum, lblb_b) = -1 then
- // messagebox("系统提示","写文件" + is_filename+"失败")
- // liResult=0
- // exit
- // end if//8010
- //NEXT
- //Fileclose(li_FileNum)
- //
- ////if liResult=1 then
- //// liResult = gf_setfiletime(is_filename,idt_file_time)
- ////end if
- //
- return liResult
- end function
- public function integer f_get_rpid ();Long ll_row, ll_i
- FOR ll_i = dw_1.RowCount() To 1 Step -1
- IF dw_1.IsSelected(ll_i) THEN
- ll_row = ll_i
- END IF
- NEXT
- IF ll_row <= 0 THEN RETURN 0
- groupid = dw_1.Object.groupid[ll_row]
- end function
- public subroutine f_readfile ();
- end subroutine
- public subroutine f_create_zcfzb ();
- end subroutine
- public subroutine f_creat_lrb ();
- end subroutine
- public subroutine wf_face ();Int LS_INT
- IF dw_edit_mode = True THEN
- cb_1.Enabled = False
- cb_2.Enabled = False
- cb_3.Enabled = False
- cb_4.Enabled = False
-
- cb_5.Enabled = True
- cb_6.Enabled = True
- cb_7.Enabled = True
- cb_8.Enabled = True
- cb_9.Enabled = True
- cb_10.Enabled = True
- dw_1.Enabled = False
-
- FOR LS_INT = 1 To 20
- dw_2.SetTabOrder (LS_INT,LS_INT*0 )
- NEXT
- ELSE
- cb_1.Enabled = True
- cb_2.Enabled = True
- cb_3.Enabled = True
- cb_4.Enabled = True
- cb_5.Enabled = False
- cb_6.Enabled = False
- cb_7.Enabled = False
- cb_8.Enabled = False
- cb_9.Enabled = False
- cb_10.Enabled = False
- dw_1.Enabled = True
-
- FOR LS_INT = 1 To 20
- dw_2.SetTabOrder (LS_INT,LS_INT*0 )
- NEXT
- END IF
- IF dw_1.Object.if_parent[dw_1.GetRow()] = 1 THEN
- cb_10.Enabled = False
- END IF
- dw_2.Retrieve(groupid)
- wf_init(0)
- end subroutine
- public function string of_globalreplace1 (string as_source, string as_old, string as_new);long ll_oldlen, ll_newlen, ll_pos
- ll_pos = Pos(as_source,as_old)
- IF ll_pos > 0 Then
- ll_oldlen = Len(as_old)
- ll_newlen = Len(as_new)
- DO WHILE ll_pos > 0
- as_source = Replace(as_source,ll_pos,ll_oldlen,as_new)
- ll_pos = Pos(as_source,as_old,ll_pos + ll_newlen)
- LOOP
- END IF
- RETURN as_source
- end function
- public function integer save ();Integer rslt = 1
- string ls_errmsg
- dw_2.AcceptText()
- IF dw_2.Update() = -1 THEN
- ROLLBACK;
-
- rslt=0
- RETURN rslt
- ELSE
- COMMIT;
-
-
- END IF
- RETURN rslt
- end function
- public subroutine f_add (integer arg_i, string arg_s);
- end subroutine
- public subroutine wf_init_dw ();//datastore dw_group_u_cust,dw_group_u_cust_rep,dw_group_u_spt,dw_group_u_spt_rep
- open(w_sys_wait)
- dw_group_u_cust = Create datastore
- dw_group_u_cust.DataObject = 'dw_group_u_cust'
- dw_group_u_cust.SetTransObject(sqlca)
- dw_group_u_cust.Retrieve()
- //
- dw_group_u_cust_rep = Create datastore
- dw_group_u_cust_rep.DataObject = 'dw_group_u_cust_rep'
- dw_group_u_cust_rep.SetTransObject(sqlca)
- dw_group_u_cust_rep.Retrieve()
- //
- dw_group_u_spt = Create datastore
- dw_group_u_spt.DataObject = 'dw_group_u_spt'
- dw_group_u_spt.SetTransObject(sqlca)
- dw_group_u_spt.Retrieve()
- //
- dw_group_u_spt_rep = Create datastore
- dw_group_u_spt_rep.DataObject = 'dw_group_u_spt_rep'
- dw_group_u_spt_rep.SetTransObject(sqlca)
- dw_group_u_spt_rep.Retrieve()
- close(w_sys_wait)
- end subroutine
- public subroutine wf_init (integer arg_dw);Long i,reltype,relid,repid
- s_group_cust_spt ss_group_cust_spt
- IF arg_dw = 0 THEN
- FOR i = 1 To dw_2.RowCount()
- reltype = dw_2.Object.reltype[i]
- relid = dw_2.Object.relid[i]
- repid = dw_2.Object.repid[i]
- ss_group_cust_spt=wf_cusorspt_name( reltype, relid , repid )
- dw_2.Object.Name[i] = ss_group_cust_spt.name
- dw_2.Object.email[i] = ss_group_cust_spt.email
- dw_2.Object.phone[i] = ss_group_cust_spt.phone
-
-
- NEXT
- END IF
- IF arg_dw = 1 THEN
- FOR i = 1 To dw_3.RowCount()
- reltype = dw_3.Object.reltype[i]
- relid = dw_3.Object.relid[i]
- repid = dw_3.Object.repid[i]
- ss_group_cust_spt=wf_cusorspt_name( reltype, relid , repid )
- dw_3.Object.Name[i] = ss_group_cust_spt.name
- dw_3.Object.email[i] = ss_group_cust_spt.email
- dw_3.Object.phone[i] = ss_group_cust_spt.phone
- NEXT
- END IF
- //
- //
- end subroutine
- public function s_group_cust_spt wf_cusorspt_name (long arg_reltype, long arg_relid, long arg_repid);//datastore dw_group_u_cust,dw_group_u_cust_rep,dw_group_u_spt,dw_group_u_spt_rep
- String ls_name,ls_name1,ls_name2
- String Name,tele,email
- s_group_cust_spt ss_group_cust_spt
- Long i
- IF arg_reltype = 0 THEN
- IF arg_repid = 0 THEN
- FOR i = 1 To dw_group_u_cust.RowCount()
- IF dw_group_u_cust.Object.cusid[i] = arg_relid THEN
- ss_group_cust_spt.Name = dw_group_u_cust.Object.Name[i]+'_' +dw_group_u_cust.Object.rep[i]
- ss_group_cust_spt.phone = dw_group_u_cust.Object.tele1[i]
- ss_group_cust_spt.email = dw_group_u_cust.Object.email[i]
- EXIT
- END IF
- NEXT
- ELSE
- FOR i = 1 To dw_group_u_cust.RowCount()
- IF dw_group_u_cust.Object.cusid[i] = arg_relid THEN
- ls_name1 = dw_group_u_cust.Object.Name[i]
-
- EXIT
- END IF
- NEXT
-
- FOR i = 1 To dw_group_u_cust_rep.RowCount()
- IF dw_group_u_cust_rep.Object.cusid[i] = arg_relid And dw_group_u_cust_rep.Object.repid[i] = arg_repid THEN
- ls_name2 = dw_group_u_cust_rep.Object.repname[i]
- ss_group_cust_spt.Name = ls_name1+'_' +ls_name2
- ss_group_cust_spt.phone = dw_group_u_cust_rep.Object.handtel[i]
- ss_group_cust_spt.email = dw_group_u_cust_rep.Object.email[i]
- EXIT
- END IF
- NEXT
-
-
- END IF
-
-
-
- ELSEIF arg_reltype = 1 THEN
-
- IF arg_repid = 0 THEN
- FOR i = 1 To dw_group_u_spt.RowCount()
- IF dw_group_u_spt.Object.sptid[i] = arg_relid THEN
- ss_group_cust_spt.Name = dw_group_u_spt.Object.Name[i]+'_' +dw_group_u_spt.Object.rep[i]
- ss_group_cust_spt.phone = dw_group_u_spt.Object.tele1[i]
- ss_group_cust_spt.email = dw_group_u_spt.Object.email[i]
- EXIT
- END IF
- NEXT
- ELSE
- FOR i = 1 To dw_group_u_spt.RowCount()
- IF dw_group_u_spt.Object.sptid[i] = arg_relid THEN
- ls_name1 = dw_group_u_spt.Object.Name[i]
-
- EXIT
- END IF
- NEXT
-
- FOR i = 1 To dw_group_u_spt_rep.RowCount()
- IF dw_group_u_spt_rep.Object.sptid[i] = arg_relid And dw_group_u_spt_rep.Object.repid[i] = arg_repid THEN
- ls_name2 = dw_group_u_spt_rep.Object.repname[i]
- ss_group_cust_spt.Name = ls_name1+'_' +ls_name2
- ss_group_cust_spt.phone = dw_group_u_spt_rep.Object.handtel[i]
- ss_group_cust_spt.email = dw_group_u_spt_rep.Object.email[i]
- EXIT
- END IF
- NEXT
-
- END IF
-
-
- ELSEIF arg_reltype = 2 THEN
- SELECT u_rep_group.groupname Into :ls_name2 From u_rep_group Where u_rep_group.groupid = :arg_relid;
- ls_name = '自定义组_' +ls_name2
- ss_group_cust_spt.Name = ls_name
- ss_group_cust_spt.phone = ''
- ss_group_cust_spt.email = ''
- END IF
- return ss_group_cust_spt
- end function
- on w_rep_group.create
- int iCurrent
- call super::create
- 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.dw_1=create dw_1
- this.dw_2=create dw_2
- this.cb_5=create cb_5
- this.cb_7=create cb_7
- this.cb_ext=create cb_ext
- this.cb_13=create cb_13
- this.cb_8=create cb_8
- this.cb_9=create cb_9
- this.cb_6=create cb_6
- this.cb_10=create cb_10
- this.dw_3=create dw_3
- this.cb_11=create cb_11
- this.st_2=create st_2
- this.ln_3=create ln_3
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cb_1
- this.Control[iCurrent+2]=this.cb_2
- this.Control[iCurrent+3]=this.cb_3
- this.Control[iCurrent+4]=this.cb_4
- this.Control[iCurrent+5]=this.dw_1
- this.Control[iCurrent+6]=this.dw_2
- this.Control[iCurrent+7]=this.cb_5
- this.Control[iCurrent+8]=this.cb_7
- this.Control[iCurrent+9]=this.cb_ext
- this.Control[iCurrent+10]=this.cb_13
- this.Control[iCurrent+11]=this.cb_8
- this.Control[iCurrent+12]=this.cb_9
- this.Control[iCurrent+13]=this.cb_6
- this.Control[iCurrent+14]=this.cb_10
- this.Control[iCurrent+15]=this.dw_3
- this.Control[iCurrent+16]=this.cb_11
- this.Control[iCurrent+17]=this.st_2
- this.Control[iCurrent+18]=this.ln_3
- end on
- on w_rep_group.destroy
- call super::destroy
- destroy(this.cb_1)
- destroy(this.cb_2)
- destroy(this.cb_3)
- destroy(this.cb_4)
- destroy(this.dw_1)
- destroy(this.dw_2)
- destroy(this.cb_5)
- destroy(this.cb_7)
- destroy(this.cb_ext)
- destroy(this.cb_13)
- destroy(this.cb_8)
- destroy(this.cb_9)
- destroy(this.cb_6)
- destroy(this.cb_10)
- destroy(this.dw_3)
- destroy(this.cb_11)
- destroy(this.st_2)
- destroy(this.ln_3)
- end on
- event resize;call super::resize;dw_1.Height = This.Height -dw_1.Y - 200
- dw_2.Height = dw_1.Height
- dw_2.Width = This.Width -dw_2.X - 50
- dw_3.x=dw_2.x+500
- dw_3.Height=dw_2.Height
- dw_3.Width=dw_2.Width - 500
- //cb_ext.x=this.width - cb_ext.width
- st_2.y =dw_1.y + dw_1.Height + 10
- end event
- event open;call super::open;dw_1.SetTransObject (sqlca)
- dw_1.Retrieve()
- dw_2.SetTransObject (sqlca)
- dw_3.SetTransObject (sqlca)
- //rb_1.TriggerEvent(Clicked!)
- dw_3.Visible = False
- wf_init_dw()
- Int LS_INT
- FOR LS_INT = 1 To 20
- dw_2.SetTabOrder (LS_INT,0 )
- NEXT
- end event
- type cb_func from w_publ_choice`cb_func within w_rep_group
- boolean visible = false
- end type
- type cb_exit from w_publ_choice`cb_exit within w_rep_group
- boolean visible = false
- end type
- type sle_ch from w_publ_choice`sle_ch within w_rep_group
- boolean visible = false
- end type
- type dw_ch from w_publ_choice`dw_ch within w_rep_group
- boolean visible = false
- end type
- type st_1 from w_publ_choice`st_1 within w_rep_group
- boolean visible = false
- end type
- type cb_retrieve from w_publ_choice`cb_retrieve within w_rep_group
- boolean visible = false
- end type
- type cb_choice from w_publ_choice`cb_choice within w_rep_group
- boolean visible = false
- end type
- type ln_bar from w_publ_choice`ln_bar within w_rep_group
- integer beginx = 5
- integer endx = 2011
- end type
- type ln_bar2 from w_publ_choice`ln_bar2 within w_rep_group
- integer beginx = 9
- integer endx = 2048
- end type
- type r_bar from w_publ_choice`r_bar within w_rep_group
- integer x = 1595
- end type
- type ln_1 from w_publ_choice`ln_1 within w_rep_group
- integer beginx = 14
- integer beginy = 192
- integer endx = 2030
- integer endy = 192
- end type
- type ln_2 from w_publ_choice`ln_2 within w_rep_group
- integer beginx = 9
- integer beginy = 184
- integer endx = 2057
- integer endy = 184
- end type
- type cb_1 from uo_imflatbutton within w_rep_group
- integer width = 192
- integer height = 164
- integer taborder = 130
- 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;dw_1.Retrieve()
- end event
- type cb_2 from uo_imflatbutton within w_rep_group
- integer x = 192
- integer width = 192
- integer height = 164
- integer taborder = 180
- 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 Not IsValid(w_rep_group_add) THEN
- String s
- s = "new"
- OpenWithParm(w_rep_group_add,s )
- cb_1.TriggerEvent(Clicked!)
- END IF
- end event
- type cb_3 from uo_imflatbutton within w_rep_group
- integer x = 384
- integer width = 192
- integer height = 164
- integer taborder = 190
- 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;Long ll_row, ll_i
- IF Not IsValid(w_rep_group_add) THEN
- String s
- FOR ll_i = dw_1.RowCount() To 1 Step -1
- IF dw_1.IsSelected(ll_i) THEN
- ll_row = ll_i
- END IF
- NEXT
- IF ll_row <= 0 THEN RETURN
- s = String(dw_1.Object.groupid[ll_row])
- OpenWithParm(w_rep_group_add,s )
- cb_1.TriggerEvent(Clicked!)
- END IF
- end event
- type cb_4 from uo_imflatbutton within w_rep_group
- integer x = 576
- integer width = 197
- integer height = 164
- integer taborder = 200
- 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;Long ll_row,l_groupid,ll_i
- String arG_MSG
- //ll_row = dw_1.GetRow()
- FOR ll_i = dw_1.RowCount() TO 1 STEP -1
- IF dw_1.IsSelected(ll_i) THEN
- ll_row=ll_i
- END IF
- NEXT
- IF ll_row <= 0 THEN RETURN
- IF MessageBox('提示信息','确定删除当前选中组?', Question! ,YesNo! , 1 ) = 1 THEN
- ELSE
- RETURN
- END IF
- l_groupid = dw_1.Object.groupid[ll_row]
- DELETE From u_rep_group Where u_rep_group.groupid = :l_groupid;
- IF sqlca.SQLCode <> 0 THEN
- arG_MSG = "因网络或其它原因导致插入明细操作失败"+"~n"+sqlca.SQLErrText
- MessageBox("Error",arG_MSG)
- ROLLBACK Using sqlca;
- GOTO ext
- END IF
- COMMIT Using sqlca;
- dw_1.DeleteRow(ll_row)
- dw_1.SelectRow(dw_1.rowcount(),true)
- dw_1.SetRow(dw_1.rowcount())
- ext:
- RETURN
- end event
- type dw_1 from u_dw_rbtnfilter within w_rep_group
- integer x = 5
- integer y = 208
- integer width = 1403
- integer height = 1632
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_rep_group"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean rbutton_filter_use = true
- boolean rbutton_setposition_use = true
- boolean titleclick_sort_use = true
- end type
- event clicked;call super::clicked;long ll_groupid
- IF row <= 0 THEN RETURN
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- This.SetRow(row)
- IF dw_1.GetRow() <= 0 THEN
- ll_groupid = 0
- ELSE
- ll_groupid = dw_1.Object.groupid[dw_1.GetRow()]
- END IF
- dw_2.reset()
- dw_2.Retrieve(ll_groupid)
- //dw_3.reset()
- //dw_3.Retrieve(ll_groupid)
- wf_init(0)
- //IF cb_8.Enabled = True THEN
- // IF MessageBox('提示信息','是否保存报表设计?', Question! ,YesNo! , 1 ) = 1 THEN
- // cb_8.TriggerEvent(Clicked!)
- // END IF
- //END IF
- //rp_dw_row=row
- //f_bulid_rp(rp_dw_row)
- //Int LS_INT
- //FOR LS_INT = 1 To 20
- // dw_2.SetTabOrder (LS_INT,0 )
- //NEXT
- end event
- type dw_2 from u_dw_rbtnfilter within w_rep_group
- integer x = 1422
- integer y = 204
- integer width = 1755
- integer height = 1640
- integer taborder = 30
- boolean bringtotop = true
- string dataobject = "dw_rep_groupmx"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean rbutton_filter_use = true
- boolean rbutton_setposition_use = true
- boolean titleclick_sort_use = true
- end type
- event itemchanged;call super::itemchanged;
- //s_text=""
- //IF s_col = "" Or l_row = 0 THEN
- // s_col = dwo.Name
- // l_row = row
- // GOTO ext
- //END IF
- //
- //IF s_col = "sql_l1" THEN
- // IF rb_1.Checked = True THEN
- // dw_2.Object.sql_l1[l_row] = sle_1.Text
- // ELSE
- // dw_2.Object.sql_l1[l_row] = mle_1.Text
- // END IF
- //
- //ELSEIF dwo.Name = "sql_l2" THEN
- // IF rb_1.Checked = True THEN
- // dw_2.Object.sql_l2[l_row] = sle_1.Text
- // ELSE
- // dw_2.Object.sql_l2[l_row] = mle_1.Text
- // END IF
- //ELSEIF dwo.Name = "sql_r1" THEN
- // IF rb_1.Checked = True THEN
- // dw_2.Object.sql_r1[l_row] = sle_1.Text
- // ELSE
- // dw_2.Object.sql_r1[l_row] = mle_1.Text
- // END IF
- //ELSEIF dwo.Name = "sql_r2" THEN
- // IF rb_1.Checked = True THEN
- // dw_2.Object.sql_r2[l_row] = sle_1.Text
- // ELSE
- // dw_2.Object.sql_r2[l_row] = mle_1.Text
- // END IF
- //END IF
- //s_col = dwo.Name
- //l_row = row
- //ext:
- //RETURN
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- end event
- event clicked;call super::clicked;IF row <= 0 THEN RETURN
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- end event
- type cb_5 from uo_imflatbutton within w_rep_group
- integer x = 3383
- integer width = 192
- integer height = 164
- integer taborder = 210
- boolean bringtotop = true
- boolean enabled = false
- string text = "删行"
- string normalpicname = "delete.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;dw_2.DeleteRow(dw_2.GetRow())
- end event
- type cb_7 from uo_imflatbutton within w_rep_group
- integer x = 2112
- integer width = 384
- integer height = 164
- integer taborder = 220
- boolean bringtotop = true
- boolean enabled = false
- string text = "增客户联系人"
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;s_rep_group_parm s_sendmx, s_return
- Long i, j,ll_row
- s_edit_index_tran ss_tran
- OpenWithParm(w_email_seach_cust_group,ss_tran)
- s_return = Message.PowerObjectParm
- IF Not IsValid(s_return) THEN RETURN
- FOR i = 1 To UpperBound(s_return.s_group)
- FOR j = 1 To dw_2.RowCount()
- IF dw_2.Object.reltype[j] = s_return.s_group[i].reltype And dw_2.Object.relid[j] = s_return.s_group[i].relid And dw_2.Object.repid[j] = s_return.s_group[i].repid THEN
- GOTO ext1
- END IF
- NEXT
- ll_row = dw_2.InsertRow(0)
- dw_2.Object.groupid[ll_row] = groupid
- dw_2.Object.reltype[ll_row] = s_return.s_group[i].reltype
- dw_2.Object.relid[ll_row] = s_return.s_group[i].relid
- dw_2.Object.repid[ll_row] = s_return.s_group[i].repid
- ext1:
- NEXT
- wf_init(0)
- end event
- type cb_ext from uo_imflatbutton within w_rep_group
- integer x = 777
- integer width = 210
- integer height = 164
- integer taborder = 220
- boolean bringtotop = true
- string text = "退出"
- string normalpicname = "exit.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;close(parent)
- end event
- type cb_13 from uo_imflatbutton within w_rep_group
- integer x = 1426
- integer width = 192
- integer height = 164
- integer taborder = 190
- 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;groupid = 0
- f_get_rpid()
- IF groupid = 0 Or IsNull(groupid) THEN
- MessageBox("error","请选择组")
- return
- END IF
- dw_edit_mode = Not dw_edit_mode
- Int LS_INT
- FOR LS_INT = 1 To 20
- dw_2.SetTabOrder (LS_INT,LS_INT*10 )
- NEXT
- wf_face()
- end event
- type cb_8 from uo_imflatbutton within w_rep_group
- integer x = 1623
- integer width = 192
- integer height = 164
- integer taborder = 200
- boolean bringtotop = true
- boolean enabled = false
- string text = "保存"
- string normalpicname = "save.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;if save()=0 then
- MessageBox (publ_operator,"保存操作失败!",Exclamation!,OK!)
- dw_2.reset()
- dw_2.Retrieve(groupid)
- else
- MessageBox (publ_operator,"保存成功!",Exclamation!,OK!)
- end if
- dw_edit_mode = Not dw_edit_mode
- wf_face()
- end event
- type cb_9 from uo_imflatbutton within w_rep_group
- integer x = 1819
- integer width = 192
- integer height = 164
- integer taborder = 210
- boolean bringtotop = true
- boolean enabled = false
- string text = "放弃"
- string normalpicname = "delete.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;dw_edit_mode = Not dw_edit_mode
- wf_face()
- end event
- type cb_6 from uo_imflatbutton within w_rep_group
- integer x = 2505
- integer width = 439
- integer height = 164
- integer taborder = 230
- boolean bringtotop = true
- boolean enabled = false
- string text = "增供应商联系人"
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- s_rep_group_parm s_sendmx, s_return
- Long i,j, ll_row
- s_edit_index_tran ss_tran
- OpenWithParm(w_email_seach_spt_group,ss_tran)
- s_return = Message.PowerObjectParm
- IF Not IsValid(s_return) THEN RETURN
- FOR i = 1 To UpperBound(s_return.s_group)
- FOR j = 1 To dw_2.RowCount()
- IF dw_2.Object.reltype[j] = s_return.s_group[i].reltype And dw_2.Object.relid[j] = s_return.s_group[i].relid And dw_2.Object.repid[j] = s_return.s_group[i].repid THEN
- GOTO ext1
- END IF
- NEXT
- ll_row = dw_2.InsertRow(0)
- dw_2.Object.groupid[ll_row] = groupid
- dw_2.Object.reltype[ll_row] = s_return.s_group[i].reltype
- dw_2.Object.relid[ll_row] = s_return.s_group[i].relid
- dw_2.Object.repid[ll_row] = s_return.s_group[i].repid
- ext1:
- NEXT
- wf_init(0)
- end event
- type cb_10 from uo_imflatbutton within w_rep_group
- integer x = 2944
- integer width = 439
- integer height = 164
- integer taborder = 240
- boolean bringtotop = true
- boolean enabled = false
- string text = "增自定义组"
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- s_rep_group_parm s_sendmx, s_return
- Long i,j, ll_row
- s_edit_index_tran ss_tran
- OpenWithParm(w_email_seach_self_group,ss_tran)
- s_return = Message.PowerObjectParm
- IF Not IsValid(s_return) THEN RETURN
- FOR i = 1 To UpperBound(s_return.s_group)
- FOR j = 1 To dw_2.RowCount()
- IF dw_2.Object.reltype[j] = s_return.s_group[i].reltype And dw_2.Object.relid[j] = s_return.s_group[i].relid And dw_2.Object.repid[j] = s_return.s_group[i].repid THEN
- GOTO ext1
- END IF
- NEXT
- ll_row = dw_2.InsertRow(0)
- dw_2.Object.groupid[ll_row] = groupid
- dw_2.Object.reltype[ll_row] = s_return.s_group[i].reltype
- dw_2.Object.relid[ll_row] = s_return.s_group[i].relid
- dw_2.Object.repid[ll_row] = s_return.s_group[i].repid
- ext1:
- NEXT
- wf_init(0)
- end event
- type dw_3 from u_dw_rbtnfilter within w_rep_group
- integer x = 1824
- integer y = 208
- integer width = 1755
- integer height = 1640
- integer taborder = 40
- boolean bringtotop = true
- boolean titlebar = true
- string dataobject = "dw_rep_groupmx_copy"
- boolean controlmenu = true
- boolean minbox = true
- boolean maxbox = true
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean rbutton_filter_use = true
- boolean rbutton_setposition_use = true
- boolean titleclick_sort_use = true
- end type
- event clicked;call super::clicked;IF row <= 0 THEN RETURN
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- end event
- event itemchanged;call super::itemchanged;
- //s_text=""
- //IF s_col = "" Or l_row = 0 THEN
- // s_col = dwo.Name
- // l_row = row
- // GOTO ext
- //END IF
- //
- //IF s_col = "sql_l1" THEN
- // IF rb_1.Checked = True THEN
- // dw_2.Object.sql_l1[l_row] = sle_1.Text
- // ELSE
- // dw_2.Object.sql_l1[l_row] = mle_1.Text
- // END IF
- //
- //ELSEIF dwo.Name = "sql_l2" THEN
- // IF rb_1.Checked = True THEN
- // dw_2.Object.sql_l2[l_row] = sle_1.Text
- // ELSE
- // dw_2.Object.sql_l2[l_row] = mle_1.Text
- // END IF
- //ELSEIF dwo.Name = "sql_r1" THEN
- // IF rb_1.Checked = True THEN
- // dw_2.Object.sql_r1[l_row] = sle_1.Text
- // ELSE
- // dw_2.Object.sql_r1[l_row] = mle_1.Text
- // END IF
- //ELSEIF dwo.Name = "sql_r2" THEN
- // IF rb_1.Checked = True THEN
- // dw_2.Object.sql_r2[l_row] = sle_1.Text
- // ELSE
- // dw_2.Object.sql_r2[l_row] = mle_1.Text
- // END IF
- //END IF
- //s_col = dwo.Name
- //l_row = row
- //ext:
- //RETURN
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- end event
- type cb_11 from uo_imflatbutton within w_rep_group
- integer x = 3808
- integer width = 439
- integer height = 164
- integer taborder = 250
- boolean bringtotop = true
- string text = "展开所有分组"
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;datastore dw_x
- Long i,j,ll_groupid
- dw_x = Create datastore
- dw_x.DataObject = 'dw_rep_groupmx'
- dw_x.SetTransObject(sqlca)
- IF dw_2.RowCount() <= 0 THEN RETURN
- dw_3.Visible = Not dw_3.Visible
- IF dw_3.Visible = True THEN
- This.Text = "收起所有分组"
- ELSE
- This.Text = "展开所有分组"
- END IF
- IF dw_3.Visible = True THEN
- dw_3.Reset()
- FOR i = 1 To dw_2.RowCount()
- IF dw_2.Object.reltype[i] <> 2 THEN
- dw_2.RowsCopy (i,i,Primary!,dw_3,dw_3.RowCount() + 1,Primary!)
- ELSE
- dw_x.Reset()
- ll_groupid = dw_2.Object.relid[i]
- dw_x.Retrieve(ll_groupid)
- dw_x.RowsCopy (1,dw_x.RowCount(),Primary!,dw_3,dw_3.RowCount() + 1,Primary!)
- END IF
- NEXT
- wf_init(1)
- END IF
- end event
- type st_2 from statictext within w_rep_group
- integer x = 23
- integer y = 2772
- integer width = 2089
- integer height = 72
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 700
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 134217857
- long backcolor = 67108864
- string text = "提示:只有父项可添加子项,子项不能添加子项"
- boolean focusrectangle = false
- end type
- type ln_3 from line within w_rep_group
- long linecolor = 268435456
- integer linethickness = 18
- integer beginx = 1413
- integer beginy = 4
- integer endx = 1413
- integer endy = 160
- end type
|