|
pfc_insertrow
|
|
Full name
|
pfc_u_dw.pfc_insertrow
|
Access
|
public
|
Extend of
|
long
|
Return value
|
long
|
Prototype
|
event long pfc_insertrow()
|
Name
|
Datatype
|
lb_disablelinkage
|
boolean
|
ll_currow
|
long
|
ll_rc
|
long
|
event pfc_insertrow;//////////////////////////////////////////////////////////////////////////////
// Event: pfc_insertrow
// Arguments: None
// Returns: long - number of the new row that was inserted
// 0 = No row was added.
// -1 = error
// Description: Inserts a new row into the DataWindow before the current row
//////////////////////////////////////////////////////////////////////////////
// Rev. History Version
// 5.0 Initial version
// 6.0 Enhanced with Pre Insert funcitonality.
// 7.0 Enhanced with Post Insert funcitonality.
// 7.0 Linkage service should not fire events when querymode is enabled
//////////////////////////////////////////////////////////////////////////////
// Copyright © 1996-1999 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.
//////////////////////////////////////////////////////////////////////////////
long ll_currow
long ll_rc
boolean lb_disablelinkage
// Allow for pre functionality.
if this.Event pfc_preinsertrow() <= PREVENT_ACTION then return NO_ACTION
// Get current row
ll_currow = this.GetRow()
if ll_currow < 0 then ll_currow = 0
// Is Querymode enabled?
if IsValid(inv_QueryMode) then lb_disablelinkage = inv_QueryMode.of_GetEnabled()
if not lb_disablelinkage then
// Notify that a new row is about to be added.
if IsValid ( inv_Linkage ) then inv_Linkage.Event pfc_InsertRow (0)
end if
// Insert row.
if IsValid (inv_RowManager) then
ll_rc = inv_RowManager.event pfc_insertrow (ll_currow)
else
ll_rc = this.InsertRow (ll_currow)
end if
if not lb_disablelinkage then
// Notify that a new row has been added.
if IsValid ( inv_Linkage ) then inv_Linkage.Event pfc_InsertRow (ll_rc)
end if
// Allow for post functionality.
this.Post Event pfc_postinsertrow(ll_rc)
return ll_rc
end event