Пример #1
0
        public string GetValueAsString(object src)
        {
            object value = null;

            value = SrcProperty.GetValue(src);

            switch (Type)
            {
            case DisplayValueType.DecimalList:
                return(string.Join(" ", ((List <decimal>)value).Select(d => string.Format("{0:N}", d))));

            case DisplayValueType.Decimal:
                return(string.Format("{0:N}", value));

            case DisplayValueType.PickList_Multi:
            default:
                return(value?.ToString());
            }
        }
Пример #2
0
 public T GetValue <T>(object src) => SrcProperty.GetValue <T>(src);
Пример #3
0
 public int GetMaxIndex(object obj) => Type == DisplayValueType.DecimalList ? (((SrcProperty.GetValue <List <decimal> >(obj)))?.Count() ?? 0) - 1 : 0;