w_cus_price_ch.srw 17 KB

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