pfc_propertysyntax


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_srvlinkage2   >   pfc_propertysyntax   

Full name pfc_u_tabpg_dwproperty_srvlinkage2.pfc_propertysyntax
Access public
Extend of
Return value
Prototype event pfc_propertysyntax()

Name Datatype
No Data

Name Datatype
lb_desired boolean
li_cnt integer
li_rc integer
li_styledesired integer
li_upper integer
lnv_conversion n_cst_conversion
ls_desired string
ls_syntax string

event pfc_propertysyntax;call super::pfc_propertysyntax;//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		pfc_propertysyntax
//
//	Access:    		Public
//
//	Arguments:  	None
//
//	Returns:   		String
//	  The syntax required to create the currently selections.
//   '!' in error
//
//	Description:  
//	Create the required syntax to match the current selections.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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_cnt
integer 	li_rc
integer	li_styledesired
string	ls_desired
string	ls_syntax
boolean	lb_desired
n_cst_conversion lnv_conversion

// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
	Return '!'
End If
If IsNull(idw_requestor.inv_linkage) or Not IsValid(idw_requestor.inv_linkage) Then
	Return '!'
End If


// -- Sync On Key Change. --
lb_desired = cbx_synconkeychange.Checked
ls_syntax += '~r~nThis.inv_linkage.of_SetSyncOnKeyChange('+lnv_conversion.of_String(lb_desired)+')'

// -- Delete Style. --
li_styledesired = ii_deletestyle - 1
Choose Case li_styledesired
	Case idw_requestor.inv_linkage.DEFAULT
		ls_syntax += '~r~nThis.inv_linkage.of_SetDeleteStyle(inv_linkage.DEFAULT)'
	Case idw_requestor.inv_linkage.DELETE_ROWS 
		ls_syntax += '~r~nThis.inv_linkage.of_SetDeleteStyle(inv_linkage.DELETE_ROWS)'		
	Case idw_requestor.inv_linkage.DISCARD_ROWS
		ls_syntax += '~r~nThis.inv_linkage.of_SetDeleteStyle(inv_linkage.DISCARD_ROWS)'
	Case Else
		ls_syntax += '~r~nThis.inv_linkage.of_SetDeleteStyle('+String(li_styledesired)+')'		
End Choose

// -- Update Style. --
// The update styles are (1 through 4) and then the Custom (101).
If ii_updatestyle >= 5 Then
	li_styledesired = 101
Else
	li_styledesired = ii_updatestyle
End If
Choose Case li_styledesired
	Case idw_requestor.inv_linkage.TOPDOWN
		ls_syntax += '~r~nThis.inv_linkage.of_SetUpdateStyle(inv_linkage.TOPDOWN)'
	Case idw_requestor.inv_linkage.BOTTOMUP 
		ls_syntax += '~r~nThis.inv_linkage.of_SetUpdateStyle(inv_linkage.BOTTOMUP)'		
	Case idw_requestor.inv_linkage.TOPDOWN_BOTTOMUP 
		ls_syntax += '~r~nThis.inv_linkage.of_SetUpdateStyle(inv_linkage.TOPDOWN_BOTTOMUP)'
	Case idw_requestor.inv_linkage.BOTTOMUP_TOPDOWN 
		ls_syntax += '~r~nThis.inv_linkage.of_SetUpdateStyle(inv_linkage.BOTTOMUP_TOPDOWN)'
	Case idw_requestor.inv_linkage.CUSTOM 
		ls_syntax += '~r~nThis.inv_linkage.of_SetUpdateStyle(inv_linkage.CUSTOM)'		
	Case Else
		ls_syntax += '~r~nThis.inv_linkage.of_SetUpdateStyle('+String(li_styledesired)+')'		
End Choose

// The update styles are (1 through 4) and then the Custom (101).
If ii_updatestyle >= 5 Then
	// -- Custom Update. --
	li_styledesired = ii_customupdate
	ls_syntax += '~r~nThis.inv_linkage.of_SetCustomUpdate('+String(li_styledesired)+')'		
End If

// Retrieve Style only options.
If idw_requestor.inv_linkage.of_GetStyle() = idw_requestor.inv_linkage.RETRIEVE Then
	// -- Update On Row Change. --
	lb_desired = cbx_updateonrowchange.Checked
	ls_syntax += '~r~nThis.inv_linkage.of_SetUpdateOnRowChange('+lnv_conversion.of_String(lb_desired)+')'

	// Update On Row Change only options.
	If cbx_updateonrowchange.Checked Then
		// -- Confirm On Row Change. --
		lb_desired = cbx_confirmonrowchange.Checked
		ls_syntax += '~r~nThis.inv_linkage.of_SetConfirmOnRowChange('+lnv_conversion.of_String(lb_desired)+')'
	
		// -- Confirm On Delete. --
		lb_desired = cbx_confirmondelete.Checked
		ls_syntax += '~r~nThis.inv_linkage.of_SetConfirmOnDelete('+lnv_conversion.of_String(lb_desired)+')'

		// -- Sound File. --
		ls_desired = Trim(sle_savesound.Text)
		ls_syntax += '~r~nThis.inv_linkage.of_SetSaveSound("'+ls_desired+'")'	
	End If
End If

Return ls_syntax


Return ls_syntax

end event

     
Name Owner
No Data

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.string systemfunctions
systemfunctions.trim systemfunctions
pfc_n_cst_conversion.of_string pfc_n_cst_conversion
pfc_n_cst_dwsrv_linkage.of_getstyle pfc_n_cst_dwsrv_linkage
pfc_u_tabpg_dwproperty_base.pfc_propertysyntax pfc_u_tabpg_dwproperty_base

     
Full name
pfc_u_tabpg_dwproperty_srvlinkage2

     
Name Scope
No Data