74 lines
3.0 KiB
C#
74 lines
3.0 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(ISbmUserContext_Core 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 GetCodesOfType(Sbm.SystemCode.CommodityType); } }
|
|
public List<TypeCodeDesc> ContainerCategories { get { return GetCodesOfType(Sbm.SystemCode.ContainerCategory); } }
|
|
public List<TypeCodeDesc> ContainerTypes { get { return GetCodesOfType(Sbm.SystemCode.ContainerType); } }
|
|
public List<TypeCodeDesc> PortfolioItemTypes { get { return GetCodesOfType(Sbm.SystemCode.PortfolioItemType); } }
|
|
public List<TypeCodeDesc> CommodityStatusCats { get { return GetCodesOfType(Sbm.SystemCode.CommodityStatusCat); } }
|
|
public List<TypeCodeDesc> TransactionTypes { get { return GetCodesOfType(Sbm.SystemCode.TransactionType); } }
|
|
public List<TypeCodeDesc> TransactionStatusCats { get { return GetCodesOfType(Sbm.SystemCode.TransactionStatusCat); } }
|
|
public List<TypeCodeDesc> RequirementStatusCats { get { return GetCodesOfType(Sbm.SystemCode.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");
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|