Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters to biz forms
Message
From
10/06/2007 12:00:19
 
 
To
09/06/2007 20:01:18
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Vista
Database:
MS SQL Server
Miscellaneous
Thread ID:
01231809
Message ID:
01231843
Views:
13
This message has been marked as the solution to the initial question of the thread.
Hi,
public ProjectEditForm(int projectID) : this()
(base() refers to the parent class constructor)
HTH,
Viv


>I am passing in a parameter to a biz form:
>
>the code in the parameterised constructor fails because the object has not been instantiated yet.
>Now from the help - the bizobj needs to registered before the call to InitialiseComponent()
>
>I can 'make' this work by adding the instantiation to the second constructor - just wondering what the correct way to do this is?
>
>
>        public ProjectEditForm()
>        {
>            this.oProject = (Project)this.RegisterPrimaryBizObj(new Project());
>            InitializeComponent();
>        }
>
>        public ProjectEditForm(int projectID) : base()
>        {
>            this.oProject.GetProjectByID(projectID);
>        }
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform