Adding a business object to a form


Author
Message
franka
franka
StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)StrataFrame Beginner (28 reputation)
Group: Forum Members
Posts: 22, Visits: 35
I've created a business object library with 3 business objects.  In my WinForm project, I added a reference to the BOL .dll.  I then added a maintenance form to the WinForm project and I'm trying to add 1 of the business objects to it.  How?  The tutorial has the business object as part of the WinForm project and a tab gets created for the project in the Toolbox.  When I build my project, I don't get a tab for it in the Toolbox.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
There are two options here. 

First Option (Recommended for most cases)
First, is to create a solution that includes both your WinForms sample and your business object library.  To do this, open your WinForms sample and do the following:

1. Open the Solution Explorer
2. Right-Click the solution and go to Add -> Existing Project
3. Choose your business object libarary project.
4. Click OK

At this point your new BO library will be in the same solution as your WinForms application.  Now you need to add a reference to your WinForms project.

1. Under the references item, remove your BOL.dll reference if it exists.
2. Right-click the references item and choose "Add Reference"
3. Click on the Projects page tab
4. Choose your BO Library project.
5. Click OK

This will add the proper reference to your project.  Rebuild the solution and the business objects from your BO libarary will appear in the Toolbox and can be dropped on the form.

Second Option
You can add a tab item to your toolbox and pull it from your BOL.dll library file.  To do this do the following:

1. Right-Click on the Toolbox and click "Add Tab"
2. Name the tab to best suite your needs
3. Right-Click on the new tab and click "Choose Items..."
4. Navigate to your BOL.dll file
5. Click OK and you will see it open a list with all of the items in the BOL.dll checked.
6. Click OK and the items will be added to your Toolbox.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search