コード例 #1
0
        private string MapPropertyValueIdToNames(JArray jArray)
        {
            foreach (var item in jArray.Cast <JObject>())
            {
                var fieldSets = GetArray(item, "fieldSets");
                foreach (var fieldSet in fieldSets.Cast <JObject>())
                {
                    var containers = GetArray(fieldSet, "containers");
                    foreach (var container in containers.Cast <JObject>())
                    {
                        var fields = GetArray(container, "fields");
                        foreach (var field in fields.Cast <JObject>())
                        {
                            var attempt = GetObjectValue <Guid>(field, "prevalueSourceId");
                            if (attempt && attempt.Result != Guid.Empty)
                            {
                                var prevalue = syncFormService.GetPreValueSource(attempt.Result);
                                if (prevalue != null)
                                {
                                    field["prevalueSourceId"] = prevalue.Name;
                                }
                            }
                        }
                    }
                }
            }

            return(jArray.ToString(Formatting.Indented));
        }
コード例 #2
0
 protected override FieldPreValueSource FindItem(Guid key)
 => SyncFormService.GetPreValueSource(key);
コード例 #3
0
 protected override FieldPreValueSource GetFromService(Guid key)
 => syncFormService.GetPreValueSource(key);