Accounting Software
Small Business Software Estimating Software
Construction Estimating SoftwareBookkeeping SoftwareInventory SoftwareInventory Control SoftwareInventory Tracking SoftwareInventory Management SoftwareBusiness Management Software

Other Cost Account Viewer (Source Code)

Link to: header | record viewer directory

Copyright Turtle Creek Software 1996-2006. All Rights Reserved.

Comments

COtherCostAccountViewer

This class manages other cost accounts for the Goldenseal accounting software,
small business management software, construction project management software and
construction estimating software. Includes accounts payable and job costing info.

SUPERCLASS = CAccountViewer

Constructor

/*********************************************************************************
constructor TCS 10/30/02
*********************************************************************************/
COtherCostAccountViewer::COtherCostAccountViewer(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 COtherCostAccountViewer::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_OtherCost, button_viewinvoices); // TCS 11/24/02
}
/*********************************************************************************

HandleDBButtonClicked TCS 11/24/02

a button in the layout was clicked.

*********************************************************************************/
void COtherCostAccountViewer::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_OtherCost, contactArray);

if (contactArray.GetCount() > 0)
{
DB_Editor::ShowEditorArray(id_OtherCost, contactArray, cShowLastRecord);
}
}
else
THE_SUPERCLASS::HandleDBButtonClicked(btnID);
}