94 lines
4.3 KiB
C#
94 lines
4.3 KiB
C#
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
|
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
|
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
|
using Sarand.Net.Standard.Base.Bus;
|
|
using Sarand.Net.Standard.Base.Security;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Sarand.BusinessMgr.Net.Core.Web.App
|
|
{
|
|
//=======================================================================
|
|
public abstract class SbmSessionData_Web : SbmSessionData, ISbmUserContext
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Protected construction - for JSON deserialisation.
|
|
protected SbmSessionData_Web(long sessionIdx, int itemIdx, SbmSessionContext sessionContext) :
|
|
base(sessionIdx, itemIdx, sessionContext)
|
|
{
|
|
securityProfile = new SbmSecurityProfile(this, false);
|
|
}
|
|
// Protected construction.
|
|
protected SbmSessionData_Web(SbmSessionContext sessionContext, SaSecurityItem securityItemUser, SbmAffiliate affiliateUser, List<SysIdString> supervisedOrganisations, SbmAssociation associationOrganisation, SbmAffiliate affiliateOrganisation) :
|
|
base(sessionContext, securityItemUser, affiliateUser, supervisedOrganisations, associationOrganisation, affiliateOrganisation)
|
|
{
|
|
securityProfile = new SbmSecurityProfile(this, false);
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// User Context.
|
|
public SbmUserContext UserContext
|
|
{
|
|
get
|
|
{
|
|
SbmUserContext userContext = new SbmUserContext_Web(SessionContext);
|
|
return userContext;
|
|
}
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Security Profile.
|
|
private readonly SbmSecurityProfile securityProfile;
|
|
public ISbmSecurityProfile SecurityProfile { get { return securityProfile; } }
|
|
|
|
|
|
//-------------------------------------------------------------------
|
|
// ToDo: Organisation configuration.
|
|
public String GetOrganisationOption(Sbm.OrganisationOption option, String context) { return null; }
|
|
public String GetOrganisationOption(String optionName, String context) { return null; }
|
|
public String GetOwnerOption_Value(Sbm.OrgOption_Value eCol) { return null; }
|
|
public String GetOwnerOption_Folder(Sbm.OrgOption_Folder eCol) { return null; }
|
|
public bool GetOwnerOption_AllowOption(Sbm.OrgOption_AllowOption eCol) { return false; }
|
|
public String GetOwnerOption_Caption(Sbm.OrgOption_Caption eCol, String defautValue) { return defautValue; }
|
|
public bool GetOwnerOption_ShowField(SbmDbDfn.ColumnIdx eCol) { return false; }
|
|
public bool GetOwnerOption_ShowColumn(Sbm.OrgOption_ShowColumn eCol) { return false; }
|
|
public String GetOwnerOption_FieldLabel(SbmDbDfn.ColumnIdx eCol, String defautValue) { return defautValue; }
|
|
public int GetOwnerOption_Minutes(Sbm.OrgOption_Minutes eLimit, int defautValue) { return defautValue; }
|
|
public int GetOwnerOption_UpdateLimit(Sbm.OrgOption_PeriodDays eLimit, int defautValue) { return defautValue; }
|
|
public int GetOwnerOption_UpdateLimit(Sbm.OrgOption_PeriodWeeks eLimit, int defautValue) { return defautValue; }
|
|
public int GetOwnerOption_NumericDecimals(Sbm.OrgOption_NumericDecimals eNumDecimals, int defautValue = 2) { return defautValue; }
|
|
public Sbm.CommodityType GetOwnerOption_CommodityType(Sbm.OrgOption_CommodityType commodityTypeContext) { return Sbm.CommodityType.Unknown; }
|
|
public SysId GetOwnerOption_StockLocation(Sbm.OrgOption_StockLocation eLoc) { return null; }
|
|
|
|
//-------------------------------------------------------------------
|
|
// Contacts.
|
|
public class ContactsData
|
|
{
|
|
public class FilterData
|
|
{
|
|
public uint PageNo { get; set; } = 1;
|
|
public ushort PageLength { get; set; } = 16;
|
|
}
|
|
public FilterData Filter { get; } = new FilterData();
|
|
}
|
|
public ContactsData Contacts { get; } = new ContactsData();
|
|
|
|
//-------------------------------------------------------------------
|
|
// Commodities.
|
|
public class CommoditiesData
|
|
{
|
|
public class FilterData
|
|
{
|
|
public uint PageNo { get; set; } = 1;
|
|
public ushort PageLength { get; set; } = 16;
|
|
}
|
|
public FilterData Filter { get; } = new FilterData();
|
|
}
|
|
public CommoditiesData Commodities { get; } = new CommoditiesData();
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|