pfc_propertyapply


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_services   >   pfc_propertyapply   

Full name pfc_u_tabpg_dwproperty_services.pfc_propertyapply
Access public
Extend of
Return value
Prototype event pfc_propertyapply()

Name Datatype
No Data

Name Datatype
lb_currentstate boolean
lb_desiredstate boolean
li_cnt integer
li_rc integer
li_return integer
li_upper integer
ls_servicename string

event pfc_propertyapply;call super::pfc_propertyapply;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  pfc_PropertyApply
//
//	Arguments:  None
//
//	Returns: Integer
//	 1 = successful
// -1 = Error
//
//	Description:  	Apply all outstanding changes.
//
// *Note: Notice the behavior of the object in which settings to 'Enabled or True' are 
//		applied immediately and settings to 'Disabled or False' are applied
//		at the last possible moment.  This is done in order not to loose any internal
//		values of the specific service when an user turns it 'from Enabled to Disabled to Enabled'.
//
//	*Note: Notice the 'pfc_applyothers' event call which can be used to support 
// 	non-PFC services.
//
//////////////////////////////////////////////////////////////////////////////
//	
//	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_upper
integer	li_return =1
integer 	li_cnt
integer	li_rc
string	ls_servicename
boolean	lb_currentstate
boolean	lb_desiredstate

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

// Loop around all objects.
li_upper = dw_services.RowCount()
For li_cnt = 1 to li_upper
	
	// Get the service name.
	ls_servicename = dw_services.Object.servicename.Primary[li_cnt]

	// Get the desired state.
	lb_desiredstate = (dw_services.Object.serviceenabled.Primary[li_cnt] = SERVICE_ENABLED)

	// Desired state of True should have already been turned on.
	If lb_desiredstate Then Continue
	
	// Set to the desired state.
	li_rc = this.Event pfc_PropertyApplyImmediate(ls_servicename, lb_desiredstate)
	If li_rc < 0 Then 
		// Continue processing but keep track that at least one failed.
		li_return = -1
	End If
Next

Return li_return
end event

     
Name Owner
No Data

     
Name Owner
datawindow.rowcount datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
pfc_u_tabpg_dwproperty_base.pfc_propertyapply pfc_u_tabpg_dwproperty_base
pfc_u_tabpg_dwproperty_services.pfc_propertyapplyimmediate pfc_u_tabpg_dwproperty_services

     
Full name
pfc_u_tabpg_dwproperty_services

     
Name Scope
No Data