Exemple #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"));
 }
Exemple #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..");
            }



        }