w_credport.srw 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. $PBExportHeader$w_credport.srw
  2. forward
  3. global type w_credport from window
  4. end type
  5. type cb_3 from commandbutton within w_credport
  6. end type
  7. type cb_retr from commandbutton within w_credport
  8. end type
  9. type cb_1 from commandbutton within w_credport
  10. end type
  11. type dw_1 from u_dw_rbtnfilter within w_credport
  12. end type
  13. end forward
  14. global type w_credport from window
  15. integer width = 2542
  16. integer height = 2280
  17. boolean titlebar = true
  18. string title = "自动凭证设置"
  19. boolean controlmenu = true
  20. boolean minbox = true
  21. windowtype windowtype = popup!
  22. long backcolor = 67108864
  23. string icon = "AppIcon!"
  24. boolean center = true
  25. cb_3 cb_3
  26. cb_retr cb_retr
  27. cb_1 cb_1
  28. dw_1 dw_1
  29. end type
  30. global w_credport w_credport
  31. forward prototypes
  32. public subroutine wf_retrieve ()
  33. end prototypes
  34. public subroutine wf_retrieve ();if dw_1.retrieve(sys_version_type) > 0 then
  35. dw_1.selectrow(0,false)
  36. dw_1.setrow(1)
  37. dw_1.selectrow(1,true)
  38. end if
  39. end subroutine
  40. on w_credport.create
  41. this.cb_3=create cb_3
  42. this.cb_retr=create cb_retr
  43. this.cb_1=create cb_1
  44. this.dw_1=create dw_1
  45. this.Control[]={this.cb_3,&
  46. this.cb_retr,&
  47. this.cb_1,&
  48. this.dw_1}
  49. end on
  50. on w_credport.destroy
  51. destroy(this.cb_3)
  52. destroy(this.cb_retr)
  53. destroy(this.cb_1)
  54. destroy(this.dw_1)
  55. end on
  56. event open;dw_1.SetTransObject(sqlca)
  57. cb_retr.TriggerEvent(Clicked!)
  58. end event
  59. event resize;dw_1.Height = Height - dw_1.Y - 150
  60. end event
  61. type cb_3 from commandbutton within w_credport
  62. integer x = 718
  63. integer width = 311
  64. integer height = 96
  65. integer taborder = 30
  66. integer textsize = -9
  67. integer weight = 400
  68. fontcharset fontcharset = gb2312charset!
  69. fontpitch fontpitch = variable!
  70. string facename = "宋体"
  71. string text = "退出"
  72. end type
  73. event clicked;close(parent)
  74. end event
  75. type cb_retr from commandbutton within w_credport
  76. integer x = 41
  77. integer width = 311
  78. integer height = 96
  79. integer taborder = 20
  80. integer textsize = -9
  81. integer weight = 400
  82. fontcharset fontcharset = gb2312charset!
  83. fontpitch fontpitch = variable!
  84. string facename = "宋体"
  85. string text = "刷新"
  86. end type
  87. event clicked;wf_retrieve()
  88. end event
  89. type cb_1 from commandbutton within w_credport
  90. integer x = 379
  91. integer width = 311
  92. integer height = 96
  93. integer taborder = 20
  94. integer textsize = -9
  95. integer weight = 400
  96. fontcharset fontcharset = gb2312charset!
  97. fontpitch fontpitch = variable!
  98. string facename = "宋体"
  99. string text = "设置"
  100. end type
  101. event clicked;Long ll_row,ll_credid,ll_find
  102. ll_row = dw_1.GetRow()
  103. IF ll_row <= 0 THEN
  104. MessageBox('提示','请选择凭证')
  105. RETURN
  106. END IF
  107. ll_credid = dw_1.Object.credid[ll_row]
  108. OpenWithParm(w_credport_edit,ll_credid)
  109. wf_retrieve()
  110. ll_find = dw_1.Find('credid = ' + String(ll_credid),1,dw_1.RowCount())
  111. IF ll_find > 0 THEN
  112. dw_1.SelectRow(0,False)
  113. dw_1.SelectRow(ll_find,True)
  114. dw_1.SetRow(ll_find)
  115. dw_1.ScrollToRow(ll_find)
  116. END IF
  117. end event
  118. type dw_1 from u_dw_rbtnfilter within w_credport
  119. integer x = 27
  120. integer y = 108
  121. integer width = 2441
  122. integer height = 2056
  123. string dataobject = "dw_credport_index"
  124. boolean hscrollbar = true
  125. boolean vscrollbar = true
  126. boolean rbutton_filter_use = true
  127. boolean titleclick_sort_use = true
  128. end type
  129. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  130. dw_1.SelectRow(0,False)
  131. dw_1.SelectRow(currentrow,True)
  132. END IF
  133. end event
  134. event clicked;call super::clicked;IF row > 0 THEN
  135. dw_1.SelectRow(0,False)
  136. dw_1.SelectRow(row,True)
  137. END IF
  138. end event