示例#1
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)));
        }
示例#2
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()));
        }
示例#3
0
        public Int64 getRecordCount(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(wsetobj.getDataSetCount());
        }
示例#4
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()));
        }