pfc_preinsertrow


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_linkage   >   pfc_preinsertrow   

Full name pfc_n_cst_dwsrv_linkage.pfc_preinsertrow
Access public
Extend of integer
Return value integer
Prototype event integer pfc_preinsertrow()

Name Datatype
No Data

Name Datatype
li_fnrc Integer
li_rc Integer

event pfc_preinsertrow;call super::pfc_preinsertrow;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  pfc_preinsertrow
//
//	Arguments:	None
//
//	Returns:  integer
//	1 if it succeeds and the insertrow should continue.
//	0 if the insertrow should be prevented.
//	-1 if an error occurs
//
//	Description:	
//	Notification that a row is about to be inserted.
//	Determine if the Row that is about to be added should be stopped or cancelled.
// When desired, perform an update of the current data prior to allowing a new row.
//
//	Note:
//	This is a Continue or Prevent event.
//
//////////////////////////////////////////////////////////////////////////////
//	
//	Revision History
//
//	Version
//	6.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_rc = 1
Integer	li_fnrc

// Validate the required reference.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
	Return FAILURE
End If

// Determine by looking at the linked dws, if current dw requires
//	Updates to occur on RowChange.
If of_UpdateOnRowChange() Then 
	// If appropriate Save the data.  (if applicable, perform prompt.)
	li_rc = of_Save(idw_requestor.GetRow(), True)
	If li_rc = 2 Then
		// -- The user wants to loose all pending updates starting with this
		//    datawindow and down the chain. -- 
		// Loose all pending changes from this datawindow.
		li_fnrc = of_UndoModified()

	ElseIf  li_rc <= -1 or li_rc >= 3 Then 	
		Return PREVENT_ACTION
	End If
End If

Return CONTINUE_ACTION

end event

     
Name Owner
pfc_u_dw.pfc_preinsertrow pfc_u_dw

     
Name Owner
datawindow.getrow datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
pfc_n_cst_dwsrv_linkage.of_save pfc_n_cst_dwsrv_linkage
pfc_n_cst_dwsrv_linkage.of_updateonrowchange pfc_n_cst_dwsrv_linkage
pfc_n_cst_dwsrv_linkage.of_undomodified pfc_n_cst_dwsrv_linkage

     
Full name
No Data

     
Name Scope
No Data