|
pfc_propertyvalidation
|
|
Full name
|
pfc_u_tabpg_dwproperty_srvmultitable.pfc_propertyvalidation
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event pfc_propertyvalidation()
|
Name
|
Datatype
|
li_item
|
Integer
|
li_itemcount
|
Integer
|
li_row
|
Integer
|
li_rowcount
|
Integer
|
ls_column
|
string
|
event pfc_propertyvalidation;call super::pfc_propertyvalidation;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_PropertyValidation
//
// Arguments: None
//
// Returns: Integer
// 1 = successful
// -1 = Error
//
// Description:
// Validate the object.
// Make sure all required information has been selected.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_rowcount
Integer li_row
Integer li_itemcount
Integer li_item
string ls_column
// Only validate if the table is to be registered.
If cbx_register.Checked Then
// Validate the Where option has been set.
If rb_wherekey.Checked or rb_wherekeyandupd.Checked or &
rb_wherekeyandmod.Checked Then
// OK
Else
of_MessageBox('pfc_dwproperty_multitable_whereoption', is_msgtitle, &
'The Where option needs to be set.', StopSign!, OK!, 1)
Return -1
End If
// Validate the Key option has been set.
If rb_keydelthenins.Checked or rb_keyupdate.Checked Then
// OK
Else
of_MessageBox('pfc_dwproperty_multitable_keyoption', is_msgtitle, &
'The Key option needs to be set.', StopSign!, OK!, 1)
Return -1
End If
// Validate that at least one Update column has been set.
If lb_updatecolumns.SelectedIndex() <= 0 Then
of_MessageBox('pfc_dwproperty_multitable_updatecol', is_msgtitle,&
'The Update column(s) need to be set.', StopSign!, OK!, 1)
Return -1
End If
// Validate that at least one Key column has been set.
If lb_keycolumns.SelectedIndex() <= 0 Then
of_MessageBox('pfc_dwproperty_multitable_keycol', is_msgtitle,&
'The Key column(s) need to be set.', StopSign!, OK!, 1)
Return -1
End If
End If
// Refresh the data.
// Using the previously selected table.
this.Event pfc_propertyrefreshtable(is_selectedtable)
Return 1
end event