w_storage_ch.srw 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. $PBExportHeader$w_storage_ch.srw
  2. forward
  3. global type w_storage_ch from window
  4. end type
  5. type st_2 from statictext within w_storage_ch
  6. end type
  7. type ddlb_storageid from uo_ddlb_storageid within w_storage_ch
  8. end type
  9. type cb_cancel from uo_imflatbutton within w_storage_ch
  10. end type
  11. type cb_ok from uo_imflatbutton within w_storage_ch
  12. end type
  13. end forward
  14. global type w_storage_ch from window
  15. integer width = 997
  16. integer height = 480
  17. boolean titlebar = true
  18. string title = "仓库选择"
  19. boolean controlmenu = true
  20. windowtype windowtype = response!
  21. long backcolor = 134217739
  22. string icon = "AppIcon!"
  23. boolean center = true
  24. st_2 st_2
  25. ddlb_storageid ddlb_storageid
  26. cb_cancel cb_cancel
  27. cb_ok cb_ok
  28. end type
  29. global w_storage_ch w_storage_ch
  30. type variables
  31. long cur_storageid_arr[]
  32. long cur_storageid = 0
  33. end variables
  34. on w_storage_ch.create
  35. this.st_2=create st_2
  36. this.ddlb_storageid=create ddlb_storageid
  37. this.cb_cancel=create cb_cancel
  38. this.cb_ok=create cb_ok
  39. this.Control[]={this.st_2,&
  40. this.ddlb_storageid,&
  41. this.cb_cancel,&
  42. this.cb_ok}
  43. end on
  44. on w_storage_ch.destroy
  45. destroy(this.st_2)
  46. destroy(this.ddlb_storageid)
  47. destroy(this.cb_cancel)
  48. destroy(this.cb_ok)
  49. end on
  50. event close;closewithreturn(this,cur_storageid)
  51. end event
  52. type st_2 from statictext within w_storage_ch
  53. integer x = 59
  54. integer y = 92
  55. integer width = 187
  56. integer height = 48
  57. boolean bringtotop = true
  58. integer textsize = -9
  59. integer weight = 400
  60. fontcharset fontcharset = gb2312charset!
  61. fontpitch fontpitch = variable!
  62. string facename = "宋体"
  63. long textcolor = 33554432
  64. long backcolor = 134217739
  65. string text = "仓库:"
  66. alignment alignment = right!
  67. boolean focusrectangle = false
  68. end type
  69. type ddlb_storageid from uo_ddlb_storageid within w_storage_ch
  70. integer x = 265
  71. integer y = 80
  72. integer width = 635
  73. integer height = 1232
  74. boolean bringtotop = true
  75. end type
  76. event constructor;Long ls_storageid
  77. String ls_storagename
  78. Long cnt = 0
  79. Long ll_i
  80. String ls_space
  81. Int li_spacenum
  82. FOR ll_i = 1 TO UpperBound(sys_user_storageid)
  83. ls_storageid = sys_user_storageid[ll_i]
  84. SELECT storagename
  85. INTO :ls_storagename
  86. FROM u_storage
  87. Where storageid = :ls_storageid;
  88. IF sqlca.SQLCode <> 0 OR IsNull(ls_storagename) THEN ls_storagename = ''
  89. li_spacenum = 50 - Len(Trim(ls_storagename)) - 2 - Len(String(ls_storageid))
  90. ls_space = Fill(' ',li_spacenum)
  91. THIS.AddItem (ls_storagename+ls_space+'['+String(ls_storageid)+']')
  92. NEXT
  93. THIS.uo_storageid = ls_storageid
  94. uo_storageid_arr[1] = ls_storageid
  95. THIS.Text = ls_storagename+ls_space+'['+String(ls_storageid)+']'
  96. uf_get_storageid_arr(ls_storageid)
  97. cur_storageid_arr = this.uo_storageid_arr
  98. end event
  99. type cb_cancel from uo_imflatbutton within w_storage_ch
  100. integer x = 535
  101. integer y = 244
  102. integer width = 311
  103. integer taborder = 40
  104. string text = "取消"
  105. boolean cancel = true
  106. string normalpicname = "exit.bmp"
  107. end type
  108. event clicked;call super::clicked;
  109. close(parent)
  110. end event
  111. type cb_ok from uo_imflatbutton within w_storage_ch
  112. integer x = 151
  113. integer y = 244
  114. integer width = 311
  115. integer taborder = 30
  116. string normalpicname = "ok.bmp"
  117. end type
  118. event clicked;call super::clicked;cur_storageid = ddlb_storageid.uo_storageid
  119. Close(PARENT)
  120. end event