Thanks for the input.
My error was at the creation of the Base BO class, I did not used the SF BO Class, just added a regular class and then manually added all the code which messed everything else.
I re-created it with the proper steps and now it is working fine. This is one of those days where you miss simple things
Now I am confused. I copied the Constructors Overloads and get more compiler errors.
Can you please list the steps to create a base BO class?
Aren't you missing the Constructor Overloads in your base class?
#Region " Constructors "
''' <summary> ''' Initializes a new instance of the ApplicationBaseBusinessClass class. ''' </summary> ''' <remarks></remarks> <System.Diagnostics.DebuggerNonUserCodeAttribute()> _ Public Sub New() MyBase.New() 'This call is required by the Component Designer. Me.InitializeComponent()
'-- Add the necessary handlers Me.AddHandlers() End Sub
''' <summary> ''' Initializes a new instance of the _BaseBO class. ''' </summary> ''' <param name="Container">The IContainer to which this object will be added.</param> ''' <remarks></remarks> <System.Diagnostics.DebuggerNonUserCodeAttribute()> _ Public Sub New(ByVal Container As System.ComponentModel.IContainer) MyBase.New() 'This call adds the component to the given container. Container.Add(Me) 'This call is required by the Component Designer. Me.InitializeComponent() '-- Add the necessary handlers Me.AddHandlers() End Sub
''' <summary> ''' Initializes a new instance of the ApplicationBaseBusinessClass class. ''' </summary> ''' <param name="info">The SerializationInfo for the object.</param> ''' <param name="context">The StreamingContext for the source stream.</param> ''' <remarks></remarks> Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext) MyBase.New(info, context) 'This call is required by the Component Designer. Me.InitializeComponent() '-- Add the necessary handlers Me.AddHandlers() End Sub
''' <summary> ''' Adds the necessary handlers for the ApplicationBaseBusinessClass class. ''' </summary> ''' <remarks></remarks> Private Sub AddHandlers() AddHandler Me.CheckRulesOnCurrentRow, AddressOf ApplicationBaseBusinessClass_CheckRulesOnCurrentRow AddHandler Me.SetDefaultValues, AddressOf ApplicationBaseBusinessClass_SetDefaultValues End Sub
#End Region
And, by the way, you might want you event handlers too:
#Region " Event Handlers "
''' <summary> ''' Checks the business rules on the current row ''' </summary> ''' <param name="e"></param> ''' <remarks></remarks> Private Sub ApplicationBaseBusinessClass_CheckRulesOnCurrentRow(ByVal e As MicroFour.StrataFrame.Business.CheckRulesEventArgs)
End Sub
''' <summary> ''' Sets the default values for a new row ''' </summary> ''' <remarks></remarks> Private Sub ApplicationBaseBusinessClass_SetDefaultValues()
Hope it helps.
I created a a base BO class named ApplicationBaseBusinessClass.vb with the following code:
Imports
Public
#Region
#End
<Category(EDITOR_CATEGORY_CRUD), _
DefaultValue(
_PrimaryKeyIsAutoIncremented = value
_PrimaryKeyIsUpdatable = value
loFieldPropDescriptor.SetValue(
End
I then changed the Ingeritance in my BizCustomer.vb class from:
To:
Now I am getting a compiler error in my BizCustomer.vb "Too many arguments to Public Sub New()", this is the code created by the BOM that generates the error:
Here is the code for the BO bizCustomer.vb
<Serializable()> _
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Container.Add(
What am I doing wrong here?
P.S.
Sorry for the long post.