Esempio n. 1
0
        public override List <AShareDescription> GetAShareDescription(DataTable dtDataSrc)
        {
            try
            {
                List <AShareDescription> list = new List <AShareDescription>();

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

                        d.Code       = oRow[C_Col_Code].ToString();
                        d.Name       = oRow[C_Col_Name].ToString();
                        d.Exchange   = this.getExchangeType(oRow[C_Col_ExchMarket].ToString());
                        d.ListDate   = this.getDateTimeValue(oRow[C_Col_ListDate]);
                        d.DelistDate = this.getDateTimeValue(oRow[C_Col_DelistDate]);

                        d.WindCode    = base.getWindCode(d.Code, d.Exchange);
                        d.ListedBoard = this.getListedBoardType(oRow[C_Col_Code].ToString());

                        list.Add(d);
                    }
                }

                return(list);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
 public int CompareTo(object obj)
 {
     try
     {
         //按代码降序
         AShareDescription desc = (AShareDescription)obj;
         if (this.WindCode.CompareTo(desc.WindCode) > 0)
         {
             return(-1);
         }
         else
         {
             return(1);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }