public static void LoadStockCode_ByWatchList(tmpDS.stockCodeDataTable stockCodeTbl, StringCollection codes) { StringCollection retList = new StringCollection(); StringCollection list; tmpDS.stockCodeDataTable tmpTbl = new tmpDS.stockCodeDataTable(); baseDS.portfolioDataTable portfolioTbl = new baseDS.portfolioDataTable(); baseDS.portfolioRow portfolioRow; for (int idx1 = 0; idx1 < codes.Count; idx1++) { portfolioRow = AppLibs.FindAndCache(portfolioTbl, codes[idx1]); if (portfolioRow == null) continue; list = common.MultiValueString.String2List(portfolioRow.interestedStock); if (list.Count <= 0) continue; tmpTbl.Clear(); LoadStockCode_ByCodeList(tmpTbl, list); for (int idx2 = 0; idx2 < tmpTbl.Count; idx2++) { if (stockCodeTbl.FindBycode(tmpTbl[idx2].code)==null) stockCodeTbl.ImportRow(tmpTbl[idx2]); } } portfolioTbl.Dispose(); }
public static void LoadStockOwnedByAll(tmpDS.investorStockDataTable tbl) { sumInvestorStockTA.ClearBeforeFill = false; sumInvestorStockTA.Fill(tbl); }
public static void LoadStockCode_ByPortfolios(tmpDS.stockCodeDataTable tbl, StringCollection portfolios) { baseDS.investorStockDataTable tmpTbl = new baseDS.investorStockDataTable(); string cond = common.system.MakeConditionStr(portfolios, "b." + tmpTbl.portfolioColumn.ColumnName + "=N'", "'", "OR"); if (cond.Trim() == "") return; tmpTbl.Dispose(); string sqlCmd = "SELECT DISTINCT a.code, a.stockExchange, a.tickerCode, a.name,nameEn" + " FROM stockCode a INNER JOIN investorStock b ON a.code = b.stockCode" + " WHERE " + cond; LoadFromSQL(tbl, sqlCmd); }
public static void LoadStockCode_ByStockExchange(tmpDS.stockCodeDataTable tbl, string stockExchange, AppTypes.CommonStatus status) { shortStockCodeTA.FillByStockExchange(tbl, stockExchange,((byte)status).ToString()); }
public static void LoadStockCode_ByBizSectors(tmpDS.stockCodeDataTable tbl, StringCollection bizSectors) { baseDS.stockCodeDataTable comTbl = new baseDS.stockCodeDataTable(); string cond = common.system.MakeConditionStr(bizSectors, comTbl.bizSectorsColumn.ColumnName + " LIKE N'" + common.Consts.SQL_CMD_ALL_MARKER + common.Settings.sysListSeparatorPrefix, common.Settings.sysListSeparatorPostfix + common.Consts.SQL_CMD_ALL_MARKER + "'", "OR"); string sqlCmd = "SELECT code, stockExchange, tickerCode, name,nameEn,0 AS price,0 AS priceVariant FROM stockCode WHERE " + cond; LoadFromSQL(tbl, sqlCmd); }
public static void LoadStockCode_ByCodeList(tmpDS.stockCodeDataTable tbl, StringCollection stockCode) { string cond = common.system.MakeConditionStr(stockCode, "" + tbl.codeColumn.ColumnName + "=N'", "'", "OR"); string sqlCmd = "SELECT code, stockExchange, tickerCode, name,nameEn FROM stockCode WHERE " + cond; LoadFromSQL(tbl, sqlCmd); }
/// <summary> /// Return the stocks prefered by an investor /// </summary> /// <param name="tbl"></param> /// <param name="investorCode"></param> public static void LoadData(tmpDS.interestedCodeDataTable tbl,string investorCode) { interestedCodeTA.ClearBeforeFill = false; interestedCodeTA.FillByInvestor(tbl, investorCode); }
/// <summary> /// Load investor data with investorCode /// </summary> /// <param name="tbl"></param> /// <param name="investorCode"></param> public static void LoadData(tmpDS.investorStockDataTable tbl,string investorCode) { sumInvestorStockTA.ClearBeforeFill = false; sumInvestorStockTA.FillByInvestor(tbl, investorCode); }
public static void LoadData(tmpDS.investorDataTable tbl) { tmpDSTableAdapters.investorTA investorTA = new tmpDSTableAdapters.investorTA(); investorTA.ClearBeforeFill = false; investorTA.Fill(tbl); }
public static void LoadData(tmpDS.stockCodeDataTable tbl, AppTypes.CommonStatus status) { shortStockCodeTA.ClearBeforeFill = false; shortStockCodeTA.FillByStatusMask(tbl, ((byte)status).ToString()); }
public static void LoadData(tmpDS.stockCodeDataTable tbl, string code) { shortStockCodeTA.ClearBeforeFill = false; shortStockCodeTA.FillByCode(tbl, code); }