114 lines
4.1 KiB
C#
114 lines
4.1 KiB
C#
using Sarand.Net.Standard.Base.CodeTypes;
|
|
using Sarand.Net.Standard.Base.Dbas;
|
|
using Sarand.Net.Standard.Base.Diary;
|
|
using Sarand.Net.Standard.Base.Interfaces;
|
|
using Sarand.Net.Standard.Base.ItemData;
|
|
using Sarand.Net.Standard.Base.ItemDocs;
|
|
using Sarand.Net.Standard.Base.ItemOptions;
|
|
using Sarand.Net.Standard.Base.ReferenceData;
|
|
using Sarand.Net.Standard.Base.Security;
|
|
using Sarand.Net.Standard.Base.UpdateLog;
|
|
|
|
namespace Sarand.BusinessMgr.Net.Standard.Base.App
|
|
{
|
|
//=======================================================================
|
|
public static class SbmGlobals
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// System.
|
|
public static SbmSystem System { get; set; } = null;
|
|
|
|
//-------------------------------------------------------------------
|
|
// Application.
|
|
public static SbmApplication Application { get; set; } = null;
|
|
|
|
//-------------------------------------------------------------------
|
|
// Database.
|
|
public static ISacsDatabase GetDatabase(SbmSessionContext sessionContext)
|
|
{
|
|
return Application != null ? Application.GetDatabase(sessionContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Configuration console.
|
|
public static SbmConfigConsole GetConfigConsole(SbmSessionContext sessionContext)
|
|
{
|
|
return Application != null ? Application.GetConfigConsole(sessionContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Diary.
|
|
public static SaDiaryConsole GetDiaryConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetDiaryConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Security console.
|
|
public static SaSecurityConsole GetSecurityConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetSecurityConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Code Type console.
|
|
public static SaCodeTypeConsole GetCodeTypeConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetCodeTypeConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Reference Data console.
|
|
public static SaReferenceDataConsole GetReferenceDataConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetReferenceDataConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Item Data console.
|
|
public static SaItemDataConsole GetItemDataConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetItemDataConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Item Doc console.
|
|
public static SaItemDocConsole GetItemDocConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetItemDocConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Item Option console.
|
|
public static SaItemOptionConsole GetItemOptionConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetItemOptionConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Interface console.
|
|
public static SaInterfaceConsole GetInterfaceConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetInterfaceConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Update Log console.
|
|
public static SaUpdateLogConsole GetUpdateLogConsole(SbmUserContext userContext)
|
|
{
|
|
return Application != null ? Application.GetUpdateLogConsole(userContext) : null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Clear globals.
|
|
public static void Clear()
|
|
{
|
|
System = null;
|
|
Application = null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|