コード例 #1
0
        public override List <AShareCalendar> GetAShareCalendar(DataTable dtDataSrc)
        {
            try
            {
                List <AShareCalendar> list = new List <AShareCalendar>();

                if (dtDataSrc != null && dtDataSrc.Rows.Count > 0)
                {
                    foreach (DataRow oRow in dtDataSrc.Rows)
                    {
                        AShareCalendar d = new AShareCalendar();

                        d.Exchange = this.getExchangeType(oRow[C_Col_ExchMarket].ToString());
                        d.TradeDay = base.getDateTimeValue(oRow[C_Col_TradeDays]);

                        list.Add(d);
                    }
                }

                return(list);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
 public int CompareTo(object obj)
 {
     try
     {
         //按交易日降序
         AShareCalendar c = (AShareCalendar)obj;
         if (this.TradeDay > c.TradeDay)
         {
             return(-1);
         }
         else
         {
             return(1);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }