/// <summary>
        /// 批量数据写入
        /// </summary>
        /// <param name="targetTable">目标表</param>
        /// <param name="sourceData">源数据</param>
        public int BulkCopyAutoTransaction(string targetTable, DataTable sourceData)
        {
            Trace.WriteLine(DateTime.Now + ":" + "开始拷贝数据到数据库");
            ISqlMapper sqlMap = GetLocalSqlMap();

            try
            {
                System.Threading.Thread.CurrentThread.IsBackground = true;
                var stopwatch = new Stopwatch();
                stopwatch.Start();
                int result = sqlMap.BulkCopyAutoTransaction(targetTable, sourceData);
                stopwatch.Stop();
                Trace.WriteLine(DateTime.Now + ":" + "完成拷贝数据到数据库");
                Trace.WriteLine("拷贝数据记录数:" + result);
                Trace.WriteLine(string.Format("耗时{0}", stopwatch.Elapsed.TotalSeconds));
                System.Threading.Thread.CurrentThread.IsBackground = false;
                return(result);
            }
            catch (Exception e)
            {
                Trace.Write(e.Message + "\n" + e.StackTrace);
                System.Threading.Thread.CurrentThread.IsBackground = false;
                throw new IBatisNetException(
                          "Error executing bulkcopy '" + targetTable + "' for object.  Cause: " + e.Message, e);
            }
            finally
            {
                //sqlMap.CloseConnection();
            }
        }