w_email_rev.srw 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456
  1. $PBExportHeader$w_email_rev.srw
  2. forward
  3. global type w_email_rev from w_publ_base
  4. end type
  5. type cb_back from uo_imflatbutton within w_email_rev
  6. end type
  7. type cb_sendother from uo_imflatbutton within w_email_rev
  8. end type
  9. type cb_pageup from uo_imflatbutton within w_email_rev
  10. end type
  11. type cb_pagedown from uo_imflatbutton within w_email_rev
  12. end type
  13. type cb_del from uo_imflatbutton within w_email_rev
  14. end type
  15. type cb_print from uo_imflatbutton within w_email_rev
  16. end type
  17. type st_1 from statictext within w_email_rev
  18. end type
  19. type st_2 from statictext within w_email_rev
  20. end type
  21. type st_3 from statictext within w_email_rev
  22. end type
  23. type st_4 from statictext within w_email_rev
  24. end type
  25. type st_5 from statictext within w_email_rev
  26. end type
  27. type st_6 from statictext within w_email_rev
  28. end type
  29. type st_senduser from statictext within w_email_rev
  30. end type
  31. type st_mailuser from statictext within w_email_rev
  32. end type
  33. type st_revdate from statictext within w_email_rev
  34. end type
  35. type st_subject from statictext within w_email_rev
  36. end type
  37. type st_mailaddress from statictext within w_email_rev
  38. end type
  39. type st_sendaddress from statictext within w_email_rev
  40. end type
  41. type lv_fj from uo_email_lv within w_email_rev
  42. end type
  43. type ole_1 from olecustomcontrol within w_email_rev
  44. end type
  45. type ln_bar from line within w_email_rev
  46. end type
  47. type ln_bar2 from line within w_email_rev
  48. end type
  49. type r_bar from rectangle within w_email_rev
  50. end type
  51. type ln_1 from line within w_email_rev
  52. end type
  53. type ln_2 from line within w_email_rev
  54. end type
  55. end forward
  56. global type w_email_rev from w_publ_base
  57. integer width = 3611
  58. integer height = 2380
  59. string title = "已接收邮件"
  60. boolean maxbox = true
  61. cb_back cb_back
  62. cb_sendother cb_sendother
  63. cb_pageup cb_pageup
  64. cb_pagedown cb_pagedown
  65. cb_del cb_del
  66. cb_print cb_print
  67. st_1 st_1
  68. st_2 st_2
  69. st_3 st_3
  70. st_4 st_4
  71. st_5 st_5
  72. st_6 st_6
  73. st_senduser st_senduser
  74. st_mailuser st_mailuser
  75. st_revdate st_revdate
  76. st_subject st_subject
  77. st_mailaddress st_mailaddress
  78. st_sendaddress st_sendaddress
  79. lv_fj lv_fj
  80. ole_1 ole_1
  81. ln_bar ln_bar
  82. ln_bar2 ln_bar2
  83. r_bar r_bar
  84. ln_1 ln_1
  85. ln_2 ln_2
  86. end type
  87. global w_email_rev w_email_rev
  88. type variables
  89. //s_edit_index_tran s_tran
  90. //long cur_row
  91. //long all_row
  92. //long cur_revid[]
  93. string fjfilepathname = 'fjtemp'
  94. //Boolean have_text = false
  95. //Boolean have_html = false
  96. boolean have_fj = false
  97. //long cur_mailtype = 0
  98. uo_email obj_email
  99. s_email_set cur_set
  100. s_email_send s_send
  101. transaction Commit_Tran // 帐号表所有数据库
  102. transaction fj_tran // 邮件附件数据库
  103. string C_Sys_admsg_fj = 'Sys_admsg_fj'
  104. string C_u_email_fj = 'u_email_fj'
  105. string C_from_file = 'from_file'
  106. end variables
  107. forward prototypes
  108. public function integer wf_retrieve (long arg_revid, ref string arg_msg)
  109. public function integer wf_sethtml (string arg_html)
  110. public subroutine wf_blob_runfj (ref blob arg_blob, string arg_filename)
  111. public subroutine wf_blob_saveas (ref blob arg_blob, string arg_filename)
  112. public function integer wf_admsg_getfjblob (long arg_fjid, ref blob arg_fjblob, ref string arg_msg)
  113. public function integer wf_mail_getfjblob (long arg_fjid, ref blob arg_fjblob, string arg_msg)
  114. public subroutine wf_pic ()
  115. end prototypes
  116. public function integer wf_retrieve (long arg_revid, ref string arg_msg);int rslt = 1
  117. /////////////////////////
  118. if obj_email.uf_get_send(arg_revid, s_send, arg_msg) <> 1 then
  119. rslt = 0
  120. goto ext
  121. end if
  122. st_senduser.text = s_send.senduser
  123. st_sendaddress.text = s_send.sendaddress
  124. if s_send.mailtype = '收件' then
  125. st_mailuser.text = cur_set.mailuser
  126. st_mailaddress.text = cur_set.mailaddress
  127. else
  128. st_mailuser.text = obj_email.wf_ds_getuser(arg_revid)
  129. st_mailaddress.text = obj_email.wf_ds_getaddress(arg_revid)
  130. end if
  131. st_revdate.Text = String(s_send.revdate,'YYYY-MM-DD HH:MM')
  132. st_subject.text = s_send.subject
  133. wf_sethtml(s_send.htmlbody)
  134. lv_fj.DeleteItems( )
  135. s_email_lvfj s_lvfj[]
  136. ListViewItem l_lvi
  137. long i
  138. if obj_email.uf_get_fj(s_send.sendid, s_lvfj, arg_msg, false) <> 1 then
  139. rslt = 0
  140. goto ext
  141. end if
  142. for i = 1 to UPPERBOUND(s_lvfj)
  143. l_lvi.PictureIndex = 1
  144. l_lvi.Label = s_lvfj[i].Filename
  145. l_lvi.Data = s_lvfj[i]
  146. lv_fj.additem(l_lvi)
  147. next
  148. have_fj = (UPPERBOUND(s_lvfj) > 0)
  149. lv_fj.visible = have_fj
  150. wf_pic()
  151. ext:
  152. this.triggerevent('resize')
  153. return rslt
  154. //String ls_mailuser
  155. //String ls_mailaddress
  156. //String ls_senduser
  157. //String ls_sendaddress
  158. //DateTime ld_revdate
  159. //String ls_subject
  160. //Blob lb_html, lb_text
  161. //String ls_text
  162. //String ls_html
  163. //String Pathname
  164. //
  165. /////清空
  166. //Pathname = sys_cur_path + 'temp.html'
  167. //IF FileExists(Pathname) THEN FileDelete(Pathname)
  168. //st_senduser.Text = ''
  169. //st_mailuser.Text = ''
  170. //st_mailaddress.Text = ''
  171. //st_senduser.Text = ''
  172. //st_sendaddress.Text = ''
  173. //st_revdate.Text = ''
  174. //st_subject.Text = ''
  175. //have_text = FALSE
  176. //have_html = FALSE
  177. ////tab_1.tabpage_1.mle_text.Text = ''
  178. ////tab_1.tabpage_2.ole_html.Object.navigate('about:blank')
  179. //////读取
  180. //ole_1.object.navigate('about:blank')
  181. //
  182. //SELECT u_email_rev.mailaddress,
  183. // u_email_rev.Subject,
  184. // u_email_rev.senduser,
  185. // u_email_rev.sendaddress,
  186. // u_email_rev.revdate,
  187. // u_email_set.mailuser,
  188. // u_email_rev.textBody,
  189. // u_email_rev.mailtype
  190. // INTO :ls_mailaddress,
  191. // :ls_subject,
  192. // :ls_senduser,
  193. // :ls_sendaddress,
  194. // :ld_revdate,
  195. // :ls_mailuser,
  196. // :ls_text,
  197. // :cur_mailtype
  198. // FROM u_email_rev,
  199. // u_email_set
  200. // WHERE ( u_email_rev.mailID = u_email_set.mailID ) AND
  201. // ( u_email_rev.revid = :arg_revid ) ;
  202. //IF sqlca.SQLCode <> 0 THEN
  203. // arg_msg = '读取已收邮件失败'+sqlca.SQLErrText
  204. // rslt = 0
  205. // GOTO ext
  206. //END IF
  207. //
  208. //IF cur_mailtype = 0 THEN
  209. // IF obj_email.f_read(arg_revid,arg_msg) = 0 THEN
  210. // rslt = 0
  211. // GOTO ext
  212. // END IF
  213. //END IF
  214. //
  215. //
  216. //st_senduser.Text = ls_senduser
  217. //st_mailuser.Text = ls_mailuser
  218. //st_mailaddress.Text = ls_mailaddress
  219. //st_senduser.Text = ls_senduser
  220. //st_sendaddress.Text = ls_sendaddress
  221. //st_revdate.Text = String(ld_revdate,'YYYY-MM-DD HH:MM')
  222. //st_subject.Text = ls_subject
  223. //
  224. //
  225. //IF IsNull(ls_text) OR len(trim(ls_text)) <= 0 THEN
  226. //
  227. //ELSE
  228. //// tab_1.tabpage_1.mle_text.Text = ls_text
  229. // have_text = TRUE
  230. //END IF
  231. //
  232. //////
  233. //select datalength(htmltext) INTO :ll_size
  234. //from u_email_rev
  235. //where ( u_email_rev.revid = :arg_revid );
  236. //if sqlca.sqlcode <> 0 then
  237. // rslt = 0
  238. // arg_msg = '获取网页正文大小失败>>'+sqlca.SQLErrText
  239. // GOTO ext
  240. //END IF
  241. //
  242. //if ll_size > 2048 then
  243. // SELECTBLOB htmltext
  244. // INTO :lb_html
  245. // FROM u_email_rev
  246. // Where ( u_email_rev.revid = :arg_revid ) ;
  247. // IF sqlca.SQLCode <> 0 THEN
  248. // rslt = 0
  249. // arg_msg = '下载网页正文失败>>'+sqlca.SQLErrText
  250. // GOTO ext
  251. // END IF
  252. //else
  253. // SELECT htmltext
  254. // INTO :ls_html
  255. // FROM u_email_rev
  256. // Where ( u_email_rev.revid = :arg_revid ) ;
  257. // IF sqlca.SQLCode <> 0 THEN
  258. // rslt = 0
  259. // arg_msg = '下载网页正文失败>>'+sqlca.SQLErrText
  260. // GOTO ext
  261. // END IF
  262. // lb_html = blob(ls_html)
  263. //end if
  264. //
  265. ////ls_html = String(lb_html)
  266. //IF IsNull(lb_html) OR len(trim(string(lb_html))) <= 0 THEN
  267. //
  268. //ELSE
  269. // have_html = TRUE
  270. // ////
  271. //
  272. //
  273. //// tab_1.tabpage_2.ole_html.Object.navigate('file:///' + Pathname)
  274. //END IF
  275. //
  276. //
  277. //if have_html then
  278. // IF f_blobtofile(Pathname,lb_html,arg_msg) = 0 THEN
  279. // rslt = 0
  280. // GOTO ext
  281. // END IF
  282. // DO WHILE Pos(Pathname,'\',1) > 0
  283. // Pathname = Replace(Pathname,Pos(Pathname,'\',1),1,'/')
  284. // LOOP
  285. // ole_1.object.navigate('file:///' + Pathname)
  286. //elseif have_text then
  287. // lb_text = blob(f_texttohtml(ls_text))
  288. // IF f_blobtofile(Pathname,lb_text,arg_msg) = 0 THEN
  289. // rslt = 0
  290. // GOTO ext
  291. // END IF
  292. // DO WHILE Pos(Pathname,'\',1) > 0
  293. // Pathname = Replace(Pathname,Pos(Pathname,'\',1),1,'/')
  294. // LOOP
  295. // ole_1.object.navigate('file:///' + Pathname)
  296. //end if
  297. //
  298. ////附件列表
  299. //lv_fj.DeleteItems( )
  300. //Long count,ls_i
  301. //listviewitem l_lvi
  302. //s_email_lvfj s_lvfj[]
  303. //
  304. //SELECT count(*)
  305. // INTO :count
  306. // FROM u_email_fj
  307. // Where ( u_email_fj.relid = :arg_revid AND u_email_fj.fjtype = 1 );
  308. //IF count > 0 THEN
  309. // lv_fj.Visible = TRUE
  310. // have_fj = TRUE
  311. //ELSE
  312. // lv_fj.Visible = FALSE
  313. // have_fj = FALSE
  314. // GOTO ext
  315. //END IF
  316. //
  317. //DECLARE fj_cur CURSOR FOR
  318. // SELECT fjid,
  319. // filename,
  320. // filesize,
  321. // filetype
  322. // FROM u_email_fj
  323. // Where ( u_email_fj.relid = :arg_revid AND u_email_fj.fjtype = 1);
  324. //OPEN fj_cur;
  325. //
  326. //count = 1
  327. //FETCH fj_cur INTO :s_lvfj[count].fjid,&
  328. // :s_lvfj[count].filename,&
  329. // :s_lvfj[count].filesize,&
  330. // :s_lvfj[count].FileType;
  331. //DO WHILE sqlca.SQLCode = 0
  332. // count++
  333. // FETCH fj_cur INTO :s_lvfj[count].fjid,&
  334. // :s_lvfj[count].filename,&
  335. // :s_lvfj[count].filesize,&
  336. // :s_lvfj[count].FileType;
  337. //LOOP
  338. //
  339. //count = count - 1
  340. //CLOSE fj_cur;
  341. //
  342. //
  343. //FOR ls_i = 1 TO count
  344. // l_lvi.PictureIndex = 1
  345. //
  346. // l_lvi.Label = s_lvfj[ls_i].Filename
  347. // l_lvi.Data = s_lvfj[ls_i]
  348. // lv_fj.InsertItem(ls_i,l_lvi)
  349. //NEXT
  350. //
  351. //ext:
  352. ////IF have_text AND have_html THEN
  353. //// tab_1.SelectTab (1)
  354. //// tab_1.tabpage_1.Visible = TRUE
  355. //// tab_1.tabpage_1.Visible = TRUE
  356. //// tab_1.tabpage_1.mle_text.Visible = TRUE
  357. //// tab_1.tabpage_2.ole_html.Visible = TRUE
  358. ////
  359. ////ELSEIF NOT have_text AND have_html THEN
  360. //// tab_1.SelectTab (2)
  361. //// tab_1.tabpage_1.Visible = FALSE
  362. //// tab_1.tabpage_2.Visible = TRUE
  363. //// tab_1.tabpage_1.mle_text.Visible = FALSE
  364. //// tab_1.tabpage_2.ole_html.Visible = TRUE
  365. ////
  366. ////ELSEIF have_text AND NOT have_html THEN
  367. //// tab_1.tabpage_1.Visible = TRUE
  368. //// tab_1.tabpage_2.Visible = FALSE
  369. //// tab_1.tabpage_1.mle_text.Visible = TRUE
  370. //// tab_1.tabpage_2.ole_html.Visible = FALSE
  371. //// tab_1.SelectTab (1)
  372. ////END IF
  373. //
  374. //lv_fj.Visible = have_fj
  375. //
  376. //THIS.TriggerEvent(Resize!)
  377. //
  378. //
  379. RETURN rslt
  380. end function
  381. public function integer wf_sethtml (string arg_html);do while isnull(ole_1.object.document.body)
  382. yield()
  383. loop
  384. //if isnull(ole_web.object.document.body) then
  385. // return 0
  386. //end if
  387. if isnull(arg_html) then arg_html = ''
  388. ole_1.object.document.body.innerhtml = arg_html
  389. return 1
  390. end function
  391. public subroutine wf_blob_runfj (ref blob arg_blob, string arg_filename);int rslt = 1
  392. string ls_pathname
  393. string errmsg
  394. string lsNull
  395. setnull(lsNull)
  396. ls_pathname = sys_cur_path+fjfilepathname+'\'+arg_filename
  397. IF FileExists(ls_pathname) THEN FileDelete(ls_pathname)
  398. IF f_blobtofile(ls_pathname,arg_blob,errmsg) = 0 THEN
  399. rslt = 0
  400. GOTO ext
  401. END IF
  402. //打开附件
  403. ShellExecute32( Handle(THIS), lsNull, ls_pathname, lsNull, lsNull, 1 )
  404. ext:
  405. IF rslt = 0 THEN
  406. MessageBox('系统提示',errmsg)
  407. END IF
  408. end subroutine
  409. public subroutine wf_blob_saveas (ref blob arg_blob, string arg_filename);long pos1, i
  410. string ls_filetypename
  411. string ls_filename
  412. string errmsg
  413. pos1 = Pos(arg_filename,'.',1)
  414. IF pos1 > 0 THEN
  415. ls_filetypename = Mid(arg_filename,pos1 + 1, len(arg_filename))
  416. i = GetFileSaveName("另存为",arg_filename,ls_filename,"*","*."+ls_filetypename+",*."+ls_filetypename)
  417. ELSE
  418. ls_filetypename = ''
  419. i = GetFileSaveName("另存为",arg_filename,ls_filename,"*","*.*,*.*")
  420. END IF
  421. IF i = 1 AND Trim(arg_filename) <> '' THEN
  422. IF f_blobtofile(arg_filename,arg_blob,errmsg) = 0 THEN
  423. MessageBox('系统提示',errmsg)
  424. RETURN
  425. ELSE
  426. MessageBox('系统提示','附件保存成功!'+'~r~n'+'保存路径:'+arg_filename)
  427. END IF
  428. END IF
  429. end subroutine
  430. public function integer wf_admsg_getfjblob (long arg_fjid, ref blob arg_fjblob, ref string arg_msg);int rslt = 1
  431. SELECTBLOB fileblob INTO :arg_fjblob FROM Sys_admsg_fj
  432. WHERE fjid = :arg_fjid using Commit_Tran;
  433. if Commit_Tran.sqlcode <> 0 then
  434. rslt = 0
  435. arg_msg = '获取内部消息附件失败,' + Commit_Tran.sqlerrtext
  436. goto ext
  437. end if
  438. ext:
  439. return rslt
  440. end function
  441. public function integer wf_mail_getfjblob (long arg_fjid, ref blob arg_fjblob, string arg_msg);int rslt = 1
  442. SELECTBLOB fileblob INTO :arg_fjblob FROM u_email_fj
  443. WHERE fjid = :arg_fjid using fj_tran;
  444. if fj_tran.sqlcode <> 0 then
  445. rslt = 0
  446. arg_msg = '获取附件失败,' + fj_tran.sqlerrtext
  447. goto ext
  448. end if
  449. ext:
  450. return rslt
  451. end function
  452. public subroutine wf_pic ();oleobject images
  453. images = ole_1.Object.document.images
  454. Long ll_cnt
  455. ll_cnt = images.Length
  456. Long i,j
  457. oleobject lo
  458. String ls_url
  459. String ls_cid
  460. ListViewItem lvi
  461. s_email_lvfj lvfj
  462. Blob lb
  463. String ls_msg
  464. Boolean findpic = False
  465. String ls_filename
  466. FOR i = 0 To ll_cnt - 1
  467. lo = images.Item(i)
  468. ls_url = lo.getAttribute("src")
  469. IF Lower(Mid(ls_url, 1, 4)) = 'cid:' THEN
  470. ls_cid = Mid(ls_url, 5)
  471. SetNull(lb)
  472. findpic = False
  473. FOR j = 1 To lv_fj.TotalItems()
  474. IF lv_fj.GetItem(j, lvi) = 1 THEN
  475. lvfj = lvi.Data
  476. IF lvfj.Filename <> ls_cid and lvfj.cid <> ls_cid THEN CONTINUE
  477. IF lvfj.FileType = C_Sys_admsg_fj THEN
  478. IF wf_admsg_getfjblob(lvfj.fjid, lb, ls_msg) <> 1 THEN
  479. EXIT
  480. END IF
  481. findpic = True
  482. ls_filename = lvfj.Filename
  483. ELSEIF lvfj.FileType = C_u_email_fj or lvfj.FileType = "" THEN
  484. IF wf_mail_getfjblob(lvfj.fjid, lb, ls_msg) <> 1 THEN
  485. EXIT
  486. END IF
  487. findpic = True
  488. ls_filename = lvfj.Filename
  489. END IF
  490. EXIT
  491. END IF
  492. NEXT
  493. IF findpic THEN
  494. ls_filename = sys_cur_path+fjfilepathname+'\'+ls_filename
  495. IF FileExists(ls_filename) THEN FileDelete(ls_filename)
  496. IF f_blobtofile(ls_filename,lb,ls_msg) = 0 THEN
  497. CONTINUE
  498. END IF
  499. lo.setAttribute("src", "file:///" + ls_filename)
  500. END IF
  501. END IF
  502. NEXT
  503. end subroutine
  504. on w_email_rev.create
  505. int iCurrent
  506. call super::create
  507. this.cb_back=create cb_back
  508. this.cb_sendother=create cb_sendother
  509. this.cb_pageup=create cb_pageup
  510. this.cb_pagedown=create cb_pagedown
  511. this.cb_del=create cb_del
  512. this.cb_print=create cb_print
  513. this.st_1=create st_1
  514. this.st_2=create st_2
  515. this.st_3=create st_3
  516. this.st_4=create st_4
  517. this.st_5=create st_5
  518. this.st_6=create st_6
  519. this.st_senduser=create st_senduser
  520. this.st_mailuser=create st_mailuser
  521. this.st_revdate=create st_revdate
  522. this.st_subject=create st_subject
  523. this.st_mailaddress=create st_mailaddress
  524. this.st_sendaddress=create st_sendaddress
  525. this.lv_fj=create lv_fj
  526. this.ole_1=create ole_1
  527. this.ln_bar=create ln_bar
  528. this.ln_bar2=create ln_bar2
  529. this.r_bar=create r_bar
  530. this.ln_1=create ln_1
  531. this.ln_2=create ln_2
  532. iCurrent=UpperBound(this.Control)
  533. this.Control[iCurrent+1]=this.cb_back
  534. this.Control[iCurrent+2]=this.cb_sendother
  535. this.Control[iCurrent+3]=this.cb_pageup
  536. this.Control[iCurrent+4]=this.cb_pagedown
  537. this.Control[iCurrent+5]=this.cb_del
  538. this.Control[iCurrent+6]=this.cb_print
  539. this.Control[iCurrent+7]=this.st_1
  540. this.Control[iCurrent+8]=this.st_2
  541. this.Control[iCurrent+9]=this.st_3
  542. this.Control[iCurrent+10]=this.st_4
  543. this.Control[iCurrent+11]=this.st_5
  544. this.Control[iCurrent+12]=this.st_6
  545. this.Control[iCurrent+13]=this.st_senduser
  546. this.Control[iCurrent+14]=this.st_mailuser
  547. this.Control[iCurrent+15]=this.st_revdate
  548. this.Control[iCurrent+16]=this.st_subject
  549. this.Control[iCurrent+17]=this.st_mailaddress
  550. this.Control[iCurrent+18]=this.st_sendaddress
  551. this.Control[iCurrent+19]=this.lv_fj
  552. this.Control[iCurrent+20]=this.ole_1
  553. this.Control[iCurrent+21]=this.ln_bar
  554. this.Control[iCurrent+22]=this.ln_bar2
  555. this.Control[iCurrent+23]=this.r_bar
  556. this.Control[iCurrent+24]=this.ln_1
  557. this.Control[iCurrent+25]=this.ln_2
  558. end on
  559. on w_email_rev.destroy
  560. call super::destroy
  561. destroy(this.cb_back)
  562. destroy(this.cb_sendother)
  563. destroy(this.cb_pageup)
  564. destroy(this.cb_pagedown)
  565. destroy(this.cb_del)
  566. destroy(this.cb_print)
  567. destroy(this.st_1)
  568. destroy(this.st_2)
  569. destroy(this.st_3)
  570. destroy(this.st_4)
  571. destroy(this.st_5)
  572. destroy(this.st_6)
  573. destroy(this.st_senduser)
  574. destroy(this.st_mailuser)
  575. destroy(this.st_revdate)
  576. destroy(this.st_subject)
  577. destroy(this.st_mailaddress)
  578. destroy(this.st_sendaddress)
  579. destroy(this.lv_fj)
  580. destroy(this.ole_1)
  581. destroy(this.ln_bar)
  582. destroy(this.ln_bar2)
  583. destroy(this.r_bar)
  584. destroy(this.ln_1)
  585. destroy(this.ln_2)
  586. end on
  587. event resize;call super::resize;ln_bar.EndX = THIS.Width
  588. ln_bar2.EndX = THIS.Width
  589. ln_1.EndX = THIS.Width
  590. ln_2.EndX = THIS.Width
  591. r_bar.Width = THIS.Width
  592. Long w_width,w_height
  593. w_width = 3602
  594. w_height = 2300
  595. IF newwidth < w_width THEN THIS.Width = w_width
  596. IF newheight < w_height THEN THIS.Height = w_height
  597. ole_1.Width = THIS.Width - 50
  598. lv_fj.Width = ole_1.Width
  599. //ole_1.tabpage_1.mle_text.Width = ole_1.Width - 20
  600. //ole_1.tabpage_2.ole_html.Width = ole_1.Width - 20
  601. IF have_fj THEN
  602. ole_1.Height = THIS.Height - ole_1.Y - lv_fj.Height - 150
  603. lv_fj.Visible = TRUE
  604. ELSE
  605. ole_1.Height = THIS.Height - ole_1.Y - 150
  606. lv_fj.Visible = FALSE
  607. END IF
  608. lv_fj.y = ole_1.Y + ole_1.Height+ 5
  609. //ole_1.tabpage_1.mle_text.Height = ole_1.Height - 100
  610. //ole_1.tabpage_2.ole_html.Height = ole_1.Height - 100
  611. end event
  612. event open;call super::open;Int rslt = 1
  613. String arg_msg
  614. Int li_ifexit = 0
  615. commit_tran = sqlca
  616. Long ll_ConnectionID
  617. IF sys_email_sqlca.DBHandle() > 0 THEN
  618. fj_tran = sys_email_sqlca
  619. ELSE
  620. MessageBox('系统提示','要使用邮件功能,请先定义邮件数据库')
  621. li_ifexit = 1
  622. END IF
  623. IF li_ifexit = 0 THEN
  624. obj_email = CREATE uo_email
  625. obj_email.commit_tran = commit_tran
  626. obj_email.fj_tran = fj_tran
  627. cur_set = Message.PowerObjectParm
  628. IF cur_set.title<> "" THEN
  629. THIS.title=cur_set.title
  630. END IF
  631. IF cur_set.sendid <= 0 THEN
  632. rslt = 0
  633. arg_msg = '非法唯一码'
  634. GOTO ext
  635. END IF
  636. IF wf_retrieve(cur_set.sendid, arg_msg) = 0 THEN
  637. rslt = 0
  638. GOTO ext
  639. END IF
  640. ext:
  641. IF rslt = 0 THEN
  642. MessageBox('错误', arg_msg, stopsign!)
  643. cb_exit.PostEvent(Clicked!)
  644. END IF
  645. ELSE
  646. cb_exit.PostEvent(Clicked!)
  647. END IF
  648. end event
  649. event close;call super::close;destroy obj_email
  650. end event
  651. type cb_func from w_publ_base`cb_func within w_email_rev
  652. boolean visible = false
  653. integer x = 1426
  654. integer width = 151
  655. integer height = 164
  656. end type
  657. type cb_exit from w_publ_base`cb_exit within w_email_rev
  658. integer x = 1033
  659. integer width = 165
  660. integer height = 164
  661. integer picsize = 16
  662. toolbaralignment pic_align = alignattop!
  663. boolean border = false
  664. end type
  665. type cb_back from uo_imflatbutton within w_email_rev
  666. integer width = 165
  667. integer height = 164
  668. integer taborder = 20
  669. boolean bringtotop = true
  670. string text = "回复"
  671. string normalpicname = "email_view4.bmp"
  672. integer picsize = 16
  673. toolbaralignment pic_align = alignattop!
  674. boolean border = false
  675. end type
  676. event clicked;call super::clicked;s_email_set s_parm
  677. s_parm.mailid = cur_set.mailid
  678. s_parm.mailuser = cur_set.mailuser
  679. s_parm.mailaddress = cur_set.mailaddress
  680. s_parm.flag = 1
  681. s_parm.revuser = st_mailuser.Text
  682. s_parm.revaddress = st_mailaddress.Text
  683. s_parm.relid = 0
  684. s_parm.reltype = 3
  685. s_parm.id=cur_set.sendid
  686. OpenWithParm(w_email_send_new,s_parm)
  687. end event
  688. type cb_sendother from uo_imflatbutton within w_email_rev
  689. integer x = 165
  690. integer width = 165
  691. integer height = 164
  692. integer taborder = 30
  693. boolean bringtotop = true
  694. string text = "转发"
  695. string normalpicname = "email_view5.bmp"
  696. integer picsize = 16
  697. toolbaralignment pic_align = alignattop!
  698. boolean border = false
  699. end type
  700. event clicked;call super::clicked;
  701. s_email_set s_parm
  702. s_parm.mailid = cur_set.mailid
  703. s_parm.mailuser = cur_set.mailuser
  704. s_parm.mailaddress = cur_set.mailaddress
  705. s_parm.flag = 2
  706. s_parm.reltype = 0
  707. s_parm.relid = s_send.sendid
  708. s_parm.title = s_send.subject
  709. s_parm.htmlbody = s_send.htmlbody
  710. s_parm.id=cur_set.sendid
  711. OpenWithParm(w_email_send_new,s_parm)
  712. end event
  713. type cb_pageup from uo_imflatbutton within w_email_rev
  714. integer x = 329
  715. integer width = 187
  716. integer height = 164
  717. integer taborder = 40
  718. boolean bringtotop = true
  719. string text = "前一封"
  720. string normalpicname = "p1.ICO"
  721. integer picsize = 16
  722. toolbaralignment pic_align = alignattop!
  723. boolean border = false
  724. end type
  725. event clicked;call super::clicked;string ls_msg
  726. IF cur_set.cur = 1 THEN
  727. MessageBox('提示','当前邮件已经是第一封邮件!', Information!, OK! )
  728. RETURN
  729. END IF
  730. cur_set.cur = cur_set.cur - 1
  731. IF wf_retrieve(cur_set.arr[cur_set.cur],ls_msg) = 0 THEN
  732. MessageBox('错误',ls_msg,stopsign!,OK!)
  733. RETURN
  734. END IF
  735. end event
  736. type cb_pagedown from uo_imflatbutton within w_email_rev
  737. integer x = 517
  738. integer width = 187
  739. integer height = 164
  740. integer taborder = 30
  741. boolean bringtotop = true
  742. string text = "后一封"
  743. string normalpicname = "p4.ICO"
  744. integer picsize = 16
  745. toolbaralignment pic_align = alignattop!
  746. boolean border = false
  747. end type
  748. event clicked;call super::clicked;string ls_msg
  749. IF cur_set.cur = UPPERBOUND(cur_set.arr) THEN
  750. MessageBox('提示','当前邮件已经是最后一封邮件!', Information!, OK! )
  751. RETURN
  752. END IF
  753. cur_set.cur = cur_set.cur + 1
  754. IF wf_retrieve(cur_set.arr[cur_set.cur],ls_msg) = 0 THEN
  755. MessageBox('错误',ls_msg,stopsign!,OK!)
  756. RETURN
  757. END IF
  758. end event
  759. type cb_del from uo_imflatbutton within w_email_rev
  760. integer x = 704
  761. integer width = 165
  762. integer height = 164
  763. integer taborder = 40
  764. boolean bringtotop = true
  765. string text = "删除"
  766. string normalpicname = "email_view6.bmp"
  767. integer picsize = 16
  768. toolbaralignment pic_align = alignattop!
  769. boolean border = false
  770. end type
  771. event clicked;call super::clicked;IF MessageBox ("询问","是否确定要删除当前邮件吗",Question!,YesNo! ) = 2 THEN RETURN
  772. String ls_msg
  773. IF obj_email.f_del_move_msg(s_send.sendid ,ls_msg) = 0 THEN
  774. MessageBox('错误',ls_msg, StopSign!, OK! )
  775. RETURN
  776. ELSE
  777. MessageBox('提示','删除邮件成功')
  778. END IF
  779. if UPPERBOUND(cur_set.arr) = 1 then
  780. Close(parent)
  781. end if
  782. long i
  783. long j = 0
  784. long arr[]
  785. for i = 1 to UPPERBOUND(cur_set.arr)
  786. if i <> cur_set.cur then
  787. j++
  788. arr[j] = cur_set.arr[i]
  789. end if
  790. next
  791. if cur_set.cur = UPPERBOUND(cur_set.arr) then
  792. cur_set.cur = cur_set.cur - 1
  793. end if
  794. cur_set.arr = arr
  795. IF wf_retrieve(cur_set.arr[cur_set.cur],ls_msg) = 0 THEN
  796. MessageBox('错误',ls_msg,StopSign!,OK!)
  797. RETURN
  798. END IF
  799. //
  800. //
  801. //Long i
  802. //IF cur_row <> all_row THEN
  803. // FOR i = cur_row + 1 TO all_row
  804. // cur_revid[cur_row] = cur_revid[cur_row + 1]
  805. // NEXT
  806. //END IF
  807. //
  808. //all_row = all_row - 1
  809. //
  810. //Boolean Find = TRUE
  811. //IF cur_row - 1 = 0 THEN
  812. // IF cur_row = all_row THEN
  813. // GOTO ext
  814. // ELSE
  815. // cur_row = cur_row + 1
  816. // END IF
  817. //ELSE
  818. // cur_row = cur_row - 1
  819. //END IF
  820. //
  821. //
  822. //ext:
  823. //IF Find THEN
  824. // IF wf_retrieve(cur_revid[cur_row],ls_msg) = 0 THEN
  825. // MessageBox('错误',ls_msg,StopSign!,OK!)
  826. // RETURN
  827. // END IF
  828. //ELSE
  829. // Close(PARENT)
  830. //END IF
  831. //
  832. //
  833. end event
  834. type cb_print from uo_imflatbutton within w_email_rev
  835. integer x = 869
  836. integer width = 165
  837. integer height = 164
  838. integer taborder = 50
  839. boolean bringtotop = true
  840. string text = "打印"
  841. string normalpicname = "print.BMP"
  842. integer picsize = 16
  843. toolbaralignment pic_align = alignattop!
  844. boolean border = false
  845. end type
  846. type st_1 from statictext within w_email_rev
  847. integer x = 14
  848. integer y = 208
  849. integer width = 229
  850. integer height = 48
  851. boolean bringtotop = true
  852. integer textsize = -9
  853. integer weight = 400
  854. fontcharset fontcharset = gb2312charset!
  855. fontpitch fontpitch = variable!
  856. string facename = "宋体"
  857. long textcolor = 33554432
  858. long backcolor = 134217739
  859. string text = "发件人:"
  860. alignment alignment = right!
  861. boolean focusrectangle = false
  862. end type
  863. type st_2 from statictext within w_email_rev
  864. integer x = 1303
  865. integer y = 208
  866. integer width = 338
  867. integer height = 56
  868. boolean bringtotop = true
  869. integer textsize = -9
  870. integer weight = 400
  871. fontcharset fontcharset = gb2312charset!
  872. fontpitch fontpitch = variable!
  873. string facename = "宋体"
  874. long textcolor = 33554432
  875. long backcolor = 134217739
  876. string text = "发件人地址:"
  877. boolean focusrectangle = false
  878. end type
  879. type st_3 from statictext within w_email_rev
  880. integer x = 14
  881. integer y = 288
  882. integer width = 229
  883. integer height = 48
  884. boolean bringtotop = true
  885. integer textsize = -9
  886. integer weight = 400
  887. fontcharset fontcharset = gb2312charset!
  888. fontpitch fontpitch = variable!
  889. string facename = "宋体"
  890. long textcolor = 33554432
  891. long backcolor = 134217739
  892. string text = "收件人:"
  893. alignment alignment = right!
  894. boolean focusrectangle = false
  895. end type
  896. type st_4 from statictext within w_email_rev
  897. integer x = 1303
  898. integer y = 288
  899. integer width = 338
  900. integer height = 56
  901. boolean bringtotop = true
  902. integer textsize = -9
  903. integer weight = 400
  904. fontcharset fontcharset = gb2312charset!
  905. fontpitch fontpitch = variable!
  906. string facename = "宋体"
  907. long textcolor = 33554432
  908. long backcolor = 134217739
  909. string text = "收件人地址:"
  910. boolean focusrectangle = false
  911. end type
  912. type st_5 from statictext within w_email_rev
  913. integer x = 14
  914. integer y = 384
  915. integer width = 229
  916. integer height = 56
  917. boolean bringtotop = true
  918. integer textsize = -9
  919. integer weight = 400
  920. fontcharset fontcharset = gb2312charset!
  921. fontpitch fontpitch = variable!
  922. string facename = "宋体"
  923. long textcolor = 33554432
  924. long backcolor = 134217739
  925. string text = "日期:"
  926. alignment alignment = right!
  927. boolean focusrectangle = false
  928. end type
  929. type st_6 from statictext within w_email_rev
  930. integer x = 14
  931. integer y = 472
  932. integer width = 229
  933. integer height = 56
  934. boolean bringtotop = true
  935. integer textsize = -9
  936. integer weight = 400
  937. fontcharset fontcharset = gb2312charset!
  938. fontpitch fontpitch = variable!
  939. string facename = "宋体"
  940. long textcolor = 33554432
  941. long backcolor = 134217739
  942. string text = "主题:"
  943. alignment alignment = right!
  944. boolean focusrectangle = false
  945. end type
  946. type st_senduser from statictext within w_email_rev
  947. integer x = 256
  948. integer y = 208
  949. integer width = 992
  950. integer height = 48
  951. boolean bringtotop = true
  952. integer textsize = -9
  953. integer weight = 400
  954. fontcharset fontcharset = gb2312charset!
  955. fontpitch fontpitch = variable!
  956. string facename = "宋体"
  957. long textcolor = 33554432
  958. long backcolor = 134217739
  959. string text = "none"
  960. boolean focusrectangle = false
  961. end type
  962. type st_mailuser from statictext within w_email_rev
  963. integer x = 256
  964. integer y = 288
  965. integer width = 992
  966. integer height = 48
  967. boolean bringtotop = true
  968. integer textsize = -9
  969. integer weight = 400
  970. fontcharset fontcharset = gb2312charset!
  971. fontpitch fontpitch = variable!
  972. string facename = "宋体"
  973. long textcolor = 33554432
  974. long backcolor = 134217739
  975. string text = "none"
  976. boolean focusrectangle = false
  977. end type
  978. type st_revdate from statictext within w_email_rev
  979. integer x = 256
  980. integer y = 384
  981. integer width = 992
  982. integer height = 48
  983. boolean bringtotop = true
  984. integer textsize = -9
  985. integer weight = 400
  986. fontcharset fontcharset = gb2312charset!
  987. fontpitch fontpitch = variable!
  988. string facename = "宋体"
  989. long textcolor = 33554432
  990. long backcolor = 134217739
  991. string text = "none"
  992. boolean focusrectangle = false
  993. end type
  994. type st_subject from statictext within w_email_rev
  995. integer x = 256
  996. integer y = 472
  997. integer width = 3323
  998. integer height = 48
  999. boolean bringtotop = true
  1000. integer textsize = -9
  1001. integer weight = 400
  1002. fontcharset fontcharset = gb2312charset!
  1003. fontpitch fontpitch = variable!
  1004. string facename = "宋体"
  1005. long textcolor = 33554432
  1006. long backcolor = 134217739
  1007. string text = "none"
  1008. boolean focusrectangle = false
  1009. end type
  1010. type st_mailaddress from statictext within w_email_rev
  1011. integer x = 1632
  1012. integer y = 288
  1013. integer width = 1957
  1014. integer height = 48
  1015. boolean bringtotop = true
  1016. integer textsize = -9
  1017. integer weight = 400
  1018. fontcharset fontcharset = gb2312charset!
  1019. fontpitch fontpitch = variable!
  1020. string facename = "宋体"
  1021. long textcolor = 33554432
  1022. long backcolor = 134217739
  1023. string text = "none"
  1024. boolean focusrectangle = false
  1025. end type
  1026. type st_sendaddress from statictext within w_email_rev
  1027. integer x = 1632
  1028. integer y = 208
  1029. integer width = 1957
  1030. integer height = 48
  1031. boolean bringtotop = true
  1032. integer textsize = -9
  1033. integer weight = 400
  1034. fontcharset fontcharset = gb2312charset!
  1035. fontpitch fontpitch = variable!
  1036. string facename = "宋体"
  1037. long textcolor = 33554432
  1038. long backcolor = 134217739
  1039. string text = "none"
  1040. boolean focusrectangle = false
  1041. end type
  1042. type lv_fj from uo_email_lv within w_email_rev
  1043. integer y = 2048
  1044. integer width = 3086
  1045. integer height = 228
  1046. integer taborder = 30
  1047. boolean bringtotop = true
  1048. string smallpicturename[] = {"p15drive_fdd.ico"}
  1049. end type
  1050. event doubleclicked;
  1051. ListViewItem lvi
  1052. s_email_lvfj lvfj
  1053. blob lb
  1054. string ls_msg
  1055. if ins_index > 0 then
  1056. if lv_fj.GetItem(ins_index, lvi) = 1 then
  1057. lvfj = lvi.data
  1058. if lvfj.filetype = C_u_email_fj then
  1059. if obj_email.wf_mail_getfjblob(lvfj.fjid, lb, ls_msg) <> 1 then
  1060. MessageBox('错误', ls_msg, stopsign!)
  1061. return
  1062. end if
  1063. else
  1064. return
  1065. end if
  1066. wf_blob_runfj(lb, lvfj.filename)
  1067. end if
  1068. end if
  1069. //if cur_set.mailid > 0 then
  1070. // call super::doubleclicked
  1071. //else // 内部消息
  1072. //
  1073. // //附件下载并打开
  1074. // String lsNull
  1075. // setnull(lsNull)
  1076. // integer rslt = 1
  1077. // string errmsg, ls_pathname
  1078. // listviewitem l_lvi
  1079. // s_email_lvfj s_lvfj
  1080. // IF this.ins_index > 0 THEN
  1081. // THIS.GetItem( this.ins_index, l_lvi)
  1082. // s_lvfj = l_lvi.Data
  1083. // this.ins_cur_fjid = s_lvfj.fjid
  1084. // this.ins_cur_fjname = l_lvi.Label
  1085. // IF this.ins_cur_fjname = '' THEN GOTO ext
  1086. // ELSE
  1087. // GOTO ext
  1088. // END IF
  1089. // //下载附件并打开
  1090. // ls_pathname = sys_cur_path+this.fjfilepathname+'\'+this.ins_cur_fjname
  1091. // IF FileExists(ls_pathname) THEN FileDelete(ls_pathname)
  1092. // IF this.ins_cur_fjid > 0 THEN
  1093. // selectblob fileblob INTO :this.ls_filedata
  1094. // from Sys_admsg_fj
  1095. // where fjid = :this.ins_cur_fjid;
  1096. // if sqlca.sqlcode <> 0 then
  1097. // rslt = 0
  1098. // errmsg = '下载附件失败'
  1099. // goto ext
  1100. // end if
  1101. // ELSE
  1102. // this.ls_filedata = s_lvfj.fileblob
  1103. // END IF
  1104. //
  1105. // IF f_blobtofile(ls_pathname,this.ls_filedata,errmsg) = 0 THEN
  1106. // rslt = 0
  1107. // GOTO ext
  1108. // END IF
  1109. //
  1110. // //打开附件
  1111. // ShellExecute32( Handle(THIS), lsNull, ls_pathname, lsNull, lsNull, 1 )
  1112. //
  1113. // ext:
  1114. // IF rslt = 0 THEN
  1115. // MessageBox('系统提示',errmsg)
  1116. // END IF
  1117. //
  1118. //
  1119. //
  1120. //end if
  1121. end event
  1122. event ue_saveas;
  1123. ListViewItem lvi
  1124. s_email_lvfj lvfj
  1125. blob lb
  1126. string ls_msg
  1127. if ins_index > 0 then
  1128. if lv_fj.GetItem(ins_index, lvi) = 1 then
  1129. lvfj = lvi.data
  1130. if lvfj.filetype = C_u_email_fj then
  1131. if obj_email.wf_mail_getfjblob(lvfj.fjid, lb, ls_msg) <> 1 then
  1132. MessageBox('错误', ls_msg, stopsign!)
  1133. return
  1134. end if
  1135. else
  1136. return
  1137. end if
  1138. wf_blob_saveas(lb, lvfj.filename)
  1139. end if
  1140. end if
  1141. //if cur_set.mailid > 0 then
  1142. // call super::ue_saveas// tv_fj.ue_saveas
  1143. //else
  1144. //
  1145. // //附件另存为
  1146. // Integer i
  1147. // Long ls_i,ls_j,ls_newrow,ls_filesize
  1148. // String ls_Pathname,ls_filename
  1149. // String errmsg,arg_msg
  1150. // String ls_filetypename
  1151. // Long pos1,lrow,rslt
  1152. // String ls_para,ls_downarg[]
  1153. // ls_Pathname = this.ins_cur_fjname
  1154. //
  1155. // //*************************************************************
  1156. //
  1157. // pos1 = Pos(this.ins_cur_fjname,'.',1)
  1158. // IF pos1 > 0 THEN
  1159. // ls_filetypename = Mid(this.ins_cur_fjname,pos1 + 1)
  1160. // i = GetFileSaveName("另存为",ls_Pathname,ls_filename,"*","*."+ls_filetypename+",*."+ls_filetypename)
  1161. // ELSE
  1162. // ls_filetypename = ''
  1163. // i = GetFileSaveName("另存为",ls_Pathname,ls_filename,"*","*.*,*.*")
  1164. // END IF
  1165. //
  1166. // IF i = 1 AND Trim(ls_Pathname) <> '' THEN
  1167. // selectblob fileblob INTO :ls_filedata
  1168. // from Sys_admsg_fj
  1169. // where fjid = :this.ins_cur_fjid;
  1170. // if sqlca.sqlcode <> 0 then
  1171. // MessageBox('系统提示', '下载附件失败')
  1172. // return
  1173. // end if
  1174. //
  1175. // IF f_blobtofile(ls_Pathname,ls_filedata,errmsg) = 0 THEN
  1176. // MessageBox('系统提示',errmsg)
  1177. // RETURN
  1178. // ELSE
  1179. //
  1180. // MessageBox('系统提示','附件保存成功!'+'~r~n'+'保存路径:'+ls_Pathname)
  1181. // END IF
  1182. // END IF
  1183. //
  1184. //
  1185. //
  1186. //
  1187. //end if
  1188. end event
  1189. type ole_1 from olecustomcontrol within w_email_rev
  1190. event statustextchange ( string text )
  1191. event progresschange ( long progress, long progressmax )
  1192. event commandstatechange ( long command, boolean enable )
  1193. event downloadbegin ( )
  1194. event downloadcomplete ( )
  1195. event titlechange ( string text )
  1196. event propertychange ( string szproperty )
  1197. event beforenavigate2 ( oleobject pdisp, any url, any flags, any targetframename, any postdata, any headers, ref boolean cancel1 )
  1198. event newwindow2 ( ref oleobject ppdisp, ref boolean cancel1 )
  1199. event navigatecomplete2 ( oleobject pdisp, any url )
  1200. event documentcomplete ( oleobject pdisp, any url )
  1201. event onquit ( )
  1202. event onvisible ( boolean ocx_visible )
  1203. event ontoolbar ( boolean toolbar )
  1204. event onmenubar ( boolean menubar )
  1205. event onstatusbar ( boolean statusbar )
  1206. event onfullscreen ( boolean fullscreen )
  1207. event ontheatermode ( boolean theatermode )
  1208. event windowsetresizable ( boolean resizable1 )
  1209. event windowsetleft ( long left )
  1210. event windowsettop ( long top )
  1211. event windowsetwidth ( long ocx_width )
  1212. event windowsetheight ( long ocx_height )
  1213. event windowclosing ( boolean ischildwindow, ref boolean cancel1 )
  1214. event clienttohostwindow ( ref long cx, ref long cy )
  1215. event setsecurelockicon ( long securelockicon )
  1216. event filedownload ( ref boolean cancel1 )
  1217. event navigateerror ( oleobject pdisp, any url, any frame, any statuscode, ref boolean cancel1 )
  1218. event printtemplateinstantiation ( oleobject pdisp )
  1219. event printtemplateteardown ( oleobject pdisp )
  1220. event updatepagestatus ( oleobject pdisp, any npage, any fdone )
  1221. event privacyimpactedstatechange ( boolean bimpacted )
  1222. integer y = 556
  1223. integer width = 3067
  1224. integer height = 1488
  1225. integer taborder = 40
  1226. boolean bringtotop = true
  1227. borderstyle borderstyle = stylelowered!
  1228. boolean focusrectangle = false
  1229. string binarykey = "w_email_rev.win"
  1230. integer textsize = -9
  1231. integer weight = 400
  1232. fontcharset fontcharset = gb2312charset!
  1233. fontpitch fontpitch = variable!
  1234. string facename = "宋体"
  1235. long textcolor = 33554432
  1236. end type
  1237. event constructor;this.object.navigate('about:blank')
  1238. end event
  1239. type ln_bar from line within w_email_rev
  1240. long linecolor = 268435456
  1241. integer linethickness = 4
  1242. integer beginy = 172
  1243. integer endx = 3200
  1244. integer endy = 172
  1245. end type
  1246. type ln_bar2 from line within w_email_rev
  1247. long linecolor = 16777215
  1248. integer linethickness = 4
  1249. integer beginx = 14
  1250. integer beginy = 176
  1251. integer endx = 3278
  1252. integer endy = 176
  1253. end type
  1254. type r_bar from rectangle within w_email_rev
  1255. long linecolor = 16777215
  1256. integer linethickness = 4
  1257. long fillcolor = 1073741824
  1258. integer x = 3351
  1259. integer width = 87
  1260. integer height = 68
  1261. end type
  1262. event constructor;this.fillcolor = 14215660
  1263. this.linecolor = 14215660
  1264. this.x = -1
  1265. this.y = -1
  1266. this.height = ln_bar.beginy - 5
  1267. end event
  1268. type ln_1 from line within w_email_rev
  1269. long linecolor = 268435456
  1270. integer linethickness = 4
  1271. integer beginy = 548
  1272. integer endx = 3250
  1273. integer endy = 548
  1274. end type
  1275. type ln_2 from line within w_email_rev
  1276. long linecolor = 16777215
  1277. integer linethickness = 4
  1278. integer beginy = 552
  1279. integer endx = 3282
  1280. integer endy = 552
  1281. end type
  1282. Start of PowerBuilder Binary Data Section : Do NOT Edit
  1283. 01w_email_rev.bin
  1284. 2300000a00e011cfd0e11ab1a1000000000000000000000000000000000003003e0009fffe000000060000000000000000000000010000000100000000000010000000000200000001fffffffe0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffefffffffefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006f00520074006f004500200074006e00790072000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050016ffffffffffffffff000000010000000000000000000000000000000000000000000000000000000040f375a001cea5f900000003000001800000000000500003004f0042005800430054005300450052004d0041000000000000000000000000000000000000000000000000000000000000000000000000000000000102001affffffff00000002ffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c00000000004200500043004f00530058004f00540041005200450047000000000000000000000000000000000000000000000000000000000000000000000000000000000001001affffffffffffffff000000038856f96111d0340ac0006ba9a205d74f0000000040f375a001cea5f940f375a001cea5f9000000000000000000000000004f00430054004e004e00450053005400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001020012ffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000030000009c000000000000000100000002fffffffe0000000400000005fffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
  1285. 25ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000004c0000455a000026730000000000000000000000000000000000000000000000000000004c0000000000000000000000010057d0e011cf3573000869ae62122e2b00000008000000000000004c0002140100000000000000c046000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000002b0068006a0066006900660065006c00610070006800740061006e0065006d0027002b0000004c0000455a000026730000000000000000000000000000000000000000000000000000004c0000000000000000000000010057d0e011cf3573000869ae62122e2b00000008000000000000004c0002140100000000000000c04600000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000090009000a000d000900090049000900200046005f0066006c00620062006f006f0074006900660065006c006c0028005f0073006900660065006c0061006e0065006d006c002c002c00620073006c006d005f00670073002000290020003d0020003000480054004e0045000a000d0009000900090009004f00430054004e004e004900450055000a000d00090009004500090044004e00490020000d00460009000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  1286. 11w_email_rev.bin
  1287. End of PowerBuilder Binary Data Section : No Source Expected After This Point