61 lines
2.3 KiB
C#
61 lines
2.3 KiB
C#
using Sarand.BusinessMgr.Net.Standard.Base.App;
|
|
using Sarand.BusinessMgr.Net.Standard.Base.Bus;
|
|
using Sarand.BusinessMgr.Net.Standard.Base.UpdateLog;
|
|
using Sarand.Net.Standard.Base.App;
|
|
using Sarand.Net.Standard.Base.Bus;
|
|
|
|
namespace Sarand.BusinessMgr.Net.Standard.Dbas.UpdateLog
|
|
{
|
|
//=======================================================================
|
|
public class SbmUpdateLogItemMonitor_PriceSet : SbmUpdateLogItemMonitor
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Configuration.
|
|
public new class Config : SbmUpdateLogItemMonitor.Config
|
|
{
|
|
public Config(SbmInternals internals, SysId itemId) :
|
|
base(internals)
|
|
{
|
|
ItemType = (short)Sbm.ItemType.PriceSet;
|
|
ItemId = itemId;
|
|
}
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Data members.
|
|
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
public SbmUpdateLogItemMonitor_PriceSet(SbmInternals internals, SbmPriceSet priceSet) :
|
|
base(new Config(internals, priceSet.Id))
|
|
{
|
|
RecordAttrValues(priceSet, false);
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Record attribute values.
|
|
public bool RecordUpdatedValues(SbmPriceSet priceSet)
|
|
{
|
|
return RecordAttrValues(priceSet, true);
|
|
}
|
|
private bool RecordAttrValues(SbmPriceSet priceSet, bool newValues)
|
|
{
|
|
ClearErrorState();
|
|
// PriceSet Properties - record values that may require logging.
|
|
RecordAttrValue(SbmDbDfn.ColumnIdx.SaPriceSet_AffIdOwner, SysId.ToInt(priceSet.AffiliateIdOwner), newValues);
|
|
RecordAttrValue(SbmDbDfn.ColumnIdx.SaPriceSet_Ref, priceSet.Reference, newValues);
|
|
RecordAttrValue(SbmDbDfn.ColumnIdx.SaPriceSet_Type, priceSet.PriceType.ToString(), newValues);
|
|
RecordAttrValue(SbmDbDfn.ColumnIdx.SaPriceSet_Name, priceSet.Name, newValues);
|
|
RecordAttrValue(SbmDbDfn.ColumnIdx.SaPriceSet_CurrencyId, SysId.ToInt(priceSet.CurrencyId), newValues);
|
|
// Common properties.
|
|
RecordAttrValue(SbmDbDfn.ColumnIdx.SaPriceSet_Notes, priceSet.Notes, newValues);
|
|
RecordAttrValue(SbmDbDfn.ColumnIdx.SaPriceSet_Status, SacsSystem.GetStatusCode(priceSet.Status), newValues);
|
|
|
|
return !HasErrorState();
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|