Esempio n. 1
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()));
        }
Esempio n. 2
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)));
        }
Esempio n. 4
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)));
        }
Esempio n. 5
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)));
        }
Esempio n. 6
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()));
        }