$PBExportHeader$uo_sqlpro.sru forward global type uo_sqlpro from nonvisualobject end type end forward global type uo_sqlpro from nonvisualobject end type global uo_sqlpro uo_sqlpro type variables Transaction commit_transaction //数据commit事务 end variables forward prototypes 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) public function long p_storage_set_if_fifo (long arg_storageid, long arg_if_fifo, ref string arg_msg) 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) end prototypes 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 DECLARE pro1 PROCEDURE FOR p_inware_update_mtrlware @arg_scid = :arg_scid, @arg_inwareid = :arg_inwareid, @arg_printid = :arg_printid, @arg_mtrlid = :arg_mtrlid, @arg_mtrlcode = :arg_mtrlcode, @arg_storageid = :arg_storageid, @arg_plancode = :arg_plancode, @arg_status = :arg_status, @arg_qty = :arg_qty, @arg_uqty = :arg_uqty, @arg_price = :arg_price, @arg_planprice = :arg_planprice, @arg_sptid = :arg_sptid, @arg_dxflag = :arg_dxflag, @arg_woodcode = :arg_woodcode, @arg_pcode = :arg_pcode, @arg_mtrlcuscode = :arg_mtrlcuscode, @arg_location = :arg_location, @arg_dscrp = :arg_dscrp, @arg_rslt = :rslt OUTPUT, @arg_msg = :arg_msg OUTPUT Using commit_transaction; EXECUTE pro1; IF commit_transaction.SQLCode <> 0 THEN arg_msg = commit_transaction.SQLErrText ELSE FETCH pro1 Into :rslt,:arg_msg; END IF CLOSE pro1; RETURN rslt end function public function long p_storage_set_if_fifo (long arg_storageid, long arg_if_fifo, ref string arg_msg);Long rslt = 0 DECLARE pro1 PROCEDURE FOR p_storage_set_if_fifo @arg_storageid = :arg_storageid, @arg_if_fifo = :arg_if_fifo, @arg_rslt = :rslt OUTPUT, @arg_msg = :arg_msg OUTPUT Using commit_transaction ; EXECUTE pro1; IF commit_transaction.SQLCode <> 0 THEN arg_msg = commit_transaction.SQLErrText ELSE FETCH pro1 Into :rslt,:arg_msg; END IF CLOSE pro1; RETURN rslt end function 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 DECLARE pro1 PROCEDURE FOR p_outware_update_mtrlware @arg_scid = :arg_scid, @arg_outwareid = :arg_outwareid, @arg_printid = :arg_printid, @arg_mtrlwareid = :arg_mtrlwareid, @arg_mtrlid = :arg_mtrlid, @arg_mtrlcode = :arg_mtrlcode, @arg_storageid = :arg_storageid, @arg_plancode = :arg_plancode, @arg_status = :arg_status, @arg_qty = :arg_qty, @arg_uqty = :arg_uqty, @arg_amt = :arg_amt, @arg_planprice = :arg_planprice, @arg_sptid = :arg_sptid, @arg_dxflag = :arg_dxflag, @arg_woodcode = :arg_woodcode, @arg_pcode = :arg_pcode, @arg_mtrlcuscode = :arg_mtrlcuscode, @arg_location = :arg_location, @arg_rslt = :rslt OUTPUT, @arg_msg = :arg_msg OUTPUT Using commit_transaction ; EXECUTE pro1; IF commit_transaction.SQLCode <> 0 THEN arg_msg = commit_transaction.SQLErrText ELSE FETCH pro1 Into :rslt,:arg_msg; END IF CLOSE pro1; RETURN rslt end function on uo_sqlpro.create call super::create TriggerEvent( this, "constructor" ) end on on uo_sqlpro.destroy TriggerEvent( this, "destructor" ) call super::destroy end on