Example #1
0
        void exportTask(string receiveDate)
        {
            StockUtility util     = new StockUtility();
            DateTime     fileDate = DateTime.Parse(receiveDate);

            util.Export2CSV(Server.MapPath(string.Format("//DailyData//data_export_{0}.csv", fileDate.ToString("yyyyMMdd"))),
                            DateTime.Parse(fileDate.ToString("yyyy/MM/dd")));
        }
Example #2
0
        static void Main(string[] args)
        {
            MyEnum workType;
            StockQuery query = new StockQuery();

            if (args.Length > 0)
            {
                Logger("---------------START---------------");
                if (Enum.TryParse(args[0], true, out workType) == true)
                {
                    switch (workType)
                    {
                        case MyEnum.Stage1:
                            StockUtility util = new StockUtility();

                            Logger("Reset");
                            util.Reset();

                            //Logger("QueryBroker");
                            //query.QueryBroker();

                            //Logger("QueryBrokerBranch");
                            //query.QueryBrokerBranch();

                            //Logger("QueryCompany");
                            //query.QueryCompany();

                            Logger("QueryDaliyWork");
                            query.QueryDaliyWork();

                            Logger("QueryStockWarrant");
                            query.QueryStockWarrant();
                            break;

                        case MyEnum.Stage1A:
                            Logger("QueryDaliyWork");
                            query.QueryDaliyWork();

                            Logger("QueryStockWarrant");
                            query.QueryStockWarrant();
                            break;

                        case MyEnum.Stage2:
                        case MyEnum.Stage2A:
                            DetailQuery();
                            break;

                        case MyEnum.Stage3:
                        case MyEnum.Stage3A:
                            Logger("QueryOTC");
                            query.QueryOTC();

                            Logger("QueryOTCWarrant");
                            query.QueryOTCWarrant(DateTime.Now);
                            break;

                        default:
                            break;
                    }
                }
                Logger("----------------END----------------");
            }
        }