Accounting Software
Small Business Software Estimating Software
Inventory SoftwareInventory Tracking SoftwareInventory Control SoftwareInventory Management SoftwareConstruction Management SoftwareProject Management SoftwareBusiness Management Software

Meetings (Source Code)

Link to: header | transactions directory

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

Comments

CMeeting

This class manages meetings for the Goldenseal accounting software,
small business management software, construction project management software and
construction estimating software.

a Meeting is an abstract class- it's the parent for the contact log, document
log, appointments, contracts, leases and other items that keep track of employees
acting on something.

No financial posting in these classes, but they do tend to be stored in
accounts so we can quickly retrieve meeting info.

SUPERCLASS = CTransaction

Constructor

/*********************************************************************************
default constructor
*********************************************************************************/
CMeeting::CMeeting()
:THE_SUPERCLASS()
{
mActionTaken = mEmployeeActing = 0;
}

Source Code

/*********************************************************************************

CopyFrom

copy the data members from the passed object. This is used to implement
duplicate. source should be an object of the same class as this object

*********************************************************************************/
void CMeeting::CopyFrom(DB_PersistentObject *source, const UInt8 copyFlags)
{
THE_SUPERCLASS::CopyFrom(source, copyFlags);

CMeeting *src = TCS_SAFE_CAST(source, CMeeting);
TCS_FailNILMsg(src, TCS_GetErrString(errID_BadRecord));

TCS_BlockMove(&src->mActionTaken, &mActionTaken, cCopyFileLength);
}/*********************************************************************************

GetMemberValue

return the value of the member with the given tag

*********************************************************************************/
Boolean CMeeting::GetMemberValue(const NeoTag aTag, const NeoTag aType,
void *aValue) const
{
switch (aTag)
{
case tag_actiontaken:
return ConvertObjectIDMember(mActionTaken, id_ActionTaken,
aValue, aType);
break;

case tag_employeeacting:
return ConvertObjectIDMember(mEmployeeActing, id_EmployeeAccount,
aValue, aType);
break;

default:
return THE_SUPERCLASS::GetMemberValue(aTag, aType, aValue);
break;
}
}/*********************************************************************************

SetMemberValue

set the value of the member with the given tag

*********************************************************************************/
Boolean CMeeting::SetMemberValue(const NeoTag aTag, const NeoTag aType,
const void *aValue)
{
switch (aTag)
{
case tag_actiontaken:
return ConvertDataToObjectID(aValue, aType,
&mActionTaken, id_ActionTaken);
break;

case tag_employeeacting:
return ConvertDataToObjectID(aValue, aType,
&mEmployeeActing, id_EmployeeAccount);
break;

default:
return THE_SUPERCLASS::SetMemberValue(aTag, aType, aValue);
break;
}
}/*********************************************************************************

ReadObject

read the persistent object's data in from a stream
*********************************************************************************/
void CMeeting::ReadObject(CNeoStream *aStream, const NeoTag aTag)
{
TCS_FailNILMsg(aStream, TCS_GetErrString(errID_BadStream));

CNeoDebugImport checker(aStream, this); // TCS 2/24/00

THE_SUPERCLASS::ReadObject(aStream, aTag);

if (!IsIOValid()) // TCS 2/5/02
return;

/// aStream->ReadChunk(&mActionTaken, cFileLength);

mActionTaken = aStream->ReadID(); // mfs_sa rev 20feb2k3
mEmployeeActing = aStream->ReadID();
}/*********************************************************************************

WriteObject

write the persistent object's data to a stream
*********************************************************************************/
void CMeeting::WriteObject(CNeoStream *aStream, const NeoTag aTag)
{
TCS_FailNILMsg(aStream, TCS_GetErrString(errID_BadStream));

CNeoDebugExport checker(aStream, this);
THE_SUPERCLASS::WriteObject(aStream, aTag);

/// aStream->WriteChunk(&mActionTaken, cFileLength);

aStream->WriteID(mActionTaken); // mfs_sa rev 20feb2k3
aStream->WriteID(mEmployeeActing);

}
#if CAN_USE_MARK
#pragma mark -
#endif
/*********************************************************************************

PostNewRecord TCS 11/20/03

post info for a new record
*********************************************************************************/
void CMeeting::PostNewRecord(const UInt8 creationType)
{
PostUseCount(id_ActionTaken, mActionTaken);
PostUseCount(id_EmployeeAccount, mEmployeeActing);

// let the superclass do any posting
THE_SUPERCLASS::PostNewRecord(creationType);
}
/*********************************************************************************

PostDeletion TCS 11/20/03

post info from a deleted record
*********************************************************************************/
void CMeeting::PostDeletion(const Boolean postAudit)
{
PostUseCount(id_ActionTaken, mActionTaken, cRemoveItem);
PostUseCount(id_EmployeeAccount, mEmployeeActing, cRemoveItem);

// let the superclass do any posting
THE_SUPERCLASS::PostDeletion(postAudit);
}
/*********************************************************************************

PostRecordActivated TCS 10/11/99

post info from a newly created or activated transaction
*********************************************************************************/
void CMeeting::PostRecordActivated(const UInt8 creationType)
{
UpdateContactAccount(); // rev TCS 9/30/02

// pass it along
THE_SUPERCLASS::PostRecordActivated(creationType);
}
/*********************************************************************************

PostRecordCancelled TCS 10/12/99

post info from a deleted or voided transaction
*********************************************************************************/
void CMeeting::PostRecordCancelled(const UInt8 cancelType)
{
UpdateContactAccount(cRemoveItem); // rev TCS 9/30/02

// let the superclass do any posting
THE_SUPERCLASS::PostRecordCancelled(cancelType);
}
/*********************************************************************************

PostRecordChanging TCS 10/12/99

a record will be changing. Post the change.
*********************************************************************************/
void CMeeting::PostRecordChanging(const Boolean accountChanging, const Boolean jobChanging)
{
UpdateContactAccount(cRemoveItem); // rev TCS 9/30/02

PostUseCount(id_ActionTaken, mActionTaken, cRemoveItem); // TCS 11/20/03
PostUseCount(id_EmployeeAccount, mEmployeeActing, cRemoveItem);

THE_SUPERCLASS::PostRecordChanging(accountChanging, jobChanging);
}
/*********************************************************************************

PostRecordChanged TCS 10/11/99

a record has changed. Post it.
*********************************************************************************/
void CMeeting::PostRecordChanged(const CMoney &oldAmount, const Boolean accountChanged,
const Boolean jobChanged)
{
UpdateContactAccount(); // rev TCS 9/30/02

PostUseCount(id_ActionTaken, mActionTaken); // TCS 11/20/03
PostUseCount(id_EmployeeAccount, mEmployeeActing);

// pass it along
THE_SUPERCLASS::PostRecordChanged(oldAmount, accountChanged, jobChanged);
}
/*********************************************************************************

UpdateContactAccount TCS 10/11/99 rev TCS 9/28/02

update contact data in a prospect record. Any class can respond to this,
though currently the only ones that do so are job accounts, cost accounts
and address book records
*********************************************************************************/
void CMeeting::UpdateContactAccount(const Boolean removeItem)
{
DB_PersistentObject *prospect = gDBFile->GetOneObject(mMainAccountClass,
mMainAccount);
if (prospect)
{
DB_ObjectWatcher watcher(prospect);
prospect->UpdateContactInfo(GetDBClassID(), GetDBID(), removeItem);
}
}
#if CAN_USE_MARK
#pragma mark -
#endif
/*********************************************************************************

FillDataReport TCS 9/6/02

fill in a diagnostic table that shows data field values.

*********************************************************************************/
void CMeeting::FillDataReport(CTCS_Table *table, CNeoStream *stream) const
{
TCS_FailNILMsg(table, TCS_GetErrString(errID_BadTable));
TCS_FailNILMsg(stream, TCS_GetErrString(errID_BadStream));

THE_SUPERCLASS::FillDataReport(table, stream);

FillFieldObjectIDRow(table, stream, tag_actiontaken, mActionTaken, id_ActionTaken);
FillFieldObjectIDRow(table, stream, tag_employeeacting, mEmployeeActing, id_EmployeeAccount);

}