w_cmpl_bill_ch.srw 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. $PBExportHeader$w_cmpl_bill_ch.srw
  2. forward
  3. global type w_cmpl_bill_ch from w_publ_choice
  4. end type
  5. end forward
  6. global type w_cmpl_bill_ch from w_publ_choice
  7. end type
  8. global w_cmpl_bill_ch w_cmpl_bill_ch
  9. type variables
  10. s_cmpl_modle_ch INS_RT_STRU
  11. end variables
  12. on w_cmpl_bill_ch.create
  13. call super::create
  14. end on
  15. on w_cmpl_bill_ch.destroy
  16. call super::destroy
  17. end on
  18. event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
  19. end event
  20. event dw_filter;call super::dw_filter;string obj_expr=''
  21. if trim(sle_ch.text)<>'' then
  22. IF POS(trim(sle_ch.text),'%')=0 THEN
  23. obj_expr=obj_expr+'( modlename LIKE "%'+trim(sle_ch.text)+'%" )'
  24. ELSE
  25. obj_expr=obj_expr+'( modlename LIKE "'+trim(sle_ch.text)+'" )'
  26. END IF
  27. end if
  28. dw_ch.setfilter(obj_expr)
  29. dw_ch.SetRedraw(False)
  30. dw_ch.filter()
  31. if dw_ch.rowcount()>=1 then
  32. dw_ch.selectrow(0,false)
  33. dw_ch.selectrow(1,true)
  34. end if
  35. dw_ch.SetRedraw(TRUE)
  36. end event
  37. event open;call super::open;INS_RT_STRU.modleid = 0
  38. end event
  39. type cb_func from w_publ_choice`cb_func within w_cmpl_bill_ch
  40. end type
  41. type cb_exit from w_publ_choice`cb_exit within w_cmpl_bill_ch
  42. end type
  43. type sle_ch from w_publ_choice`sle_ch within w_cmpl_bill_ch
  44. end type
  45. type dw_ch from w_publ_choice`dw_ch within w_cmpl_bill_ch
  46. string dataobject = "dw_cmpl_bill_ch"
  47. end type
  48. type st_1 from w_publ_choice`st_1 within w_cmpl_bill_ch
  49. end type
  50. type cb_retrieve from w_publ_choice`cb_retrieve within w_cmpl_bill_ch
  51. end type
  52. type cb_choice from w_publ_choice`cb_choice within w_cmpl_bill_ch
  53. end type
  54. event cb_choice::clicked;call super::clicked;Long LS_ROW
  55. LS_ROW = dw_CH.GetRow()
  56. IF LS_ROW <= 0 THEN
  57. MessageBox('系统提示','请先选择目标行!',StopSign!)
  58. RETURN
  59. END IF
  60. INS_RT_STRU.modleid = dw_CH.Object.modleid[LS_ROW]
  61. INS_RT_STRU.modlename = dw_CH.Object.modlename[LS_ROW]
  62. //Long ll_printid
  63. //String ll_parmName
  64. //String ll_displayName
  65. //Decimal ll_defaultValue
  66. //Long ll_if_useformula
  67. //String ll_formula
  68. //Long ll_if_from_mtrl
  69. //Long ll_mtrlid
  70. //String ll_mtrl_pro
  71. //Long ll_if_from_product
  72. //String ll_product_pro
  73. //String ll_mtrlcode
  74. //String ll_mtrlname
  75. //
  76. //declare cur1 cursor for
  77. // select
  78. // printid,
  79. // parmName,
  80. // displayName,
  81. // defaultValue,
  82. // if_useformula,
  83. // formula,
  84. // if_from_mtrl,
  85. // u_cmpl_modleMx.mtrlid,
  86. // mtrl_pro,
  87. // if_from_product,
  88. // product_pro,
  89. // isnull(u_mtrldef.mtrlcode, '') as mtrlcode,
  90. // isnull(u_mtrldef.mtrlname, '') as mtrlname
  91. // from u_cmpl_modleMx LEFT outer JOIN u_mtrldef ON u_cmpl_modleMx.mtrlid = u_mtrldef.mtrlid
  92. // Where modleid = :INS_RT_STRU.modleid order by printid;
  93. //
  94. //open cur1;
  95. //fetch cur1 into
  96. // :ll_printid,
  97. // :ll_parmName,
  98. // :ll_displayName,
  99. // :ll_defaultValue,
  100. // :ll_if_useformula,
  101. // :ll_formula,
  102. // :ll_if_from_mtrl,
  103. // :ll_mtrlid,
  104. // :ll_mtrl_pro,
  105. // :ll_if_from_product,
  106. // :ll_product_pro,
  107. // :ll_mtrlcode,
  108. // :ll_mtrlname;
  109. //
  110. //Long ll_cnt = 0
  111. //DO WHILE sqlca.SQLCode = 0
  112. // ll_cnt++
  113. // INS_RT_STRU.printid[ll_cnt] = ll_printid
  114. // INS_RT_STRU.parmName[ll_cnt] = ll_parmName
  115. // INS_RT_STRU.DisplayName[ll_cnt] = ll_displayName
  116. // INS_RT_STRU.defaultValue[ll_cnt] = ll_defaultValue
  117. // INS_RT_STRU.if_useformula[ll_cnt] = ll_if_useformula
  118. // INS_RT_STRU.formula[ll_cnt] = ll_formula
  119. // INS_RT_STRU.if_from_mtrl[ll_cnt] = ll_if_from_mtrl
  120. // INS_RT_STRU.mtrlid[ll_cnt] = ll_mtrlid
  121. // INS_RT_STRU.mtrl_pro[ll_cnt] = ll_mtrl_pro
  122. // INS_RT_STRU.if_from_product[ll_cnt] = ll_if_from_product
  123. // INS_RT_STRU.product_pro[ll_cnt] = ll_product_pro
  124. // INS_RT_STRU.mtrlcode[ll_cnt] = ll_mtrlcode
  125. // INS_RT_STRU.mtrlname[ll_cnt] = ll_mtrlname
  126. // fetch cur1 into
  127. // :ll_printid,
  128. // :ll_parmName,
  129. // :ll_displayName,
  130. // :ll_defaultValue,
  131. // :ll_if_useformula,
  132. // :ll_formula,
  133. // :ll_if_from_mtrl,
  134. // :ll_mtrlid,
  135. // :ll_mtrl_pro,
  136. // :ll_if_from_product,
  137. // :ll_product_pro,
  138. // :ll_mtrlcode,
  139. // :ll_mtrlname;
  140. //
  141. //LOOP
  142. //close cur1;
  143. Close(PARENT)
  144. end event
  145. type ln_bar from w_publ_choice`ln_bar within w_cmpl_bill_ch
  146. end type
  147. type ln_bar2 from w_publ_choice`ln_bar2 within w_cmpl_bill_ch
  148. end type
  149. type r_bar from w_publ_choice`r_bar within w_cmpl_bill_ch
  150. end type
  151. type ln_1 from w_publ_choice`ln_1 within w_cmpl_bill_ch
  152. end type
  153. type ln_2 from w_publ_choice`ln_2 within w_cmpl_bill_ch
  154. end type