accounting software, Point of Sale Software"> Goldenseal Accounting Software-- Sales Promotion Viewer
Accounting Software
Small Business Software Estimating Software
Construction Estimating SoftwareBookkeeping SoftwareInventory SoftwareInventory Control SoftwareInventory Tracking SoftwareInventory Management SoftwareBusiness Management Software

Sales Promotion Viewer (Source Code)

Link to: header | record viewer directory

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

Comments

CPromotionViewer

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

a viewer for sales promotions. This is a way to have a fixed set of
sale prices, for 'on sale' items that run for a while.

SUPERCLASS = DB_RecordViewer

Constructor

/*********************************************************************************
constructor
*********************************************************************************/
CPromotionViewer::CPromotionViewer(const SPaneInfo &inPaneInfo,
const SViewInfo &inViewInfo)
: THE_SUPERCLASS(inPaneInfo, inViewInfo)
{
}

Source Code

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

ListenToMessage TCS 7/9/00

listen to messages. We may need to prepare cat and subcat menus

*********************************************************************************/
void CPromotionViewer::ListenToMessage(MessageT inMessage, void *ioParam)
{
switch (inMessage)
{
case msg_TableCVSelected:
{ // a cv has been selected. We may need to prep the menu.
// Start by getting the breakdown table.
CMemberTable *table = TCS_SAFE_CAST(FindPaneByID(tag_promotiontable),
CMemberTable);
TCS_FailNILMsg(table, TCS_GetErrString(errID_BadTable));
TableIndexT col = table->GetSelectedColumn();
switch (col)
{
case CPromotion::col_cat:
table->PrepareCatCV(GetFieldValue(tag_catsystem));
break;

case CPromotion::col_subcat:
table->PrepareSubcatCV(GetFieldValue(tag_catsystem), CPromotion::col_cat);
break;

default:
break;
}
}
break;

default:
break;
}
// pass it along
THE_SUPERCLASS::ListenToMessage(inMessage, ioParam);
}