public void ApplyChangesToBusinessObject()
{
try
{
object item = this.Control.SelectedItem;
if (item is IBusinessObject)
{
RemoveCurrentBOHandlers();
try
{
SetRelatedBusinessObject((IBusinessObject) item);
}
finally
{
AddCurrentBOHandlers();
}
}
else
{
SetRelatedBusinessObject(null);
}
}
catch (Exception ex)
{
GlobalRegistry.UIExceptionNotifier.Notify(ex, "", "Error ");
}
}
}