本文整理汇总了C#中data.AddstockCodeRow方法的典型用法代码示例。如果您正苦于以下问题:C# data.AddstockCodeRow方法的具体用法?C# data.AddstockCodeRow怎么用?C# data.AddstockCodeRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data
的用法示例。
在下文中一共展示了data.AddstockCodeRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadStockList
protected void LoadStockList(data.tmpDS.stockCodeDataTable toTbl, string[] watchCodes)
{
//Load stocks in portfolio
data.tmpDS.stockCodeDataTable myStockCodeTbl = null;
switch (this.watchType)
{
case AppTypes.PortfolioTypes.Portfolio:
myStockCodeTbl = DataAccess.Libs.GetStock_InPortfolio(common.system.List2Collection(watchCodes));
break;
case AppTypes.PortfolioTypes.WatchList:
myStockCodeTbl = DataAccess.Libs.GetStock_ByWatchList(common.system.List2Collection(watchCodes));
break;
default:
common.system.ThrowException("Invalid WatchType");
break;
}
DataView myStockView = new DataView(myStockCodeTbl);
data.baseDS.stockCodeRow stockRow;
myStockView.Sort = myStockCodeTbl.codeColumn.ColumnName + "," + myStockCodeTbl.stockExchangeColumn.ColumnName;
data.tmpDS.stockCodeRow reportRow;
for (int idx1 = 0; idx1 < myStockView.Count; idx1++)
{
stockRow = (data.baseDS.stockCodeRow)myStockView[idx1].Row;
//Ignore duplicate stocks
reportRow = toTbl.FindBycode(stockRow.code);
if (reportRow != null) continue;
reportRow = toTbl.NewstockCodeRow();
commonClass.AppLibs.InitData(reportRow);
reportRow.code = stockRow.code;
reportRow.stockExchange = stockRow.stockExchange;
toTbl.AddstockCodeRow(reportRow);
}
}
示例2: AddNewCode
public static data.baseDS.stockCodeRow AddNewCode(string comCode, string stockEchangeCode,
data.baseDS.stockCodeDataTable toStockCodeTbl)
{
data.baseDS.stockCodeRow stockCodeRow;
stockCodeRow = libs.FindAndCache(toStockCodeTbl, comCode);
if (stockCodeRow == null)
{
stockCodeRow = toStockCodeTbl.NewstockCodeRow();
commonClass.AppLibs.InitData(stockCodeRow);
stockCodeRow.code = comCode;
stockCodeRow.name = "<New>";
stockCodeRow.code = comCode;
stockCodeRow.tickerCode = comCode;
stockCodeRow.stockExchange = stockEchangeCode;
stockCodeRow.regDate = DateTime.Today;
toStockCodeTbl.AddstockCodeRow(stockCodeRow);
}
return stockCodeRow;
}