StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
BO Constructor
BO Constructor
Post Reply
Like
0
BO Constructor
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Daniel Essin
Daniel Essin
posted 19 Years Ago
ANSWER
HOT
Topic Details
Share Topic
Group: Forum Members
Posts: 235,
Visits: 309
Objects that inherit from MicroFour.StrataFrame.Business.BusinessLayer, i.e. BusinessObjects, have 2 overloads on the constructor. The second one takes an IContainer.
How and when is that used?
Reply
Like
0
Replies
Daniel Essin
Daniel Essin
posted 19 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 235,
Visits: 309
In a windows service you get some code like:
private System.ComponentModel.Container components = null;
public Service1()
{
// This call is required by the Windows.Forms Component Designer.
InitializeComponent();
// TODO: Add any initialization after the InitComponent call
}
would there be any point/benefit to passing 'components' to the BO constructor?
Reply
Like
0
StrataFrame Team
S
StrataFrame Team
posted 19 Years Ago
ANSWER
Post Details
Share Post
S
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
Probably... if you drop a business object onto the service within the service designer, then the code generator will automatically call that method... I believe the service will cycle through it's "components" collection and Dispose() of each item when the service shuts down.
Reply
Like
0
Daniel Essin
Daniel Essin
posted 19 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 235,
Visits: 309
I'll try it.
Reply
Like
0
Daniel Essin
Daniel Essin
posted 19 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 235,
Visits: 309
Tried it...
The error says "The object that the business object has been dropped on must implement MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.
How do I do that?
Reply
Like
0
Daniel Essin
Daniel Essin
posted 19 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 235,
Visits: 309
Tried inheriting from MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl -
got the following errors. Need documentation and/or guidance about how to implement this stuff on non-visual components.
TEST_FaxSending.Form1' does not implement interface member 'MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.AddObjectToInitOnLoad(MicroFour.StrataFrame.UI.IInitOnFormLoad)' 'TEST_FaxSending.Form1' does not implement interface member 'MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.AddBusinessObject(MicroFour.StrataFrame.Business.BusinessLayerBase)' 'TEST_FaxSending.Form1' does not implement interface member 'MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.AddObjectToPreInitOnLoad(MicroFour.StrataFrame.UI.IPreInitOnFormLoad)' C:\_devel\release.90000\TEST-FaxSending\TEST-FaxSending\Form1.Designer.cs TEST_FaxSending.Form1' does not implement interface member 'MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl.RemoveBusinessObject(MicroFour.StrataFrame.Business.BusinessLayerBase)' C:\_devel\release.90000\TEST-FaxSending\TEST-FaxSending\Form1.Designer.cs
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
BO Constructor
Daniel Essin
-
19 Years Ago
The second constructor that accepts the IContainer is used when you...
StrataFrame Team
-
19 Years Ago
In a windows service you get some code like:...
Daniel Essin
-
19 Years Ago
Probably... if you drop a business object onto the service within the...
StrataFrame Team
-
19 Years Ago
I'll try it.
Daniel Essin
-
19 Years Ago
Tried it...
The error says "The object that the business...
Daniel Essin
-
19 Years Ago
Tried inheriting from...
Daniel Essin
-
19 Years Ago
The "components" collection is only used for user interface stuff, and...
StrataFrame Team
-
19 Years Ago
I've got this code in my service:
//--...
Daniel Essin
-
19 Years Ago
Hi Daniel Just a SWAG; maybe the connection information is missing?...
Gary C Wynne
-
19 Years Ago
Daniel, More than likely it has to do with the connection. Has any BO...
Trent L. Taylor
-
19 Years Ago
I did:
...
Daniel Essin
-
19 Years Ago
There is the problem. When you create the SqlDataSourceItem, your...
Trent L. Taylor
-
19 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search