Esempio n. 1
0
        private Constants.STATUS ValidateBusinessRules(List <IBusinessRuleValidator> rules, EnrollmentEntry entry)
        {
            Constants.STATUS status = Constants.STATUS.ACCEPTED;

            foreach (IBusinessRuleValidator rule in rules)
            {
                status = rule.ProcessBusinessRule(entry);
            }

            return(status);
        }
        public Constants.STATUS ProcessBusinessRule(EnrollmentEntry entry)
        {
            Constants.STATUS status = Constants.STATUS.ACCEPTED;

            if (entry != null)
            {
                if (entry.effectiveDate == null)
                {
                    status = Constants.STATUS.REJECTED;
                }
                if (entry.effectiveDate > DateTime.Now.AddDays(30))
                {
                    status = Constants.STATUS.REJECTED;
                }
            }

            return(status);
        }
        public Constants.STATUS ProcessBusinessRule(EnrollmentEntry entry)
        {
            Constants.STATUS status = Constants.STATUS.ACCEPTED;

            if (entry != null)
            {
                if (entry.dob == null)
                {
                    status = Constants.STATUS.REJECTED;
                }
                if (entry.dob > DateTime.Now.AddYears(-18))
                {
                    status = Constants.STATUS.REJECTED;
                }
            }

            return(status);
        }