Link to: header | record viewer
directory
Copyright Turtle Creek Software 1996-2006. All Rights Reserved.
Comments
CMaterialAccountViewer
This class manages material accounts for the Goldenseal accounting software,
small business management software, construction
project management software and
construction estimating software.
a viewer for material accounts. We store accounts payable info for the account.
SUPERCLASS = CAccountViewer
Constructor
/*********************************************************************************
constructor TCS 10/30/02
*********************************************************************************/
CMaterialAccountViewer::CMaterialAccountViewer(const SPaneInfo &inPaneInfo,
const SViewInfo &inViewInfo)
: CAccountViewer(inPaneInfo, inViewInfo)
{
}
Source Code
/*********************************************************************************
FinishUpdatingFields TCS 10/30/02
Finish prep work after updating fields from an object, but before displaying them
*********************************************************************************/
void CMaterialAccountViewer::FinishUpdatingFields(const UInt8 creationMethod,
DB_PersistentObject *viewerObject)
{
// the superclass handles basic field updating
THE_SUPERCLASS::FinishUpdatingFields(creationMethod, viewerObject);
// set enablement of the 'view contacts' buttons TCS 10/30/02
UpdateContactButton(id_MaterialPurchase, button_viewinvoices); // TCS 11/24/02
}
/*********************************************************************************
HandleDBButtonClicked TCS 11/24/02
a button in the layout was clicked.
*********************************************************************************/
void CMaterialAccountViewer::HandleDBButtonClicked(const TagType btnID)
{
if (btnID == button_viewinvoices)
{
DB_Account *account = TCS_SAFE_CAST(mCurrViewerObject, DB_Account);
TCS_FailNILMsg(account, TCS_GetErrString(errID_BadObject));
TObjectIDArray contactArray;
account->FetchMeetingArray(id_MaterialPurchase, contactArray);
if (contactArray.GetCount() > 0)
{
DB_Editor::ShowEditorArray(id_MaterialPurchase, contactArray, cShowLastRecord);
}
}
else
THE_SUPERCLASS::HandleDBButtonClicked(btnID);
}
|