public static KoreaOptionLastTradingDayInfo SelectLastTradingDayByYearMonth(string year, string month)
        {
            string    condition = string.Format(" where Year = '{0}' and Month = '{1}' ", year, month);
            DataTable dt        = Select(ETI_KOREA_OPTION_LTD_TABLE_NAME, new string[] { "*" }, condition);

            if (dt == null || dt.Rows.Count == 0)
            {
                return(null);
            }

            DataRow dr = dt.Rows[0];

            KoreaOptionLastTradingDayInfo lastTradingDayItem = new KoreaOptionLastTradingDayInfo();

            lastTradingDayItem.Year                    = year;
            lastTradingDayItem.Month                   = month;
            lastTradingDayItem.LastTradingDay          = Convert.ToDateTime(dr["LastTradingDay"]);
            lastTradingDayItem.LastTradingDayForUSDOPT = Convert.ToDateTime(dr["LastTradingDayForUSDOPT"]);
            lastTradingDayItem.ContractMonthNumber     = Convert.ToString(dr["ContractMonthNumber"]).Trim();

            return(lastTradingDayItem);
        }
        public static List <KoreaOptionLastTradingDayInfo> SelectLastTradingDayByYear(string year)
        {
            string    condition = string.Format(" where Year = '{0}' order by LastTradingDay ", year);
            DataTable dt        = Select(ETI_KOREA_OPTION_LTD_TABLE_NAME, new string[] { "*" }, condition);

            if (dt == null || dt.Rows.Count == 0)
            {
                return(null);
            }

            List <KoreaOptionLastTradingDayInfo> lastTradingDayMap = new List <KoreaOptionLastTradingDayInfo>();

            foreach (DataRow dr in dt.Rows)
            {
                KoreaOptionLastTradingDayInfo lastTradingDayItem = new KoreaOptionLastTradingDayInfo();
                lastTradingDayItem.Year                    = year;
                lastTradingDayItem.Month                   = Convert.ToString(dr["Month"]).Trim();
                lastTradingDayItem.LastTradingDay          = Convert.ToDateTime(dr["LastTradingDay"]);
                lastTradingDayItem.LastTradingDayForUSDOPT = Convert.ToDateTime(dr["LastTradingDayForUSDOPT"]);
                lastTradingDayItem.ContractMonthNumber     = Convert.ToString(dr["ContractMonthNumber"]).Trim();
                lastTradingDayMap.Add(lastTradingDayItem);
            }
            return(lastTradingDayMap);
        }