Пример #1
0
        static void Main(string[] args)
        {
            IOperator iOperator = new DbSqlHelper();
            Stopwatch sw        = new Stopwatch();

            sw.Start();
            Console.WriteLine("任务开始执行……");
            iOperator.InitTable();
            iOperator.DataTransfer();
//            iOperator.Close();

            Console.WriteLine("任务结束。查看日志请移步日志记录……");
            sw.Stop();
            Console.WriteLine("共计用时: " + sw.ElapsedMilliseconds / 1000 + "s.");
            Console.ReadKey();
        }
Пример #2
0
        private static void Do()
        {
            ILog log = LogManager.GetLogger("Main");


            IOperator iOperator = new DbSqlHelper();
            Stopwatch sw        = new Stopwatch();

            sw.Start();
            Console.WriteLine("任务开始执行……");
            iOperator.CopyTableList();
            iOperator.InitTable();
            iOperator.DataTransfer();
            //            iOperator.Close();

            Console.WriteLine("任务结束。查看日志请移步日志记录……");
            sw.Stop();
            Console.WriteLine("共计用时: " + sw.ElapsedMilliseconds / 1000 + "s.");
            log.Info("共计用时: " + sw.ElapsedMilliseconds / 1000 + "s.");
        }