public static WorkCalendarDayType ParceRule(WorkCalendarRule rule, DateTime day) { var result = rule.GetDayType(day); switch (result) { case WorkCalendarDayType.WorkingDay: if (_defaultRule == WorkCalendarDayType.WorkingDay) return WorkCalendarDayType.Holiday; break; case WorkCalendarDayType.Holiday: if (_defaultRule == WorkCalendarDayType.Holiday) return WorkCalendarDayType.WorkingDay; break; } return result; }
public static WorkCalendarDayType ParceRule(WorkCalendarRule rule, DateTime day) { var result = rule.GetDayType(day); switch (result) { case WorkCalendarDayType.WorkingDay: if (_defaultRule == WorkCalendarDayType.WorkingDay) { return(WorkCalendarDayType.Holiday); } break; case WorkCalendarDayType.Holiday: if (_defaultRule == WorkCalendarDayType.Holiday) { return(WorkCalendarDayType.WorkingDay); } break; } return(result); }