public CalcFieldModel(CompareModel model)
 {
     this.Model    = model;
     ColumnCompare = model.ColumnCompare;
     Source        = model.Source;
     Target        = model.Target;
     ErrorMessages = model.ErrorMessages;
 }
Exemple #2
0
        /// <summary>
        /// Compares the columns.
        /// </summary>
        /// <param name="table">The table.</param>
        /// <param name="ColumnCompare">The column compare.</param>
        /// <param name="token">The token.</param>
        public static void CompareColumns(CompareRows comparer, DataTable table, CompareModel model, CancellationTokenSource token)
        {
            var items = model.ColumnCompare.Where(w => w.IsPair() && w.Selected);

            foreach (var item in items)
            {
                if (table.Columns.Contains(item.LeftKey) && table.Columns.Contains(item.RightKey))
                {
                    var currentRow = model.ColumnCompare.IndexOf(item);
                    var results    = comparer.CompareColumns(currentRow, table, item, model, token);
                }
            }
        }
Exemple #3
0
        /// <summary>
        /// Compares the columns.
        /// </summary>
        /// <param name="comparer">The comparer.</param>
        /// <param name="table">The table.</param>
        /// <param name="model">The model.</param>
        /// <param name="token">The token.</param>
        public static void CompareColumns(CompareExecuter comparer, DataTable table, CompareModel model, CancellationTokenSource token)
        {
            comparer.InitalizeModel(table, model, token);

            var items = model.ColumnCompare.Where(w => w.IsPair() && w.Selected);

            foreach (var item in items)
            {
                if (item.LeftKey == null || item.RightKey == null)
                {
                    continue;
                }

                if (table.Columns.Contains(item.LeftKey) && table.Columns.Contains(item.RightKey))
                {
                    var currentRow = model.ColumnCompare.IndexOf(item);
                    comparer.CompareColumns(currentRow, item);
                }
            }
        }
 public CalcFieldModel(CompareModel model, int chunkSize) : this(model)
 {
     ChunkSize = chunkSize;
 }