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