78 lines
3.1 KiB
C#
78 lines
3.1 KiB
C#
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
|
using Sarand.BusinessMgr.Net.Standard.Base.Core;
|
|
using Sarand.Net.Standard.Base.Core;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Sarand.BusinessMgr.Net.Standard.Base.Mgr
|
|
{
|
|
//=======================================================================
|
|
// Commodity Manager.
|
|
//=======================================================================
|
|
public abstract partial class SbmCommodityMgr : SbmCoreMgr
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Data members.
|
|
|
|
// Code types.
|
|
private List<Sbm.ApplCodeType> supportedCodeTypes = new List<Sbm.ApplCodeType>()
|
|
{
|
|
Sbm.ApplCodeType.CommodityCategory,
|
|
Sbm.ApplCodeType.CommodityMaterial,
|
|
Sbm.ApplCodeType.CommodityFinish,
|
|
Sbm.ApplCodeType.CommodityRange,
|
|
Sbm.ApplCodeType.CommodityColour,
|
|
Sbm.ApplCodeType.CommoditySource,
|
|
Sbm.ApplCodeType.CommoditySupplyMethod,
|
|
Sbm.ApplCodeType.CommodityHandling,
|
|
Sbm.ApplCodeType.CommodityDelivery,
|
|
Sbm.ApplCodeType.CommodityPromotion,
|
|
Sbm.ApplCodeType.Department
|
|
};
|
|
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
protected SbmCommodityMgr(SbmInternals internals) :
|
|
base(internals)
|
|
{
|
|
}
|
|
protected SbmCommodityMgr(ISbmUserOrganisationContext userContext) :
|
|
base(userContext)
|
|
{
|
|
}
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (disposing)
|
|
{
|
|
}
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Properties.
|
|
public abstract bool ContainerDatabaseIsValid { get; }
|
|
public abstract bool PortfolioDatabaseIsValid { get; }
|
|
// Code lists.
|
|
public List<TypeCodeDesc> CommodityTypes { get { return GetSystemCodes(Sbm.ApplicationCode.CommodityType); } }
|
|
public List<TypeCodeDesc> ContainerCategories { get { return GetSystemCodes(Sbm.ApplicationCode.ContainerCategory); } }
|
|
public List<TypeCodeDesc> ContainerTypes { get { return GetSystemCodes(Sbm.ApplicationCode.ContainerType); } }
|
|
public List<TypeCodeDesc> PortfolioItemTypes { get { return GetSystemCodes(Sbm.ApplicationCode.PortfolioItemType); } }
|
|
public List<TypeCodeDesc> CommodityStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.CommodityStatusCat); } }
|
|
public List<TypeCodeDesc> TransactionTypes { get { return GetSystemCodes(Sbm.ApplicationCode.TransactionType); } }
|
|
public List<TypeCodeDesc> TransactionStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.TransactionStatusCat); } }
|
|
public List<TypeCodeDesc> RequirementStatusCats { get { return GetSystemCodes(Sbm.ApplicationCode.RequirementStatusCat); } }
|
|
// Code types.
|
|
public override List<Sbm.ApplCodeType> SupportedCodeTypes { get { return new List<Sbm.ApplCodeType>(supportedCodeTypes); } }
|
|
|
|
//-------------------------------------------------------------------
|
|
// Utilities.
|
|
public String GetTransTypeDesc(Sbm.TransactionType transactionType)
|
|
{
|
|
return TransactionTypes.GetDescForType(transactionType, "Transaction");
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|