示例#1
0
        internal void Add(string key, DataColumn c, DataRow r1, DataRow r2, DataRow[] duplicatedRows)
        {
            ReconcileItem item = null;

            lock (dictKeyResult)
            {
                if (dictKeyResult.ContainsKey(key) == false)
                {
                    dictKeyResult.Add(key, new ReconcileItem(r1, r2, key));
                }
            }
            item = dictKeyResult[key];
            if (r1 != null && r2 != null && c != null)
            {
                lock (item)
                {
                    item.Add(c, r1[c.ColumnName], r2[c.ColumnName]);
                }
            }
            else if (duplicatedRows != null)
            {
                if (duplicatedRows.Contains(r1))
                {
                    lock (item)
                    {
                        item.Add(c, null, r2[0]);
                    }
                }
                else if (duplicatedRows.Contains(r2))
                {
                    lock (item)
                        item.Add(c, r1[0], null);
                }
            }
        }
示例#2
0
 public void Export(string filename)
 {
     using (System.IO.StreamWriter writer = new StreamWriter(filename, false, Encoding.GetEncoding("Shift_JIS")))
     {
         writer.WriteLine("KEY,Item,\"" + Table1ID + "\",\"" + Table2ID + "\"");
         foreach (string key in dictKeyResult.Keys)
         {
             ReconcileItem i = dictKeyResult[key];
             writer.WriteLine(i.CSVLine);
             writer.Flush();
         }
     }
 }
示例#3
0
        internal void AddCountMismatch(string key, DataColumn c, int cnt1, int cnt2)
        {
            ReconcileItem item = null;

            lock (dictKeyResult)
            {
                if (dictKeyResult.ContainsKey(key) == false)
                {
                    dictKeyResult.Add(key, new ReconcileItem(null, null, key));
                }
            }
            item = dictKeyResult[key];
            item.Add(c, cnt1, cnt2);
        }