Exemplo n.º 1
0
 public static void load_market_data()
 {
     SystemBatchManager sbm = new SystemBatchManager();
     sbm.load_market_data(new DateTime(2015, 8, 4)); Console.WriteLine(new DateTime(2015, 8, 4).ToString("yyyyMMdd"));
     sbm.load_market_data(new DateTime(2015, 8, 5)); Console.WriteLine(new DateTime(2015, 8, 5).ToString("yyyyMMdd"));
     sbm.load_market_data(new DateTime(2015, 8, 6)); Console.WriteLine(new DateTime(2015, 8, 6).ToString("yyyyMMdd"));
     sbm.load_market_data(new DateTime(2015, 8, 7)); Console.WriteLine(new DateTime(2015, 8, 7).ToString("yyyyMMdd"));
 }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            DatabaseLayer.DataBaseConnection.SqlConnection_.Open();

            //newProduct();
            //batch();
            
            //load_market_data();

            //if (args.Length == 0)
            //{
            //    Console.WriteLine("input reference date(yyyyMMdd) must be provided");
            //    return;
            //}

            SystemBatchManager sbm = new SystemBatchManager();

            //Console.WriteLine("arg : "  + args[0].ToString());
            //DateTime d = DateTime.Now.Date.AddDays(-1);
            //DateTime d = new DateTime(2015, 10, 30);
            DateTime d = ConvertingTool.ToDateTime(args[0].ToString());

            //while (d.DayOfWeek == DayOfWeek.Sunday || d.DayOfWeek == DayOfWeek.Saturday)
            //    d = d.Date.AddDays(-1);

            Console.WriteLine("reference date : " + d.ToString("yyyyMMdd"));

            Console.WriteLine(d.ToString("yyyyMMdd") + "start..");
            try
            {
                sbm.load_market_data(d);
                Console.WriteLine(d.ToString("yyyyMMdd") + "end..");

            }
            catch (Exception)
            {
                Console.WriteLine(d.ToString("yyyyMMdd") + "fail..");
            }



        }
Exemplo n.º 3
0
        public static void batch()
        {
            SystemBatchManager sbm = new SystemBatchManager();

            //sbm.batch_all(new DateTime(2015, 7, 1));
            //sbm.batch_all(new DateTime(2015, 7, 2));
            //sbm.batch_all(new DateTime(2015, 7, 3));
            //sbm.batch_all(new DateTime(2015, 7, 6));
            //sbm.batch_all(new DateTime(2015, 7, 7));
            //sbm.batch_all(new DateTime(2015, 7, 8));
            //sbm.batch_all(new DateTime(2015, 7, 9));
            //sbm.batch_all(new DateTime(2015, 7, 10));
            //sbm.batch_all(new DateTime(2015, 7, 13));
            //sbm.batch_all(new DateTime(2015, 7, 14)); Console.WriteLine(new DateTime(2015, 7, 14).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 15)); Console.WriteLine(new DateTime(2015, 7, 15).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 16)); Console.WriteLine(new DateTime(2015, 7, 16).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 17)); Console.WriteLine(new DateTime(2015, 7, 17).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 20)); Console.WriteLine(new DateTime(2015, 7, 20).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 21)); Console.WriteLine(new DateTime(2015, 7, 21).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 22)); Console.WriteLine(new DateTime(2015, 7, 22).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 23)); Console.WriteLine(new DateTime(2015, 7, 23).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 24)); Console.WriteLine(new DateTime(2015, 7, 24).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 27)); Console.WriteLine(new DateTime(2015, 7, 27).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 28)); Console.WriteLine(new DateTime(2015, 7, 28).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 29)); Console.WriteLine(new DateTime(2015, 7, 29).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 7, 30)); Console.WriteLine(new DateTime(2015, 7, 30).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 4)); Console.WriteLine(new DateTime(2015, 8, 4).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 5)); Console.WriteLine(new DateTime(2015, 8, 5).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 6)); Console.WriteLine(new DateTime(2015, 8, 6).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 7)); Console.WriteLine(new DateTime(2015, 8, 7).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 10)); Console.WriteLine(new DateTime(2015, 7, 30).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 11)); Console.WriteLine(new DateTime(2015, 7, 30).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 12)); Console.WriteLine(new DateTime(2015, 7, 30).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 13)); Console.WriteLine(new DateTime(2015, 7, 30).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 14)); Console.WriteLine(new DateTime(2015, 7, 30).ToString("yyyyMMdd"));
            //sbm.batch_all(new DateTime(2015, 8, 4)); Console.WriteLine(new DateTime(2015, 7, 30).ToString("yyyyMMdd"));




        }