''' <summary>
''' The business object that is used to bind the data to this field
''' </summary>
''' <value></value>
''' <remarks></remarks>
<Category(EDITOR_CATEGORY), _
DefaultValue(CType(Nothing, Object)), _
Description(EDITOR_BUSINESSOBJECT_DESC)> _
Public Property BusinessObject() As BusinessLayerBase Implements IBusinessBindable.BusinessObject
Get
'-- Set the business object to the forms primary business object
If Not _BusinessObjectEvaluated Then
_BusinessObjectEvaluated = True
Try
BusinessBasics.DefaultBusinessObjectToFormPrimary(Me.DesignMode, _BusinessObject, CType(Me.GetService(GetType(System.ComponentModel.Design.IDesignerHost)), System.ComponentModel.Design.IDesignerHost))
Catch ex As Exception
End Try
End If
Return _BusinessObject
End Get
Set(ByVal value As BusinessLayerBase)
'-- If the business object is being removed, then make sure it is no longer bound
If (value Is Nothing) AndAlso (_BusinessObject IsNot Nothing) Then
Me._BusinessObject.RemoveFromListOfBoundControls(Me)
End If
If (Not Me.DesignMode) AndAlso (value IsNot Nothing) Then
value.AddToListOfBoundControls(Me)
End If
_BusinessObject = CType(value, BusinessLayer)
End Set
End Property