Пример #1
0
 public new void AddCompareField(string sourceFieldToCompare, string sourceFieldToUpdate, Func <DataRow, object, object> sourcePreSaveConversionMethod,
                                 string targetFieldToCompare, string targetFieldToUpdate, Func <DataRow, object, object> targetPreSaveConversionMethod,
                                 CompareAs compareAsType)
 {
     base.AddCompareField(sourceFieldToCompare, sourceFieldToUpdate, sourcePreSaveConversionMethod,
                          targetFieldToCompare, targetFieldToUpdate, targetPreSaveConversionMethod,
                          compareAsType);
 }
Пример #2
0
        protected void AddCompareField(string sourceFieldToCompare, string sourceFieldToUpdate, Func <DataRow, object, object> sourcePreSaveConversionMethod,
                                       string targetFieldToCompare, string targetFieldToUpdate, Func <DataRow, object, object> targetPreSaveConversionMethod,
                                       CompareAs compareAsType)
        {
            AddToSyncSideFieldsList(SyncSide.Source, sourceFieldToUpdate);
            AddToSyncSideFieldsList(SyncSide.Target, targetFieldToUpdate);

            _compareFields.Add(new CompareField(sourceFieldToCompare, sourceFieldToUpdate, sourcePreSaveConversionMethod,
                                                targetFieldToCompare, targetFieldToUpdate, targetPreSaveConversionMethod, compareAsType));
        }
Пример #3
0
        public CompareField(string sourceFieldToCompare, string sourceFieldToUpdate, Func <DataRow, object, object> sourcePreSaveConversionMethod,
                            string targetFieldToCompare, string targetFieldToUpdate, Func <DataRow, object, object> targetPreSaveConversionMethod,
                            CompareAs compareAsType)
        {
            Type = CompareType.ConvertToType;

            CompareAs = compareAsType;

            SetFields(sourceFieldToCompare, sourceFieldToUpdate, targetFieldToCompare, targetFieldToUpdate);

            _sourcePreSaveConversionMethod = sourcePreSaveConversionMethod;

            _targetPreSaveConversionMethod = targetPreSaveConversionMethod;
        }
Пример #4
0
        public void AddCompareField(string sourceField, string targetField, CompareAs compareAsType, Func <DataRow, object, object> preSaveConversionMethod)
        {
            switch (SyncDirection)
            {
            case SyncDirection.SourceToTarget:
                AddCompareField(sourceField, targetField, targetField, compareAsType, preSaveConversionMethod);
                break;

            case SyncDirection.TargetToSource:
                AddCompareField(sourceField, targetField, sourceField, compareAsType, preSaveConversionMethod);
                break;

            default:
                throw new EnumValueNotImplementedException <SyncDirection>(SyncDirection);
            }
        }
Пример #5
0
 protected void AddCompareField(string sourceField, Func <DataRow, object, object> sourcePreSaveConversionMethod,
                                string targetField, Func <DataRow, object, object> targetPreSaveConversionMethod,
                                CompareAs compareAsType)
 {
     AddCompareField(sourceField, sourceField, sourcePreSaveConversionMethod, targetField, targetField, targetPreSaveConversionMethod, compareAsType);
 }
Пример #6
0
 public void AddCompareField(string sourceField, string targetField, CompareAs compareAsType)
 {
     AddCompareField(sourceField, sourceField, null, targetField, targetField, null, compareAsType);
 }
Пример #7
0
 public void AddCompareField(string sourceFieldToCompare, string sourceFieldToUpdate,
                             string targetFieldToCompare, string targetFieldToUpdate,
                             CompareAs compareAsType)
 {
     AddCompareField(sourceFieldToCompare, sourceFieldToUpdate, null, targetFieldToCompare, targetFieldToUpdate, null, compareAsType);
 }
Пример #8
0
 public CompareField(string sourceField, Func <DataRow, object, object> sourcePreSaveConversionMethod,
                     string targetField, Func <DataRow, object, object> targetPreSaveConversionMethod,
                     CompareAs compareAsType)
     : this(sourceField, sourceField, sourcePreSaveConversionMethod, targetField, targetField, targetPreSaveConversionMethod, compareAsType)
 {
 }