w_inwaremx_buy_mod_price.srw 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. $PBExportHeader$w_inwaremx_buy_mod_price.srw
  2. forward
  3. global type w_inwaremx_buy_mod_price from w_publ_base
  4. end type
  5. type cb_ok from uo_imflatbutton within w_inwaremx_buy_mod_price
  6. end type
  7. type dw_1 from datawindow within w_inwaremx_buy_mod_price
  8. end type
  9. end forward
  10. global type w_inwaremx_buy_mod_price from w_publ_base
  11. integer width = 2363
  12. integer height = 980
  13. string title = "采购收货单修改单价"
  14. boolean minbox = false
  15. windowtype windowtype = response!
  16. cb_ok cb_ok
  17. dw_1 dw_1
  18. end type
  19. global w_inwaremx_buy_mod_price w_inwaremx_buy_mod_price
  20. type variables
  21. s_edit_index_tran s_tran
  22. long ins_scid,ins_inwareid,ins_printid
  23. uo_inware uo_in
  24. end variables
  25. on w_inwaremx_buy_mod_price.create
  26. int iCurrent
  27. call super::create
  28. this.cb_ok=create cb_ok
  29. this.dw_1=create dw_1
  30. iCurrent=UpperBound(this.Control)
  31. this.Control[iCurrent+1]=this.cb_ok
  32. this.Control[iCurrent+2]=this.dw_1
  33. end on
  34. on w_inwaremx_buy_mod_price.destroy
  35. call super::destroy
  36. destroy(this.cb_ok)
  37. destroy(this.dw_1)
  38. end on
  39. event open;call super::open;dw_1.settransobject(sqlca)
  40. uo_in = create uo_inware
  41. uo_in.commit_transaction = sqlca
  42. s_tran=Message.PowerObjectParm
  43. ins_scid = s_tran.b_long
  44. ins_inwareid = s_tran.c_long
  45. ins_printid = s_tran.d_long
  46. dw_1.retrieve( ins_scid,ins_inwareid,ins_printid)
  47. dw_1.setfocus()
  48. end event
  49. type cb_func from w_publ_base`cb_func within w_inwaremx_buy_mod_price
  50. boolean visible = false
  51. end type
  52. type cb_exit from w_publ_base`cb_exit within w_inwaremx_buy_mod_price
  53. integer x = 2025
  54. integer y = 788
  55. integer picsize = 16
  56. end type
  57. type cb_ok from uo_imflatbutton within w_inwaremx_buy_mod_price
  58. integer x = 1701
  59. integer y = 788
  60. integer width = 311
  61. integer height = 96
  62. integer taborder = 20
  63. boolean bringtotop = true
  64. string normalpicname = "ok.bmp"
  65. integer picsize = 16
  66. end type
  67. event clicked;call super::clicked;dw_1.AcceptText()
  68. Long ll_row
  69. Decimal ld_uprice,ld_jgprice
  70. String arg_msg
  71. ll_row = dw_1.GetRow()
  72. IF ll_row <= 0 THEN
  73. MessageBox('提示','没有可保存的内容', Information!, OK! )
  74. RETURN
  75. END IF
  76. ld_uprice = dw_1.Object.u_inwaremx_uprice[ll_row]
  77. ld_jgprice = dw_1.Object.u_inwaremx_jgprice[ll_row]
  78. IF uo_in.mod_price(ins_scid,ins_inwareid,ins_printid,ld_uprice,ld_jgprice,-1,-1,arg_msg,TRUE) = 0 THEN
  79. MessageBox('错误',arg_msg, StopSign!, OK! )
  80. RETURN
  81. END IF
  82. MessageBox('提示','修改单价成功!', Information!, OK! )
  83. Close(PARENT)
  84. end event
  85. type dw_1 from datawindow within w_inwaremx_buy_mod_price
  86. integer width = 2336
  87. integer height = 768
  88. integer taborder = 30
  89. boolean bringtotop = true
  90. string title = "none"
  91. string dataobject = "dw_inwaremx_buy_mod_price"
  92. boolean livescroll = true
  93. borderstyle borderstyle = stylelowered!
  94. end type
  95. event constructor;f_title_change(this)
  96. end event