123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392 |
- $PBExportHeader$w_email_move.srw
- forward
- global type w_email_move from window
- end type
- type st_9 from statictext within w_email_move
- end type
- type st_8 from statictext within w_email_move
- end type
- type sle_sendaddress from multilineedit within w_email_move
- end type
- type ddlb_sendaddess from dropdownlistbox within w_email_move
- end type
- type st_7 from statictext within w_email_move
- end type
- type sle_sendman from multilineedit within w_email_move
- end type
- type cbx_1 from checkbox within w_email_move
- end type
- type cb_3 from commandbutton within w_email_move
- end type
- type st_end from statictext within w_email_move
- end type
- type st_star from statictext within w_email_move
- end type
- type em_2 from editmask within w_email_move
- end type
- type st_6 from statictext within w_email_move
- end type
- type rb_2 from radiobutton within w_email_move
- end type
- type rb_1 from radiobutton within w_email_move
- end type
- type em_1 from editmask within w_email_move
- end type
- type ddlb_senddate from dropdownlistbox within w_email_move
- end type
- type st_5 from statictext within w_email_move
- end type
- type ddlb_sendman from dropdownlistbox within w_email_move
- end type
- type st_4 from statictext within w_email_move
- end type
- type cb_2 from commandbutton within w_email_move
- end type
- type cb_1 from commandbutton within w_email_move
- end type
- type sle_subject from singlelineedit within w_email_move
- end type
- type ddlb_subject from dropdownlistbox within w_email_move
- end type
- type st_3 from statictext within w_email_move
- end type
- type rb_4 from radiobutton within w_email_move
- end type
- type rb_3 from radiobutton within w_email_move
- end type
- type st_2 from statictext within w_email_move
- end type
- type st_1 from statictext within w_email_move
- end type
- type gb_1 from groupbox within w_email_move
- end type
- end forward
- global type w_email_move from window
- integer width = 2473
- integer height = 1696
- boolean titlebar = true
- string title = "邮件移入\移出文件夹"
- boolean controlmenu = true
- windowtype windowtype = response!
- long backcolor = 67108864
- string icon = "AppIcon!"
- boolean center = true
- st_9 st_9
- st_8 st_8
- sle_sendaddress sle_sendaddress
- ddlb_sendaddess ddlb_sendaddess
- st_7 st_7
- sle_sendman sle_sendman
- cbx_1 cbx_1
- cb_3 cb_3
- st_end st_end
- st_star st_star
- em_2 em_2
- st_6 st_6
- rb_2 rb_2
- rb_1 rb_1
- em_1 em_1
- ddlb_senddate ddlb_senddate
- st_5 st_5
- ddlb_sendman ddlb_sendman
- st_4 st_4
- cb_2 cb_2
- cb_1 cb_1
- sle_subject sle_subject
- ddlb_subject ddlb_subject
- st_3 st_3
- rb_4 rb_4
- rb_3 rb_3
- st_2 st_2
- st_1 st_1
- gb_1 gb_1
- end type
- global w_email_move w_email_move
- type variables
- s_tv_data1 tv_data
- long revboxid,tboxid
- end variables
- forward prototypes
- public function string of_globalreplace (string as_source, string as_old, string as_new)
- public function string wf_find (string arg_str)
- public subroutine wf_move ()
- end prototypes
- public function string of_globalreplace (string as_source, string as_old, string as_new);long ll_oldlen, ll_newlen, ll_pos
- as_source=trim(as_source)
- as_old=trim(as_old)
- 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 string wf_find (string arg_str);String ls_rslt
- Long ll_1,ll_2,i
- ll_1 = Pos(arg_str,"'")
- FOR i = ll_1 + 1 To Len(arg_str)
- IF Mid(arg_str,i,1) = "'" THEN
- ll_2 = i
- EXIT
- END IF
- NEXT
- ls_rslt=mid(arg_str,ll_1 + 1, ll_2 - ll_1 - 1)
- ls_rslt=of_globalreplace(ls_rslt,"%","")
- RETURN ls_rslt
- end function
- public subroutine wf_move ();//游标读收费项目
- String arry_sql[]
- Integer i
- DECLARE readitem_sql CURSOR FOR
- SELECT u_email_box.filter
- From u_email_box Where if_filter = 1;
-
- OPEN readitem_sql;
- i++
- FETCH readitem_sql Into :arry_sql[i];
- DO WHILE sqlca.SQLCode = 0
- i++
- FETCH readitem_sql Into :arry_sql[i];
- LOOP
- CLOSE readitem_sql;
- FOR i = 1 To UpperBound(arry_sql)
- IF arry_sql[i] <> "" THEN
- EXECUTE Immediate :arry_sql[i] Using sys_email_sqlca;
- IF sys_email_sqlca.SQLCode <> 0 THEN
- MessageBox("错误" , "移动邮件失败~n"+sys_email_sqlca.SQLErrText)
- GOTO ext
- END IF
- COMMIT;
- END IF
-
- NEXT
- ext:
- //w_email_view.cb_fresh.TriggerEvent(Clicked!)
- end subroutine
- on w_email_move.create
- this.st_9=create st_9
- this.st_8=create st_8
- this.sle_sendaddress=create sle_sendaddress
- this.ddlb_sendaddess=create ddlb_sendaddess
- this.st_7=create st_7
- this.sle_sendman=create sle_sendman
- this.cbx_1=create cbx_1
- this.cb_3=create cb_3
- this.st_end=create st_end
- this.st_star=create st_star
- this.em_2=create em_2
- this.st_6=create st_6
- this.rb_2=create rb_2
- this.rb_1=create rb_1
- this.em_1=create em_1
- this.ddlb_senddate=create ddlb_senddate
- this.st_5=create st_5
- this.ddlb_sendman=create ddlb_sendman
- this.st_4=create st_4
- this.cb_2=create cb_2
- this.cb_1=create cb_1
- this.sle_subject=create sle_subject
- this.ddlb_subject=create ddlb_subject
- this.st_3=create st_3
- this.rb_4=create rb_4
- this.rb_3=create rb_3
- this.st_2=create st_2
- this.st_1=create st_1
- this.gb_1=create gb_1
- this.Control[]={this.st_9,&
- this.st_8,&
- this.sle_sendaddress,&
- this.ddlb_sendaddess,&
- this.st_7,&
- this.sle_sendman,&
- this.cbx_1,&
- this.cb_3,&
- this.st_end,&
- this.st_star,&
- this.em_2,&
- this.st_6,&
- this.rb_2,&
- this.rb_1,&
- this.em_1,&
- this.ddlb_senddate,&
- this.st_5,&
- this.ddlb_sendman,&
- this.st_4,&
- this.cb_2,&
- this.cb_1,&
- this.sle_subject,&
- this.ddlb_subject,&
- this.st_3,&
- this.rb_4,&
- this.rb_3,&
- this.st_2,&
- this.st_1,&
- this.gb_1}
- end on
- on w_email_move.destroy
- destroy(this.st_9)
- destroy(this.st_8)
- destroy(this.sle_sendaddress)
- destroy(this.ddlb_sendaddess)
- destroy(this.st_7)
- destroy(this.sle_sendman)
- destroy(this.cbx_1)
- destroy(this.cb_3)
- destroy(this.st_end)
- destroy(this.st_star)
- destroy(this.em_2)
- destroy(this.st_6)
- destroy(this.rb_2)
- destroy(this.rb_1)
- destroy(this.em_1)
- destroy(this.ddlb_senddate)
- destroy(this.st_5)
- destroy(this.ddlb_sendman)
- destroy(this.st_4)
- destroy(this.cb_2)
- destroy(this.cb_1)
- destroy(this.sle_subject)
- destroy(this.ddlb_subject)
- destroy(this.st_3)
- destroy(this.rb_4)
- destroy(this.rb_3)
- destroy(this.st_2)
- destroy(this.st_1)
- destroy(this.gb_1)
- end on
- event open;
- String sql_filter
- Long if_filter
- tv_data = Message.PowerObjectParm
- IF rb_1.Checked = True THEN
- st_1.Text = "目标文件夹:" + tv_data.b_string
- st_2.Text = "源文件夹:" + tv_data.d_string + " 收件箱"
- ELSEIF rb_2.Checked = True THEN
- st_1.Text = "目标文件夹:" + tv_data.d_string + " 收件箱"
- st_2.Text = "源文件夹:" + tv_data.b_string
-
- END IF
- IF ddlb_senddate.Text <> "范围" THEN
- st_star.Visible = False
- st_end.Visible = False
- em_2.Visible = False
- END IF
- tboxid = tv_data.relid
- SELECT boxid Into :revboxid From u_email_box Where mailid = :tv_data.a_long And boxname = "收件箱";
- SELECT Filter,if_filter Into :sql_filter,:if_filter From u_email_box Where boxid = :tboxid Using sqlca;
- IF revboxid = 0 Or IsNull(revboxid) THEN
- MessageBox("错误","获取收件箱boxid出错")
- Close(This)
- END IF
- //messagebox(string(if_filter),sql_filter)
- Long L1,L2
- String temp,temp1
- String condition1,condition2,condition3,condition4
- String subject_condition1,sendman_condition2,sendaddress_condition3,senddate_condition4
- L1 = Pos(sql_filter,"where")
- L2 = Pos(sql_filter,"and mailtype")
- temp = Mid(sql_filter,L1 + 5 ,L2 - L1 -5)
- //MessageBox(String(L1),temp)
- IF Pos(temp," or") > 0 THEN
- // temp1 = temp +" or"
- rb_4.Checked = True
- L1 = Pos(temp,"#1s")
- L2 = Pos(temp,"#1e")
- subject_condition1 = Mid(temp,L1 + 3 ,L2 - L1 - 3)
- //
- L1 = Pos(temp,"#2s")
- L2 = Pos(temp,"#2e")
- sendman_condition2 = Mid(temp,L1 + 3 ,L2 - L1 - 3)
- //
- L1 = Pos(temp,"#3s")
- L2 = Pos(temp,"#3e")
- sendaddress_condition3 = Mid(temp,L1 + 3 ,L2 - L1 - 3)
- //
- L1 = Pos(temp,"#4s")
- L2 = Pos(temp,"#4e")
- senddate_condition4 = Mid(temp,L1 + 3 ,L2 - L1 - 3)
-
- ELSE
- rb_3.Checked = True
- // temp1 = temp +" and"
- L1 = Pos(temp,"#1s")
- L2 = Pos(temp,"#1e")
- subject_condition1 = Mid(temp,L1 + 3 ,L2 - L1 - 3)
- //
- L1 = Pos(temp,"#2s")
- L2 = Pos(temp,"#2e")
- sendman_condition2 = Mid(temp,L1 + 3 ,L2 - L1 - 3)
- //
- L1 = Pos(temp,"#3s")
- L2 = Pos(temp,"#3e")
- sendaddress_condition3 = Mid(temp,L1 + 3 ,L2 - L1 - 3)
- //
- L1 = Pos(temp,"#4s")
- L2 = Pos(temp,"#4e")
- senddate_condition4 = Mid(temp,L1 + 3 ,L2 - L1 - 3)
- END IF
- //MessageBox("1",subject_condition1)
- //MessageBox("2",sendman_condition2)
- //MessageBox("3",sendaddress_condition3)
- //MessageBox("4",senddate_condition4)
- IF subject_condition1 <> "" THEN
-
- IF Pos(condition1,"like") > 0 THEN
- ddlb_subject.Text = "包含"
- ELSE
- ddlb_subject.Text = "等于"
- END IF
- sle_subject.Text = wf_find(subject_condition1)
- END IF
- IF sendman_condition2 <> "" THEN
-
- ddlb_subject.Text = "等于"
- sendman_condition2 = of_globalreplace(sendman_condition2,"senduser in"," ")
- sendman_condition2 = of_globalreplace(sendman_condition2,"("," ")
- sendman_condition2 = of_globalreplace(sendman_condition2,")"," ")
- sle_sendman.Text = Trim(sendman_condition2)
- END IF
- IF sendaddress_condition3 <> "" THEN
-
- ddlb_sendaddess.Text = "等于"
- sendaddress_condition3 = of_globalreplace(sendaddress_condition3,"sendaddress in"," ")
- sendaddress_condition3 = of_globalreplace(sendaddress_condition3,"("," ")
- sendaddress_condition3 = of_globalreplace(sendaddress_condition3,")"," ")
- sle_sendaddress.Text = Trim(sendaddress_condition3)
- END IF
- IF senddate_condition4 <> "" THEN
- Integer ll_senddate
- String s1_senddate_condition4,s2_senddate_condition4
- ll_senddate = Pos(senddate_condition4,"and")
- IF ll_senddate > 0 THEN
- ddlb_senddate.Text = "范围"
- ddlb_senddate.TriggerEvent('selectionchanged')
- s1_senddate_condition4 = Left(senddate_condition4,ll_senddate )
- s2_senddate_condition4 = Right(senddate_condition4,Len(senddate_condition4) - ll_senddate )
- em_1.Text = wf_find(s1_senddate_condition4)
- em_2.Text = wf_find(s2_senddate_condition4)
- ELSE
- IF Pos(senddate_condition4,">=") > 0 THEN
- ddlb_senddate.Text = ">="
- ELSEIF Pos(senddate_condition4,"<=") > 0 THEN
- ddlb_senddate.Text = "<="
- ELSEIF Pos(senddate_condition4,">") > 0 THEN
- ddlb_senddate.Text = ">"
- ELSEIF Pos(senddate_condition4,"<") > 0 THEN
- ddlb_senddate.Text = "<"
- ELSEIF Pos(senddate_condition4,"=") > 0 THEN
- ddlb_senddate.Text = "="
- END IF
- em_1.Text = wf_find(senddate_condition4)
- END IF
-
-
-
- END IF
- //IF condition1 <> "" THEN
- // IF Pos(condition1,"subject") > 0 THEN
- // IF Pos(condition1,"like") > 0 THEN
- // ddlb_subject.Text = "包含"
- // ELSE
- // ddlb_subject.Text = "等于"
- // END IF
- // sle_subject.Text = wf_find(condition1)
- // ELSEIF Pos(condition1,"senduser") > 0 THEN
- // IF Pos(condition1,"like") > 0 THEN
- // ddlb_sendman.Text = "包含"
- // ELSE
- // ddlb_sendman.Text = "等于"
- // END IF
- // sle_sendman.Text = wf_find(condition1)
- // ELSEIF Pos(condition1,"revdate") > 0 THEN
- // IF Pos(condition2,"revdate") > 0 THEN
- // ddlb_senddate.Text = "范围"
- // ddlb_senddate.TriggerEvent('selectionchanged')
- // IF em_2.Text = "" THEN
- // em_2.Text = wf_find(condition2)
- // END IF
- // ELSEIF Pos(condition1,">=") > 0 THEN
- // ddlb_senddate.Text = ">="
- // ELSEIF Pos(condition1,"<=") > 0 THEN
- // ddlb_senddate.Text = "<="
- // ELSEIF Pos(condition1,">") > 0 THEN
- // ddlb_senddate.Text = ">"
- // ELSEIF Pos(condition1,"<") > 0 THEN
- // ddlb_senddate.Text = "<"
- // ELSEIF Pos(condition1,"=") > 0 THEN
- // ddlb_senddate.Text = "="
- //
- // END IF
- // IF em_1.Text = "" THEN
- // em_1.Text = wf_find(condition1)
- // END IF
- // END IF
- //END IF
- //IF condition2 <> "" THEN
- // IF Pos(condition2,"subject") > 0 THEN
- // IF Pos(condition2,"like") > 0 THEN
- // ddlb_subject.Text = "包含"
- // ELSE
- // ddlb_subject.Text = "等于"
- // END IF
- // sle_subject.Text = wf_find(condition2)
- // ELSEIF Pos(condition2,"senduser") > 0 THEN
- // IF Pos(condition2,"like") > 0 THEN
- // ddlb_sendman.Text = "包含"
- // ELSE
- // ddlb_sendman.Text = "等于"
- // END IF
- // sle_sendman.Text = wf_find(condition2)
- // ELSEIF Pos(condition2,"revdate") > 0 THEN
- // IF Pos(condition3,"revdate") > 0 THEN
- // ddlb_senddate.Text = "范围"
- // ddlb_senddate.TriggerEvent('selectionchanged')
- // IF em_2.Text = "" THEN
- // em_2.Text = wf_find(condition3)
- // END IF
- // ELSEIF Pos(condition2,">=") > 0 THEN
- // ddlb_senddate.Text = ">="
- // ELSEIF Pos(condition2,"<=") > 0 THEN
- // ddlb_senddate.Text = "<="
- // ELSEIF Pos(condition2,">") > 0 THEN
- // ddlb_senddate.Text = ">"
- // ELSEIF Pos(condition2,"<") > 0 THEN
- // ddlb_senddate.Text = "<"
- // ELSEIF Pos(condition2,"=") > 0 THEN
- // ddlb_senddate.Text = "="
- //
- // END IF
- // IF em_1.Text = "" THEN
- // em_1.Text = wf_find(condition2)
- // END IF
- // END IF
- //END IF
- //
- //IF condition3 <> "" THEN
- // IF Pos(condition3,"subject") > 0 THEN
- // IF Pos(condition3,"like") > 0 THEN
- // ddlb_subject.Text = "包含"
- // ELSE
- // ddlb_subject.Text = "等于"
- // END IF
- // sle_subject.Text = wf_find(condition3)
- // ELSEIF Pos(condition3,"senduser") > 0 THEN
- // IF Pos(condition3,"like") > 0 THEN
- // ddlb_sendman.Text = "包含"
- // ELSE
- // ddlb_sendman.Text = "等于"
- // END IF
- // sle_sendman.Text = wf_find(condition3)
- // ELSEIF Pos(condition3,"revdate") > 0 THEN
- // IF Pos(condition4,"revdate") > 0 THEN
- // ddlb_senddate.Text = "范围"
- // ddlb_senddate.TriggerEvent('selectionchanged')
- // IF em_2.Text = "" THEN
- // em_2.Text = wf_find(condition4)
- // END IF
- // ELSEIF Pos(condition3,">=") > 0 THEN
- // ddlb_senddate.Text = ">="
- // ELSEIF Pos(condition3,"<=") > 0 THEN
- // ddlb_senddate.Text = "<="
- // ELSEIF Pos(condition3,">") > 0 THEN
- // ddlb_senddate.Text = ">"
- // ELSEIF Pos(condition3,"<") > 0 THEN
- // ddlb_senddate.Text = "<"
- // ELSEIF Pos(condition3,"=") > 0 THEN
- // ddlb_senddate.Text = "="
- //
- // END IF
- // IF em_1.Text = "" THEN
- // em_1.Text = wf_find(condition3)
- // END IF
- // END IF
- //END IF
- end event
- type st_9 from statictext within w_email_move
- integer x = 315
- integer y = 1108
- integer width = 1111
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 134217857
- long backcolor = 67108864
- string text = "例子 ~'123456@qq.com~',~'789123@163.com~'"
- boolean focusrectangle = false
- end type
- type st_8 from statictext within w_email_move
- integer x = 325
- integer y = 872
- integer width = 727
- integer height = 48
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 134217857
- long backcolor = 67108864
- string text = "例子 ~'张三~',~'李四~'"
- boolean focusrectangle = false
- end type
- type sle_sendaddress from multilineedit within w_email_move
- integer x = 1477
- integer y = 956
- integer width = 800
- integer height = 264
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean vscrollbar = true
- boolean autovscroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type ddlb_sendaddess from dropdownlistbox within w_email_move
- integer x = 722
- integer y = 972
- integer width = 617
- integer height = 400
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "等于"
- string item[] = {"等于",""}
- borderstyle borderstyle = stylelowered!
- end type
- type st_7 from statictext within w_email_move
- integer x = 320
- integer y = 964
- integer width = 288
- integer height = 88
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "发件人邮箱"
- boolean focusrectangle = false
- end type
- type sle_sendman from multilineedit within w_email_move
- integer x = 1477
- integer y = 748
- integer width = 800
- integer height = 164
- integer taborder = 50
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean vscrollbar = true
- boolean autovscroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type cbx_1 from checkbox within w_email_move
- integer x = 133
- integer y = 1540
- integer width = 805
- integer height = 60
- 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
- type cb_3 from commandbutton within w_email_move
- integer x = 987
- integer y = 1488
- integer width = 434
- integer height = 112
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "保存规则"
- end type
- event clicked;String ls_subject,ls_sendman,ls_sendaddress,ls_senddate,ls_senddate1,ls_choose_revdate,ls_sql1,ls_sql
- String ls_choose_subject,ls_choose_sendman
- ls_subject = Trim(sle_subject.Text)
- ls_sendman = Trim(sle_sendman.Text)
- ls_sendaddress= Trim(sle_sendaddress.Text)
- ls_senddate = "'" +Trim(em_1.Text) + "'"
- ls_senddate1 = "'" +Trim(em_2.Text) + "'"
- ls_choose_subject = Trim(ddlb_subject.Text)
- ls_choose_sendman = Trim(ddlb_sendman.Text)
- ls_choose_revdate = Trim(ddlb_senddate.Text)
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////
- IF rb_3.Checked = True THEN //满足以下所有条件
- IF ls_subject <> "" THEN
- IF ls_choose_subject = "包含" THEN
- ls_sql = "#1s(subject like '%" + ls_subject + "%')#1e"
- ELSEIF ls_choose_subject = "等于" THEN
- ls_sql = "#1s(subject = '" + ls_subject + "')#1e"
- END IF
-
- END IF
-
- IF ls_sendman <> "" THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and "
-
- ls_sql = ls_sql + "#2s(senduser in ( " + ls_sendman + " ) )#2e"
-
-
- END IF
-
- IF ls_sendaddress <> "" THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and "
-
- ls_sql = ls_sql + "#3s(sendaddress in ( " + ls_sendaddress + " ) )#3e"
-
-
- END IF
-
- IF ls_senddate <> "''" And Date(Trim(em_1.Text)) <> Date("1900-01-01") THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and "
- IF ls_choose_revdate <> "范围" THEN
- ls_sql = ls_sql + "#4s(convert(char(10),revdate,120) " + ls_choose_revdate + ls_senddate + ")#4e"
- ELSE
- IF Date(Trim(em_2.Text)) <> Date("1900-01-01") THEN
- ls_sql = ls_sql + "#4s(convert(char(10),revdate,120) >= " + ls_senddate + " and convert(char(10),revdate,120) <= " + ls_senddate1 + ")#4e"
- END IF
- END IF
-
- END IF
-
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and mailtype ='收件'"
-
-
- ELSEIF rb_4.Checked = True THEN //满足以下任意条件
- IF ls_subject <> "" THEN
- IF ls_choose_subject = "包含" THEN
- ls_sql = "#1s(subject like '%" + ls_subject + "%')#1e"
- ELSEIF ls_choose_subject = "等于" THEN
- ls_sql = "#1s(subject = '" + ls_subject + "')#1e"
- END IF
-
- END IF
-
- IF ls_sendman <> "" THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " or "
-
- ls_sql = ls_sql + "#2s(senduser in ( " + ls_sendman + " ) )#2e"
-
-
- END IF
-
- IF ls_sendaddress <> "" THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " or "
-
- ls_sql = ls_sql + "#3s(sendaddress in ( " + ls_sendaddress + " ) )#3e"
-
-
- END IF
-
- IF ls_senddate <> "''" And Date(Trim(em_1.Text)) <> Date("1900-01-01") THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " or "
- IF ls_choose_revdate <> "范围" THEN
- ls_sql = ls_sql + "#4s(convert(char(10),revdate,120) " + ls_choose_revdate + ls_senddate + ")#4e"
- ELSE
- IF Date(Trim(em_2.Text)) <> Date("1900-01-01") THEN
- ls_sql = ls_sql + "#4s(convert(char(10),revdate,120) >= " + ls_senddate + " and convert(char(10),revdate,120) <= " + ls_senddate1 + ")#4e"
- END IF
- END IF
-
- END IF
-
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and mailtype ='收件'"
-
-
- END IF
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ls_sql1 = ""
- IF rb_1.Checked = True THEN //从收件箱移入到文件夹
- IF ls_sql <> "" THEN
- ls_sql1 = "update u_email_msg set boxid=" + String(tboxid) +" where " + ls_sql + "and boxid=" + String(revboxid)
- END IF
- ELSEIF rb_2.Checked = True THEN //从文件夹移出到收件箱
- IF ls_sql <> "" THEN
- ls_sql1 = "update u_email_msg set boxid=" + String(revboxid) +" where " + ls_sql + "and boxid=" + String(tboxid)
- END IF
- END IF
- ls_sql1=of_globalreplace(ls_sql1,"‘","'")
- ls_sql1=of_globalreplace(ls_sql1,"’","'")
- ls_sql1=of_globalreplace(ls_sql1,",",",")
- //messagebox("",ls_sql1)
- Long if_filter = 0
- IF rb_1.Checked = True THEN
- IF cbx_1.Checked = True THEN
- if_filter = 1
- END IF
- UPDATE u_email_box Set Filter = :ls_sql1,if_filter = :if_filter Where boxid = :tboxid Using sqlca;
-
-
-
- IF sqlca.SQLCode <> 0 THEN
- MessageBox("错误" , "保存规则失败~n"+sqlca.SQLErrText)
- GOTO ext
- END IF
- COMMIT;
- MessageBox("成功","保存规则成功")
- ext:
-
-
- END IF
- end event
- type st_end from statictext within w_email_move
- integer x = 1349
- integer y = 1372
- integer width = 123
- integer height = 76
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "结束"
- boolean focusrectangle = false
- end type
- type st_star from statictext within w_email_move
- integer x = 1353
- integer y = 1268
- integer width = 123
- integer height = 76
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "开始"
- boolean focusrectangle = false
- end type
- type em_2 from editmask within w_email_move
- integer x = 1472
- integer y = 1352
- integer width = 800
- integer height = 84
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- maskdatatype maskdatatype = datemask!
- string mask = "yyyy-mm-dd"
- boolean dropdowncalendar = true
- end type
- type st_6 from statictext within w_email_move
- integer x = 114
- integer y = 1460
- integer width = 864
- integer height = 64
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "(发件人 不包括 <邮箱地址> 部分)"
- boolean focusrectangle = false
- end type
- type rb_2 from radiobutton within w_email_move
- integer x = 1472
- integer y = 16
- integer width = 841
- integer height = 80
- 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;IF rb_1.Checked = True THEN
- st_1.Text = "目标文件夹:" + tv_data.b_string
- st_2.Text = "源文件夹:" + tv_data.d_string + " 收件箱"
- ELSEIF rb_2.Checked = True THEN
- st_1.Text = "目标文件夹:" + tv_data.d_string + " 收件箱"
- st_2.Text = "源文件夹:" + tv_data.b_string
-
- END IF
- end event
- type rb_1 from radiobutton within w_email_move
- integer x = 110
- integer y = 16
- integer width = 841
- integer height = 80
- 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;IF rb_1.Checked = True THEN
- st_1.Text = "目标文件夹:" + tv_data.b_string
- st_2.Text = "源文件夹:" + tv_data.d_string + " 收件箱"
- ELSEIF rb_2.Checked = True THEN
- st_1.Text = "目标文件夹:" + tv_data.d_string + " 收件箱"
- st_2.Text = "源文件夹:" + tv_data.b_string
-
- END IF
- end event
- type em_1 from editmask within w_email_move
- integer x = 1472
- integer y = 1268
- integer width = 800
- integer height = 84
- integer taborder = 50
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- maskdatatype maskdatatype = datemask!
- string mask = "yyyy-mm-dd"
- boolean dropdowncalendar = true
- end type
- type ddlb_senddate from dropdownlistbox within w_email_move
- integer x = 731
- integer y = 1268
- integer width = 617
- integer height = 548
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "="
- boolean sorted = false
- string item[] = {">","<","=",">=","<=","范围"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;IF ddlb_senddate.Text <> "范围" THEN
- st_star.Visible = False
- st_end.Visible = False
- em_2.Visible = False
- ELSE
- st_star.Visible = True
- st_end.Visible = True
- em_2.Visible = True
- END IF
- end event
- type st_5 from statictext within w_email_move
- integer x = 329
- integer y = 1260
- integer width = 311
- integer height = 88
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "发送日期"
- boolean focusrectangle = false
- end type
- type ddlb_sendman from dropdownlistbox within w_email_move
- integer x = 731
- integer y = 764
- integer width = 617
- integer height = 400
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "等于"
- string item[] = {"等于",""}
- borderstyle borderstyle = stylelowered!
- end type
- type st_4 from statictext within w_email_move
- integer x = 329
- integer y = 756
- integer width = 187
- integer height = 88
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "发件人"
- boolean focusrectangle = false
- end type
- type cb_2 from commandbutton within w_email_move
- integer x = 1888
- integer y = 1488
- integer width = 471
- integer height = 112
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "取消"
- end type
- event clicked;close(parent)
- end event
- type cb_1 from commandbutton within w_email_move
- integer x = 1431
- integer y = 1488
- integer width = 443
- integer height = 112
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "立即执行"
- end type
- event clicked;String ls_subject,ls_sendman,ls_sendaddress,ls_senddate,ls_senddate1,ls_choose_revdate,ls_sql1,ls_sql
- String ls_choose_subject,ls_choose_sendman
- ls_subject = Trim(sle_subject.Text)
- ls_sendman = Trim(sle_sendman.Text)
- ls_sendaddress= Trim(sle_sendaddress.Text)
- ls_senddate = "'" +Trim(em_1.Text) + "'"
- ls_senddate1 = "'" +Trim(em_2.Text) + "'"
- ls_choose_subject = Trim(ddlb_subject.Text)
- ls_choose_sendman = Trim(ddlb_sendman.Text)
- ls_choose_revdate = Trim(ddlb_senddate.Text)
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////
- IF rb_3.Checked = True THEN //满足以下所有条件
- IF ls_subject <> "" THEN
- IF ls_choose_subject = "包含" THEN
- ls_sql = "#1s(subject like '%" + ls_subject + "%')#1e"
- ELSEIF ls_choose_subject = "等于" THEN
- ls_sql = "#1s(subject = '" + ls_subject + "')#1e"
- END IF
-
- END IF
-
- IF ls_sendman <> "" THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and "
-
- ls_sql = ls_sql + "#2s(senduser in ( " + ls_sendman + " ) )#2e"
-
-
- END IF
-
- IF ls_sendaddress <> "" THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and "
-
- ls_sql = ls_sql + "#3s(sendaddress in ( " + ls_sendaddress + " ) )#3e"
-
-
- END IF
-
- IF ls_senddate <> "''" And Date(Trim(em_1.Text)) <> Date("1900-01-01") THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and "
- IF ls_choose_revdate <> "范围" THEN
- ls_sql = ls_sql + "#4s(convert(char(10),revdate,120) " + ls_choose_revdate + ls_senddate + ")#4e"
- ELSE
- IF Date(Trim(em_2.Text)) <> Date("1900-01-01") THEN
- ls_sql = ls_sql + "#4s(convert(char(10),revdate,120) >= " + ls_senddate + " and convert(char(10),revdate,120) <= " + ls_senddate1 + ")#4e"
- END IF
- END IF
-
- END IF
-
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and mailtype ='收件'"
-
-
- ELSEIF rb_4.Checked = True THEN //满足以下任意条件
- IF ls_subject <> "" THEN
- IF ls_choose_subject = "包含" THEN
- ls_sql = "#1s(subject like '%" + ls_subject + "%')#1e"
- ELSEIF ls_choose_subject = "等于" THEN
- ls_sql = "#1s(subject = '" + ls_subject + "')#1e"
- END IF
-
- END IF
-
- IF ls_sendman <> "" THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " or "
-
- ls_sql = ls_sql + "#2s(senduser in ( " + ls_sendman + " ) )#2e"
-
-
- END IF
-
- IF ls_sendaddress <> "" THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " or "
-
- ls_sql = ls_sql + "#3s(sendaddress in ( " + ls_sendaddress + " ) )#3e"
-
-
- END IF
-
- IF ls_senddate <> "''" And Date(Trim(em_1.Text)) <> Date("1900-01-01") THEN
- IF ls_sql <> "" THEN ls_sql = ls_sql + " or "
- IF ls_choose_revdate <> "范围" THEN
- ls_sql = ls_sql + "#4s(convert(char(10),revdate,120) " + ls_choose_revdate + ls_senddate + ")#4e"
- ELSE
- IF Date(Trim(em_2.Text)) <> Date("1900-01-01") THEN
- ls_sql = ls_sql + "#4s(convert(char(10),revdate,120) >= " + ls_senddate + " and convert(char(10),revdate,120) <= " + ls_senddate1 + ")#4e"
- END IF
- END IF
-
- END IF
-
- IF ls_sql <> "" THEN ls_sql = ls_sql + " and mailtype ='收件'"
-
-
- END IF
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ls_sql1 = ""
- IF rb_1.Checked = True THEN //从收件箱移入到文件夹
- IF ls_sql <> "" THEN
- ls_sql1 = "update u_email_msg set boxid=" + String(tboxid) +" where " + ls_sql + "and boxid=" + String(revboxid)
- END IF
- ELSEIF rb_2.Checked = True THEN //从文件夹移出到收件箱
- IF ls_sql <> "" THEN
- ls_sql1 = "update u_email_msg set boxid=" + String(revboxid) +" where " + ls_sql + "and boxid=" + String(tboxid)
- END IF
- END IF
- ls_sql1=of_globalreplace(ls_sql1,"‘","'")
- ls_sql1=of_globalreplace(ls_sql1,"’","'")
- ls_sql1=of_globalreplace(ls_sql1,",",",")
- ls_sql1=of_globalreplace(ls_sql1,"#1s"," ")
- ls_sql1=of_globalreplace(ls_sql1,"#2s"," ")
- ls_sql1=of_globalreplace(ls_sql1,"#3s"," ")
- ls_sql1=of_globalreplace(ls_sql1,"#4s"," ")
- ls_sql1=of_globalreplace(ls_sql1,"#1e"," ")
- ls_sql1=of_globalreplace(ls_sql1,"#2e"," ")
- ls_sql1=of_globalreplace(ls_sql1,"#3e"," ")
- ls_sql1=of_globalreplace(ls_sql1,"#4e"," ")
- //messagebox("",ls_sql1)
- IF ls_sql1 <> "" THEN
- EXECUTE Immediate :ls_sql1 Using sys_email_sqlca;
- IF sys_email_sqlca.SQLCode <> 0 THEN
- MessageBox("错误" , "移动邮件失败~n"+sys_email_sqlca.SQLErrText)
- GOTO ext
- END IF
- COMMIT;
- ext:
-
-
- Close(Parent)
- END IF
- end event
- type sle_subject from singlelineedit within w_email_move
- integer x = 1472
- integer y = 608
- integer width = 800
- integer height = 84
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- end type
- type ddlb_subject from dropdownlistbox within w_email_move
- integer x = 731
- integer y = 608
- integer width = 617
- integer height = 400
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "包含"
- string item[] = {"包含","等于"}
- borderstyle borderstyle = stylelowered!
- end type
- type st_3 from statictext within w_email_move
- integer x = 329
- integer y = 608
- integer width = 187
- integer height = 88
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "主题"
- boolean focusrectangle = false
- end type
- type rb_4 from radiobutton within w_email_move
- integer x = 1472
- integer y = 476
- integer width = 695
- integer height = 80
- 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 rb_3 from radiobutton within w_email_move
- integer x = 315
- integer y = 472
- integer width = 695
- integer height = 80
- 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
- type st_2 from statictext within w_email_move
- integer x = 105
- integer y = 256
- integer width = 1691
- integer height = 88
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "源文件夹"
- boolean focusrectangle = false
- end type
- type st_1 from statictext within w_email_move
- integer x = 105
- integer y = 140
- integer width = 1691
- integer height = 88
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "目标文件夹"
- boolean focusrectangle = false
- end type
- type gb_1 from groupbox within w_email_move
- integer x = 110
- integer y = 372
- integer width = 2235
- integer height = 1084
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "条件"
- end type
|