using OakLeaf.MM.Main.Business; using OakLeaf.MM.NorthwindSample.Main.Business;2. As you normally would, create a field that hold a reference to the business object (this is more for the sake of convenience than an actual requirement). For example:
public class MainForm : mmMainAppForm { public Orders oOrder;3. In the form's constructor before the call to InitializeComponent, instantiate the business object, but don't use the usual "RegisterBizObj" method since the form doesn't have it...just use the "new" keyword. For example:
public MainForm() { this.oOrder = new Orders(); // // Required for Windows Form Designer support // InitializeComponent();3. In the form's constructor after the call to InitializeComponent, add code that manually registers the user interface control with the business object's StateChange method. For example:
public MainForm() { this.oOrder = new Orders(); // // Required for Windows Form Designer support // InitializeComponent(); this.oOrder.StateChange += new mmBusinessStateChangeDelegate(this.mmTextBox1.StateChangeHandler);4. As you normally would, add code to the form that calls a business object method that retrieves data from the back end. This code must be executed AFTER the instantiation of the business object and registration of the user interface controls. For example:
this.oOrder.GetOrderByOrderID(10249);
5. Now, go back to the form in design mode, and manually set the BindingSource and BindingSourceMember properties of your textbox (the BindingSource dialog won't show any business objects, but the BindingSourceMember dialog will work).