Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business object and OOP
Message
From
26/09/2003 15:16:32
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
26/09/2003 09:13:44
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00832637
Message ID:
00832805
Views:
20
>However, in my POS/Invoice module, program will not know the item type key-in/scanned at least search from database. Since, I have multiple of Item class (each for each type of item), how to know which class should be initiated for SKU/Barcode lookup? Should I create one more class just for lookup, then create a appropriate object??

I'd create a "lookup" class, and then have that class instantiate the appropriate "item" class.

I have something similar in my Inventory module which has many different types of "documents"; eg. Purchase Order, Order Receipt, Stock Issue, Return to Stock, Return to Vendor, Inventory Count, Inventory Adjustment, etc.

There is a Document "front-end" that allows a User to retrieve one or more Documents (current or archived) and perform some action (Validate, Validate and Post, Post, Print). This front-end instantiates the appropriate "document object" (which is a subclass of a "document processor" class) based on document type, sets some properties, and then lets the document object execute.
Previous
Reply
Map
View

Click here to load this message in the networking platform