Link to: header | record viewer
directory
Copyright Turtle Creek Software 1996-2006. All Rights Reserved.
Comments
CRentalUnitViewer
This class manages rental units for the Goldenseal accounting software,
property management software and rental
management software.
It's a viewer for rental units. Setup for Goldenseal property management software.
SUPERCLASS = DB_RecordViewer
Source Code
/*********************************************************************************
FinishUpdatingFields TCS TCS 4/23/03
Finish prep work after updating fields from an object, but before displaying them
*********************************************************************************/
void CRentalUnitViewer::FinishUpdatingFields(const UInt8 creationMethod,
DB_PersistentObject *viewerObject)
{
// the superclass handles basic field updating
THE_SUPERCLASS::FinishUpdatingFields(creationMethod, viewerObject);
// we disable the account field if we got here via button in RE account
if (creationMethod == record_fromprocess)
SetFieldEnabled(tag_mainaccount, false);
else
SetFieldEnabled(tag_mainaccount, true);
}
/*********************************************************************************
IsReadyToUpdateObject TCS 3/3/03
before updating, make sure we have a property listed
*********************************************************************************/
UInt8 CRentalUnitViewer::IsReadyToUpdateObject(const UInt8 saveSource)
{
UInt8 results = DB_RecordViewer::IsReadyToUpdateObject(saveSource);
if (results != save_success)
return results;
DBid propertyID = GetFieldValue(tag_mainaccount);
if (!propertyID)
{
CTextString errorString = TCS_GetMsgString(msgID_MissingRequiredField);
errorString.ReplaceStdTokens(DB_ClassDescriptor::GetClassNameSingular(id_RealEstateAccount));
TCS_ErrorAlert(errorString);
return save_notready;
}
return save_success;
}
|