w_outrepdef_edit_ch_arr.srw 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. $PBExportHeader$w_outrepdef_edit_ch_arr.srw
  2. forward
  3. global type w_outrepdef_edit_ch_arr from w_outrepdef_edit
  4. end type
  5. end forward
  6. global type w_outrepdef_edit_ch_arr from w_outrepdef_edit
  7. integer width = 2523
  8. integer height = 1636
  9. string title = "业务员 "
  10. boolean minbox = false
  11. windowtype windowtype = response!
  12. end type
  13. global w_outrepdef_edit_ch_arr w_outrepdef_edit_ch_arr
  14. type variables
  15. s_outrepdef_arr INS_RT_STRU_arr
  16. Int if_mlselect = 1
  17. Boolean if_changeselect = TRUE
  18. end variables
  19. on w_outrepdef_edit_ch_arr.create
  20. call super::create
  21. end on
  22. on w_outrepdef_edit_ch_arr.destroy
  23. call super::destroy
  24. end on
  25. event close;CLOSEWITHRETURN(THIS,INS_RT_STRU_arr)
  26. end event
  27. type cb_func from w_outrepdef_edit`cb_func within w_outrepdef_edit_ch_arr
  28. end type
  29. type cb_exit from w_outrepdef_edit`cb_exit within w_outrepdef_edit_ch_arr
  30. end type
  31. type cb_add from w_outrepdef_edit`cb_add within w_outrepdef_edit_ch_arr
  32. end type
  33. type cb_edit from w_outrepdef_edit`cb_edit within w_outrepdef_edit_ch_arr
  34. end type
  35. type cb_delet from w_outrepdef_edit`cb_delet within w_outrepdef_edit_ch_arr
  36. end type
  37. type cb_choice from w_outrepdef_edit`cb_choice within w_outrepdef_edit_ch_arr
  38. boolean visible = true
  39. integer y = 0
  40. integer width = 151
  41. end type
  42. event cb_choice::clicked;Long i, cnt
  43. //ROW=dw_uc.getrow()
  44. //if ROW<=0 then
  45. // messagebox('提示','请先选择目标行!', Information!, OK! )
  46. // return
  47. //end if
  48. FOR i = 1 To dw_uc.RowCount()
  49. IF dw_uc.IsSelected(i) THEN
  50. cnt++
  51. INS_RT_STRU_arr.outrepcode[cnt] = dw_uc.Object.outrepcode[i]
  52. INS_RT_STRU_arr.outrepname[cnt] = dw_uc.Object.outrepname[i]
  53. INS_RT_STRU_arr.outrepdscrp[cnt] = dw_uc.Object.outrepdscrp[i]
  54. END IF
  55. NEXT
  56. IF cnt = 0 THEN
  57. i = dw_uc.GetRow()
  58. IF i <= 0 THEN
  59. MessageBox('提示','请先选择目标行!', Information!, OK! )
  60. RETURN
  61. END IF
  62. cnt++
  63. INS_RT_STRU_arr.outrepcode[cnt] = dw_uc.Object.outrepcode[i]
  64. INS_RT_STRU_arr.outrepname[cnt] = dw_uc.Object.outrepname[i]
  65. INS_RT_STRU_arr.outrepdscrp[cnt] = dw_uc.Object.outrepdscrp[i]
  66. END IF
  67. Close(Parent)
  68. end event
  69. type dw_uc from w_outrepdef_edit`dw_uc within w_outrepdef_edit_ch_arr
  70. end type
  71. event dw_uc::doubleclicked;call super::doubleclicked;//IF row <= 0 then return
  72. //cb_choice.triggerevent(clicked!)
  73. end event
  74. event dw_uc::clicked;IF row > 0 THEN
  75. THIS.SetRow(row)
  76. IF if_mlselect = 1 THEN
  77. IF if_changeselect THEN
  78. THIS.SelectRow(row,NOT THIS.IsSelected(row))
  79. ELSE
  80. if_changeselect = TRUE
  81. END IF
  82. ELSE
  83. THIS.SelectRow(0,FALSE)
  84. THIS.SelectRow(row,TRUE)
  85. END IF
  86. END IF
  87. end event
  88. event dw_uc::rowfocuschanged;IF if_mlselect = 1 THEN
  89. IF currentrow <= 0 THEN RETURN
  90. IF KeyDown(keycontrol!) THEN
  91. IF THIS.IsSelected(currentrow) THEN
  92. THIS.SelectRow(currentrow,FALSE)
  93. if_changeselect = FALSE
  94. ELSE
  95. if_changeselect = TRUE
  96. END IF
  97. ELSE
  98. IF NOT THIS.IsSelected(currentrow) THEN
  99. THIS.SelectRow(currentrow,TRUE)
  100. if_changeselect = FALSE
  101. ELSE
  102. if_changeselect = TRUE
  103. END IF
  104. END IF
  105. ELSE
  106. IF dw_edit_mode THEN RETURN
  107. IF currentrow <= 0 THEN RETURN
  108. THIS.SelectRow(0,FALSE)
  109. THIS.SelectRow(currentrow,TRUE)
  110. END IF
  111. end event
  112. type cb_rtr from w_outrepdef_edit`cb_rtr within w_outrepdef_edit_ch_arr
  113. end type
  114. type cb_help from w_outrepdef_edit`cb_help within w_outrepdef_edit_ch_arr
  115. boolean visible = false
  116. end type
  117. type ln_bar from w_outrepdef_edit`ln_bar within w_outrepdef_edit_ch_arr
  118. end type
  119. type ln_bar2 from w_outrepdef_edit`ln_bar2 within w_outrepdef_edit_ch_arr
  120. end type
  121. type r_bar from w_outrepdef_edit`r_bar within w_outrepdef_edit_ch_arr
  122. end type
  123. type cb_view from w_outrepdef_edit`cb_view within w_outrepdef_edit_ch_arr
  124. end type
  125. type cbx_inuse from w_outrepdef_edit`cbx_inuse within w_outrepdef_edit_ch_arr
  126. end type