Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameters to biz forms
Message
De
10/06/2007 12:00:19
 
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Vista
Database:
MS SQL Server
Divers
Thread ID:
01231809
Message ID:
01231843
Vues:
12
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);
>        }
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform