public UnitIndex(AbstractUnitIndexId abstractUnitIndexId, Period period, SharedUnitIndex sharedUnitIndex, UnitIndexGroup group, bool isInquireable, long calculationLevel = 1, int calculationOrder = 1) { if (period == null) { throw new ArgumentNullException("period"); } period.CheckAssigningUnitIndex(); if (sharedUnitIndex == null) { throw new ArgumentNullException("sharedUnitIndex"); } if (group == null) { throw new ArgumentNullException("group"); } if (!group.PeriodId.Equals(period.Id)) { throw new UnitIndexCompareException("UnitIndex", "UnitIndexGroup", "Period"); } this.calculationLevel = calculationLevel; // must be check periodId id = abstractUnitIndexId; periodId = period.Id; this.group = group; this.sharedUnitIndex = sharedUnitIndex; this.isInquireable = isInquireable; this.calculationOrder = calculationOrder; }
public virtual void Update(UnitIndexGroup group, bool isInquireable, Dictionary <SharedUnitIndexCustomField, string> customFieldValueItems, IPeriodManagerService periodChecker, int calculationOrder, long calculationLevel = 1) { periodChecker.CheckUpdatingUnitIndex(this); if (!group.PeriodId.Equals(periodId)) { throw new UnitIndexCompareException("UnitIndex", "UnitIndexGroup", "Period"); } this.group = group; this.isInquireable = isInquireable; this.calculationLevel = calculationLevel; this.calculationOrder = calculationOrder; UpdateCustomFields(customFieldValueItems); }
public UnitIndexGroup(AbstractUnitIndexId UnitIndexGroupId, Period period, UnitIndexGroup parent, string name, string dictionaryName) { if (UnitIndexGroupId == null) { throw new ArgumentNullException("UnitIndexGroupId"); } if (period == null) { throw new ArgumentNullException("period"); } this.parent = parent; periodId = period.Id; id = UnitIndexGroupId; this.name = name; this.dictionaryName = dictionaryName; }
public virtual void Update(UnitIndexGroup parent, string name, string dictionaryName) { this.name = name; this.dictionaryName = dictionaryName; this.parent = parent; }