Hi Ben,I'm not sure what you mean by "If you have a base class for your business objects that contains some extra code that is common to all of your business objects, you need to make sure you don't build a partial class for it (it should always have a red-x on it in the BOMapper.." and "..if you have a base class for your business objects, make sure it's not configured."
Certainly our only partial class is the standard Designer code but we don't process anything through the BO Mapper that causes a red cross.
Our structure is as follows:
Our BO template generates the class, e.g.
Imports System.Data
Imports System.Data.SqlClient
Imports System.Runtime.Serialization
<Serializable()> _
Public Class boSPCNew
Inherits UtilBOBase.boBase
This class has the Constructors and handles "SetDefaultValues" that we extract directly from the database. It inherits boBase that is all our own code and is common to all BO's:
Option Explicit On
Option Strict On
Imports System.Data
Imports System.Data.SqlClient
Imports System.Runtime.Serialization
Imports System.Diagnostics
Imports MicroFour.StrataFrame.Messaging
Imports UtilRunTimeEnvironment
Imports UtilEnums
Imports UtilLogging
Imports UtilLocalisation
Public Class boBase
Inherits MicroFour.StrataFrame.Business.BusinessLayer
Obviously MicroFour.StrataFrame.Business.BusinessLayer is unchanged.
So, we use our template to generate the BO and process that through the Business Object Mapper to generate the Designer code. The Designer code is standard StrataFrame:
Option Strict On
Option Explicit On
Imports MicroFour.StrataFrame.Business
Imports MicroFour.StrataFrame.Security
Imports MicroFour.StrataFrame.UI.Windows.Forms
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.IO
Partial Public Class boSPCNew
In terms of versions I think we a right there - everything is 1.6 in the GAC, \Program Files\Common Files\MicroFour\StrataFrame and \Program Files\MicroFour\StrataFrame\Assemblies although there are 1.5 DLL's in the sources directories.
In this case, the BO that works and the one that doesn't, are both in the same Project so I presume that rules out any potential versioning problem.
Ben, thanks for taking the time with this - I realise this isn't a really a StrataFrame issue.
Cheers, Peter