示例#1
0
        private void SaveChanges(OversightReview oversightReview, Domain.Entities.Apply application, bool isNew)
        {
            if (isNew)
            {
                _oversightReviewRepository.Add(oversightReview);
            }
            else
            {
                _oversightReviewRepository.Update(oversightReview);
            }

            switch (oversightReview.Status)
            {
            case OversightReviewStatus.InProgress:
                application.ApplicationStatus = ApplicationStatus.InProgressOutcome;
                break;

            case OversightReviewStatus.Successful:
            case OversightReviewStatus.SuccessfulAlreadyActive:
            case OversightReviewStatus.SuccessfulFitnessForFunding:
                application.ApplicationStatus = ApplicationStatus.Successful;
                break;

            case OversightReviewStatus.Unsuccessful:
                application.ApplicationStatus = application.GatewayReviewStatus == GatewayReviewStatus.Rejected
                        ? ApplicationStatus.Rejected :
                                                ApplicationStatus.Unsuccessful;
                break;
            }

            _applyRepository.Update(application);
        }
示例#2
0
        private void SaveChanges(OversightReview oversightReview, Domain.Entities.Apply application, bool isNew)
        {
            if (isNew)
            {
                _oversightReviewRepository.Add(oversightReview);
            }
            else
            {
                _oversightReviewRepository.Update(oversightReview);
            }

            if (oversightReview.Status == OversightReviewStatus.InProgress)
            {
                return;
            }

            application.ApplicationStatus = oversightReview.Status == OversightReviewStatus.Unsuccessful
                ? ApplicationStatus.Rejected
                : ApplicationStatus.Approved;

            _applyRepository.Update(application);
        }