Mat,
>This works great for all of my business objects, but I am having a problem with the Login Form. Since the Users business object is not based on Abusiness, it does not see the overrided method. So my application works fine if disable Login, but how do I resolve this issue?
To make a global change that affects all business objects you can instead override the Database Manager's GetConnectionString() method (which is called by your business objects and all Framework-level objects too). Just create a subclass of mmDatabaseManager (for example, mmDatabaseManager) and override the GetConnectionString() method. Afterwards, override the CreateDatabaseManager() method in your project's Factory class and have it instantiate myDatabaseManager. For example:
public class Factory : OakLeaf.MM.Main.Windows.Forms.mmFactoryDesktop
{
public override OakLeaf.MM.Main.Managers.mmDatabaseManager CreateDatabaseManager()
{
return new MyDataBaseManager();
}
}
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com