89 lines
3.9 KiB
C#
89 lines
3.9 KiB
C#
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
|
using Sarand.Net.Standard.Base.Bus;
|
|
using Sarand.Net.Standard.Base.Dbas;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Sarand.BusinessMgr.Net.Standard.Base.Core
|
|
{
|
|
//=======================================================================
|
|
public interface ISbmUserContext
|
|
{
|
|
//-------------------------------------------------------------------
|
|
/// <summary>Session Context - Identifies database connections etc.</summary>
|
|
SbmSessionContext SessionContext { get; }
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>User data - account details.</summary>
|
|
public interface IUserData
|
|
{
|
|
/// <summary>User Security Item Id.</summary>
|
|
SysId SecurityItemId { get; }
|
|
/// <summary>User Affiliate Id.</summary>
|
|
SysId AffiliateId { get; }
|
|
/// <summary>User first name.</summary>
|
|
String FirstName { get; }
|
|
/// <summary>User last name.</summary>
|
|
String LastName { get; }
|
|
/// <summary>User display name.</summary>
|
|
String DisplayName { get; }
|
|
/// <summary>User email address.</summary>
|
|
String EmailAddress { get; }
|
|
/// <summary>User managed organisations - Affiliate Id and display name.</summary>
|
|
List<SysIdString> SupervisedOrganisations { get; }
|
|
}
|
|
|
|
/// <summary>Current user account details.</summary>
|
|
IUserData User { get; }
|
|
bool ValidUser { get; }
|
|
|
|
/// <summary>Database upfate info - user session specific properties for database inserts/updates.</summary>
|
|
DbUpdateInfo DbUpdateInfo { get; }
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>Security profile - what the user is allowed to do based on security roles and groups.</summary>
|
|
ISbmSecurityProfile SecurityProfile { get; }
|
|
|
|
//-------------------------------------------------------------------
|
|
/// <summary>User data - logged in account details.</summary>
|
|
public interface IOrganisationData
|
|
{
|
|
/// <summary>Organisation Affiliate Id.</summary>
|
|
SysId AffiliateId { get; }
|
|
/// <summary>Organisation Affiliate Type.</summary>
|
|
Sbm.AffiliateType AffiliateType { get; }
|
|
/// <summary>Organisation display name.</summary>
|
|
String DisplayName { get; }
|
|
/// <summary>Organisation Interface context - to qualify interfaces belonging to the organisation.</summary>
|
|
public String InterfaceContext { get; }
|
|
/// <summary>Organisation 'Internal' Association Id.</summary>
|
|
public SysId AssociationId { get; }
|
|
}
|
|
|
|
/// <summary>Current selected organisation.</summary>
|
|
IOrganisationData Organisation { get; }
|
|
|
|
//-------------------------------------------------------------------
|
|
// Organisation configuration.
|
|
String GetOrganisationOption(Sbm.OrganisationOption option, String context);
|
|
String GetOrganisationOption(String optionName, String context);
|
|
String GetOwnerOption_Value(Sbm.OrgOption_Value eCol);
|
|
String GetOwnerOption_Folder(Sbm.OrgOption_Folder eCol);
|
|
bool GetOwnerOption_AllowOption(Sbm.OrgOption_AllowOption eCol);
|
|
String GetOwnerOption_Caption(Sbm.OrgOption_Caption eCol, String defaultValue);
|
|
bool GetOwnerOption_ShowField(SbmDbDfn.ColumnIdx eCol);
|
|
bool GetOwnerOption_ShowColumn(Sbm.OrgOption_ShowColumn eCol);
|
|
String GetOwnerOption_FieldLabel(SbmDbDfn.ColumnIdx eCol, String defautValue);
|
|
int GetOwnerOption_Minutes(Sbm.OrgOption_Minutes eLimit, int defautValue);
|
|
int GetOwnerOption_UpdateLimit(Sbm.OrgOption_PeriodDays eLimit, int defautValue);
|
|
int GetOwnerOption_UpdateLimit(Sbm.OrgOption_PeriodWeeks eLimit, int defautValue);
|
|
int GetOwnerOption_NumericDecimals(Sbm.OrgOption_NumericDecimals eNumDecimals, int defautValue = 2);
|
|
Sbm.CommodityType GetOwnerOption_CommodityType(Sbm.OrgOption_CommodityType commodityTypeContext);
|
|
SysId GetOwnerOption_StockLocation(Sbm.OrgOption_StockLocation eLoc);
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|