|
pfc_propertypopulate
|
|
Full name
|
pfc_u_tabpg_dwproperty_srvlinkage.pfc_propertypopulate
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event pfc_propertypopulate()
|
Name
|
Datatype
|
ldw_details
|
u_dw[]
|
ldw_temp
|
u_dw
|
li_cnt
|
integer
|
li_index
|
integer
|
li_rc
|
integer
|
li_row
|
integer
|
li_style
|
integer
|
li_upper
|
integer
|
lnv_linkageattrib
|
n_cst_linkageattrib
|
ls_details
|
string
|
event pfc_propertypopulate;call super::pfc_propertypopulate;//////////////////////////////////////////////////////////////////////////////
//
// Function: pfc_propertypopulate
//
// 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_row
integer li_upper
integer li_cnt
integer li_rc
integer li_index
integer li_style
string ls_details
u_dw ldw_temp
u_dw ldw_details[]
n_cst_linkageattrib lnv_linkageattrib
// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return -1
End If
If IsNull(idw_requestor.inv_linkage) or Not IsValid(idw_requestor.inv_linkage) Then
Return -1
End If
// Get the Current datawindow.
st_currentdw.Text = idw_requestor.ClassName()
// Get the Root datawindow.
li_rc = idw_requestor.inv_linkage.of_FindRoot(ldw_temp)
If IsValid(ldw_temp) Then
st_rootdw.Text = ldw_temp.ClassName()
End If
// Get the Master datawindow.
li_rc = idw_requestor.inv_linkage.of_GetMaster(ldw_temp)
If IsValid(ldw_temp) Then
st_masterdw.Text = ldw_temp.ClassName()
End If
// Get the Detail datawindow(s).
li_rc = idw_requestor.inv_linkage.of_GetDetails(ldw_details)
li_upper = Upperbound(ldw_details)
For li_cnt = 1 to li_upper
If IsValid(ldw_details[li_cnt]) Then
If Len(ls_details) > 0 Then ls_details += '~r~n'
ls_details += ldw_details[li_cnt].ClassName()
End If
Next
If Len(ls_details) > 0 Then
mle_detaildw.Text = ls_details
End If
// Get the Style.
li_style = idw_requestor.inv_linkage.of_GetStyle()
Choose Case li_style
Case idw_requestor.inv_linkage.FILTER
st_style.Text = 'Filter'
Case idw_requestor.inv_linkage.RETRIEVE
st_style.Text = 'Retrieve'
Case idw_requestor.inv_linkage.SCROLL
st_style.Text = 'Scroll'
Case Else
st_style.Text = String(li_style)
End Choose
// Get the Registered arguments.
li_rc = idw_requestor.inv_linkage.of_GetRegistered(lnv_linkageattrib)
If IsValid(lnv_linkageattrib) Then
li_upper = UpperBound(lnv_linkageattrib.is_mastercolarg)
For li_cnt = 1 to li_upper
If Len(Trim(lnv_linkageattrib.is_mastercolarg[li_cnt])) > 0 Then
li_row = dw_arguments.Event pfc_addrow()
If li_row > 0 Then
dw_arguments.object.mastercolumn.primary[li_row] = &
Trim(lnv_linkageattrib.is_mastercolarg[li_cnt])
dw_arguments.object.detailcolumn.primary[li_row] = &
Trim(lnv_linkageattrib.is_detailcolarg[li_cnt])
End If
End If
Next
End If
Return 1
end event