Esempio n. 1
0
        public static void Main(string[] args)
        {
            List <InfoData> iflist = BizApi.QueryInfoAll();

            foreach (InfoData id in iflist)
            {
                InfoExtData ifd = QueryInfoExtFromEastMoney(id.sid);
                BizApi.InsertInfoExt(ifd);
                //Console.WriteLine(ifd.sid + " infoext inserted.");
            }

            //InfoExtData ifd = QueryInfoExtFromEastMoney("sh600339");
        }
Esempio n. 2
0
        public static void Auto(int totalThread = 2)
        {
            //List<InfoData> total = new List<InfoData>();

            //total.Add(new InfoData() { sid = "sh600009" });
            //total.Add(new InfoData() { sid = "sh600010" });
            List <InfoData> total = BizApi.QueryInfoAll();
            int             count = total.Count;

            //int totalThread = 10;
            int range = total.Count / totalThread;
            int start = -1;

            for (int i = 0; i < totalThread; i++)
            {
                new Thread(new ParameterizedThreadStart(Process)).Start(total.GetRange(start + 1, range));
                start = range * i;
            }
        }