w_inwaremx_buy_mod_buyqty_p.srw 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. $PBExportHeader$w_inwaremx_buy_mod_buyqty_p.srw
  2. forward
  3. global type w_inwaremx_buy_mod_buyqty_p from w_publ_base
  4. end type
  5. type cb_ok from uo_imflatbutton within w_inwaremx_buy_mod_buyqty_p
  6. end type
  7. type dw_1 from datawindow within w_inwaremx_buy_mod_buyqty_p
  8. end type
  9. end forward
  10. global type w_inwaremx_buy_mod_buyqty_p from w_publ_base
  11. integer width = 3616
  12. integer height = 1628
  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_buyqty_p w_inwaremx_buy_mod_buyqty_p
  20. type variables
  21. s_edit_index_tran s_tran
  22. long ins_scid,ins_inwareid
  23. string ins_inwarecode
  24. end variables
  25. on w_inwaremx_buy_mod_buyqty_p.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_buyqty_p.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. s_tran=Message.PowerObjectParm
  41. ins_scid = s_tran.b_long
  42. ins_inwareid = s_tran.c_long
  43. ins_inwarecode = s_tran.c_string
  44. dw_1.retrieve( ins_scid,ins_inwareid)
  45. dw_1.setfocus()
  46. end event
  47. type cb_func from w_publ_base`cb_func within w_inwaremx_buy_mod_buyqty_p
  48. boolean visible = false
  49. end type
  50. type cb_exit from w_publ_base`cb_exit within w_inwaremx_buy_mod_buyqty_p
  51. integer x = 2025
  52. integer y = 1404
  53. integer picsize = 16
  54. end type
  55. type cb_ok from uo_imflatbutton within w_inwaremx_buy_mod_buyqty_p
  56. integer x = 1458
  57. integer y = 1404
  58. integer width = 311
  59. integer height = 96
  60. integer taborder = 20
  61. boolean bringtotop = true
  62. string normalpicname = "ok.bmp"
  63. integer picsize = 16
  64. end type
  65. event clicked;call super::clicked;
  66. Long rslt = 1
  67. Long i
  68. long ll_printid
  69. Decimal lde_buyqty,ld_jgprice, lde_rebate, lde_tax
  70. String arg_msg
  71. dw_1.AcceptText()
  72. uo_inware uo_ware
  73. uo_ware = create uo_inware
  74. uo_ware.commit_transaction = sqlca
  75. i = dw_1.GetNextModified(0 , Primary!)
  76. IF i = 0 THEN
  77. arg_msg = "收货数量没有修改"
  78. rslt = 0
  79. GOTO ext
  80. END IF
  81. DO WHILE i > 0
  82. ll_printid = dw_1.Object.u_inwaremx_printid[i]
  83. lde_buyqty = dw_1.Object.u_inwaremx_buyqty[i]
  84. IF uo_ware.mod_buyqty(ins_scid,ins_inwareid,ll_printid,lde_buyqty,arg_msg,false) = 0 THEN
  85. arg_msg = "行:"+string(i)+","+arg_msg
  86. rslt = 0
  87. GOTO ext
  88. END IF
  89. i = dw_1.GetNextModified(i, Primary!)
  90. LOOP
  91. ext:
  92. destroy uo_ware
  93. IF rslt = 0 THEN
  94. ROLLBACK;
  95. MessageBox('错误',arg_msg, StopSign!, OK! )
  96. RETURN
  97. ELSE
  98. COMMIT;
  99. MessageBox('提示','修改收货数量成功!', Information!, OK! )
  100. Close(Parent)
  101. END IF
  102. end event
  103. type dw_1 from datawindow within w_inwaremx_buy_mod_buyqty_p
  104. integer width = 3584
  105. integer height = 1348
  106. integer taborder = 30
  107. boolean bringtotop = true
  108. string title = "none"
  109. string dataobject = "dw_inwaremx_buy_mod_buyqty_p"
  110. boolean hscrollbar = true
  111. boolean vscrollbar = true
  112. boolean hsplitscroll = true
  113. boolean livescroll = true
  114. borderstyle borderstyle = stylelowered!
  115. end type
  116. event constructor;f_title_change(this)
  117. end event