using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Globalization;
using System.Linq;
using System.Web;

namespace Demo.Models
{

    public class StockPosition
    {

        public StockPosition()
        {

        }

        public StockPosition(string baseText)
        {

            var values = baseText.Split('\t');

            this.Date = DateTime.ParseExact(values[0],"d-MMM-yy", CultureInfo.CurrentUICulture);
            this.Open = Convert.ToDecimal(values[1]);
            this.Close = Convert.ToDecimal(values[2]);
            this.Low = Convert.ToDecimal(values[3]);
            this.High = Convert.ToDecimal(values[4]);

        }

        public int Id { get; set; }

        public DateTime Date { get; set; }

        public decimal Open { get; set; }

        public decimal Close { get; set; }

        public decimal Low { get; set; }

        public decimal High { get; set; }

    }

}