StrataFrame Forum

How do you Declare a BO in C#

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

By Scott - 12/1/2005

Here is the code from the help file:

Public WithEvents MyBusinessObject1 As MyBusinessObject
 
How do declare this in c#?
 
public MyBusinessObject MyBusinessObject1;
 
 
By StrataFrame Team - 12/1/2005

Yes, that's how you would define it...



The WithEvents keyword in VB allows you to have Handles on methods to handle events, but since C# doesn't allow you to do that, there is no WithEvents.
By Scott - 12/1/2005

When I am trying to set the businessobject property of a text box on a new page the BO is not listed.  What should I look for?  I have added my BO decleration to the ApplicationBasePage.cs file in the Business Object Definitions region.

Thanks

By StrataFrame Team - 12/1/2005

You'll have to rebuild your project before the new business object you've declared will be visible. We've had some issues the the type resolution and finally got the type editors switched over to using the VsTypeResolutionService. I'm not sure if you have that update, so if the business object still doesn't show up after you rebuild, then let me know, and I'll shoot you the update.
By Scott - 12/1/2005

It still isn't there.  Send the udpate when ever you have some time, I know things must be really busy around there since the release of the framework.

Scott

By StrataFrame Team - 12/2/2005

Aye, I'll get it to you ASAP, but you might have to wait until Monday, when we plan to release the OLE DB support...
By Scott - 12/2/2005

Looking forward to Monday.

Thanks for the udpate.

By StrataFrame Team - 12/12/2005

The declaration of the business objects in the ApplicationBasePage.cs works now... however, you need to declare it as a property, so:



private MyBOClass _MyBO;



public MyBOClass MyBO

{

get

{

return this._MyBO;

}

set

{

this._MyBO = value;

}

}



Then, just build and it will be there as a possible option for the data source of bindable controls.