Esempio n. 1
0
        static void Main(string[] args)
        {
            JobAutoRun job = new JobAutoRun();

            Console.WriteLine("PM项目控制管理Job开始运行\n\n");
            JobContext context = new JobContext();

            context.Properties = new Dictionary <string, string>();
            context.Properties.Add("BizLog", @"Log\log.txt");


            Console.WriteLine("Please choose model:(Init/Update)");

            string x = Console.ReadLine();

            switch (x)
            {
            case "Init":
                context.Properties.Add("Model", x);
                break;

            case "Update":
                context.Properties.Add("Model", x);
                break;
            }

            job.Run(context);


            Console.WriteLine("。。。。。。。。Runing。。。。。。。。");
            Console.ReadLine().Trim();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            string input = string.Empty;

            Console.WriteLine("请选择操作:1--运行job,0--退出job");
            input = Console.ReadLine();
            while (input != "0")
            {
                JobAutoRun job     = new JobAutoRun();
                JobContext context = new JobContext();
                job.Run(context);
                Console.WriteLine("请选择操作:1--运行job,0--退出job");
                input = Console.ReadLine();
            }
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            string input = string.Empty;

            Console.WriteLine("请选择操作:1、启动JOB    0、退出JOB");
            input = Console.ReadLine();
            JobAutoRun run     = new JobAutoRun();
            JobContext context = new JobContext();

            while (input == "1")
            {
                run.Run(context);
                Console.WriteLine("请选择操作:1、启动JOB    0、退出JOB");
                input = Console.ReadLine();
            }
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
           
            Console.WriteLine("请选择操作:1、同步渠道库存,2、退出JOB");
            string result = Console.ReadLine();


            while (result == "1")
            {
                JobAutoRun job = new JobAutoRun();
                JobContext context = new JobContext();
                job.Run(context);
                Console.WriteLine();

                Console.WriteLine("请选择操作:1、同步渠道库存,2、退出JOB");
                result = Console.ReadLine();
            }
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            string option = string.Empty;

            JobAutoRun job = new JobAutoRun();

            Console.WriteLine("请选择操作:1——同步库存;0——退出系统");
            //Console.WriteLine("请选择操作:1——同步库存[老版本];2--同步库存[新版本];0——退出系统");
            option = Console.ReadLine().Trim();
            JobContext context = new JobContext();

            context.Properties = new Dictionary <string, string>();
            context.Properties.Add("BizLog", @"Log\log.txt");

            while (option != "0")
            {
                context.Properties["option"] = option;

                job.Run(context);
                Console.WriteLine("请选择操作:1——同步库存;0——退出系统");
                //Console.WriteLine("请选择操作:1——同步库存[老版本];2--同步库存[新版本];0——退出系统");
                option = Console.ReadLine();
            }
        }