예제 #1
0
        public int GoLiveWrite(List <string> Exceptions, string ExceptionFile, intCSVSerialise intface, ISession sess)
        {
            string thisstr;
            int    eCount = 0;

            ; // doit, return exceptions and optionally write to file
            this.CSVFileName = intface.GetType().ToString();
            fs = new FileStream(this.CSVFolder + "\\" + this.CSVFileName, FileMode.OpenOrCreate);
            using (StreamWriter sw = new StreamWriter(fs))
            {
                sw.WriteLine(intface.WriteCSVHeader());
                foreach (nwdbDataType sd in intface.GetList())
                {
                    try
                    {
                        thisstr = intface.WriteCSVRow(sd);
                        sw.WriteLine(thisstr);
                    }
                    catch (Exception e)
                    {
                        Exceptions.Add(e.ToString());
                        eCount++;
                    }
                }
                return(eCount);
            }
        }
예제 #2
0
 public int DryRun(intCSVSerialise intface)
 {
     //doit Dry and return failed records
     return(0);
 }