w_sptware_sptid_ch.srw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. $PBExportHeader$w_sptware_sptid_ch.srw
  2. forward
  3. global type w_sptware_sptid_ch from w_pageretr_ch
  4. end type
  5. type cbx_ml from checkbox within w_sptware_sptid_ch
  6. end type
  7. type cbx_showall from checkbox within w_sptware_sptid_ch
  8. end type
  9. type cb_ok from uo_imflatbutton within w_sptware_sptid_ch
  10. end type
  11. type cb_del from uo_imflatbutton within w_sptware_sptid_ch
  12. end type
  13. type cbx_mlselect from checkbox within w_sptware_sptid_ch
  14. end type
  15. type dw_choice from datawindow within w_sptware_sptid_ch
  16. end type
  17. type cbx_allselect from checkbox within w_sptware_sptid_ch
  18. end type
  19. end forward
  20. global type w_sptware_sptid_ch from w_pageretr_ch
  21. integer width = 3191
  22. integer height = 2168
  23. string title = "外协商库存选择 [按Ctrl键反选]"
  24. cbx_ml cbx_ml
  25. cbx_showall cbx_showall
  26. cb_ok cb_ok
  27. cb_del cb_del
  28. cbx_mlselect cbx_mlselect
  29. dw_choice dw_choice
  30. cbx_allselect cbx_allselect
  31. end type
  32. global w_sptware_sptid_ch w_sptware_sptid_ch
  33. type variables
  34. s_sptware_array INS_RT_STRU
  35. boolean if_changeselect=true
  36. int if_mlselect=0,cur_mtrlprp=0
  37. long arg_sptid
  38. long arg_scid
  39. end variables
  40. forward prototypes
  41. public function integer wf_face_change ()
  42. end prototypes
  43. public function integer wf_face_change ();//wf_face_change()
  44. if cbx_ml.checked then
  45. dw_pageretr.height=1744
  46. dw_choice.visible=false
  47. cb_ok.visible=false
  48. cb_del.visible=false
  49. else
  50. dw_pageretr.height=1020
  51. dw_choice.visible=true
  52. cb_ok.visible=true
  53. cb_del.visible=true
  54. end if
  55. return 1
  56. end function
  57. on w_sptware_sptid_ch.create
  58. int iCurrent
  59. call super::create
  60. this.cbx_ml=create cbx_ml
  61. this.cbx_showall=create cbx_showall
  62. this.cb_ok=create cb_ok
  63. this.cb_del=create cb_del
  64. this.cbx_mlselect=create cbx_mlselect
  65. this.dw_choice=create dw_choice
  66. this.cbx_allselect=create cbx_allselect
  67. iCurrent=UpperBound(this.Control)
  68. this.Control[iCurrent+1]=this.cbx_ml
  69. this.Control[iCurrent+2]=this.cbx_showall
  70. this.Control[iCurrent+3]=this.cb_ok
  71. this.Control[iCurrent+4]=this.cb_del
  72. this.Control[iCurrent+5]=this.cbx_mlselect
  73. this.Control[iCurrent+6]=this.dw_choice
  74. this.Control[iCurrent+7]=this.cbx_allselect
  75. end on
  76. on w_sptware_sptid_ch.destroy
  77. call super::destroy
  78. destroy(this.cbx_ml)
  79. destroy(this.cbx_showall)
  80. destroy(this.cb_ok)
  81. destroy(this.cb_del)
  82. destroy(this.cbx_mlselect)
  83. destroy(this.dw_choice)
  84. destroy(this.cbx_allselect)
  85. end on
  86. event ue_before_open;call super::ue_before_open;if_ue_retr=true
  87. if_ue_sort=true
  88. end event
  89. event close;call super::close;cLOSEWITHRETURN(THIS,INS_RT_STRU)
  90. //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
  91. end event
  92. event open;this.triggerevent('ue_before_open')
  93. wf_movetocenter()
  94. OLD_TITLE=THIS.TITLE
  95. s_tran=Message.PowerObjectParm
  96. IF not ISNULL(s_tran) then
  97. retrieve_all=s_tran.if_retrieve_all
  98. mode=s_tran.work_mode
  99. arg_pkid=s_tran.arg_pkid
  100. arg_string_code=s_tran.arg_string_code
  101. arg_sptid=s_tran.d_long
  102. arg_scid=s_tran.f_long
  103. end if
  104. dw_pageretr.RBUTTON_FILTER_USE=true //右键查询功能开关
  105. dw_pageretr.titleclick_sort_use=true //单击标题排序功能开关
  106. dw_pageretr.SetTransObject (sqlca)
  107. pkcolumndbtname=wf_get_pkcolumndbtname(dw_pageretr) //取第一列为关键字
  108. ori_oldselect=dw_pageretr.Describe("DataWindow.Table.Select")
  109. ls_newselect=ori_oldselect
  110. ds_curquery=CREATE DATASTORE
  111. ds_curquery.DATAOBJECT='d_extr_find'
  112. ds_curquery.SetTransObject (sqlca)
  113. wf_editindex_lockf()
  114. if NOT retrieve_all AND trim(arg_string_code)<>'' then
  115. sle_usual_query.text=trim(arg_string_code)
  116. THIS.TRIGGEREVENT("ue_usual_query_RETR") //修改ls_newselect,retrieve
  117. else
  118. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  119. this.TRIGGEREVENT('RETRIEVE_pageretr')
  120. end if
  121. IF retrieve_all AND trim(arg_string_code)<>'' THEN
  122. THIS.TRIGGEREVENT("ue_usual_query_filt")
  123. END IF
  124. INS_RT_STRU.mtrlwareid[1]=0
  125. dw_choice.settransobject(sqlca)
  126. wf_face_change()
  127. s_hide_col s_col
  128. s_col.col_1 = 'cost'
  129. f_hide_col(490,dw_pageretr,s_col)
  130. f_hide_col(490,dw_choice,s_col)
  131. s_hide_col s_col_mtrlsectype
  132. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  133. f_hide_col(1308,dw_pageretr,s_col_mtrlsectype)
  134. f_hide_col(1308,dw_choice,s_col_mtrlsectype)
  135. s_hide_col s_col_zxmtrlmode
  136. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  137. f_hide_col(1309,dw_pageretr,s_col_zxmtrlmode)
  138. f_hide_col(1309,dw_choice,s_col_zxmtrlmode)
  139. end event
  140. event retrieve_pageretr;boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  141. boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  142. cb_nextpage_enabled=cb_nextpage.enabled
  143. cb_retrieveall_enabled=cb_retrieveall.enabled
  144. cb_func_enabled=cb_func.enabled
  145. cb_nextpage.enabled=false
  146. cb_retrieveall.enabled=false
  147. cb_func.enabled=false
  148. SetPointer(HourGlass!)
  149. if cbx_showall.checked then
  150. dw_pageretr.retrieve(arg_sptid,1,arg_scid)
  151. else
  152. dw_pageretr.retrieve(arg_sptid,0,arg_scid)
  153. end if
  154. if dw_pageretr.rowcount()>0 and dw_pageretr.getrow()=0 then dw_pageretr.setrow(1)
  155. SetPointer(Arrow!)
  156. cb_nextpage.enabled=cb_nextpage_enabled
  157. cb_retrieveall.enabled=cb_retrieveall_enabled
  158. cb_func.enabled=cb_func_enabled
  159. IF cbx_mlselect.Checked AND dw_pageretr.RowCount() > 1 THEN
  160. dw_pageretr.SelectRow(1,FALSE)
  161. END IF
  162. end event
  163. event ue_usual_query_filt;call super::ue_usual_query_filt;string obj_expr=''
  164. if trim(sle_usual_query.text)<>'' then
  165. IF POS(trim(sle_usual_query.text),'%')=0 THEN
  166. obj_expr=obj_expr+'( u_mtrldef_mtrlcode LIKE "%'+trim(sle_usual_query.text)+'%") '
  167. obj_expr=obj_expr+' or ( u_mtrldef_mtrlname LIKE "%'+trim(sle_usual_query.text)+'%" )'
  168. ELSE
  169. obj_expr=obj_expr+'( u_mtrldef_mtrlcode LIKE "'+trim(sle_usual_query.text)+'" )'
  170. obj_expr=obj_expr+' or ( u_mtrldef_mtrlname LIKE "'+trim(sle_usual_query.text)+'" )'
  171. END IF
  172. end if
  173. dw_pageretr.setfilter(obj_expr)
  174. dw_pageretr.SetRedraw(False)
  175. dw_pageretr.filter()
  176. if dw_pageretr.rowcount()>=1 then
  177. dw_pageretr.selectrow(0,false)
  178. dw_pageretr.selectrow(1,true )
  179. end if
  180. dw_pageretr.SetRedraw(TRUE )
  181. end event
  182. event ue_usual_query_retr;call super::ue_usual_query_retr;String ls_querystrpart = ''
  183. ls_newselect = Lower(ori_oldselect)
  184. IF Trim(sle_usual_query.Text) <> '' THEN
  185. IF Pos(Trim(sle_usual_query.Text),'%') = 0 THEN
  186. ls_querystrpart = ls_querystrpart + "(u_mtrldef.mtrlcode like '%"+Trim(sle_usual_query.Text)+"%'"
  187. ls_querystrpart = ls_querystrpart + " or u_mtrldef.mtrlname like '%"+Trim(sle_usual_query.Text)+"%')"
  188. ELSE
  189. ls_querystrpart = ls_querystrpart + "( u_mtrldef.mtrlcode like '"+Trim(sle_usual_query.Text)+"'"
  190. ls_querystrpart = ls_querystrpart + " or u_mtrldef.mtrlname like '"+Trim(sle_usual_query.Text)+"')"
  191. END IF
  192. IF Pos(ls_newselect," where ") <> 0 THEN
  193. ls_newselect = ls_newselect+" AND ("+ls_querystrpart+')'
  194. ELSE
  195. ls_newselect = ls_newselect+" where ("+ls_querystrpart+')'
  196. END IF
  197. END IF
  198. wf_retrieveuc(dw_pageretr,ls_newselect,1)
  199. THIS.TriggerEvent('retrieve_pageretr')
  200. end event
  201. type cb_func from w_pageretr_ch`cb_func within w_sptware_sptid_ch
  202. end type
  203. type cb_exit from w_pageretr_ch`cb_exit within w_sptware_sptid_ch
  204. end type
  205. type sle_usual_query from w_pageretr_ch`sle_usual_query within w_sptware_sptid_ch
  206. integer x = 347
  207. end type
  208. type cb_retrieveall from w_pageretr_ch`cb_retrieveall within w_sptware_sptid_ch
  209. integer x = 1102
  210. end type
  211. type em_pagerowno from w_pageretr_ch`em_pagerowno within w_sptware_sptid_ch
  212. integer x = 773
  213. end type
  214. type dw_pageretr from w_pageretr_ch`dw_pageretr within w_sptware_sptid_ch
  215. integer width = 3154
  216. integer height = 1020
  217. string dataobject = "dw_sptware_sptid_ch"
  218. end type
  219. event dw_pageretr::clicked;if row>0 then
  220. this.setrow(row)
  221. if if_mlselect=1 then
  222. if if_changeselect then
  223. this.selectrow(row,not this.IsSelected(row))
  224. else
  225. if_changeselect=true
  226. end if
  227. else
  228. this.selectrow(0,false)
  229. this.selectrow(row,true)
  230. end if
  231. end if
  232. end event
  233. event dw_pageretr::doubleclicked;if cbx_ml.checked then
  234. cb_choice.TRIGGEREVENT(CLICKED!)
  235. else
  236. cb_ok.TRIGGEREVENT(CLICKED!)
  237. end if
  238. end event
  239. event dw_pageretr::rowfocuschanged;if if_mlselect=1 then
  240. if currentrow <=0 then return
  241. if keydown(keycontrol!) then
  242. if this.isselected(currentrow) then
  243. this.selectrow(currentrow,false)
  244. if_changeselect=false
  245. else
  246. if_changeselect=true
  247. end if
  248. else
  249. if not this.isselected(currentrow) then
  250. this.selectrow(currentrow,true)
  251. if_changeselect=false
  252. else
  253. if_changeselect=true
  254. end if
  255. end if
  256. else
  257. if dw_edit_mode then return
  258. if currentrow <=0 then return
  259. this.selectrow(0,false)
  260. this.selectrow(currentrow,true)
  261. end if
  262. end event
  263. event dw_pageretr::dwnkey;call super::dwnkey;if keydown(keyenter!) then return 1
  264. end event
  265. type st_1 from w_pageretr_ch`st_1 within w_sptware_sptid_ch
  266. integer x = 14
  267. integer width = 343
  268. string text = "编码/名称含:"
  269. end type
  270. type cb_nextpage from w_pageretr_ch`cb_nextpage within w_sptware_sptid_ch
  271. integer x = 1253
  272. end type
  273. type cb_choice from w_pageretr_ch`cb_choice within w_sptware_sptid_ch
  274. integer taborder = 120
  275. end type
  276. event cb_choice::clicked;call super::clicked;LONG ROW,ls_i=0,chC=0
  277. if cbx_ml.checked then
  278. ROW=dw_pageretr.GETROW()
  279. if ROW<=0 then
  280. messagebox('提示','请先选择目标行!',information!,OK!)
  281. return
  282. end if
  283. for ls_i=1 to dw_pageretr.rowcount()
  284. if dw_pageretr.isselected(ls_i) then
  285. chC++
  286. INS_RT_STRU.mtrlwareid[chC]=dw_pageretr.OBJECT.mtrlwareid[ls_i]
  287. INS_RT_STRU.mtrlid[chC]=dw_pageretr.OBJECT.mtrlid[ls_i]
  288. INS_RT_STRU.u_mtrldef_mtrlcode[chC]=dw_pageretr.OBJECT.u_mtrldef_mtrlcode[ls_i]
  289. INS_RT_STRU.u_mtrldef_mtrlname[chC]=dw_pageretr.OBJECT.u_mtrldef_mtrlname[ls_i]
  290. INS_RT_STRU.u_mtrldef_mtrlmode[chC]=dw_pageretr.OBJECT.mtrlmode[ls_i]
  291. INS_RT_STRU.u_mtrldef_unit[chC]=dw_pageretr.OBJECT.u_mtrldef_unit[ls_i]
  292. INS_RT_STRU.u_mtrldef_prdpackcode[chC]=dw_pageretr.OBJECT.u_mtrldef_prdpackcode[ls_i]
  293. INS_RT_STRU.u_mtrldef_packqty[chC]=dw_pageretr.OBJECT.u_mtrldef_packqty[ls_i]
  294. INS_RT_STRU.noallocqty[chC]=dw_pageretr.OBJECT.noallocqty[ls_i]
  295. INS_RT_STRU.cost[chC]=dw_pageretr.OBJECT.ow_wfjgware_cost[ls_i]
  296. INS_RT_STRU.planprice[chC]=dw_pageretr.OBJECT.planprice[ls_i]
  297. INS_RT_STRU.sptid[chC]=dw_pageretr.OBJECT.ow_wfjgware_sptid[ls_i]
  298. INS_RT_STRU.plancode[chC]=dw_pageretr.OBJECT.plancode[ls_i]
  299. INS_RT_STRU.status[chC]=dw_pageretr.OBJECT.ow_wfjgware_status[ls_i]
  300. INS_RT_STRU.woodcode[chC]=dw_pageretr.OBJECT.ow_wfjgware_woodcode[ls_i]
  301. INS_RT_STRU.pcode[chC]=dw_pageretr.OBJECT.ow_wfjgware_pcode[ls_i]
  302. INS_RT_STRU.mtrlsectype[chC]=dw_pageretr.OBJECT.u_mtrldef_mtrlsectype[ls_i]
  303. INS_RT_STRU.zxmtrlmode[chC]=dw_pageretr.OBJECT.u_mtrldef_zxmtrlmode[ls_i]
  304. INS_RT_STRU.barcode[chC]=dw_pageretr.OBJECT.u_mtrldef_barcode[ls_i]
  305. INS_RT_STRU.mtrlengname[chC]=dw_pageretr.OBJECT.u_mtrldef_mtrlengname[ls_i]
  306. end if
  307. next
  308. if chC=0 then
  309. messagebox('提示','请至少选择一个目标行!',information!,OK!)
  310. return
  311. end if
  312. else
  313. dw_choice.accepttext()
  314. ROW=dw_choice.rowcount()
  315. if ROW<=0 then
  316. messagebox('提示','请先选择目标行!',information!,OK!)
  317. return
  318. end if
  319. for ls_i=1 to dw_choice.rowcount()
  320. INS_RT_STRU.mtrlwareid[ls_i]=dw_choice.OBJECT.mtrlwareid[ls_i]
  321. INS_RT_STRU.mtrlid[ls_i]=dw_choice.OBJECT.mtrlid[ls_i]
  322. INS_RT_STRU.u_mtrldef_mtrlcode[ls_i]=dw_choice.OBJECT.u_mtrldef_mtrlcode[ls_i]
  323. INS_RT_STRU.u_mtrldef_mtrlname[ls_i]=dw_choice.OBJECT.u_mtrldef_mtrlname[ls_i]
  324. INS_RT_STRU.u_mtrldef_mtrlmode[ls_i]=dw_choice.OBJECT.mtrlmode[ls_i]
  325. INS_RT_STRU.u_mtrldef_unit[ls_i]=dw_choice.OBJECT.u_mtrldef_unit[ls_i]
  326. INS_RT_STRU.u_mtrldef_prdpackcode[ls_i]=dw_choice.OBJECT.u_mtrldef_prdpackcode[ls_i]
  327. INS_RT_STRU.u_mtrldef_packqty[ls_i]=dw_choice.OBJECT.u_mtrldef_packqty[ls_i]
  328. INS_RT_STRU.noallocqty[ls_i]=dw_choice.OBJECT.noallocqty[ls_i]
  329. INS_RT_STRU.cost[ls_i]=dw_choice.OBJECT.ow_wfjgware_cost[ls_i]
  330. INS_RT_STRU.planprice[ls_i]=dw_choice.OBJECT.planprice[ls_i]
  331. INS_RT_STRU.plancode[ls_i]=dw_choice.OBJECT.plancode[ls_i]
  332. INS_RT_STRU.status[ls_i]=dw_choice.OBJECT.ow_wfjgware_status[ls_i]
  333. INS_RT_STRU.sptid[ls_i]=dw_choice.OBJECT.ow_wfjgware_sptid[ls_i]
  334. INS_RT_STRU.woodcode[ls_i]=dw_choice.OBJECT.ow_wfjgware_woodcode[ls_i]
  335. INS_RT_STRU.pcode[ls_i]=dw_choice.OBJECT.ow_wfjgware_pcode[ls_i]
  336. INS_RT_STRU.mtrlsectype[ls_i]=dw_choice.OBJECT.u_mtrldef_mtrlsectype[ls_i]
  337. INS_RT_STRU.zxmtrlmode[ls_i]=dw_choice.OBJECT.u_mtrldef_zxmtrlmode[ls_i]
  338. INS_RT_STRU.barcode[ls_i]=dw_choice.OBJECT.u_mtrldef_barcode[ls_i]
  339. INS_RT_STRU.mtrlengname[ls_i]=dw_choice.OBJECT.u_mtrldef_mtrlengname[ls_i]
  340. next
  341. end if
  342. CLOSE(PARENT)
  343. end event
  344. type cb_refresh from w_pageretr_ch`cb_refresh within w_sptware_sptid_ch
  345. end type
  346. type cb_help from w_pageretr_ch`cb_help within w_sptware_sptid_ch
  347. end type
  348. type ln_bar from w_pageretr_ch`ln_bar within w_sptware_sptid_ch
  349. end type
  350. type ln_bar2 from w_pageretr_ch`ln_bar2 within w_sptware_sptid_ch
  351. end type
  352. type r_bar from w_pageretr_ch`r_bar within w_sptware_sptid_ch
  353. end type
  354. type ln_1 from w_pageretr_ch`ln_1 within w_sptware_sptid_ch
  355. end type
  356. type ln_2 from w_pageretr_ch`ln_2 within w_sptware_sptid_ch
  357. end type
  358. type cbx_ml from checkbox within w_sptware_sptid_ch
  359. integer x = 878
  360. integer y = 208
  361. integer width = 357
  362. integer height = 60
  363. boolean bringtotop = true
  364. integer textsize = -9
  365. integer weight = 700
  366. fontcharset fontcharset = gb2312charset!
  367. fontpitch fontpitch = variable!
  368. string facename = "宋体"
  369. long textcolor = 16711680
  370. long backcolor = 134217739
  371. string text = "直接多选"
  372. end type
  373. event clicked;wf_face_change()
  374. int use_ml
  375. if this.checked then
  376. use_ml=1
  377. else
  378. use_ml=0
  379. end if
  380. f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "use_ml", string(use_ml))
  381. end event
  382. event constructor;int use_ml
  383. use_ml=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "use_ml", '0'))
  384. if use_ml=0 then
  385. this.checked=false
  386. else
  387. this.checked=true
  388. end if
  389. end event
  390. type cbx_showall from checkbox within w_sptware_sptid_ch
  391. integer x = 1253
  392. integer y = 208
  393. integer width = 613
  394. integer height = 60
  395. boolean bringtotop = true
  396. integer textsize = -9
  397. integer weight = 700
  398. fontcharset fontcharset = gb2312charset!
  399. fontpitch fontpitch = variable!
  400. string facename = "宋体"
  401. long textcolor = 255
  402. long backcolor = 134217739
  403. string text = "显示 0 库存物料批"
  404. end type
  405. event clicked;int if_zeromtrlware
  406. if this.checked then
  407. if_zeromtrlware=1
  408. else
  409. if_zeromtrlware=0
  410. end if
  411. f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_zeromtrlware", string(if_zeromtrlware))
  412. parent.triggerevent("retrieve_pageretr")
  413. end event
  414. event constructor;int if_zeromtrlware
  415. if_zeromtrlware=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_zeromtrlware", '0'))
  416. if if_zeromtrlware =0 then
  417. this.checked=false
  418. else
  419. this.checked=true
  420. end if
  421. end event
  422. type cb_ok from uo_imflatbutton within w_sptware_sptid_ch
  423. integer x = 2469
  424. integer y = 1340
  425. integer width = 379
  426. integer taborder = 60
  427. boolean bringtotop = true
  428. string text = "选定[Enter]"
  429. end type
  430. event clicked;call super::clicked;LONG ROW,ls_i,chC=0
  431. ROW=dw_pageretr.GETROW()
  432. if ROW<=0 then
  433. messagebox('提示','请先选择目标行!',information!,OK!)
  434. return
  435. end if
  436. for ls_i=1 to dw_pageretr.rowcount()
  437. if dw_pageretr.isselected(ls_i) then
  438. if dw_choice.find('mtrlwareid ='+string(dw_pageretr.object.mtrlwareid[ls_i]),1,dw_choice.rowcount())=0 then
  439. chC++
  440. dw_pageretr.RowsCopy(ls_i, ls_i, Primary!, dw_choice, dw_choice.rowcount() + 1, Primary!)
  441. end if
  442. end if
  443. next
  444. end event
  445. type cb_del from uo_imflatbutton within w_sptware_sptid_ch
  446. integer x = 2843
  447. integer y = 1340
  448. integer width = 311
  449. integer taborder = 140
  450. boolean bringtotop = true
  451. string text = "删除"
  452. string normalpicname = "delete.bmp"
  453. end type
  454. event clicked;call super::clicked;IF dw_choice.GETROW()=0 THEN
  455. MESSAGEBOX('提示','请选择删除的行对象!',information!,OK!)
  456. RETURN
  457. END IF
  458. dw_choice.DeleteRow (0)
  459. dw_choice.TriggerEvent (rowfocuschanged!)
  460. end event
  461. type cbx_mlselect from checkbox within w_sptware_sptid_ch
  462. integer x = 1947
  463. integer y = 208
  464. integer width = 256
  465. integer height = 60
  466. boolean bringtotop = true
  467. integer textsize = -9
  468. integer weight = 400
  469. fontcharset fontcharset = gb2312charset!
  470. fontpitch fontpitch = variable!
  471. string facename = "宋体"
  472. long backcolor = 134217739
  473. string text = "多选"
  474. end type
  475. event clicked;if this.checked then
  476. if_mlselect=1
  477. cbx_allselect.enabled = true
  478. else
  479. if_mlselect=0
  480. cbx_allselect.enabled = false
  481. end if
  482. f_SetProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_mlselect", string(if_mlselect))
  483. end event
  484. event constructor;if_mlselect=integer(f_ProfileString (sys_empid,dw_pageretr.DATAOBJECT, "if_mlselect", '0'))
  485. if if_mlselect =0 then
  486. this.checked=false
  487. else
  488. this.checked=true
  489. end if
  490. end event
  491. type dw_choice from datawindow within w_sptware_sptid_ch
  492. integer y = 1452
  493. integer width = 3154
  494. integer height = 600
  495. integer taborder = 130
  496. string title = "none"
  497. string dataobject = "dw_sptware_sptid_ch"
  498. boolean minbox = true
  499. boolean hscrollbar = true
  500. boolean vscrollbar = true
  501. boolean hsplitscroll = true
  502. boolean livescroll = true
  503. borderstyle borderstyle = stylelowered!
  504. end type
  505. event rowfocuschanged;IF currentrow <=0 THEN RETURN
  506. this.selectrow(0,false)
  507. this.selectrow(currentrow,true)
  508. end event
  509. type cbx_allselect from checkbox within w_sptware_sptid_ch
  510. integer x = 2254
  511. integer y = 208
  512. integer width = 224
  513. integer height = 60
  514. boolean bringtotop = true
  515. integer textsize = -9
  516. integer weight = 400
  517. fontcharset fontcharset = gb2312charset!
  518. fontpitch fontpitch = variable!
  519. string facename = "宋体"
  520. long backcolor = 134217739
  521. string text = "全选"
  522. end type
  523. event clicked;Int li
  524. IF THIS.Checked AND cbx_mlselect.Checked THEN
  525. FOR li = 1 TO dw_pageretr.RowCount()
  526. dw_pageretr.SelectRow(li,TRUE)
  527. NEXT
  528. ELSE
  529. FOR li = 1 TO dw_pageretr.RowCount()
  530. dw_pageretr.SelectRow(li,FALSE)
  531. NEXT
  532. END IF
  533. end event