//Detect new stockCode and create new one public static void AddNewCode(data.importDS.importPriceDataTable tbl, OnAddData onAddstockCodeFunc) { data.baseDS.stockCodeDataTable stockCodeTbl = new data.baseDS.stockCodeDataTable(); for (int count = 0; count < tbl.Count; count++) { if (tbl[count].RowState == DataRowState.Deleted) { continue; } if (AddNewCode(tbl[count].stockCode, tbl[count].stockExchange, stockCodeTbl) != null && onAddstockCodeFunc != null) { onAddstockCodeFunc(tbl[count].stockCode); } } application.DbAccess.UpdateData(stockCodeTbl); }
public static void AddNewCode(data.baseDS.priceDataDataTable tbl, string stockEchangeCode, OnAddData onAddstockCodeFunc) { data.baseDS.stockCodeDataTable stockCodeTbl = new data.baseDS.stockCodeDataTable(); for (int count = 0; count < tbl.Count; count++) { if (tbl[count].RowState == DataRowState.Deleted) continue; if (AddNewCode(tbl[count].stockCode, stockEchangeCode, stockCodeTbl)!=null && onAddstockCodeFunc != null) onAddstockCodeFunc(tbl[count].stockCode); } application.DbAccess.UpdateData(stockCodeTbl); }