/// <summary> /// see CheckForTwo and extropliate :-) /// </summary> public static void CheckForFive(RepeatModel r, int skipWeek) { ResultLineModel n = new ResultLineModel(); // this works out the next record to check int i = r.ResultsLineIndex + (skipWeek * 3); // this if statement makes sure the query stays in range int c = allLines.Where(x => x.ResultIndex == i).Count(); if (c > 0 && allLines.Count > (allLines.Count - i)) { n = allLines.Where(x => x.ResultIndex == i).ToList().First(); if (r.NumberTypeIndicator == 1) { if (n.Col1 == r.DrawNumber || n.Col2 == r.DrawNumber || n.Col3 == r.DrawNumber || n.Col4 == r.DrawNumber || n.Col5 == r.DrawNumber) { r.MainNumberFifthDrawDate = n.DrawDate; r.MainNumberFifthRepeatIndicator = 5; } } if (r.NumberTypeIndicator == 2) { if (n.Star1 == r.DrawNumber || n.Star2 == r.DrawNumber) { r.StarNumberFifthRepeatDate = n.DrawDate; r.StarNumberFifthRepeatIndicator = 5; } } } }
/// <summary> /// this checks for the second time in a row that a number comes out. /// note calling second repeat / third repeat gets relaay confusing, is a second repeat the third time a number comes out or is it the forth ? /// to hell with language second in a row is what is looked for here , dont care, its two in a row. /// </summary> /// <param name="searchNo"></param> /// <param name="numberType"></param> /// <param name="resultIndex"></param> /// <param name="drawDate"></param> public static void CheckForTwo(int searchNo, int numberType, int resultIndex, DateTime drawDate, int skipWeek) { ResultLineModel n = new ResultLineModel(); RepeatModel r = new RepeatModel(); // this works out the next record to check int i = resultIndex + skipWeek; // this if statement makes sure the query stays in range int c = allLines.Where(x => x.ResultIndex == i).Count(); if (c > 0 && allLines.Count > (allLines.Count - i)) { n = allLines.Where(x => x.ResultIndex == i).ToList().First(); if (numberType == 1) { //this loads main numbers to the RepeatModel if (n.Col1 == searchNo || n.Col2 == searchNo || n.Col3 == searchNo || n.Col4 == searchNo || n.Col5 == searchNo) { r.ResultsLineIndex = n.ResultIndex; r.DrawNumber = searchNo; r.OrigionalDrawDate = drawDate; r.MainNumberSecondRepeatDate = n.DrawDate; r.MainNumberSecondRepeatIndicator = 2; r.NumberTypeIndicator = numberType; allRepeats.Add(r); CheckForThree(r, skipWeek); } } if (numberType == 2) { if (n.Star1 == searchNo || n.Star2 == searchNo) { r.ResultsLineIndex = n.ResultIndex; r.DrawNumber = searchNo; r.OrigionalDrawDate = drawDate; r.StarNumberSecondRepeatDate = n.DrawDate; r.StarNumberSecondRepeatIndicator = 2; r.NumberTypeIndicator = numberType; allRepeats.Add(r); CheckForThree(r, skipWeek); } } } }