49 lines
2.2 KiB
C#
49 lines
2.2 KiB
C#
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
|
using Sarand.BusinessMgr.Net.Standard.Base.Mgr;
|
|
using Sarand.Net.Standard.Base.Bus;
|
|
using Sarand.Net.Standard.Base.ItemOptions;
|
|
using Sarand.Net.Standard.Base.UpdateLog;
|
|
using Sarand.Net.Standard.Dbas.Base;
|
|
using Sarand.Net.Standard.Dbas.ItemOptions;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.Consoles
|
|
{
|
|
//=======================================================================
|
|
public abstract class SbmItemOptionConsole_Dbas : SaItemOptionConsole_Dbas
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Data members.
|
|
private SbmAccountMgr accountMgr = null;
|
|
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
protected SbmItemOptionConsole_Dbas(SacsDatabase database) : base(database)
|
|
{
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Properties.
|
|
public SbmUserContext UserContext { get; set; }
|
|
public SbmSessionContext SessionContext { get { return UserContext.SessionContext; } }
|
|
public override short ItemOptionDataType { get { return (short)Sbm.ItemType.ItemOption; } }
|
|
public override SaUpdateLogConsole UpdateLogConsole { get { return SbmGlobals.Application.GetUpdateLogConsole(UserContext); } }
|
|
private SbmAccountMgr AccountMgr { get { if (accountMgr == null) accountMgr = SbmGlobals.System.CreateAccountMgr(UserContext); return accountMgr; } }
|
|
|
|
//-------------------------------------------------------------------
|
|
// I t e m O p t i o n D e f i n i t i o n s
|
|
//-------------------------------------------------------------------
|
|
public override List<SaItemOptionDfn> GetItemOptionDfnsForItem(ItemId itemId)
|
|
{
|
|
if (itemId.Type == (int)Sbm.ItemType.Association)
|
|
return AccountMgr.GetOrganisationItemOptionDfns(itemId.Id);
|
|
if (itemId.Type == (int)Sbm.ItemType.Interface)
|
|
return SbmGlobals.Application.GetInterfaceConsole(UserContext).GetInterfaceItemOptionDfns(itemId.Id);
|
|
return new List<SaItemOptionDfn>();
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|