Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Audit Info Logic Location Best Practice
Message
 
To
20/10/2004 11:34:38
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00953023
Message ID:
00953203
Views:
24
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform