| | |
| | | } |
| | | } |
| | | |
| | | public static string GetValueDescription(int id, long value) |
| | | //largeNumFormat 大数值格式:0 默认原数值 1 按万或者(K)显示 2 按6位数以上(才转换大数值,根据情况可统一调整) |
| | | public static string GetValueDescription(int id, long value, int largeNumFormat = 1) |
| | | { |
| | | return GetValueDescription(id, value, true); |
| | | return GetValueDescriptionEx(id, value, largeNumFormat); |
| | | } |
| | | |
| | | public static string GetValueDescription(int id, long value, bool largeValue) |
| | | public static string GetValueDescriptionEx(int id, long value, int largeNumFormat = 1) |
| | | { |
| | | var config = Get(id); |
| | | if (config == null) |
| | |
| | | } |
| | | |
| | | var label = string.Empty; |
| | | if (largeValue) |
| | | if (largeNumFormat == 1) |
| | | { |
| | | label = UIHelper.ReplaceLargeNum(result); |
| | | } |
| | | else if (largeNumFormat == 2) |
| | | { |
| | | if (result > 999999) |
| | | { |
| | | label = UIHelper.ReplaceLargeNum(result, 6); |
| | | } |
| | | else |
| | | { |
| | | label = result.ToString(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | label = result.ToString(); |