Joe,
>I have the need to capture user audit information as follows:
> Public Function GetCurrentUser() As String
> Dim CurrentUser As String
> CurrentUser = SystemInformation.UserDomainName
> Return CurrentUser
> End Function
>
> Public Function GetCurrentComputer() As String
> Dim CurrentComputer As String
> CurrentComputer = SystemInformation.ComputerName
> Return CurrentComputer
> End Function
>
>The SystemInformation namespace is found within System.Windows.Forms and OakLeaf.MM.Main.Windows.Forms.
>
>Where is a best practice location to place this logic common to almost all business objects (encapsulation)?
>How could I reference and use this information in my business objects (e.g. default values)?
If you need this information in the business objects, you can add corresponding properties to your application-specific ABusinessObject (located in Business.cs or Business.vb) that wrap the code you have listed above. These properties would then be available in all subclasses.
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