示例#1
0
        public KeyValuePair <T, T> NextNumberRange(string key)
        {
            IDRange idRange = this.idRangeRepository.GetNextRange(key);

            return(new KeyValuePair <T, T>(
                       TypeConvertor <T> .GetValue(
                           idRange.StartRange.ToString()),
                       TypeConvertor <T> .GetValue(idRange.EndRange.ToString())));
        }
示例#2
0
        private static decimal TypeCastDecimalValue(object value)
        {
            decimal retValue = 0;

            if (null != value && value != DBNull.Value)
            {
                retValue = (typeof(decimal) == value.GetType()) ? (decimal)value : TypeConvertor <decimal> .GetValue(value.ToString());
            }

            return(retValue);
        }