public static object GetValuePendingOrCurrent(PXCache cache, Type sourceType, object row) { object value = cache.GetValuePending(row, sourceType.Name); if (value != PXCache.NotSetValue) { return(value); } return(BqlHelper.GetOperandValue(cache, row ?? cache.Current, sourceType)); }
public static object GetCurrentValue(PXGraph graph, Type sourceType, object row = null) { if (typeof(IBqlField).IsAssignableFrom(sourceType)) { Type cacheType = BqlCommand.GetItemType(sourceType); PXCache cache = graph.Caches[cacheType]; return(BqlHelper.GetOperandValue(cache, row ?? cache.Current, sourceType)); } throw new NotImplementedException(); }
public static object GetValuePendingOrRow <TField>(PXCache cache, object row) where TField : IBqlField { object value = cache.GetValuePending(row, typeof(TField).Name); if (value != PXCache.NotSetValue) { cache.RaiseFieldUpdating <TField>(row, ref value); return(value); } return(BqlHelper.GetOperandValue(cache, row, typeof(TField))); }