uo_sqlpro.sru 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. $PBExportHeader$uo_sqlpro.sru
  2. forward
  3. global type uo_sqlpro from nonvisualobject
  4. end type
  5. end forward
  6. global type uo_sqlpro from nonvisualobject
  7. end type
  8. global uo_sqlpro uo_sqlpro
  9. type variables
  10. Transaction commit_transaction //数据commit事务
  11. end variables
  12. forward prototypes
  13. public function long p_inware_update_mtrlware (long arg_scid, long arg_inwareid, long arg_printid, long arg_mtrlid, string arg_mtrlcode, long arg_storageid, string arg_plancode, string arg_status, decimal arg_qty, decimal arg_uqty, decimal arg_price, decimal arg_planprice, long arg_sptid, long arg_dxflag, string arg_woodcode, string arg_pcode, string arg_mtrlcuscode, string arg_location, string arg_dscrp, ref string arg_msg)
  14. public function long p_storage_set_if_fifo (long arg_storageid, long arg_if_fifo, ref string arg_msg)
  15. public function long p_outware_update_mtrlware (long arg_scid, long arg_outwareid, long arg_printid, long arg_mtrlwareid, long arg_mtrlid, string arg_mtrlcode, long arg_storageid, string arg_plancode, string arg_status, decimal arg_qty, decimal arg_uqty, decimal arg_amt, decimal arg_planprice, long arg_sptid, long arg_dxflag, string arg_woodcode, string arg_pcode, string arg_mtrlcuscode, string arg_location, ref string arg_msg)
  16. end prototypes
  17. public function long p_inware_update_mtrlware (long arg_scid, long arg_inwareid, long arg_printid, long arg_mtrlid, string arg_mtrlcode, long arg_storageid, string arg_plancode, string arg_status, decimal arg_qty, decimal arg_uqty, decimal arg_price, decimal arg_planprice, long arg_sptid, long arg_dxflag, string arg_woodcode, string arg_pcode, string arg_mtrlcuscode, string arg_location, string arg_dscrp, ref string arg_msg);Long rslt = 0
  18. DECLARE pro1 PROCEDURE FOR p_inware_update_mtrlware
  19. @arg_scid = :arg_scid,
  20. @arg_inwareid = :arg_inwareid,
  21. @arg_printid = :arg_printid,
  22. @arg_mtrlid = :arg_mtrlid,
  23. @arg_mtrlcode = :arg_mtrlcode,
  24. @arg_storageid = :arg_storageid,
  25. @arg_plancode = :arg_plancode,
  26. @arg_status = :arg_status,
  27. @arg_qty = :arg_qty,
  28. @arg_uqty = :arg_uqty,
  29. @arg_price = :arg_price,
  30. @arg_planprice = :arg_planprice,
  31. @arg_sptid = :arg_sptid,
  32. @arg_dxflag = :arg_dxflag,
  33. @arg_woodcode = :arg_woodcode,
  34. @arg_pcode = :arg_pcode,
  35. @arg_mtrlcuscode = :arg_mtrlcuscode,
  36. @arg_location = :arg_location,
  37. @arg_dscrp = :arg_dscrp,
  38. @arg_rslt = :rslt OUTPUT,
  39. @arg_msg = :arg_msg OUTPUT Using commit_transaction;
  40. EXECUTE pro1;
  41. IF commit_transaction.SQLCode <> 0 THEN
  42. arg_msg = commit_transaction.SQLErrText
  43. ELSE
  44. FETCH pro1 Into :rslt,:arg_msg;
  45. END IF
  46. CLOSE pro1;
  47. RETURN rslt
  48. end function
  49. public function long p_storage_set_if_fifo (long arg_storageid, long arg_if_fifo, ref string arg_msg);Long rslt = 0
  50. DECLARE pro1 PROCEDURE FOR p_storage_set_if_fifo
  51. @arg_storageid = :arg_storageid,
  52. @arg_if_fifo = :arg_if_fifo,
  53. @arg_rslt = :rslt OUTPUT,
  54. @arg_msg = :arg_msg OUTPUT Using commit_transaction ;
  55. EXECUTE pro1;
  56. IF commit_transaction.SQLCode <> 0 THEN
  57. arg_msg = commit_transaction.SQLErrText
  58. ELSE
  59. FETCH pro1 Into :rslt,:arg_msg;
  60. END IF
  61. CLOSE pro1;
  62. RETURN rslt
  63. end function
  64. public function long p_outware_update_mtrlware (long arg_scid, long arg_outwareid, long arg_printid, long arg_mtrlwareid, long arg_mtrlid, string arg_mtrlcode, long arg_storageid, string arg_plancode, string arg_status, decimal arg_qty, decimal arg_uqty, decimal arg_amt, decimal arg_planprice, long arg_sptid, long arg_dxflag, string arg_woodcode, string arg_pcode, string arg_mtrlcuscode, string arg_location, ref string arg_msg);Long rslt = 0
  65. DECLARE pro1 PROCEDURE FOR p_outware_update_mtrlware
  66. @arg_scid = :arg_scid,
  67. @arg_outwareid = :arg_outwareid,
  68. @arg_printid = :arg_printid,
  69. @arg_mtrlwareid = :arg_mtrlwareid,
  70. @arg_mtrlid = :arg_mtrlid,
  71. @arg_mtrlcode = :arg_mtrlcode,
  72. @arg_storageid = :arg_storageid,
  73. @arg_plancode = :arg_plancode,
  74. @arg_status = :arg_status,
  75. @arg_qty = :arg_qty,
  76. @arg_uqty = :arg_uqty,
  77. @arg_amt = :arg_amt,
  78. @arg_planprice = :arg_planprice,
  79. @arg_sptid = :arg_sptid,
  80. @arg_dxflag = :arg_dxflag,
  81. @arg_woodcode = :arg_woodcode,
  82. @arg_pcode = :arg_pcode,
  83. @arg_mtrlcuscode = :arg_mtrlcuscode,
  84. @arg_location = :arg_location,
  85. @arg_rslt = :rslt OUTPUT,
  86. @arg_msg = :arg_msg OUTPUT Using commit_transaction ;
  87. EXECUTE pro1;
  88. IF commit_transaction.SQLCode <> 0 THEN
  89. arg_msg = commit_transaction.SQLErrText
  90. ELSE
  91. FETCH pro1 Into :rslt,:arg_msg;
  92. END IF
  93. CLOSE pro1;
  94. RETURN rslt
  95. end function
  96. on uo_sqlpro.create
  97. call super::create
  98. TriggerEvent( this, "constructor" )
  99. end on
  100. on uo_sqlpro.destroy
  101. TriggerEvent( this, "destructor" )
  102. call super::destroy
  103. end on