示例#1
0
 public void Export(string filename)
 {
     using (System.IO.StreamWriter writer = new StreamWriter(filename))
     {
         writer.WriteLine("KEY,Item,\"" + Item1ID + "\",\"" + Item2ID + "\"");
         foreach (string key in dictKeyResult.Keys)
         {
             ReconcileItem <T> i = dictKeyResult[key];
             writer.WriteLine(i.CSVLine);
             writer.Flush();
         }
     }
 }
示例#2
0
        public void AddCountMismatch(string key, EType field, int cnt1, int cnt2)
        {
            ReconcileItem <T> item = null;

            lock (dictKeyResult)
            {
                if (dictKeyResult.ContainsKey(key) == false)
                {
                    dictKeyResult.Add(key, new ReconcileItem <T>(default(T), default(T), key));
                }
            }
            item = dictKeyResult[key];
            item.Add(Access.EnumAccess.GetEnumValueDescription(field), cnt1, cnt2);
        }
示例#3
0
        public void Add(string key, EType field, T r1, T r2, T[] duplicatedRows)
        {
            ReconcileItem <T> item     = null;
            string            strField = Access.EnumAccess.GetEnumValueDescription(field);

            lock (dictKeyResult)
            {
                if (dictKeyResult.ContainsKey(key) == false)
                {
                    dictKeyResult.Add(key, new ReconcileItem <T>(r1, r2, key));
                }
            }
            item = dictKeyResult[key];
            if (r1 != null && r2 != null /*&& field != null*/)
            {
                lock (item)
                {
                    item.Add(strField, r1[Convert.ToInt32(field)], r2[Convert.ToInt32(field)]);
                }
            }
            else if (duplicatedRows != null)
            {
                if (duplicatedRows.Contains(r1))
                {
                    lock (item)
                    {
                        item.Add(strField, null, r2.Key);
                    }
                }
                else if (duplicatedRows.Contains(r2))
                {
                    lock (item)
                        item.Add(strField, r1.Key, null);
                }
            }
        }