//PHP Code
<?php
// 摘錄自 her系統中的代碼片段
$_submit_result = array ("days" => "", "hours" => "", "msg" => "",
"is_success" => "" );
$stmt1 = "begin begin pk_erp.p_set_segment_no(:in_company_id1);
end; begin pk_erp.p_set_username(:in_user_seqno); end; begin wf.pkg_work_flow.p_submit_absence_apply(pi_seg_segment_no=>:in_compan
yid,pi_absence_flow_sz_id=>:in_workflow_seqno,po_days=>:out_days,po_h
ours=>:out_hours,po_errmsg=>:out_msg,po_success=>:out_issuccess);
end;end;";
$stmt = $this->DBConn->PrepareSP ( $stmt1 );
$this->DBConn->InParameter ( $stmt, $companyid,
"in_company_id1",10 );
$this->DBConn->InParameter ( $stmt, $companyid,
"in_companyid", 10 );
$this->DBConn->InParameter ( $stmt, $user_seqno,
"in_user_seqno", 10 );
$this->DBConn->InParameter ( $stmt, $workflow_seqno,
"in_workflow_seqno", 10 );
$this->DBConn->OutParameter ( $stmt, $_submit_result ["days"],
"out_days", 5 );
$this->DBConn->OutParameter ( $stmt, $_submit_result["hours"],
"out_hours", 6 );
$this->DBConn->OutParameter ( $stmt, $_submit_result ["msg"],
"out_msg", 2000 );
$this->DBConn->OutParameter ( $stmt, $_submit_result
["is_success"], "out_issuccess", 2 );
//$this->DBConn->debug = true;
$this->DBConn->StartTrans (); // begin transaction
$this->DBConn->Execute ( $stmt );
$this->DBConn->CompleteTrans (); // end transaction
return $_submit_result;
?>
|