Esempio n. 1
0
        public virtual void Process([NotNull] TranslateSharepointValueArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            if (string.IsNullOrEmpty(args.TranslatedValue))
            {
                return;
            }

            Field targetField = args.TargetIntegrationItem.Fields[args.TargetFieldName];

            if (targetField == null || (targetField.TypeKey != "datetime" && targetField.TypeKey != "date"))
            {
                return;
            }

            DateTime sourceFieldValue;

            if (DateTime.TryParse(args.TranslatedValue, out sourceFieldValue))
            {
                args.TranslatedValue = DateUtil.ToIsoDate(sourceFieldValue);
            }
        }
        public virtual void Process([NotNull] TranslateSharepointValueArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            args.TranslatedValue = args.SourceSharepointItem[args.SourceFieldName];
        }