w_cmpl_formula_edit.srw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. $PBExportHeader$w_cmpl_formula_edit.srw
  2. forward
  3. global type w_cmpl_formula_edit from w_publ_base
  4. end type
  5. type cb_1 from uo_imflatbutton within w_cmpl_formula_edit
  6. end type
  7. type cb_2 from commandbutton within w_cmpl_formula_edit
  8. end type
  9. type cb_3 from commandbutton within w_cmpl_formula_edit
  10. end type
  11. type cb_4 from commandbutton within w_cmpl_formula_edit
  12. end type
  13. type cb_5 from commandbutton within w_cmpl_formula_edit
  14. end type
  15. type cb_6 from commandbutton within w_cmpl_formula_edit
  16. end type
  17. type cb_7 from commandbutton within w_cmpl_formula_edit
  18. end type
  19. type cb_8 from commandbutton within w_cmpl_formula_edit
  20. end type
  21. type cb_9 from commandbutton within w_cmpl_formula_edit
  22. end type
  23. type cb_10 from commandbutton within w_cmpl_formula_edit
  24. end type
  25. type cb_11 from commandbutton within w_cmpl_formula_edit
  26. end type
  27. type cb_13 from commandbutton within w_cmpl_formula_edit
  28. end type
  29. type cb_14 from commandbutton within w_cmpl_formula_edit
  30. end type
  31. type cb_15 from commandbutton within w_cmpl_formula_edit
  32. end type
  33. type cb_16 from commandbutton within w_cmpl_formula_edit
  34. end type
  35. type cb_17 from commandbutton within w_cmpl_formula_edit
  36. end type
  37. type cb_12 from commandbutton within w_cmpl_formula_edit
  38. end type
  39. type cb_18 from commandbutton within w_cmpl_formula_edit
  40. end type
  41. type cb_19 from commandbutton within w_cmpl_formula_edit
  42. end type
  43. type cb_20 from commandbutton within w_cmpl_formula_edit
  44. end type
  45. type cb_21 from commandbutton within w_cmpl_formula_edit
  46. end type
  47. type st_2 from statictext within w_cmpl_formula_edit
  48. end type
  49. type sle_1 from u_sleedit within w_cmpl_formula_edit
  50. end type
  51. type cb_25 from commandbutton within w_cmpl_formula_edit
  52. end type
  53. type cb_26 from commandbutton within w_cmpl_formula_edit
  54. end type
  55. type dw_1 from u_dw_rbtnfilter within w_cmpl_formula_edit
  56. end type
  57. type st_1 from statictext within w_cmpl_formula_edit
  58. end type
  59. type sle_rslt from singlelineedit within w_cmpl_formula_edit
  60. end type
  61. end forward
  62. global type w_cmpl_formula_edit from w_publ_base
  63. integer width = 1824
  64. integer height = 1136
  65. string title = "公式设定"
  66. boolean minbox = false
  67. windowtype windowtype = response!
  68. cb_1 cb_1
  69. cb_2 cb_2
  70. cb_3 cb_3
  71. cb_4 cb_4
  72. cb_5 cb_5
  73. cb_6 cb_6
  74. cb_7 cb_7
  75. cb_8 cb_8
  76. cb_9 cb_9
  77. cb_10 cb_10
  78. cb_11 cb_11
  79. cb_13 cb_13
  80. cb_14 cb_14
  81. cb_15 cb_15
  82. cb_16 cb_16
  83. cb_17 cb_17
  84. cb_12 cb_12
  85. cb_18 cb_18
  86. cb_19 cb_19
  87. cb_20 cb_20
  88. cb_21 cb_21
  89. st_2 st_2
  90. sle_1 sle_1
  91. cb_25 cb_25
  92. cb_26 cb_26
  93. dw_1 dw_1
  94. st_1 st_1
  95. sle_rslt sle_rslt
  96. end type
  97. global w_cmpl_formula_edit w_cmpl_formula_edit
  98. type variables
  99. string ins_rslt = 'NULL' // 按取消键返回
  100. end variables
  101. forward prototypes
  102. public subroutine wf_cmp ()
  103. end prototypes
  104. public subroutine wf_cmp ();
  105. String ls_msg
  106. s_cmpl_parm arg_cmpl
  107. decimal ld_qty
  108. dw_1.accepttext()
  109. long i
  110. for i = 1 to dw_1.RowCount()
  111. arg_cmpl.parmname[i] = dw_1.object.parmname[i]
  112. arg_cmpl.parmvalue[i] = dw_1.object.parmvalue[i]
  113. next
  114. ld_qty = 0
  115. if f_cmpl_with_parms(sle_1.text,arg_cmpl, ld_qty,ls_msg) = 0 then
  116. MessageBox('提示',ls_msg, Information!, OK! )
  117. RETURN
  118. END IF
  119. sle_rslt.Text = String(ld_qty,'###,####,###0.######')
  120. end subroutine
  121. on w_cmpl_formula_edit.create
  122. int iCurrent
  123. call super::create
  124. this.cb_1=create cb_1
  125. this.cb_2=create cb_2
  126. this.cb_3=create cb_3
  127. this.cb_4=create cb_4
  128. this.cb_5=create cb_5
  129. this.cb_6=create cb_6
  130. this.cb_7=create cb_7
  131. this.cb_8=create cb_8
  132. this.cb_9=create cb_9
  133. this.cb_10=create cb_10
  134. this.cb_11=create cb_11
  135. this.cb_13=create cb_13
  136. this.cb_14=create cb_14
  137. this.cb_15=create cb_15
  138. this.cb_16=create cb_16
  139. this.cb_17=create cb_17
  140. this.cb_12=create cb_12
  141. this.cb_18=create cb_18
  142. this.cb_19=create cb_19
  143. this.cb_20=create cb_20
  144. this.cb_21=create cb_21
  145. this.st_2=create st_2
  146. this.sle_1=create sle_1
  147. this.cb_25=create cb_25
  148. this.cb_26=create cb_26
  149. this.dw_1=create dw_1
  150. this.st_1=create st_1
  151. this.sle_rslt=create sle_rslt
  152. iCurrent=UpperBound(this.Control)
  153. this.Control[iCurrent+1]=this.cb_1
  154. this.Control[iCurrent+2]=this.cb_2
  155. this.Control[iCurrent+3]=this.cb_3
  156. this.Control[iCurrent+4]=this.cb_4
  157. this.Control[iCurrent+5]=this.cb_5
  158. this.Control[iCurrent+6]=this.cb_6
  159. this.Control[iCurrent+7]=this.cb_7
  160. this.Control[iCurrent+8]=this.cb_8
  161. this.Control[iCurrent+9]=this.cb_9
  162. this.Control[iCurrent+10]=this.cb_10
  163. this.Control[iCurrent+11]=this.cb_11
  164. this.Control[iCurrent+12]=this.cb_13
  165. this.Control[iCurrent+13]=this.cb_14
  166. this.Control[iCurrent+14]=this.cb_15
  167. this.Control[iCurrent+15]=this.cb_16
  168. this.Control[iCurrent+16]=this.cb_17
  169. this.Control[iCurrent+17]=this.cb_12
  170. this.Control[iCurrent+18]=this.cb_18
  171. this.Control[iCurrent+19]=this.cb_19
  172. this.Control[iCurrent+20]=this.cb_20
  173. this.Control[iCurrent+21]=this.cb_21
  174. this.Control[iCurrent+22]=this.st_2
  175. this.Control[iCurrent+23]=this.sle_1
  176. this.Control[iCurrent+24]=this.cb_25
  177. this.Control[iCurrent+25]=this.cb_26
  178. this.Control[iCurrent+26]=this.dw_1
  179. this.Control[iCurrent+27]=this.st_1
  180. this.Control[iCurrent+28]=this.sle_rslt
  181. end on
  182. on w_cmpl_formula_edit.destroy
  183. call super::destroy
  184. destroy(this.cb_1)
  185. destroy(this.cb_2)
  186. destroy(this.cb_3)
  187. destroy(this.cb_4)
  188. destroy(this.cb_5)
  189. destroy(this.cb_6)
  190. destroy(this.cb_7)
  191. destroy(this.cb_8)
  192. destroy(this.cb_9)
  193. destroy(this.cb_10)
  194. destroy(this.cb_11)
  195. destroy(this.cb_13)
  196. destroy(this.cb_14)
  197. destroy(this.cb_15)
  198. destroy(this.cb_16)
  199. destroy(this.cb_17)
  200. destroy(this.cb_12)
  201. destroy(this.cb_18)
  202. destroy(this.cb_19)
  203. destroy(this.cb_20)
  204. destroy(this.cb_21)
  205. destroy(this.st_2)
  206. destroy(this.sle_1)
  207. destroy(this.cb_25)
  208. destroy(this.cb_26)
  209. destroy(this.dw_1)
  210. destroy(this.st_1)
  211. destroy(this.sle_rslt)
  212. end on
  213. event open;call super::open;s_cmpl_parm s_parm
  214. s_parm = message.powerobjectparm
  215. long i, ll_row
  216. sle_1.Text = s_parm.oldformula
  217. for i = 1 to upperbound(s_parm.parmname)
  218. ll_row = dw_1.insertrow(0)
  219. dw_1.object.parmname[ll_row] = s_parm.parmname[i]
  220. dw_1.object.displayname[ll_row] = s_parm.displayname[i]
  221. dw_1.object.parmvalue[ll_row] = s_parm.parmvalue[i]
  222. next
  223. end event
  224. event close;call super::close;closewithreturn(this, ins_rslt)
  225. end event
  226. type cb_func from w_publ_base`cb_func within w_cmpl_formula_edit
  227. boolean visible = false
  228. end type
  229. type cb_exit from w_publ_base`cb_exit within w_cmpl_formula_edit
  230. integer x = 1440
  231. integer y = 908
  232. integer width = 343
  233. integer taborder = 50
  234. end type
  235. type cb_1 from uo_imflatbutton within w_cmpl_formula_edit
  236. integer x = 1038
  237. integer y = 908
  238. integer width = 343
  239. integer height = 96
  240. integer taborder = 40
  241. boolean bringtotop = true
  242. string normalpicname = "ok.bmp"
  243. end type
  244. event clicked;call super::clicked;ins_rslt = sle_1.text
  245. close(parent)
  246. end event
  247. type cb_2 from commandbutton within w_cmpl_formula_edit
  248. integer x = 814
  249. integer y = 396
  250. integer width = 165
  251. integer height = 104
  252. integer taborder = 70
  253. boolean bringtotop = true
  254. integer textsize = -9
  255. integer weight = 400
  256. fontcharset fontcharset = gb2312charset!
  257. fontpitch fontpitch = variable!
  258. string facename = "宋体"
  259. string text = "7"
  260. end type
  261. event clicked;string ls_temp
  262. ls_temp = this.text
  263. sle_1.replacetext(ls_temp)
  264. sle_1.setfocus()
  265. end event
  266. type cb_3 from commandbutton within w_cmpl_formula_edit
  267. integer x = 1015
  268. integer y = 396
  269. integer width = 165
  270. integer height = 104
  271. integer taborder = 80
  272. boolean bringtotop = true
  273. integer textsize = -9
  274. integer weight = 400
  275. fontcharset fontcharset = gb2312charset!
  276. fontpitch fontpitch = variable!
  277. string facename = "宋体"
  278. string text = "8"
  279. end type
  280. event clicked;string ls_temp
  281. ls_temp = this.text
  282. sle_1.replacetext(ls_temp)
  283. sle_1.setfocus()
  284. end event
  285. type cb_4 from commandbutton within w_cmpl_formula_edit
  286. integer x = 1015
  287. integer y = 524
  288. integer width = 165
  289. integer height = 104
  290. integer taborder = 130
  291. boolean bringtotop = true
  292. integer textsize = -9
  293. integer weight = 400
  294. fontcharset fontcharset = gb2312charset!
  295. fontpitch fontpitch = variable!
  296. string facename = "宋体"
  297. string text = "5"
  298. end type
  299. event clicked;string ls_temp
  300. ls_temp = this.text
  301. sle_1.replacetext(ls_temp)
  302. sle_1.setfocus()
  303. end event
  304. type cb_5 from commandbutton within w_cmpl_formula_edit
  305. integer x = 814
  306. integer y = 524
  307. integer width = 165
  308. integer height = 104
  309. integer taborder = 90
  310. boolean bringtotop = true
  311. integer textsize = -9
  312. integer weight = 400
  313. fontcharset fontcharset = gb2312charset!
  314. fontpitch fontpitch = variable!
  315. string facename = "宋体"
  316. string text = "4"
  317. end type
  318. event clicked;string ls_temp
  319. ls_temp = this.text
  320. sle_1.replacetext(ls_temp)
  321. sle_1.setfocus()
  322. end event
  323. type cb_6 from commandbutton within w_cmpl_formula_edit
  324. integer x = 1216
  325. integer y = 396
  326. integer width = 165
  327. integer height = 104
  328. integer taborder = 100
  329. boolean bringtotop = true
  330. integer textsize = -9
  331. integer weight = 400
  332. fontcharset fontcharset = gb2312charset!
  333. fontpitch fontpitch = variable!
  334. string facename = "宋体"
  335. string text = "9"
  336. end type
  337. event clicked;string ls_temp
  338. ls_temp = this.text
  339. sle_1.replacetext(ls_temp)
  340. sle_1.setfocus()
  341. end event
  342. type cb_7 from commandbutton within w_cmpl_formula_edit
  343. integer x = 1417
  344. integer y = 396
  345. integer width = 165
  346. integer height = 104
  347. integer taborder = 140
  348. boolean bringtotop = true
  349. integer textsize = -9
  350. integer weight = 400
  351. fontcharset fontcharset = gb2312charset!
  352. fontpitch fontpitch = variable!
  353. string facename = "宋体"
  354. string text = "/"
  355. end type
  356. event clicked;string ls_temp
  357. ls_temp = this.text
  358. sle_1.replacetext(ls_temp)
  359. sle_1.setfocus()
  360. end event
  361. type cb_8 from commandbutton within w_cmpl_formula_edit
  362. integer x = 1417
  363. integer y = 524
  364. integer width = 165
  365. integer height = 104
  366. integer taborder = 200
  367. boolean bringtotop = true
  368. integer textsize = -9
  369. integer weight = 400
  370. fontcharset fontcharset = gb2312charset!
  371. fontpitch fontpitch = variable!
  372. string facename = "宋体"
  373. string text = "*"
  374. end type
  375. event clicked;string ls_temp
  376. ls_temp = this.text
  377. sle_1.replacetext(ls_temp)
  378. sle_1.setfocus()
  379. end event
  380. type cb_9 from commandbutton within w_cmpl_formula_edit
  381. integer x = 1216
  382. integer y = 524
  383. integer width = 165
  384. integer height = 104
  385. integer taborder = 150
  386. boolean bringtotop = true
  387. integer textsize = -9
  388. integer weight = 400
  389. fontcharset fontcharset = gb2312charset!
  390. fontpitch fontpitch = variable!
  391. string facename = "宋体"
  392. string text = "6"
  393. end type
  394. event clicked;string ls_temp
  395. ls_temp = this.text
  396. sle_1.replacetext(ls_temp)
  397. sle_1.setfocus()
  398. end event
  399. type cb_10 from commandbutton within w_cmpl_formula_edit
  400. integer x = 814
  401. integer y = 652
  402. integer width = 165
  403. integer height = 104
  404. integer taborder = 110
  405. boolean bringtotop = true
  406. integer textsize = -9
  407. integer weight = 400
  408. fontcharset fontcharset = gb2312charset!
  409. fontpitch fontpitch = variable!
  410. string facename = "宋体"
  411. string text = "1"
  412. end type
  413. event clicked;string ls_temp
  414. ls_temp = this.text
  415. sle_1.replacetext(ls_temp)
  416. sle_1.setfocus()
  417. end event
  418. type cb_11 from commandbutton within w_cmpl_formula_edit
  419. integer x = 1015
  420. integer y = 652
  421. integer width = 165
  422. integer height = 104
  423. integer taborder = 160
  424. boolean bringtotop = true
  425. integer textsize = -9
  426. integer weight = 400
  427. fontcharset fontcharset = gb2312charset!
  428. fontpitch fontpitch = variable!
  429. string facename = "宋体"
  430. string text = "2"
  431. end type
  432. event clicked;string ls_temp
  433. ls_temp = this.text
  434. sle_1.replacetext(ls_temp)
  435. sle_1.setfocus()
  436. end event
  437. type cb_13 from commandbutton within w_cmpl_formula_edit
  438. integer x = 814
  439. integer y = 780
  440. integer width = 165
  441. integer height = 104
  442. integer taborder = 170
  443. boolean bringtotop = true
  444. integer textsize = -9
  445. integer weight = 400
  446. fontcharset fontcharset = gb2312charset!
  447. fontpitch fontpitch = variable!
  448. string facename = "宋体"
  449. string text = "0"
  450. end type
  451. event clicked;string ls_temp
  452. ls_temp = this.text
  453. sle_1.replacetext(ls_temp)
  454. sle_1.setfocus()
  455. end event
  456. type cb_14 from commandbutton within w_cmpl_formula_edit
  457. integer x = 1216
  458. integer y = 652
  459. integer width = 165
  460. integer height = 104
  461. integer taborder = 180
  462. boolean bringtotop = true
  463. integer textsize = -9
  464. integer weight = 400
  465. fontcharset fontcharset = gb2312charset!
  466. fontpitch fontpitch = variable!
  467. string facename = "宋体"
  468. string text = "3"
  469. end type
  470. event clicked;string ls_temp
  471. ls_temp = this.text
  472. sle_1.replacetext(ls_temp)
  473. sle_1.setfocus()
  474. end event
  475. type cb_15 from commandbutton within w_cmpl_formula_edit
  476. integer x = 1417
  477. integer y = 652
  478. integer width = 165
  479. integer height = 104
  480. integer taborder = 210
  481. boolean bringtotop = true
  482. integer textsize = -9
  483. integer weight = 400
  484. fontcharset fontcharset = gb2312charset!
  485. fontpitch fontpitch = variable!
  486. string facename = "宋体"
  487. string text = "-"
  488. end type
  489. event clicked;string ls_temp
  490. ls_temp = this.text
  491. sle_1.replacetext(ls_temp)
  492. sle_1.setfocus()
  493. end event
  494. type cb_16 from commandbutton within w_cmpl_formula_edit
  495. integer x = 1417
  496. integer y = 780
  497. integer width = 165
  498. integer height = 104
  499. integer taborder = 250
  500. boolean bringtotop = true
  501. integer textsize = -9
  502. integer weight = 400
  503. fontcharset fontcharset = gb2312charset!
  504. fontpitch fontpitch = variable!
  505. string facename = "宋体"
  506. string text = "+"
  507. end type
  508. event clicked;string ls_temp
  509. ls_temp = this.text
  510. sle_1.replacetext(ls_temp)
  511. sle_1.setfocus()
  512. end event
  513. type cb_17 from commandbutton within w_cmpl_formula_edit
  514. integer x = 1015
  515. integer y = 780
  516. integer width = 165
  517. integer height = 104
  518. integer taborder = 220
  519. boolean bringtotop = true
  520. integer textsize = -9
  521. integer weight = 400
  522. fontcharset fontcharset = gb2312charset!
  523. fontpitch fontpitch = variable!
  524. string facename = "宋体"
  525. string text = "."
  526. end type
  527. event clicked;string ls_temp
  528. ls_temp = this.text
  529. sle_1.replacetext(ls_temp)
  530. sle_1.setfocus()
  531. end event
  532. type cb_12 from commandbutton within w_cmpl_formula_edit
  533. integer x = 1618
  534. integer y = 780
  535. integer width = 165
  536. integer height = 104
  537. integer taborder = 30
  538. boolean bringtotop = true
  539. integer textsize = -9
  540. integer weight = 400
  541. fontcharset fontcharset = gb2312charset!
  542. fontpitch fontpitch = variable!
  543. string facename = "宋体"
  544. string text = "="
  545. end type
  546. event clicked;wf_cmp()
  547. cb_1.SetFocus()
  548. end event
  549. type cb_18 from commandbutton within w_cmpl_formula_edit
  550. integer x = 1618
  551. integer y = 524
  552. integer width = 165
  553. integer height = 104
  554. integer taborder = 260
  555. boolean bringtotop = true
  556. integer textsize = -9
  557. integer weight = 400
  558. fontcharset fontcharset = gb2312charset!
  559. fontpitch fontpitch = variable!
  560. string facename = "宋体"
  561. string text = "("
  562. end type
  563. event clicked;string ls_temp
  564. ls_temp = this.text
  565. sle_1.replacetext(ls_temp)
  566. sle_1.setfocus()
  567. end event
  568. type cb_19 from commandbutton within w_cmpl_formula_edit
  569. integer x = 1618
  570. integer y = 652
  571. integer width = 165
  572. integer height = 104
  573. integer taborder = 290
  574. boolean bringtotop = true
  575. integer textsize = -9
  576. integer weight = 400
  577. fontcharset fontcharset = gb2312charset!
  578. fontpitch fontpitch = variable!
  579. string facename = "宋体"
  580. string text = ")"
  581. end type
  582. event clicked;string ls_temp
  583. ls_temp = this.text
  584. sle_1.replacetext(ls_temp)
  585. sle_1.setfocus()
  586. end event
  587. type cb_20 from commandbutton within w_cmpl_formula_edit
  588. integer x = 1618
  589. integer y = 396
  590. integer width = 165
  591. integer height = 104
  592. integer taborder = 230
  593. boolean bringtotop = true
  594. integer textsize = -9
  595. integer weight = 400
  596. fontcharset fontcharset = gb2312charset!
  597. fontpitch fontpitch = variable!
  598. string facename = "宋体"
  599. string text = "C"
  600. end type
  601. event clicked;sle_1.text = ''
  602. end event
  603. type cb_21 from commandbutton within w_cmpl_formula_edit
  604. integer x = 1216
  605. integer y = 780
  606. integer width = 165
  607. integer height = 104
  608. integer taborder = 270
  609. boolean bringtotop = true
  610. integer textsize = -9
  611. integer weight = 400
  612. fontcharset fontcharset = gb2312charset!
  613. fontpitch fontpitch = variable!
  614. string facename = "宋体"
  615. string text = "BS"
  616. end type
  617. event clicked;sle_1.text = mid(sle_1.text,1,len(sle_1.text) - 1)
  618. end event
  619. type st_2 from statictext within w_cmpl_formula_edit
  620. integer x = 1262
  621. integer y = 316
  622. integer width = 535
  623. integer height = 60
  624. boolean bringtotop = true
  625. integer textsize = -9
  626. integer weight = 400
  627. fontcharset fontcharset = gb2312charset!
  628. fontpitch fontpitch = variable!
  629. string facename = "宋体"
  630. long textcolor = 255
  631. long backcolor = 67108864
  632. string text = "说明:C-清除,BS-退格"
  633. boolean focusrectangle = false
  634. end type
  635. type sle_1 from u_sleedit within w_cmpl_formula_edit
  636. integer x = 41
  637. integer y = 100
  638. integer width = 1755
  639. integer taborder = 20
  640. boolean bringtotop = true
  641. boolean autohscroll = true
  642. end type
  643. type cb_25 from commandbutton within w_cmpl_formula_edit
  644. boolean visible = false
  645. integer x = 41
  646. integer width = 165
  647. integer height = 88
  648. integer taborder = 140
  649. boolean bringtotop = true
  650. integer textsize = -9
  651. integer weight = 400
  652. fontcharset fontcharset = gb2312charset!
  653. fontpitch fontpitch = variable!
  654. string facename = "宋体"
  655. string text = "选择"
  656. end type
  657. event clicked;Open(w_formula_edit)
  658. String ls_temp
  659. ls_temp = Message.StringParm
  660. IF ls_temp <> '' THEN
  661. sle_1.Text = ls_temp
  662. END IF
  663. end event
  664. type cb_26 from commandbutton within w_cmpl_formula_edit
  665. boolean visible = false
  666. integer x = 206
  667. integer width = 165
  668. integer height = 88
  669. integer taborder = 150
  670. boolean bringtotop = true
  671. integer textsize = -9
  672. integer weight = 400
  673. fontcharset fontcharset = gb2312charset!
  674. fontpitch fontpitch = variable!
  675. string facename = "宋体"
  676. string text = "保存"
  677. end type
  678. event clicked;Long ll_newid
  679. String ls_formula,errmsg
  680. Long rslt = 1
  681. ls_formula = Trim(sle_1.Text)
  682. ll_newid = f_sys_scidentity(0,"u_formula_def","formulaid",errmsg,FALSE,sqlca)
  683. IF ll_newid <= 0 THEN
  684. rslt = 0
  685. GOTO ext
  686. ELSE
  687. INSERT INTO u_formula_def
  688. ( formulaid,
  689. content )
  690. VALUES ( :ll_newid,
  691. :ls_formula ) ;
  692. IF sqlca.SQLCode <> 0 THEN
  693. errmsg = '插入公式失败'
  694. rslt = 0
  695. GOTO ext
  696. END IF
  697. END IF
  698. ext:
  699. IF rslt = 0 THEN
  700. ROLLBACK;
  701. MessageBox('错误',errmsg,stopsign!,OK!)
  702. ELSE
  703. COMMIT;
  704. MessageBox('提示',"保存成功!", Information!, OK! )
  705. END IF
  706. end event
  707. type dw_1 from u_dw_rbtnfilter within w_cmpl_formula_edit
  708. integer x = 32
  709. integer y = 216
  710. integer width = 750
  711. integer height = 832
  712. integer taborder = 20
  713. boolean bringtotop = true
  714. string dataobject = "dw_cmpl_parm"
  715. boolean hscrollbar = true
  716. boolean vscrollbar = true
  717. end type
  718. event doubleclicked;call super::doubleclicked;if row <= 0 then return
  719. string ls_temp
  720. ls_temp = '[' + this.object.parmname[row] + ']'
  721. sle_1.replacetext(ls_temp)
  722. sle_1.setfocus()
  723. end event
  724. type st_1 from statictext within w_cmpl_formula_edit
  725. integer x = 1330
  726. integer y = 224
  727. integer width = 55
  728. integer height = 48
  729. boolean bringtotop = true
  730. integer textsize = -9
  731. integer weight = 400
  732. fontcharset fontcharset = gb2312charset!
  733. fontpitch fontpitch = variable!
  734. string facename = "宋体"
  735. long textcolor = 33554432
  736. long backcolor = 134217739
  737. string text = "="
  738. boolean focusrectangle = false
  739. end type
  740. type sle_rslt from singlelineedit within w_cmpl_formula_edit
  741. integer x = 1394
  742. integer y = 208
  743. integer width = 402
  744. integer height = 84
  745. integer taborder = 30
  746. boolean bringtotop = true
  747. integer textsize = -9
  748. integer weight = 400
  749. fontcharset fontcharset = gb2312charset!
  750. fontpitch fontpitch = variable!
  751. string facename = "宋体"
  752. long textcolor = 33554432
  753. borderstyle borderstyle = stylelowered!
  754. end type