예제 #1
0
        public override void LoadData(DataInfoType type)
        {
            switch (type)
            {
            case DataInfoType.SecurityInfo:
                base.LoadSecurityInfo();
                break;

            case DataInfoType.TradingPrice:
                DataManager.GetDataLoader().LoadIndexPrice(this);
                break;

            default:
                MessageManager.GetInstance().AddMessage(MessageType.Warning, Message.C_Msg_GE1, type.ToString());
                return;
            }
        }
예제 #2
0
        public override void LoadData(DataInfoType type)
        {
            switch (type)
            {
            case DataInfoType.SecurityInfo:
                DataManager.GetDataLoader().LoadEquityInfo(this);
                break;

            case DataInfoType.TradingPrice:
                if (base.TradingPrice == null)
                {
                    base.TradingPrice = new SeriesEquityPrice(base.Code, base.TimeSeriesStart, base.TimeSeriesEnd);
                }
                base.TradingPrice.Load();
                break;

            case DataInfoType.SecurityReport:
                throw new NotImplementedException();

            default:
                MessageManager.GetInstance().AddMessage(MessageType.Warning, Message.C_Msg_GE1, type.ToString());
                return;
            }
        }
예제 #3
0
        public override void LoadData(DataInfoType type)
        {
            try
            {
                switch (type)
                {
                case DataInfoType.SecurityInfo:
                    DataManager.GetDataLoader().LoadMutualFundInfo(this);
                    break;

                case DataInfoType.FundNetAssetValue:
                    if (this.TradingNAV == null)
                    {
                        this.TradingNAV = new SeriesNetAssetValue(base.Code, base.TimeSeriesStart, base.TimeSeriesEnd);
                    }
                    //仅对非货币基金
                    if (this.Category.AssetCategory != FundAssetCategory.Monetory)
                    {
                        this.TradingNAV.Load();
                    }
                    break;

                case DataInfoType.TradingPrice:
                    if (base.TradingPrice == null)
                    {
                        base.TradingPrice = new SeriesFundPrice(base.Code, base.TimeSeriesStart, base.TimeSeriesEnd);
                    }
                    base.TradingPrice.Load();
                    break;

                case DataInfoType.SecurityReport:
                    if (this.FundReport == null)
                    {
                        this.FundReport = new SeriesFundReport(base.Code, base.TimeSeriesStart, base.TimeSeriesEnd);
                    }
                    this.FundReport.Load();
                    break;

                default:
                    MessageManager.GetInstance().AddMessage(MessageType.Warning, Message.C_Msg_GE1, type.ToString());
                    return;
                }
            }
            catch (Exception ex)
            {
                throw new Exception("读取基金数据时出错!", ex);;
            }
        }
예제 #4
0
        public override void LoadData(DataInfoType type)
        {
            switch (type)
            {
            case DataInfoType.SecurityInfo:
                base.LoadSecurityInfo();
                break;

            case DataInfoType.TradingPrice:
                DataManager.GetDataLoader().LoadMutualFundPrice(this);
                break;

            case DataInfoType.FundNetAssetValue:
                DataManager.GetDataLoader().LoadMutualFundNAV(this);
                break;

            case DataInfoType.SecurityReport:
                DataManager.GetDataLoader().LoadMutualFundReport(this);
                break;

            default:
                MessageManager.GetInstance().AddMessage(MessageType.Warning, Message.C_Msg_GE1, type.ToString());
                break;
            }
        }