pfc_propertyloadtable


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_srvmultitable   >   pfc_propertyloadtable   

Full name pfc_u_tabpg_dwproperty_srvmultitable.pfc_propertyloadtable
Access public
Extend of integer
Return value integer
Prototype event integer pfc_propertyloadtable(string)

Name Datatype
No Data

Name Datatype
lb_keyoption boolean
li_item integer
li_rc integer
li_row integer
li_rowcount integer
li_whereoption integer
ls_column string

event pfc_propertyloadtable;call super::pfc_propertyloadtable;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  		pfc_propertyloadtable
//
//	Arguments:  	None
//
//	Returns:   		Integer
//   1 if it succeeds.
//	 -1 if an error occurs.
//
//	Description:  	
//	The user has selected a new table to view.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

string	ls_column
integer	li_rc = 1
integer 	li_rowcount
integer 	li_row
integer	li_item
integer	li_whereoption
boolean	lb_keyoption

// Validate arguments.
If Len(Trim(as_table)) = 0 Then li_rc = -1

// Filter and Sort just the table related data.
If li_rc > 0 Then
	li_rowcount = of_SetData(as_table)
	If li_rowcount <= 0 Then li_rc = -1
End If

If li_rc < 0 Then
	// Clear all to some default value.
	cbx_register.Checked = False
	rb_wherekey.Checked = True
	rb_wherekeyandupd.Checked = False
	rb_wherekeyandmod.Checked = False
	rb_keydelthenins.Checked = True
	rb_keyupdate.Checked = False
	lb_keycolumns.Reset()
	lb_updatecolumns.Reset()
	Return -1
End If

// Set the register visual.
cbx_register.Checked = ( Upper(ids_data.object.pfc_register.primary[1]) = 'Y')

// Populate the WhereClause option information.
li_whereoption = ids_data.object.pfc_whereoption.primary[1]
rb_wherekey.Checked = (li_whereoption = 0)
rb_wherekeyandupd.Checked = (li_whereoption = 1)
rb_wherekeyandmod.Checked = (li_whereoption = 2)

// Populate the Key
If (Upper(ids_data.object.pfc_keyinplace.primary[1]) = 'Y') Then
	rb_keyupdate.Checked = False
	rb_keydelthenins.Checked = True
Else
	rb_keydelthenins.Checked = False	
	rb_keyupdate.Checked = True
End If

// Populate the Columns information.
lb_keycolumns.Reset()
lb_keycolumns.SetState(0, False)
lb_updatecolumns.Reset()
lb_updatecolumns.SetState(0, False)
For li_row = 1 to li_rowcount
	ls_column = ids_data.object.pfc_column.primary[li_row]
	
	// Add the Key Columns - Select the currently registered ones.
	li_item = lb_keycolumns.AddItem(ls_column)
	If Upper(ids_data.object.pfc_key.primary[li_row]) = 'Y' Then
		lb_keycolumns.SetState(li_item, True)
	End If
	
	// Add the Update Columns - Select the currently registered ones.
	li_item = lb_updatecolumns.AddItem(ls_column)
	If Upper(ids_data.object.pfc_update.primary[li_row]) = 'Y' Then
		lb_updatecolumns.SetState(li_item, True)
	End If
	
Next
	
Return 1
end event

     
Name Owner
pfc_u_tabpg_dwproperty_srvmultitable.ddlb_table.selectionchanged ddlb_table

     
Name Owner
listbox.additem listbox
listbox.reset listbox
listbox.setstate listbox
systemfunctions.len systemfunctions
systemfunctions.trim systemfunctions
pfc_u_tabpg_dwproperty_srvmultitable.of_setdata pfc_u_tabpg_dwproperty_srvmultitable

     
Full name
pfc_u_tabpg_dwproperty_srvmultitable

     
Name Scope
No Data