pfc_propertyapply


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_srvcalculator   >   pfc_propertyapply   

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

Name Datatype
No Data

Name Datatype
lb_current boolean
lb_desired boolean
li_currentstyle integer
li_desiredstyle integer
li_excludecount integer
li_index integer
li_rc integer
li_row integer
li_rowcount integer
ls_column string

event pfc_propertyapply;call super::pfc_propertyapply;//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		pfc_PropertyApply
//
//	Access:    		Public
//
//	Arguments:  	None
//
//	Returns:   		Integer
//   1 if it succeeds.
//	 -1 if an error occurs.
//
//	Description:  		
//	 Apply the requested changes.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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_rowcount
integer	li_row
integer 	li_rc
integer	li_index
integer	li_excludecount=0
string	ls_column
boolean	lb_current, lb_desired
integer	li_desiredstyle, li_currentstyle

// Validate references.

If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
	Return -1
End If
If IsNull(idw_requestor.iuo_calculator) or Not IsValid(idw_requestor.iuo_calculator) Then
	Return -1
End If

// -- Initial Value. --
lb_current = idw_requestor.iuo_calculator.of_IsInitialValue()
lb_desired = cbx_initialvalue.Checked
// If the desired value differs from the current value.
If  lb_current<> lb_desired Then
	li_rc = idw_requestor.iuo_calculator.of_SetInitialValue(lb_desired)
End If

// -- Close on Click. --
lb_current = idw_requestor.iuo_calculator.of_IsCloseOnClick()
lb_desired = cbx_closeonclick.Checked
// If the desired value differs from the current value.
If  lb_current<> lb_desired Then
	li_rc = idw_requestor.iuo_calculator.of_SetCloseOnClick(lb_desired)
End If

// -- Register or Unregister Columns. --
li_rowcount = dw_register.RowCount()
For li_row = 1 to li_rowcount
	// Get the column name, register flag, and style.
	ls_column = dw_register.object.columnname.primary[li_row]
	lb_desired = (dw_register.object.register.primary[li_row] = 'Y')
	li_desiredstyle = dw_register.object.style.primary[li_row]
	
	If lb_desired THEN  
		// Want this current column to be registered.
		If Not idw_requestor.iuo_calculator.of_IsRegistered(ls_column) Then
			li_rc = idw_requestor.iuo_calculator.of_Register(ls_column, li_desiredstyle)
		Else
			// Already registered, see if the style is the same.
			li_currentstyle = idw_requestor.iuo_calculator.of_GetRegisteredStyle(ls_column)
			If li_currentstyle <> li_desiredstyle Then
				// Unregister and then register back with the new style.
				li_rc = idw_requestor.iuo_calculator.of_UnRegister(ls_column)
				li_rc = idw_requestor.iuo_calculator.of_Register(ls_column, li_desiredstyle)
			End If
		End If
	Else
		// Want this current column to Not be registed.
		If idw_requestor.iuo_calculator.of_IsRegistered(ls_column) Then
			li_rc = idw_requestor.iuo_calculator.of_UnRegister(ls_column)
		End If		
	End If
Next

Return 1

end event

     
Name Owner
No Data

     
Name Owner
datawindow.rowcount datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
pfc_u_calculator.of_setcloseonclick pfc_u_calculator
pfc_u_calculator.of_isregistered pfc_u_calculator
pfc_u_calculator.of_register pfc_u_calculator
pfc_u_calculator.of_unregister pfc_u_calculator
pfc_u_calculator.of_getregisteredstyle pfc_u_calculator
pfc_u_calculator.of_IsCloseOnClick pfc_u_calculator
pfc_u_calculator.of_SetInitialValue pfc_u_calculator
pfc_u_calculator.of_IsInitialValue pfc_u_calculator
pfc_u_tabpg_dwproperty_base.pfc_propertyapply pfc_u_tabpg_dwproperty_base

     
Full name
pfc_u_tabpg_dwproperty_srvcalculator

     
Name Scope
No Data