Exemple #1
0
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return(null);
            }
            string csv = value.ToString();

            if (string.IsNullOrEmpty(csv))
            {
                return(csv);
            }
            if (csv[0] == '(')
            {
                csv = csv.Substring(1);
            }
            if (csv[csv.Length - 1] == ')')
            {
                csv = csv.Substring(0, csv.Length - 1);
            }
            string[] strs = csv.Split(',');
            for (int i = 0; i < strs.Length; i++)
            {
                strs[i] = Db2SourceContext.DequoteIdentifier(strs[i].Trim());
            }
            return(strs);
        }