示例#1
0
 private static void PopulateHowMany(UltraSixResult ultraSixResult)
 {
     Manager.Instance.IncludeDozenInHowMany(ultraSixResult.FirstDozen);
     Manager.Instance.IncludeDozenInHowMany(ultraSixResult.SecondDozen);
     Manager.Instance.IncludeDozenInHowMany(ultraSixResult.ThirdDozen);
     Manager.Instance.IncludeDozenInHowMany(ultraSixResult.FourthDozen);
     Manager.Instance.IncludeDozenInHowMany(ultraSixResult.FifthDozen);
     Manager.Instance.IncludeDozenInHowMany(ultraSixResult.SixthDozen);
 }
示例#2
0
        public UltraSixResult Generate(int countOfNumbers)
        {
            var ultraSixResult = new UltraSixResult();

            var random = new Random();

            for (int i = 0; i < countOfNumbers; i++)
                ultraSixResult.NumbersToBet.Add(random.Next(0, 60));

            return ultraSixResult;
        }
示例#3
0
        public override void PopulateManagerFromExcelUsingDb(string path)
        {
            var ultraSixResults = new List<UltraSixResult>();

            IList<int> dozens = new List<int>();

            var connectionString = string.Format(_connectionStringFormat, path);

            var dt = GetDataTable(connectionString);

            foreach (DataRow rowValue in dt.Rows)
            {
                if (rowValue[0] == DBNull.Value)
                    continue;

                var ultraSixResult = new UltraSixResult
                {
                    Concourse = Convert.ToInt16(rowValue[0]),
                    Date = Convert.ToDateTime(rowValue[1]),
                    FirstDozen = Convert.ToInt16(rowValue[2]),
                    SecondDozen = Convert.ToInt16(rowValue[3]),
                    ThirdDozen = Convert.ToInt16(rowValue[4]),
                    FourthDozen = Convert.ToInt16(rowValue[5]),
                    FifthDozen = Convert.ToInt16(rowValue[6]),
                    SixthDozen = Convert.ToInt16(rowValue[7])
                };

                ultraSixResults.Add(ultraSixResult);

                PopulateHowMany(ultraSixResult);
            }

            PopulateLastTenResults(ultraSixResults);

            Manager.Instance.Results = ultraSixResults;
        }