|
pfc_propertypopulate
|
|
Full name
|
pfc_u_tabpg_dwproperty_srvquerymode.pfc_propertypopulate
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_propertypopulate()
|
Name
|
Datatype
|
li_cntall
|
integer
|
li_cntquery
|
integer
|
li_index
|
integer
|
li_rc
|
integer
|
li_upperall
|
integer
|
li_upperquery
|
integer
|
ls_allcols
|
string[]
|
ls_querycols
|
string[]
|
event pfc_propertypopulate;call super::pfc_propertypopulate;//////////////////////////////////////////////////////////////////////////////
//
// Function: pfc_properypopulate
//
// Access: Public
//
// Arguments: None
//
// Returns: Integer
// 1 if it succeeds.
// -1 if an error occurs.
//
// Description:
// Populate the screen edit controls with the current service values.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_upperall, li_upperquery
integer li_cntall, li_cntquery
integer li_rc
integer li_index
string ls_allcols[]
string ls_querycols[]
// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return -1
End If
If IsNull(idw_requestor.inv_querymode) or Not IsValid(idw_requestor.inv_querymode) Then
Return -1
End If
// Determine if QueryMode is enabled.
cbx_enabled.Checked = idw_requestor.inv_querymode.of_GetEnabled()
// Determine if ResetQueryCriteria is enabled.
cbx_resetcriteria.Checked = idw_requestor.inv_querymode.of_GetResetCriteria()
// Determine if Retrieve on Disabled is enabled.
cbx_retrieveondisabled.Checked = idw_requestor.inv_querymode.of_GetRetrieveOnDisabled()
// Get all the columns from which the querymode service could querymode.
li_rc = idw_requestor.inv_querymode.of_GetObjects (ls_allcols, "column", "*", true)
// Get all the QueryColumns columns.
li_rc = idw_requestor.inv_querymode.of_GetQueryCols(ls_querycols)
// Add All of the columns and Select the Query Columns
li_upperall = UpperBound(ls_allcols)
li_upperquery = UpperBound(ls_querycols)
For li_cntall = 1 to li_upperall
li_index = lb_cols.AddItem(ls_allcols[li_cntall])
// Determine if this is an Query column.
For li_cntquery = 1 to li_upperquery
If ls_allcols[li_cntall] = ls_querycols[li_cntquery] Then
lb_cols.SetState ( li_index, True )
Exit
End If
Next
Next
Return 1
end event