Пример #1
0
        public bool isGoodTiming(string aStockCode)
        {
            bool retbool = false;

            try
            {
                SqlDal  sd      = new SqlDal(cConnString);
                DataSet dsCur   = sd.GetLatestCpSvr8091S(aStockCode);
                DataSet dsBuy08 = sd.GetBUY08(aStockCode);

                if (dsCur.Tables.Count > 0 && dsCur.Tables[0].Rows.Count > 0)
                {
                    if (dsBuy08.Tables.Count > 0 && dsBuy08.Tables[0].Rows.Count > 0)
                    {
                        if (HasStock(aStockCode))
                        {
                            // 해당 종목 보유시에는 구매 Timing 이 아님
                            retbool = false;
                        }
                        else if (BuyCheck(dsCur, dsBuy08))
                        {
                            retbool = true;
                        }
                        else
                        {
                            retbool = false;
                        }
                    }
                }
            }
            catch (Exception e)
            {
                EventLog.WriteEntry("Simulator-gini_CPSVR8091S-GoodTiming", e.ToString());
            }

            return(retbool);
        }