of_settransobject


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_linkage   >   of_settransobject   

Full name pfc_n_cst_dwsrv_linkage.of_settransobject
Access public
Extend of integer
Return value integer
Prototype public function integer of_settransobject(n_tr)

Name Datatype
No Data

Name Datatype
li_i Integer
li_numdetails Integer
li_rc Integer

public function integer of_settransobject (n_tr atr_trans);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_SetTransObject
//
//	Access:    		Public
//
//	Arguments:
//   atr_trans:	The connected transaction object
//
//	Returns:   		Integer
//   					1 if it succeeds and -1 if an error occurs.
//
//	Description:  Sets the transaction object on all datawindows in the linked chain.
//
//	   Note: Typically called from the root datawindow to affect all datawindows in
//	   the chain, but may be started anywhere in the chain.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Integer	li_numdetails
Integer	li_i
Integer	li_rc=1

// Verify the passed transaction object.
If IsNull(atr_trans) Or Not IsValid(atr_trans) Then Return -1

// Set the transaction object on the requesting datawindow.
If idw_Requestor.of_SetTransObject(atr_trans) <> 1 Then Return -1

// Loop through the valid details and call this function on the each detail.
li_numdetails = UpperBound ( idw_details ) 
For li_i = 1 to li_numdetails 
	If IsValid ( idw_details[li_i] ) Then 
 		If IsNull(idw_details[li_i].inv_Linkage) Or & 
		 	Not IsValid ( idw_details[li_i].inv_Linkage ) Then Return -1
		li_rc = idw_details[li_i].inv_Linkage.of_SetTransObject ( atr_trans ) 
		// If error, then get out now.
		If li_rc <> 1 Then Exit
	End If 
Next 

Return li_rc
end function

     
Name Owner
pfc_n_cst_dwsrv_linkage.of_settransobject pfc_n_cst_dwsrv_linkage
w_sheet_sales_order.pfc_postopen w_sheet_sales_order
w_sheet_employee.pfc_postopen w_sheet_employee

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.upperbound systemfunctions
pfc_n_cst_dwsrv_linkage.of_settransobject pfc_n_cst_dwsrv_linkage
pfc_u_dw.of_SetTransObject pfc_u_dw

     
Full name
No Data

     
Name Scope
No Data