Beispiel #1
0
        public string DisplayValue()
        {
            StringBuilder valueContent = new StringBuilder();

            if ((Name == "Checkbox" || Name == "Radio" || Name == "Dropdown") && FieldOptions != null)
            {
                valueContent.Append(string.Join("\r\n", FieldOptions.Where(m => m.Selected ?? false).Select(m => m.DisplayText)));
            }
            else if (Name == "Address" && Value.IsNotNullAndWhiteSpace())
            {
                valueContent.Append(string.Join(" ", JsonConvert.DeserializeObject <string[]>(Value)));
            }
            else
            {
                valueContent.Append(Value);
            }
            return(valueContent.ToString());
        }