Greg McGuffey (02/26/2009)
Does that makes sense? Yes, thanks. I did make sense and I got it done in no time, here is the resulting code:
Imports
CardTrackingSystem.BusinessPublic
MustInherit Class AppSettings Private Sub New() End Sub '-- Set the Company Setting Object Private Shared _company As bizCompany Public Shared Property Company() As bizCompany Get Return _company End Get Set(ByVal value As bizCompany) Dim loBO As New bizCompany loBO.FillAllRecords()
_company = loBO
End Set End Property '-- Set the Workstation Setting Object Private Shared _workstation As bizWorkstation Public Shared Property Workstation() As bizWorkstation Get Return _workstation End Get Set(ByVal value As bizWorkstation) Dim loBO As New bizWorkstation loBO.FillAllRecords()
_workstation = loBO
End Set End PropertyEnd
Class
Now I can reference the properties anywhere like this:
AppSettings.Company.CompanyName =
String.EmptyAppSettings.Workstation.WorkstationName =
String.Empty
Of course I have not tried this on reports yet, but there should be no problem