I have a four projects in a solution AllianceControl
-MainMenu
-BackflowControl
-UMS
-CounterReceipts

MainMenu Serves as launchboard for all the different projects as refrences them all to get at the controls to launch in a tab control:
BackflowControl -> MainMenu
UMS -> MainMenu
CounterReceipts -> MainMenu


EX:
http://s1024.photobucket.com/albums/y307/USSDeveloper/?action=view&current=datagridpull.png

This setup worked perfectly while I had just needed the refrence one way. But I came across a problem when I needed to add a new feature. Say I'm in BackflowControl
and want to load account information off of a datagrid double click. This double click would open a new tab in the collection I have going on. My problem is that the
functionality and collection is stored in my main menu since that is the launching point. I understand of course that you can't refrence the Mainmenu from the controls
(this would cause circular dependancy) but how would I be able to get at the function (or collection of tabs) to create a new tab in that collection?

You could sepearte out the data management classes to a seperate dll project.
This will enable access to the data manipulation functions for all processes.
If you need to reference objects from the MainMenu process then that is a totally differenct ball game and will also require cross process channels to transfere the data.

It's good practise in cases like these to keep your DomainObjects (for example a Person would be a DomainObject) and your DataAccessObjects separated.

So I could have a PersonDao and this class has a "GetById(int id)" method. So I can call PersonDao.GetbyId(25) and it will pull back that person for me.

The great thing about DAOs are that you can then implement GetBy<Whatever> and include functionality for that.

The Design pattern is good, but how you implement it will be different :)

DAO Design Pattern

(Separation will remove a lot of the circular dependency you talked about, which is why I'm mentioning it :))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.