Exemplo n.º 1
0
        private static void CheckRules(AllData data)
        {
            var rule = new Rule();

            rule.CreateTimerRule("1", "-", DateTime.Now.AddDays(3), TimerRuleType.MustBePaid);
            rule.CreateTimerRule("1", "-", DateTime.Now.AddDays(4), TimerRuleType.CanSubscribe);

            foreach (var danser in data.Dancers)
            {
                Console.WriteLine($"{danser}\n");
            }

            var shac = data.SHAClasses.OrderBy(c => c.Direction).ThenBy(c => c.Significance);

            foreach (var danser in shac)
            {
                Console.WriteLine($"{danser}\n");
            }

            foreach (var danser in data.Groups)
            {
                Console.WriteLine($"{danser}\n");
            }

            Console.WriteLine("---------------------------------------------------");
            Console.WriteLine($"{rule} {DateTime.Now} {rule.Accepted(data.Dancers[0])} {rule.MustBePaid()}");
        }