예제 #1
0
        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();
        }
예제 #2
0
 public static void LoadData(baseDS.portfolioDataTable tbl, AppTypes.PortfolioTypes type)
 {
     common.SysLog.WriteLog(DateTime.Now.ToString() + common.Consts.constTab +
                            "ABC " + portfolioDetailTA.Connection.ConnectionString, Settings.sysFileUserLog);
     portfolioTA.ClearBeforeFill = false;
     portfolioTA.FillByTypeMask(tbl, ((byte)type).ToString());
 }
예제 #3
0
 public static baseDS.portfolioRow GetPortfolio(string portfolioCode)
 {
     baseDS.portfolioDataTable tbl = portfolioTA.GetByCode(portfolioCode);
     if (tbl.Count == 0)
     {
         return(null);
     }
     return(tbl[0]);
 }
예제 #4
0
 public static void LoadPortfolioByInvestor(baseDS.portfolioDataTable tbl, string investorCode)
 {
     portfolioTA.ClearBeforeFill = false;
     portfolioTA.FillByInvestorCode(tbl, investorCode);
 }
예제 #5
0
 public static void LoadPortfolioByInvestor(baseDS.portfolioDataTable tbl, string investorCode, AppTypes.PortfolioTypes type)
 {
     portfolioTA.ClearBeforeFill = false;
     portfolioTA.FillByInvestorCodeAndTypeMask(tbl, investorCode, ((byte)type).ToString());
 }
예제 #6
0
 public static void LoadData(baseDS.portfolioDataTable tbl, string code)
 {
     portfolioTA.ClearBeforeFill = false;
     portfolioTA.FillByCode(tbl, code);
 }
예제 #7
0
 public static void LoadData(baseDS.portfolioDataTable tbl, AppTypes.PortfolioTypes type)
 {
     portfolioTA.ClearBeforeFill = false;
     portfolioTA.FillByTypeMask(tbl, ((byte)type).ToString());
 }
예제 #8
0
 public static void UpdateData(baseDS.portfolioDataTable tbl)
 {
     portfolioTA.Update(tbl);
     tbl.AcceptChanges();
 }
예제 #9
0
        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();
        }