pfc_propertysyntax


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_srvquerymode   >   pfc_propertysyntax   

Full name pfc_u_tabpg_dwproperty_srvquerymode.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_columncount integer
li_index integer
li_rc integer
li_styledesired integer
li_upper integer
lnv_conversion n_cst_conversion
ls_columns string
ls_columnscols 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
integer	li_index
integer	li_columncount=0
string	ls_columnscols[]
string	ls_columns
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_querymode) or Not IsValid(idw_requestor.inv_querymode) Then
	Return '!'
End If


// -- Start the service. --
ls_syntax += 'This.of_SetQueryMode(True)~r~n'

// -- QueryMode. --
lb_desired = cbx_enabled.Checked
ls_syntax += '~r~nThis.inv_querymode.of_SetEnabled('+lnv_conversion.of_String(lb_desired)+')'

// -- ResetQueryCriteria. --
lb_desired = cbx_resetcriteria.Checked
ls_syntax += '~r~nThis.inv_querymode.of_SetResetCriteria('+lnv_conversion.of_String(lb_desired)+')'

// -- Retrieve on Disabled. --
lb_desired = cbx_retrieveondisabled.Checked
ls_syntax += '~r~nThis.inv_querymode.of_SetRetrieveOnDisabled('+lnv_conversion.of_String(lb_desired)+')'

// -- Query Columns. --
// Get the number of items in the ListBox.
li_upper = lb_cols.TotalItems( )
For li_cnt = 1 to li_upper
	// Is the item selected?
	If lb_cols.State(li_cnt) = 1 THEN  
		li_columncount ++
		ls_columns += '~r~nls_columns['+string(li_columncount)+'] = "'+ &
							lb_cols.text(li_cnt)+'"'
	End If
Next
If li_columncount > 0 Then
	// -- Defined required variables.  -- 
	ls_syntax = 'String	ls_columns[]~r~n~r~n' + ls_syntax
	ls_syntax += ls_columns
	ls_syntax += '~r~nThis.inv_querymode.of_SetQueryCols(ls_columns)'
End If

Return ls_syntax
end event

     
Name Owner
No Data

     
Name Owner
listbox.state listbox
listbox.text listbox
listbox.totalitems listbox
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.string systemfunctions
pfc_n_cst_conversion.of_string pfc_n_cst_conversion
pfc_u_tabpg_dwproperty_base.pfc_propertysyntax pfc_u_tabpg_dwproperty_base

     
Full name
pfc_u_tabpg_dwproperty_srvquerymode

     
Name Scope
No Data