Hi all. What I am trying to do is this: I drop a BO component (let's say CustomerBO) on the form and bind it in different controls. How can change the instance of this BO? I need to implement a method like this:
private CustomerBO mCustomer;
public void ChangeCustomer(CustomerBO newCustomer)
{
mCustomer = newCustomer;
}
Where mCustomer is the object which is dropped on the form and bound to all controls, and newCustomer is an object created somewhere outside the form.
After the above assignment, the controls are still bound to the previous instance, and the Save method of the form still saves the original instance. Is there a way of "centrally" changing the instance of the BO (Something like the DataSource property of a BindingSource?)? Do I have to loop all controls and assign it manually?
Thanks in advance.