public string GetValue(TableStyle style, DataInfo dataInfo) { var value = string.Empty; if (dataInfo.ContainsKey(style.AttributeName)) { var fieldValue = dataInfo.Get <string>(style.AttributeName); if (style.InputType == InputType.CheckBox || style.InputType == InputType.SelectMultiple) { var list = TranslateUtils.JsonDeserialize <List <string> >(fieldValue); if (list != null) { value = string.Join(",", list); } } else if (style.InputType == InputType.Date) { if (!string.IsNullOrEmpty(fieldValue)) { var date = FormUtils.ToDateTime(fieldValue, DateTime.MinValue); if (date != DateTime.MinValue) { value = date.ToString("yyyy-MM-dd"); } } } else if (style.InputType == InputType.DateTime) { if (!string.IsNullOrEmpty(fieldValue)) { var date = FormUtils.ToDateTime(fieldValue, DateTime.MinValue); if (date != DateTime.MinValue) { value = date.ToString("yyyy-MM-dd HH:mm"); } } } else { value = fieldValue; } } return(value); }