How do you Declare a BO in C#


Author
Message
Scott
Scott
StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Here is the code from the help file:

Public WithEvents MyBusinessObject1 As MyBusinessObject
 
How do declare this in c#?
 
public MyBusinessObject MyBusinessObject1;
 
 

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.
Scott
Scott
StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
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

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.
Scott
Scott
StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
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

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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...
Scott
Scott
StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Looking forward to Monday.

Thanks for the udpate.

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.
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