of_undelete


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_rowmanager   >   of_undelete   

Full name pfc_n_cst_dwsrv_rowmanager.of_undelete
Access public
Extend of long
Return value long
Prototype public function long of_undelete()

Name Datatype
No Data

Name Datatype
lnv_restorerowattrib n_cst_restorerowattrib
lnv_return n_cst_returnattrib

public function long of_undelete ();//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_Undelete
//
//	Access:  public
//
//	Arguments:  none
//
//	Returns:  long
//	number of rows that were restored to the primary buffer
//	-1 = error
//	-2 = no rows are in the delete buffer to undelete
//
//	Description:
//	Allows user to select rows which can be undeleted
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
// 6.0 	Replaced call to w_undelete with call to new w_restorerow dialog.
//			Added call to the dw.pfc_prerestorerow event.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

n_cst_returnattrib	lnv_return 
n_cst_restorerowattrib lnv_restorerowattrib

// Validate DW requestor
if IsNull(idw_requestor) Or not IsValid (idw_requestor) then
	return -1
end if

// Check deleted count first
if idw_requestor.DeletedCount() <=0 then
	return -2
end if

// Populate information passed to the RestoreRow window.
lnv_restorerowattrib.idw_active = idw_requestor
idw_requestor.Event pfc_prerestorerow (lnv_restorerowattrib)

// Restore rows.
OpenWithParm (w_restorerow, lnv_restorerowattrib)

// w_restorerow closes with a CloseWithReturn value.  Get the value.
if IsValid(Message.PowerObjectParm) then
	if lnv_return.ClassName() = Message.PowerObjectParm.ClassName() then
		lnv_return = Message.PowerObjectParm
	else
		return -1
	end if
else
	return -1
end if

// Set focus back on the dw.
idw_requestor.SetFocus()

return lnv_return.ii_rc

end function

     
Name Owner
pfc_n_cst_dwsrv_rowmanager.pfc_restorerow pfc_n_cst_dwsrv_rowmanager

     
Name Owner
powerobject.classname powerobject
dragobject.setfocus dragobject
datawindow.deletedcount datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.openwithparm systemfunctions
pfc_u_dw.pfc_prerestorerow pfc_u_dw

     
Full name
w_restorerow
demopfc

     
Name Scope
No Data