mardi 24 février 2015

How do I properly separate object references?

I am writing a transfer WinForms application in C# to build sales orders and invoices for an accounting system from an inventory control system. I have defined a separate class for each system containing utilities and classes to manage the data coming from and going to each system. Let's call these two classes InvUtil and AcctUtil.


InvUtil contains classes for SalesOrders and SalesOrderLines as well as methods for gathering the data.


AcctUtil contains methods for receiving the data from InvUtil for processing into the accounting system.


How do I structure a middle layer or class to keep these two main classes from directly referencing each other? More specifically, how would the AcctUtil class reference and use SalesOrders objects from the InvUtil class without a direct reference?


Aucun commentaire:

Enregistrer un commentaire