|
of_validation
|
|
Full name
|
pfc_n_cst_dwsrv_linkage.of_validation
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_validation()
|
Name
|
Datatype
|
li_i
|
Integer
|
li_numdetails
|
Integer
|
li_rc
|
Integer
|
public function integer of_validation ();//////////////////////////////////////////////////////////////////////////////
//
// Function:
// of_validation
//
// Access: Public
//
// Arguments: None
//
// Returns: Integer
// 1 = No error found during validation.
// -1 = An error was found during validation.
//
// Description:
// Validate each control on the chain. Stop if an error is found.
//
// 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
// 6.0 Allow datawindows which are marked as NotUpdateable to be validated.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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, li_i, li_rc=0
// Check for any errors.
If idw_Requestor.Event pfc_Validation() < 0 Then
Return FAILURE
End If
// 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 FAILURE
li_rc = idw_details[li_i].inv_Linkage.of_Validation()
If li_rc < 0 Then Return li_rc
End If
Next
Return li_rc
end function