w_aifmb_inquire_rsp.srw 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. $PBExportHeader$w_aifmb_inquire_rsp.srw
  2. forward
  3. global type w_aifmb_inquire_rsp from window
  4. end type
  5. type cb_2 from commandbutton within w_aifmb_inquire_rsp
  6. end type
  7. type cb_1 from commandbutton within w_aifmb_inquire_rsp
  8. end type
  9. type dw_1 from datawindow within w_aifmb_inquire_rsp
  10. end type
  11. end forward
  12. global type w_aifmb_inquire_rsp from window
  13. integer width = 1961
  14. integer height = 728
  15. boolean titlebar = true
  16. string title = "询价"
  17. boolean controlmenu = true
  18. windowtype windowtype = response!
  19. long backcolor = 67108864
  20. string icon = "AppIcon!"
  21. boolean center = true
  22. cb_2 cb_2
  23. cb_1 cb_1
  24. dw_1 dw_1
  25. end type
  26. global w_aifmb_inquire_rsp w_aifmb_inquire_rsp
  27. on w_aifmb_inquire_rsp.create
  28. this.cb_2=create cb_2
  29. this.cb_1=create cb_1
  30. this.dw_1=create dw_1
  31. this.Control[]={this.cb_2,&
  32. this.cb_1,&
  33. this.dw_1}
  34. end on
  35. on w_aifmb_inquire_rsp.destroy
  36. destroy(this.cb_2)
  37. destroy(this.cb_1)
  38. destroy(this.dw_1)
  39. end on
  40. event open;s_aifmb_inquire_add s_tran
  41. s_tran = message.powerobjectparm
  42. long i
  43. i = dw_1.InsertRow(0)
  44. dw_1.Object.mtrlcode[i] = s_tran.mtrlcode
  45. dw_1.Object.mtrlname[i] = s_tran.mtrlname
  46. dw_1.Object.mtrlmode[i] = s_tran.mtrlmode
  47. dw_1.Object.mprice[i] = s_tran.mprice
  48. dw_1.Object.nprice[i] = s_tran.nprice
  49. dw_1.Object.desiredprice[i] = s_tran.desiredprice
  50. dw_1.Object.quantity[i] = s_tran.quantity
  51. dw_1.Object.unit[i] = s_tran.unit
  52. dw_1.Object.inquireremark[i] = s_tran.inquireremark
  53. dw_1.Object.inquireid[i] = s_tran.inquireid
  54. dw_1.Object.froment[i] = s_tran.froment
  55. dw_1.Object.fromuser[i] = s_tran.fromuser
  56. end event
  57. type cb_2 from commandbutton within w_aifmb_inquire_rsp
  58. integer x = 1664
  59. integer y = 504
  60. integer width = 251
  61. integer height = 112
  62. integer taborder = 30
  63. integer textsize = -9
  64. integer weight = 400
  65. fontcharset fontcharset = gb2312charset!
  66. fontpitch fontpitch = variable!
  67. string facename = "宋体"
  68. string text = "取消"
  69. end type
  70. event clicked;close(parent)
  71. end event
  72. type cb_1 from commandbutton within w_aifmb_inquire_rsp
  73. integer x = 1371
  74. integer y = 504
  75. integer width = 251
  76. integer height = 112
  77. integer taborder = 20
  78. integer textsize = -9
  79. integer weight = 400
  80. fontcharset fontcharset = gb2312charset!
  81. fontpitch fontpitch = variable!
  82. string facename = "宋体"
  83. string text = "确定"
  84. end type
  85. event clicked;Int rslt = 1
  86. String arg_msg = ''
  87. uo_aifmb aifmb
  88. aifmb = Create uo_aifmb
  89. dw_1.AcceptText()
  90. Long i = 1
  91. s_aifmb_inquire_add s_tran
  92. s_tran.inquireid = dw_1.Object.inquireid[i]
  93. s_tran.mprice = dw_1.Object.mprice[i]
  94. s_tran.nprice = dw_1.Object.nprice[i]
  95. IF aifmb.uf_inquire_rsp(s_tran, arg_msg) <> 1 THEN
  96. rslt = 0
  97. arg_msg = '询价回复失败,' + arg_msg
  98. GOTO ext
  99. END IF
  100. ext:
  101. Destroy aifmb
  102. IF rslt = 1 THEN
  103. Close(Parent)
  104. ELSE
  105. MessageBox('ERROR', arg_msg)
  106. END IF
  107. end event
  108. type dw_1 from datawindow within w_aifmb_inquire_rsp
  109. integer width = 1934
  110. integer height = 468
  111. integer taborder = 10
  112. string title = "none"
  113. string dataobject = "dw_aifmb_inquire_rsp"
  114. boolean livescroll = true
  115. borderstyle borderstyle = stylelowered!
  116. end type