StrataFrame Forum

Steps to Setting up a BO in a WebForm

http://forum.strataframe.net/Topic16227.aspx

By Howard Bennett - 5/7/2008

Okay...I've searched existing messages and tried to figure this out on my own...with no luck!

What I'd like to know is how to add a SF BO to a webform.

What I think I understand is that I need to create a BO in another project and reference that in my webform project.  I can create the BO - but - don't understand what to do next.  How do I reference that and then how to I add that to the webform so that I can bind textboxes to it?

Can someone help me understand this a bit better?

Thanks - HB

P.S. Looking forward to seeing some of you in Amarillo in July!

By Trent L. Taylor - 5/7/2008

Howard,

Sorry about the slow response on this...I missed this post Blush

You will define the BO in the ApplicationBasepage, and then your web form inherits from an ApplicationBasePage.  You can have as many ApplicationBasePages as you need, but any page that inherits from a base page will see those business objects.

If you will open up the web application sample you will see how these get defined in the ApplicationBasePage of that sample.  It should get you going in the right direction.

By Howard Bennett - 5/8/2008

No problem being "late."  Any help is greatly appreciated!

Here's the problem...and don't forget...this is my first "real" application using SF.

I've got the ReferralBO in a project called "CommonBusiness" within this solution.  I've added this: to the ApplicationBasePage.cs:

using MicroFour.StrataFrame.Tools;

using System.Web.Configuration;

using CommonBusiness;

When building, I get this error:

The type or namespace name 'CommonBusiness' could not be found...

I've attached screenshots so you can see more of how I've got things setup.

Thanks - again - for trying to help!

By Ivan George Borges - 5/8/2008

Hi Howard.

Have you added a reference to your CommomBusiness project into the PTPlus project references?

Great to see we will meet at the class in July. Cool

By Howard Bennett - 5/8/2008

That's the step I was missing - thanks! BigGrin

I'm sure I'll be back here soon with another question...

By Ivan George Borges - 5/8/2008

Glad you got it going. Wink