Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business object and OOP
Message
De
26/09/2003 15:16:32
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
À
26/09/2003 09:13:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00832637
Message ID:
00832805
Vues:
23
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform