当前位置: 首页>>代码示例>>C#>>正文


C# data.AddportfolioListRow方法代码示例

本文整理汇总了C#中data.AddportfolioListRow方法的典型用法代码示例。如果您正苦于以下问题:C# data.AddportfolioListRow方法的具体用法?C# data.AddportfolioListRow怎么用?C# data.AddportfolioListRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在data的用法示例。


在下文中一共展示了data.AddportfolioListRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadStockList

        protected void LoadStockList(data.tmpDS.portfolioListDataTable toTbl, string[] watchCodes)
        {
            //Load stocks in portfolio
            data.baseDS.stockCodeDataTable myStockCodeTbl = new data.baseDS.stockCodeDataTable();
            switch (watchListCb.WatchType)
            { 
                case myTypes.portfolioType.Portfolio:
                    dataLibs.LoadStockCode_ByPortfolios(myStockCodeTbl, common.system.List2Collection(watchCodes));
                     break;
                case myTypes.portfolioType.WatchList:
                     dataLibs.LoadStockCode_ByWatchList(myStockCodeTbl, common.system.List2Collection(watchCodes));
                     break;
                default:
                     common.system.ThrowException("Imvalid WatchType"); 
                     break;
            }

            DataView myStockView = new DataView(myStockCodeTbl);
            data.baseDS.stockCodeRow stockRow;
            myStockView.Sort = myStockCodeTbl.codeColumn.ColumnName + "," + myStockCodeTbl.stockExchangeColumn.ColumnName;
            data.tmpDS.portfolioListRow reportRow;
            for (int idx1 = 0; idx1 < myStockView.Count; idx1++)
            {
                stockRow = (data.baseDS.stockCodeRow)myStockView[idx1].Row;
                //Ignore duplicate stocks
                reportRow = toTbl.FindBystockCode(stockRow.code);
                if (reportRow != null) continue;
                reportRow = toTbl.NewportfolioListRow();
                dataLibs.InitData(reportRow);
                reportRow.stockCode = stockRow.code;
                reportRow.stockExCode = stockRow.stockExchange;
                toTbl.AddportfolioListRow(reportRow);
            }
        }
开发者ID:oghenez,项目名称:trade-software,代码行数:34,代码来源:basePortfolioView.cs

示例2: LoadStockList

        protected void LoadStockList(string[] portfolioCodes, data.tmpDS.portfolioListDataTable toTbl)
        {
            //Load stocks in portfolio
            data.baseDS.stockCodeExtDataTable myStockCodeTbl = new data.baseDS.stockCodeExtDataTable();
            dataLibs.LoadData(myStockCodeTbl, portfolioCodes);

            DataView myStockView = new DataView(myStockCodeTbl);
            data.baseDS.stockCodeExtRow stockRow;
            myStockView.Sort = myStockCodeTbl.codeColumn.ColumnName + "," + myStockCodeTbl.stockExchangeColumn.ColumnName;
            data.tmpDS.portfolioListRow reportRow;
            for (int idx1 = 0; idx1 < myStockView.Count; idx1++)
            {
                stockRow = (data.baseDS.stockCodeExtRow)myStockView[idx1].Row;
                //Ignore duplicate stocks
                reportRow = toTbl.FindBystockCode(stockRow.code);
                if (reportRow != null) continue;
                reportRow = toTbl.NewportfolioListRow();
                dataLibs.InitData(reportRow);
                reportRow.stockCode = stockRow.code;
                reportRow.stockExCode = stockRow.stockExchange;
                toTbl.AddportfolioListRow(reportRow);
            }
        }
开发者ID:oghenez,项目名称:trade-software,代码行数:23,代码来源:basePortfolioView.cs


注:本文中的data.AddportfolioListRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。