w_buytask_buymx_ch2.srw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. $PBExportHeader$w_buytask_buymx_ch2.srw
  2. forward
  3. global type w_buytask_buymx_ch2 from w_pageretr_ch
  4. end type
  5. type cbx_mlselect from checkbox within w_buytask_buymx_ch2
  6. end type
  7. type cb_other from uo_imflatbutton within w_buytask_buymx_ch2
  8. end type
  9. type dw_choice from datawindow within w_buytask_buymx_ch2
  10. end type
  11. type cb_ok from uo_imflatbutton within w_buytask_buymx_ch2
  12. end type
  13. type cb_del from uo_imflatbutton within w_buytask_buymx_ch2
  14. end type
  15. type cbx_ml from checkbox within w_buytask_buymx_ch2
  16. end type
  17. type cbx_allselect from checkbox within w_buytask_buymx_ch2
  18. end type
  19. end forward
  20. global type w_buytask_buymx_ch2 from w_pageretr_ch
  21. integer width = 6025
  22. integer height = 2752
  23. string title = "采购订单 - 销售订单明细采购需求选择"
  24. event ue_retrieve_info ( )
  25. cbx_mlselect cbx_mlselect
  26. cb_other cb_other
  27. dw_choice dw_choice
  28. cb_ok cb_ok
  29. cb_del cb_del
  30. cbx_ml cbx_ml
  31. cbx_allselect cbx_allselect
  32. end type
  33. global w_buytask_buymx_ch2 w_buytask_buymx_ch2
  34. type variables
  35. s_mtrldef_buytask_array INS_RT_STRU
  36. boolean if_changeselect=true
  37. int if_mlselect=0
  38. long cur_sptid
  39. long cur_scid
  40. end variables
  41. forward prototypes
  42. public function integer wf_face_change ()
  43. end prototypes
  44. event ue_retrieve_info();Long ll_row
  45. Long ll_mtrlid
  46. ll_row = dw_pageretr.GetRow()
  47. IF ll_row <= 0 THEN
  48. ll_mtrlid = 0
  49. ELSE
  50. ll_mtrlid = dw_pageretr.Object.u_orderrqmtrl_mtrlid[ll_row]
  51. END IF
  52. IF IsValid(w_mtrl_info) THEN
  53. w_mtrl_info.WindowState = Normal!
  54. w_mtrl_info.ins_mtrlid = ll_mtrlid
  55. w_mtrl_info.wf_retrieve(ll_mtrlid)
  56. END IF
  57. end event
  58. public function integer wf_face_change ();//wf_face_change()
  59. IF cbx_ml.Checked THEN
  60. dw_pageretr.Height = this.height - dw_pageretr.y - 140
  61. dw_choice.Visible = FALSE
  62. cb_ok.Visible = FALSE
  63. cb_del.Visible = FALSE
  64. ELSE
  65. dw_pageretr.Height = 1418
  66. dw_choice.Visible = TRUE
  67. cb_ok.Visible = TRUE
  68. cb_del.Visible = TRUE
  69. END IF
  70. dw_pageretr.X = 9
  71. dw_pageretr.Width = this.Width - dw_pageretr.x - 40
  72. dw_choice.X = 9
  73. dw_choice.Width = this.Width - dw_choice.x - 40
  74. RETURN 1
  75. end function
  76. on w_buytask_buymx_ch2.create
  77. int iCurrent
  78. call super::create
  79. this.cbx_mlselect=create cbx_mlselect
  80. this.cb_other=create cb_other
  81. this.dw_choice=create dw_choice
  82. this.cb_ok=create cb_ok
  83. this.cb_del=create cb_del
  84. this.cbx_ml=create cbx_ml
  85. this.cbx_allselect=create cbx_allselect
  86. iCurrent=UpperBound(this.Control)
  87. this.Control[iCurrent+1]=this.cbx_mlselect
  88. this.Control[iCurrent+2]=this.cb_other
  89. this.Control[iCurrent+3]=this.dw_choice
  90. this.Control[iCurrent+4]=this.cb_ok
  91. this.Control[iCurrent+5]=this.cb_del
  92. this.Control[iCurrent+6]=this.cbx_ml
  93. this.Control[iCurrent+7]=this.cbx_allselect
  94. end on
  95. on w_buytask_buymx_ch2.destroy
  96. call super::destroy
  97. destroy(this.cbx_mlselect)
  98. destroy(this.cb_other)
  99. destroy(this.dw_choice)
  100. destroy(this.cb_ok)
  101. destroy(this.cb_del)
  102. destroy(this.cbx_ml)
  103. destroy(this.cbx_allselect)
  104. end on
  105. event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
  106. if trim(sle_usual_query.text)<>'' then
  107. if pos(trim(sle_usual_query.text),'%')=0 then
  108. obj_expr=obj_expr+'( u_mtrldef_mtrlcode like "%'+trim(sle_usual_query.text)+'%" )'
  109. else
  110. obj_expr=obj_expr+'( u_mtrldef_mtrlcode like "'+trim(sle_usual_query.text)+'" )'
  111. end if
  112. end if
  113. dw_pageretr.setfilter(obj_expr)
  114. dw_pageretr.setredraw(false)
  115. dw_pageretr.filter()
  116. if dw_pageretr.rowcount()>=1 then
  117. dw_pageretr.selectrow(0,false)
  118. dw_pageretr.selectrow(1,true)
  119. end if
  120. dw_pageretr.setredraw(true)
  121. end event
  122. event ue_usual_query_retr;call super::ue_usual_query_retr;string ls_querystrpart=''
  123. ls_newselect=lower(ori_oldselect)
  124. if trim(sle_usual_query.text)<>'' then
  125. if pos(trim(sle_usual_query.text),'%')=0 then
  126. ls_querystrpart="(u_mtrldef.mtrlcode like '%"+trim(sle_usual_query.text)+"%')"
  127. else
  128. ls_querystrpart="(u_mtrldef.mtrlcode like '"+trim(sle_usual_query.text)+"')"
  129. end if
  130. if pos(ls_newselect," where ") <> 0 then
  131. ls_newselect=ls_newselect+" and ("+ls_querystrpart+')'
  132. else
  133. ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
  134. end if
  135. end if
  136. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  137. this.triggerevent('retrieve_pageretr')
  138. end event
  139. event close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
  140. //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
  141. end event
  142. event open;this.triggerevent('ue_before_open')
  143. wf_movetocenter()
  144. OLD_TITLE=THIS.TITLE
  145. s_tran=Message.PowerObjectParm
  146. IF not ISNULL(s_tran) then
  147. retrieve_all=s_tran.if_retrieve_all
  148. mode=s_tran.work_mode
  149. arg_pkid=s_tran.arg_pkid
  150. arg_string_code=s_tran.arg_string_code
  151. if_sharedata=s_tran.if_sharedata //是否应用sharedata,当retrieve_all=true是生效
  152. ds_share=s_tran.ds_share
  153. cur_sptid = s_tran.d_long
  154. cur_scid = s_tran.e_long
  155. end if
  156. dw_pageretr.RBUTTON_FILTER_USE=true //右键查询功能开关
  157. dw_pageretr.titleclick_sort_use=true //单击标题排序功能开关
  158. dw_pageretr.SetTransObject (sqlca)
  159. pkcolumndbtname=wf_get_pkcolumndbtname(dw_pageretr) //取第一列为关键字
  160. ori_oldselect=dw_pageretr.Describe("DataWindow.Table.Select")
  161. ls_newselect=ori_oldselect
  162. ds_curquery=CREATE DATASTORE
  163. ds_curquery.DATAOBJECT='d_extr_find'
  164. ds_curquery.SetTransObject (sqlca)
  165. wf_editindex_lockf()
  166. sle_usual_query.text=trim(arg_string_code)
  167. if NOT retrieve_all then
  168. THIS.TRIGGEREVENT("ue_usual_query_RETR") //修改ls_newselect,retrieve
  169. else
  170. if if_sharedata then
  171. ds_share.sharedata(dw_pageretr)
  172. else
  173. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  174. this.TRIGGEREVENT('RETRIEVE_pageretr')
  175. end if
  176. end if
  177. IF retrieve_all THEN
  178. THIS.TRIGGEREVENT("ue_usual_query_filt")
  179. END IF
  180. INS_RT_STRU.mtrlid[1]=0
  181. s_hide_col s_col_mtrlsectype
  182. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  183. f_hide_col(1308,dw_pageretr,s_col_mtrlsectype)
  184. s_hide_col s_col_zxmtrlmode
  185. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  186. f_hide_col(1309,dw_pageretr,s_col_zxmtrlmode)
  187. wf_face_change()
  188. end event
  189. event ue_before_open;call super::ue_before_open;if_ue_sort=true
  190. end event
  191. event retrieve_pageretr;boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  192. boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  193. //cb_firstpage_enabled=cb_firstpage.enabled
  194. cb_nextpage_enabled=cb_nextpage.enabled
  195. cb_retrieveall_enabled=cb_retrieveall.enabled
  196. //cb_priorpage_enabled=cb_priorpage.enabled
  197. cb_func_enabled=cb_func.enabled
  198. //cb_firstpage.enabled=false
  199. cb_nextpage.enabled=false
  200. cb_retrieveall.enabled=false
  201. //cb_priorpage.enabled=false
  202. cb_func.enabled=false
  203. SetPointer(HourGlass!)
  204. dw_pageretr.retrieve(cur_scid, cur_sptid)
  205. if dw_pageretr.rowcount()>0 and dw_pageretr.getrow()=0 then dw_pageretr.setrow(1)
  206. SetPointer(Arrow!)
  207. //cb_firstpage.enabled=cb_firstpage_enabled
  208. cb_nextpage.enabled=cb_nextpage_enabled
  209. cb_retrieveall.enabled=cb_retrieveall_enabled
  210. //cb_priorpage.enabled=cb_priorpage_enabled
  211. cb_func.enabled=cb_func_enabled
  212. IF cbx_mlselect.Checked AND dw_pageretr.RowCount() > 1 THEN
  213. dw_pageretr.SelectRow(1,FALSE)
  214. END IF
  215. end event
  216. type cb_func from w_pageretr_ch`cb_func within w_buytask_buymx_ch2
  217. end type
  218. type cb_exit from w_pageretr_ch`cb_exit within w_buytask_buymx_ch2
  219. integer x = 869
  220. end type
  221. type sle_usual_query from w_pageretr_ch`sle_usual_query within w_buytask_buymx_ch2
  222. integer x = 347
  223. end type
  224. type cb_retrieveall from w_pageretr_ch`cb_retrieveall within w_buytask_buymx_ch2
  225. integer x = 1339
  226. end type
  227. type em_pagerowno from w_pageretr_ch`em_pagerowno within w_buytask_buymx_ch2
  228. integer x = 1029
  229. end type
  230. type dw_pageretr from w_pageretr_ch`dw_pageretr within w_buytask_buymx_ch2
  231. integer width = 5998
  232. integer height = 1420
  233. string dataobject = "dw_buytask_mx_ch2"
  234. end type
  235. event dw_pageretr::clicked;if row>0 then
  236. this.setrow(row)
  237. if if_mlselect=1 then
  238. if if_changeselect then
  239. this.selectrow(row,not this.IsSelected(row))
  240. else
  241. if_changeselect=true
  242. end if
  243. else
  244. this.selectrow(0,false)
  245. this.selectrow(row,true)
  246. end if
  247. end if
  248. end event
  249. event dw_pageretr::rowfocuschanged;if if_mlselect=1 then
  250. if currentrow <=0 then return
  251. if keydown(keycontrol!) then
  252. if this.isselected(currentrow) then
  253. this.selectrow(currentrow,false)
  254. if_changeselect=false
  255. else
  256. if_changeselect=true
  257. end if
  258. else
  259. if not this.isselected(currentrow) then
  260. this.selectrow(currentrow,true)
  261. if_changeselect=false
  262. else
  263. if_changeselect=true
  264. end if
  265. end if
  266. else
  267. if dw_edit_mode then return
  268. if currentrow <=0 then return
  269. this.selectrow(0,false)
  270. this.selectrow(currentrow,true)
  271. end if
  272. parent.TriggerEvent('ue_retrieve_info')
  273. end event
  274. event dw_pageretr::dwnkey;call super::dwnkey;if keydown(keyenter!) then return 1
  275. end event
  276. event dw_pageretr::doubleclicked;IF cbx_ml.Checked THEN
  277. cb_choice.TriggerEvent(Clicked!)
  278. ELSE
  279. cb_ok.TriggerEvent(Clicked!) //缓冲
  280. END IF
  281. end event
  282. type st_1 from w_pageretr_ch`st_1 within w_buytask_buymx_ch2
  283. integer width = 315
  284. string text = "物料编码含:"
  285. end type
  286. type cb_nextpage from w_pageretr_ch`cb_nextpage within w_buytask_buymx_ch2
  287. integer x = 1486
  288. end type
  289. type cb_choice from w_pageretr_ch`cb_choice within w_buytask_buymx_ch2
  290. integer x = 718
  291. end type
  292. event cb_choice::clicked;call super::clicked;Long ROW,ls_i = 0,chC = 0
  293. datawindow dw
  294. IF cbx_ml.Checked THEN
  295. dw = dw_pageretr
  296. ROW = dw.GetRow()
  297. IF ROW <= 0 THEN
  298. MessageBox('提示','请先选择目标行!', Information!, OK! )
  299. RETURN
  300. END IF
  301. ELSE
  302. dw = dw_choice
  303. dw.AcceptText()
  304. ROW = dw.RowCount()
  305. IF ROW <= 0 THEN
  306. MessageBox('提示','请先选择缓冲目标!', Information!, OK! )
  307. RETURN
  308. END IF
  309. END IF
  310. FOR ls_i = 1 To dw.RowCount()
  311. IF Not cbx_ml.Checked Or dw.IsSelected(ls_i) THEN
  312. chC++
  313. INS_RT_STRU.mtrlid[chC] = dw.Object.u_orderrqmtrl_mtrlid[ls_i]
  314. INS_RT_STRU.mtrlname[chC] = dw.Object.u_mtrldef_mtrlname[ls_i]
  315. INS_RT_STRU.mtrlcode[chC] = dw.Object.u_mtrldef_mtrlcode[ls_i]
  316. INS_RT_STRU.mtrlmode[chC] = dw.Object.u_mtrldef_mtrlmode[ls_i]
  317. INS_RT_STRU.unit[chC] = dw.Object.u_mtrldef_unit[ls_i]
  318. INS_RT_STRU.mtrltype[chC] = dw.Object.u_mtrldef_mtrltype[ls_i]
  319. //INS_RT_STRU.qty[chC] = dw.Object.notconsignedqty[ls_i]
  320. INS_RT_STRU.qty[chC] = dw.Object.u_orderrqmtrl_truerqqty[ls_i]
  321. INS_RT_STRU.relcode[chC] = dw.Object.u_saletask_taskcode[ls_i]
  322. INS_RT_STRU.relid[chC] = dw.Object.u_orderrqmtrl_taskid[ls_i]
  323. INS_RT_STRU.relPrintid[chC] = dw.Object.u_orderrqmtrl_printid[ls_i]
  324. INS_RT_STRU.lmbuyprice[chC] = dw.Object.u_mtrldef_lmbuyprice[ls_i]
  325. INS_RT_STRU.rate_buy[chC] = dw.Object.u_mtrldef_rate_buy[ls_i]
  326. INS_RT_STRU.unit_buy[chC] = dw.Object.u_mtrldef_unit_buy[ls_i]
  327. INS_RT_STRU.planprice[chC] = dw.Object.u_mtrldef_planprice[ls_i]
  328. INS_RT_STRU.status[chC] = dw.Object.u_orderrqmtrl_status[ls_i]
  329. INS_RT_STRU.woodcode[chC] = dw.Object.u_orderrqmtrl_woodcode[ls_i]
  330. INS_RT_STRU.pcode[chC] = dw.Object.u_orderrqmtrl_pcode[ls_i]
  331. INS_RT_STRU.mtrlsectype[chC] = dw.Object.u_mtrldef_mtrlsectype[ls_i]
  332. INS_RT_STRU.zxmtrlmode[chC] = dw.Object.u_mtrldef_zxmtrlmode[ls_i]
  333. INS_RT_STRU.relid2[chC] = dw.Object.u_orderrqmtrl_mxpkid[ls_i]
  334. INS_RT_STRU.proname[chC] = dw.Object.u_mtrldef_upmtrlname[ls_i]
  335. INS_RT_STRU.promode[chC] = dw.Object.u_mtrldef_upmtrlmode[ls_i]
  336. INS_RT_STRU.rel_rep[chC] = dw.Object.u_saletask_rel_rep[ls_i]
  337. INS_RT_STRU.cus_address[chC] = dw.Object.u_saletask_cus_address[ls_i]
  338. INS_RT_STRU.cus_tele[chC] = dw.Object.u_saletask_cus_tele[ls_i]
  339. INS_RT_STRU.cus_tele1[chC] = dw.Object.u_saletask_cus_tele1[ls_i]
  340. INS_RT_STRU.dscrp2[chC] = dw.Object.u_saletaskmx_mxdscrp2[ls_i]
  341. INS_RT_STRU.plancode[chC] = dw.Object.u_orderrqmtrl_plancode[ls_i]
  342. if dw.Object.u_mtrldef_unit_buy[ls_i] <> '' then
  343. INS_RT_STRU.unit[chC] = dw.Object.u_mtrldef_unit_buy[ls_i]
  344. INS_RT_STRU.qty[chC] = dw.Object.u_orderrqmtrl_truerqqty[ls_i]/dw.Object.u_mtrldef_rate_buy[ls_i]
  345. end if
  346. END IF
  347. NEXT
  348. IF chC = 0 THEN
  349. MessageBox('提示','请至少选择一个目标行!', Information!, OK! )
  350. RETURN
  351. END IF
  352. Close(Parent)
  353. end event
  354. type cb_refresh from w_pageretr_ch`cb_refresh within w_buytask_buymx_ch2
  355. end type
  356. type cb_help from w_pageretr_ch`cb_help within w_buytask_buymx_ch2
  357. end type
  358. type ln_bar from w_pageretr_ch`ln_bar within w_buytask_buymx_ch2
  359. end type
  360. type ln_bar2 from w_pageretr_ch`ln_bar2 within w_buytask_buymx_ch2
  361. end type
  362. type r_bar from w_pageretr_ch`r_bar within w_buytask_buymx_ch2
  363. end type
  364. type ln_1 from w_pageretr_ch`ln_1 within w_buytask_buymx_ch2
  365. end type
  366. type ln_2 from w_pageretr_ch`ln_2 within w_buytask_buymx_ch2
  367. end type
  368. type cbx_mlselect from checkbox within w_buytask_buymx_ch2
  369. integer x = 1312
  370. integer y = 204
  371. integer width = 256
  372. integer height = 60
  373. boolean bringtotop = true
  374. integer textsize = -9
  375. integer weight = 400
  376. fontcharset fontcharset = gb2312charset!
  377. fontpitch fontpitch = variable!
  378. string facename = "宋体"
  379. long backcolor = 134217739
  380. string text = "多选"
  381. end type
  382. event clicked;if this.checked then
  383. if_mlselect=1
  384. else
  385. if_mlselect=0
  386. end if
  387. f_SetProfileString (sys_empid,dw_pageretr.DataObject, "if_mlselect", String(if_mlselect))
  388. end event
  389. event constructor;if_mlselect=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_mlselect", '0'))
  390. if if_mlselect =0 then
  391. this.checked=false
  392. else
  393. this.checked=true
  394. end if
  395. end event
  396. type cb_other from uo_imflatbutton within w_buytask_buymx_ch2
  397. integer x = 453
  398. integer width = 265
  399. integer height = 164
  400. integer taborder = 40
  401. boolean bringtotop = true
  402. string text = "相关信息"
  403. string normalpicname = "find2.BMP"
  404. integer picsize = 16
  405. toolbaralignment pic_align = alignattop!
  406. boolean border = false
  407. end type
  408. event clicked;call super::clicked;Long ll_row
  409. ll_row = dw_pageretr.GetRow()
  410. IF ll_row <= 0 THEN
  411. MessageBox('系统提示','请选择物料')
  412. RETURN
  413. END IF
  414. Long ll_mtrlid
  415. ll_mtrlid = dw_pageretr.Object.u_orderrqmtrl_mtrlid[ll_row]
  416. IF IsValid(w_mtrl_info) THEN
  417. w_mtrl_info.WindowState = Normal!
  418. w_mtrl_info.ins_mtrlid = ll_mtrlid
  419. w_mtrl_info.wf_retrieve(ll_mtrlid)
  420. ELSE
  421. OpenWithParm(w_mtrl_info,ll_mtrlid)
  422. END IF
  423. end event
  424. type dw_choice from datawindow within w_buytask_buymx_ch2
  425. integer y = 1840
  426. integer width = 6002
  427. integer height = 796
  428. integer taborder = 150
  429. boolean bringtotop = true
  430. string title = "none"
  431. string dataobject = "dw_buytask_mx_ch2"
  432. boolean minbox = true
  433. boolean hscrollbar = true
  434. boolean vscrollbar = true
  435. boolean hsplitscroll = true
  436. boolean livescroll = true
  437. borderstyle borderstyle = stylelowered!
  438. end type
  439. event rowfocuschanged;IF currentrow <=0 THEN RETURN
  440. this.selectrow(0,false)
  441. this.selectrow(currentrow,true)
  442. end event
  443. type cb_ok from uo_imflatbutton within w_buytask_buymx_ch2
  444. integer x = 5271
  445. integer y = 1724
  446. integer width = 379
  447. integer taborder = 80
  448. boolean bringtotop = true
  449. string text = "选定[Enter]"
  450. end type
  451. event clicked;call super::clicked;Long ROW,ls_i,chC = 0
  452. ROW = dw_pageretr.GetRow()
  453. IF ROW <= 0 THEN
  454. MessageBox('提示','请先选择目标行!', Information!, OK! )
  455. RETURN
  456. END IF
  457. FOR ls_i = 1 To dw_pageretr.RowCount()
  458. IF dw_pageretr.IsSelected(ls_i) THEN
  459. IF dw_choice.Find('u_OrderRqMtrl_taskID ='+String(dw_pageretr.Object.u_OrderRqMtrl_taskID[ls_i])+' and u_OrderRqMtrl_MtrlID = ' + String(dw_pageretr.Object.u_OrderRqMtrl_MtrlID[ls_i]),1,dw_choice.RowCount()) = 0 THEN
  460. chC++
  461. dw_pageretr.RowsCopy(ls_i, ls_i, Primary!, dw_choice, dw_choice.RowCount() + 1, Primary!)
  462. END IF
  463. END IF
  464. NEXT
  465. end event
  466. type cb_del from uo_imflatbutton within w_buytask_buymx_ch2
  467. integer x = 5669
  468. integer y = 1724
  469. integer width = 311
  470. integer taborder = 90
  471. boolean bringtotop = true
  472. string text = "删除"
  473. string normalpicname = "delete.bmp"
  474. end type
  475. event clicked;call super::clicked;IF dw_choice.GETROW()=0 THEN
  476. MESSAGEBOX('提示','请选择删除的行对象!', Information!, OK! )
  477. RETURN
  478. END IF
  479. dw_choice.DeleteRow (0)
  480. dw_choice.TriggerEvent (rowfocuschanged!)
  481. end event
  482. type cbx_ml from checkbox within w_buytask_buymx_ch2
  483. integer x = 901
  484. integer y = 204
  485. integer width = 357
  486. integer height = 60
  487. boolean bringtotop = true
  488. integer textsize = -9
  489. integer weight = 700
  490. fontcharset fontcharset = gb2312charset!
  491. fontpitch fontpitch = variable!
  492. string facename = "宋体"
  493. long textcolor = 16711680
  494. long backcolor = 134217739
  495. string text = "直接多选"
  496. end type
  497. event clicked;wf_face_change()
  498. Int use_ml
  499. IF This.Checked THEN //缓冲
  500. use_ml = 0
  501. ELSE
  502. use_ml = 1
  503. END IF
  504. f_SetProfileString (sys_empid,dw_pageretr.DataObject, "use_ml", String(use_ml))
  505. end event
  506. event constructor;Int use_ml
  507. use_ml = Integer(f_ProfileString (sys_empid,dw_pageretr.DataObject, "use_ml", '0'))
  508. IF use_ml = 0 THEN
  509. This.Checked = True
  510. ELSE
  511. This.Checked = False
  512. END IF
  513. end event
  514. type cbx_allselect from checkbox within w_buytask_buymx_ch2
  515. integer x = 1618
  516. integer y = 204
  517. integer width = 256
  518. integer height = 60
  519. boolean bringtotop = true
  520. integer textsize = -9
  521. integer weight = 400
  522. fontcharset fontcharset = gb2312charset!
  523. fontpitch fontpitch = variable!
  524. string facename = "宋体"
  525. long backcolor = 134217739
  526. string text = "全选"
  527. end type
  528. event clicked;Int li
  529. IF THIS.Checked AND cbx_mlselect.Checked THEN
  530. FOR li = 1 TO dw_pageretr.RowCount()
  531. dw_pageretr.SelectRow(li,TRUE)
  532. NEXT
  533. ELSE
  534. FOR li = 1 TO dw_pageretr.RowCount()
  535. dw_pageretr.SelectRow(li,FALSE)
  536. NEXT
  537. END IF
  538. end event
  539. event constructor;Int li
  540. IF THIS.Checked AND cbx_mlselect.Checked THEN
  541. FOR li = 1 TO dw_pageretr.RowCount()
  542. dw_pageretr.SelectRow(li,TRUE)
  543. NEXT
  544. ELSE
  545. FOR li = 1 TO dw_pageretr.RowCount()
  546. dw_pageretr.SelectRow(li,FALSE)
  547. NEXT
  548. END IF
  549. end event