|
pfc_deleterow
|
|
Full name
|
pfc_n_cst_dwsrv_linkage.pfc_deleterow
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_deleterow(long)
|
Name
|
Datatype
|
ldw_root
|
u_dw
|
li_detail
|
integer
|
li_numdetails
|
integer
|
li_option
|
integer
|
li_rc
|
integer
|
ls_option
|
string
|
ls_reset
|
string[]
|
event pfc_deleterow;call super::pfc_deleterow;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_deleterow
//
// Arguments:
// al_row: A long identifying the deleted row
//
// Returns: Integer
// 1 If sucessful.
// -1 If an error is encountered.
//
// Description:
// Notification that a row has been deleted. The pfc_predeleterow should have
// been called prior to the actual deletion. The save operation may be
// performed.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 6.0 Added support for the DeleteStyle and RowUpdate functionality.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_detail
integer li_rc
string ls_reset[]
integer li_option
string ls_option
u_dw ldw_root
SetPointer(HourGlass!)
// Reset the prevent focus change functionality.
ib_preventfocuschanged = False
// Validate the required reference.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return -1
End If
// Make sure a row was deleted.
If al_row <= -1 Then Return 1
// Get the current row that has focus.
if IsNull(al_row) or al_row = 0 then
al_row = idw_requestor.GetRow()
end if
// Disable linkage redrawing starting with this dw (prevent flicker).
of_SetRedraw(False)
// Start the Delete operation.
li_rc = of_DeleteDetailRows()
of_SetRedraw(True)
If li_rc < 0 Then
// Notify the service about the row which currently has focus.
this.Event pfc_RowFocusChanged(al_row)
Return li_rc
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. (Do not prompt.)
li_rc = of_Save(0, False)
If li_rc <= -1 or li_rc >=2 Then
// Notify the service about the row which currently has focus.
this.Event pfc_RowFocusChanged(al_row)
Return -1
End If
End If
// Notify the service about the row which currently has focus.
this.Event pfc_RowFocusChanged(al_row)
Return 1
end event