Example #1
0
 private static void ruleHoliday(Rule r, DateTime dateShift, DateTime currentDate, drogowskazEntities db)
 {
     if (CyclesUtilitiess.isInHoliday(dateShift, r.Holiday.Name))
     {
         AddMass(r, db, currentDate);
     }
 }
Example #2
0
        private static void ruleCycle(Rule r, DateTime dateShift, DateTime currentDate, drogowskazEntities db)
        {
            int dzienTyg = (int)dateShift.DayOfWeek;

            if (!czyDodacDlaDniaTygodnia(r, dzienTyg))
            {
                return;
            }

            if (!czyDodacDlaTygodniaWMiesiacu(r, dateShift))
            {
                return;
            }

            bool hit = CyclesUtilitiess.isInCycle(dateShift, r.Cycle.Name);

            if (hit)
            {
                AddMass(r, db, currentDate);
            }
        }