w_dytitle_saletask.srw 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. $PBExportHeader$w_dytitle_saletask.srw
  2. forward
  3. global type w_dytitle_saletask from w_dytitle_inwarebuy
  4. end type
  5. end forward
  6. global type w_dytitle_saletask from w_dytitle_inwarebuy
  7. end type
  8. global w_dytitle_saletask w_dytitle_saletask
  9. forward prototypes
  10. public subroutine wf_save ()
  11. public subroutine wf_reset_dw1 ()
  12. end prototypes
  13. public subroutine wf_save ();long i,hang
  14. string arg_msg
  15. string ls_filtername
  16. uo_saletask uo_save
  17. uo_save = Create uo_saletask
  18. uo_save.commit_transaction = sqlca
  19. dw_1.AcceptText()
  20. hang=long(trim(sle_1.text))
  21. for i=1 to dw_1.rowcount()
  22. ls_filtername = of_globalreplace(dw_1.Object.filtername[i],',',',')
  23. if uo_save.uof_save_dytitle_saletask(hang,dw_1.Object.name[i],dw_1.Object.dwtitlename[i],dw_1.Object.execltitlename[i],ls_filtername,arg_msg )=0 then
  24. messagebox('Error','保存出错!' + arg_msg)
  25. return
  26. end if
  27. next
  28. messagebox('成功','保存成功' )
  29. end subroutine
  30. public subroutine wf_reset_dw1 ();Long i,ll_hang
  31. dw_1.AcceptText()
  32. String ls_name,ls_dwtitlename,ls_execltitlename,ls_filtername
  33. FOR i = 1 To dw_1.RowCount()
  34. IF i = 1 THEN
  35. SELECT Top 1 hang Into :ll_hang From u_dytitle_saletask;
  36. IF ll_hang <> 0 THEN
  37. sle_1.Text = string(ll_hang)
  38. ELSE
  39. sle_1.Text = '1'
  40. END IF
  41. END IF
  42. IF dw_1.Object.Name[i] <> '' THEN
  43. ls_name = dw_1.Object.Name[i]
  44. SELECT execltitlename,filtername Into :ls_execltitlename,:ls_filtername From u_dytitle_saletask Where Name = :ls_name;
  45. IF ls_execltitlename <> '' THEN
  46. dw_1.Object.execltitlename[i] = ls_execltitlename
  47. ELSE
  48. dw_1.Object.execltitlename[i] = dw_1.Object.dwtitlename[i]
  49. END IF
  50. dw_1.Object.filtername[i] = ls_filtername//过滤字眼
  51. END IF
  52. NEXT
  53. end subroutine
  54. event open;s_dytitle_saletask s_tran
  55. s_tran=message.powerobjectparm
  56. long i,row
  57. for i=1 to upperbound(s_tran.col_name)
  58. row=dw_1.insertrow(0)
  59. dw_1.object.name[row]=s_tran.col_name[i]
  60. dw_1.object.dwtitlename[row]=s_tran.title_name[i]
  61. next
  62. wf_reset_dw1()
  63. end event
  64. on w_dytitle_saletask.create
  65. call super::create
  66. end on
  67. on w_dytitle_saletask.destroy
  68. call super::destroy
  69. end on
  70. type cb_func from w_dytitle_inwarebuy`cb_func within w_dytitle_saletask
  71. end type
  72. type cb_exit from w_dytitle_inwarebuy`cb_exit within w_dytitle_saletask
  73. end type
  74. type dw_1 from w_dytitle_inwarebuy`dw_1 within w_dytitle_saletask
  75. end type
  76. type cb_1 from w_dytitle_inwarebuy`cb_1 within w_dytitle_saletask
  77. end type
  78. type st_1 from w_dytitle_inwarebuy`st_1 within w_dytitle_saletask
  79. end type
  80. type sle_1 from w_dytitle_inwarebuy`sle_1 within w_dytitle_saletask
  81. end type
  82. type cb_2 from w_dytitle_inwarebuy`cb_2 within w_dytitle_saletask
  83. end type