StrataFrame Security Documentation Send comments on this topic.
Retrieving Global Preferences from the Database

Glossary Item Box

Retrieving Global Preferences

Global preferences are stored within the database in the SFSPreferences table; however, all global preferences are referenced through shared (static) properties on the SecurityBasics class. The MicroFour.StrataFrame.Security.BusinessObjects.SFSPreferencesBO.RetrieveSecurityPreferences() method is provided to retrieve all of the global security preferences from the SFSPreferences table and store them in the appropriate properties on the SecurityBasics class. For more information on the global preferences, click here.

The RetrieveSecurityPreferences() method should be called after the SecurityDataSourceKey property is set to ensure that the SFSPreferencesBO object can access the SFSPreferences table. The RetrieveSecurityPreferences() method is generally called within the InitApplication() method of the AppMain.vb (Program.cs) file. The following sample shows an example of calling the RetrieveSecurityPreferences() method.

Sample - RetrieveSecurityPreferences() [Visual Basic]
Imports MicroFour.StrataFrame.Security.BusinessObjects
...
Private Shared Sub InitApplication(ByVal e As InitializingApplicationEventArgs)
	'-- Retrieve the security preferences
	SFSPreferencesBO.RetrieveSecurityPreferences()
End Sub

Sample - RetrieveSecurityPreferences() [C#]
using MicroFour.StrataFrame.Security.BusinessObjects;
...
private static void InitApplication(InitializingApplicationEventArgs  e)
{
	//-- Retrieve the security preferences
	SFSPreferencesBO.RetrieveSecurityPreferences();
}