示例#1
0
        /// <summary>
        /// Creates a new history date object. Takes a MySqlDataReader object.
        /// </summary>
        /// <param name="rdr"></param>
        /// <returns></returns>
        public HistoryDate CreateHistoryDate(MySqlDataReader rdr)
        {
            HistoryDate historyDate = new HistoryDate()
            {
                ScheduleDate = DateTime.Parse(rdr["scheduledate"].ToString())
            };

            return(historyDate);
        }
示例#2
0
        public virtual string ToCsv()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(HistoryDate.ToString("yyyy-MM-dd"));
            sb.Append("," + String.Format("{0:0.00}", LowPrice / 10000D));
            sb.Append("," + String.Format("{0:0.00}", HighPrice / 10000D));
            sb.Append("," + String.Format("{0:0.00}", AveragePrice / 10000D));
            sb.Append("," + Volume);
            sb.Append("," + Orders);
            return(sb.ToString());
        }
示例#3
0
 public override string ToString()
 {
     return(HistoryDate.ToLongDateString());
 }