public override object Evaluate(PXCache cache, object item, Dictionary<Type, object> pars) { object val = base.Evaluate(cache, item, pars); if (val == null) { return null; } DateTime? recoveryEndDate = (DateTime?)val; int? bookID = (int?)pars[typeof(BookID)]; return FABookPeriodIDAttribute.FormatPeriod(FABookPeriodIDAttribute.PeriodFromDate(cache.Graph, recoveryEndDate, bookID, false)); }
public override void Verify(PXCache cache, object item, List <object> pars, ref bool?result, ref object value) { base.Verify(cache, item, pars, ref result, ref value); if (value == null) { return; } DateTime?recoveryEndDate = (DateTime?)value; int?bookID = (int?)Calculate <BookID>(cache, item); string recoveryEndPeriod = FABookPeriodIDAttribute.PeriodFromDate(cache.Graph, recoveryEndDate, bookID); value = FABookPeriodIDAttribute.FormatPeriod(recoveryEndPeriod); }