Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do I have to re-register business objects?
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Do I have to re-register business objects?
Miscellaneous
Thread ID:
01164618
Message ID:
01164618
Views:
96
I have a business form with business objects registered. The form is then used as an inherited form in several modules. The problem is that it seems the registered business objects methods in the based form are gone. Do I have to re-register business objects again so that the methods can be utilized?

base form:
    public partial class BBDemographicsForm : mmBusinessForm
    {
        // Initialize Business Objects
        public Nations oNations;
        public Regions oRegions;
        public PersonData oPersonData;

        /// <summary>
        /// Constructor
        /// </summary>
        public BBDemographicsForm()
        {
            this.oNations = (Nations)this.RegisterBizObj(new Nations());
            this.oRegions = (Regions)this.RegisterBizObj(new Regions());
            this.oPersonData = (PersonData)this.RegisterBizObj(new PersonData());
            InitializeComponent();
        }
    }
new form instance:
    public partial class UserDemographics : BBDemographicsForm 
    {
        // initialize business objects
        private Users oUsers;
        private Reports oReports;

        // Constructor
        public UserDemographics() 
        {
            // Register business objects
            this.oUsers = (Users)this.RegisterPrimaryBizObj(new Users());
            this.oReports = (Reports)this.RegisterBizObj(new Reports());
            InitializeComponent();
        }
    }
I was expecting that the methods of object properties oNations, oRegions, oPersonData are available in the instantiated form. Am I missing something here?

The idea here is that, the form can be used in several modules through object inheritance in order to minimize recoding and rebuilding the same form. What I will only do is to add some controls specific for a particular module.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Next
Reply
Map
View

Click here to load this message in the networking platform