w_aifmb_inquire_add.srw 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. $PBExportHeader$w_aifmb_inquire_add.srw
  2. forward
  3. global type w_aifmb_inquire_add from window
  4. end type
  5. type cb_2 from commandbutton within w_aifmb_inquire_add
  6. end type
  7. type cb_1 from commandbutton within w_aifmb_inquire_add
  8. end type
  9. type dw_1 from datawindow within w_aifmb_inquire_add
  10. end type
  11. end forward
  12. global type w_aifmb_inquire_add 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_add w_aifmb_inquire_add
  27. on w_aifmb_inquire_add.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_add.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.toentid[i] = s_tran.toentid
  45. dw_1.Object.toent[i] = s_tran.toent
  46. dw_1.Object.productid[i] = s_tran.productid
  47. dw_1.Object.mtrlcode[i] = s_tran.mtrlcode
  48. dw_1.Object.mtrlname[i] = s_tran.mtrlname
  49. dw_1.Object.mtrlmode[i] = s_tran.mtrlmode
  50. dw_1.Object.mprice[i] = s_tran.mprice
  51. dw_1.Object.nprice[i] = s_tran.nprice
  52. dw_1.Object.desiredprice[i] = s_tran.desiredprice
  53. dw_1.Object.quantity[i] = s_tran.quantity
  54. dw_1.Object.unit[i] = s_tran.unit
  55. dw_1.Object.inquireremark[i] = s_tran.inquireremark
  56. end event
  57. type cb_2 from commandbutton within w_aifmb_inquire_add
  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_add
  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.toentid = dw_1.Object.toentid[i]
  93. s_tran.toent = dw_1.Object.toent[i]
  94. s_tran.productid = dw_1.Object.productid[i]
  95. s_tran.mtrlcode = dw_1.Object.mtrlcode[i]
  96. s_tran.mtrlname = dw_1.Object.mtrlname[i]
  97. s_tran.mtrlmode = dw_1.Object.mtrlmode[i]
  98. s_tran.mprice = dw_1.Object.mprice[i]
  99. s_tran.nprice = dw_1.Object.nprice[i]
  100. s_tran.desiredprice = dw_1.Object.desiredprice[i]
  101. s_tran.quantity = dw_1.Object.quantity[i]
  102. s_tran.unit = dw_1.Object.unit[i]
  103. s_tran.inquireremark = dw_1.Object.inquireremark[i]
  104. IF aifmb.uf_inquire_add(s_tran, arg_msg) <> 1 THEN
  105. rslt = 0
  106. arg_msg = '询价失败,' + arg_msg
  107. GOTO ext
  108. END IF
  109. ext:
  110. Destroy aifmb
  111. IF rslt = 1 THEN
  112. Close(Parent)
  113. ELSE
  114. MessageBox('ERROR', arg_msg)
  115. END IF
  116. end event
  117. type dw_1 from datawindow within w_aifmb_inquire_add
  118. integer width = 1934
  119. integer height = 468
  120. integer taborder = 10
  121. string title = "none"
  122. string dataobject = "dw_aifmb_inquire_add"
  123. boolean livescroll = true
  124. borderstyle borderstyle = stylelowered!
  125. end type