Exemplo n.º 1
0
            public void getResult(ulong reqid, WindData data)
            {
                DataTable dt = WDDataAdapter.getRecords(data);
                List <DetailStringClass> retList = WDDataAdapter.GetList(dt);

                AfterUpdate(Data);
            }
Exemplo n.º 2
0
        public DataTable getRecords(DateTime dt)
        {
            WSETCommIndexClass wsetobj;

            wsetobj = new WSETCommIndexClass(_sic.SummaryCode, dt);
            return(WDDataAdapter.getRecords(wsetobj.getDataSet()));
        }
Exemplo n.º 3
0
        public DataTable getHQData(string strCode, DateTime begT, DateTime endT)
        {
            GLClass  globj   = new GLClass(strCode);
            WSDClass wsetobj = new WSDClass(strCode, "open,high,low,close,pct_chg,volume,windcode", begT, endT);

            //WSDClass wsetobj = new WSDClass(strCode, "open,close,volume,windcode", begT, endT);
            return(WDDataAdapter.getRecords(wsetobj.getDataSet()));
        }
Exemplo n.º 4
0
        public MTable getRecordsCount(DateTime begdt, DateTime enddt)
        {
            if (gbc == null)
            {
                return(null);
            }
            WTDaysCountClass wsetobj;

            wsetobj = new WTDaysCountClass(w, begdt, enddt);
            return(WDDataAdapter.getTable(wsetobj.getDataSet()));
        }
Exemplo n.º 5
0
        public MTable getRecords(DateTime endt, int N)
        {
            if (gbc == null)
            {
                return(null);
            }
            WTDaysOffsetClass wsetobj;

            wsetobj = new WTDaysOffsetClass(w, endt, N, string.Format(strParamsStyle, gbc.cycle.ToString().Substring(0, 1)));
            return(WDDataAdapter.getTable(wsetobj.getDataSet()));
        }
        public MTable getRecords(string Sector, DateTime begdt, DateTime enddt)
        {
            if (gbc == null)
            {
                return(null);
            }
            WSDClass wsetobj;

            wsetobj = new WSDClass(w, Sector, gbc.GuidName, begdt, enddt, string.Format(strParamsStyle, gbc.strParam, gbc.priceAdj.ToString().Substring(0, 1), gbc.cycle.ToString().Substring(0, 1)));
            return(WDDataAdapter.getTable(wsetobj.getDataSet(), gbc.GuidName, typeof(decimal)));
        }
Exemplo n.º 7
0
        public override MTable getRecords(string[] Sectors, DateTime dt)
        {
            if (gbc == null)
            {
                return(null);
            }
            gbc.tradeDate = dt;
            WSSClass wsetobj;

            wsetobj = new WSSClass(w, string.Join(",", Sectors), gbc.GuidName, string.Format(strParamsStyle, dt.ToShortDateString().Replace("-", ""), gbc.strParam, gbc.priceAdj.ToString().Substring(0, 1), gbc.cycle.ToString().Substring(0, 1)));
            return(WDDataAdapter.getTable(wsetobj.getDataSet(), gbc.GuidName, typeof(decimal)));
        }
Exemplo n.º 8
0
        public override Dictionary <string, ExpectList> RequestData(string[] grpcodes, string Fields, string options)
        {
            WindData  wd = SystemGlobal.w.wsq(string.Join(",", grpcodes), Fields, options);
            DataTable dt = WDDataAdapter.getRecords(wd);
            Dictionary <string, ExpectList> ret = new Dictionary <string, ExpectList>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ExpectList el = new ExpectList();
            }
            return(ret);
        }
Exemplo n.º 9
0
        public DataTable getRecords(string[] Sectors, DateTime dt)
        {
            if (gbc == null)
            {
                return(null);
            }
            gbc.tradeDate = dt;
            WSSClass wsetobj;

            wsetobj = new WSSClass(string.Join(",", Sectors), gbc.GuidName, gbc.strParam);
            return(WDDataAdapter.getRecords(wsetobj.getDataSet()));
        }
Exemplo n.º 10
0
        public DataTable getRecords(string strCode, DateTime dt)
        {
            GLClass   globj = new GLClass(strCode);
            WSETClass wsetobj;

            if (strCode == null || strCode.Length == 0)//如果是板块类
            {
                wsetobj = new WSETMarketClass(globj.GLCode, dt);
            }
            else//如果是指数类
            {
                wsetobj = new WSETIndexClass(globj.GLCode, dt);
            }
            return(WDDataAdapter.getRecords(wsetobj.getDataSet()));
        }
Exemplo n.º 11
0
        /// <summary>
        /// 获得该指数下所有证券权重清单
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public MTable getBkWeight(DateTime dt)
        {
            //WSETCommIndexClass wsetobj;
            WSETClass wsetobj;

            if (_sic.IndexCode == null) //如果未指定代码,一定是板块类
            {
                wsetobj = new WSETCommIndexClass(w, _sic.SummaryCode, dt);
            }
            else
            {
                wsetobj = new WSETIndexClass(w, "indexconstituent", _sic.IndexCode, dt);
            }
            return(WDDataAdapter.getTable(wsetobj.getDataSet(), "i_weight", typeof(float)));
        }
Exemplo n.º 12
0
        /// <summary>
        /// 获得该指数下所有证券清单
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public MTable getBkList(DateTime dt)
        {
            //WSETCommIndexClass wsetobj;
            WSETClass wsetobj;

            if (_sic.IndexCode == null)
            {
                wsetobj = new WSETCommIndexClass(w, _sic.SummaryCode, dt);
            }
            else
            {
                if (_sic.IndexCode.IndexOf(".") > 0)//指数成分类
                {
                    wsetobj = new WSETIndexClass(w, _sic.IndexCode, dt);
                }
                else //板块成分类
                {
                    wsetobj = new WSETMarketClass(w, _sic.IndexCode, dt);
                }
            }
            return(WDDataAdapter.getTable(wsetobj.getDataSet()));
        }