public AppraisalCompanyProfileController(
			IAppraisalCompanyService appraisalCompanyWizardService,
			IAppraiserManagement appraiserManagement,
			IReferenceManagement referenceManagement,
			IAppraisalCompanyBranchesService appraisalCompanyBranchesService,
			IGeocodingValidation geocodingValidation)
		{
			_appraisalCompanyWizardService = appraisalCompanyWizardService;
			_referenceManagement = referenceManagement;
			_appraiserManagement = appraiserManagement;
			var branchesService = new BranchesDatabaseService(appraisalCompanyBranchesService);
			branchesService.CurrentCompanyService = new LazeCurrentCompanyService(GetAppraisalCompanyId);
			var lazyCompanyDetails =
				new Lazy<AppraisalCompanyDetailsViewModel>(
					() => _appraisalCompanyWizardService.GetAppraisalCompanyDetails(GetAppraisalCompanyId()));
			_branchesService = new BranchesServiceSecurity(branchesService, lazyCompanyDetails);
			_branchAcceses = new BranchAcceses(lazyCompanyDetails);
			_brancheMessagesService = new BrancheMessageService(() => Session, branchesService.CurrentCompanyService)
			{
				BrancheAddedMessage = Constants.Notifications.BranchSaved,
				BranchesAddedMessage = Constants.Notifications.BranchesSaved,
				EmptyResult = string.Empty
			};
			_geocodingValidation = geocodingValidation;
		}
Example #2
0
		public BranchesServiceSecurity(IBranchesService branchesService, Lazy<AppraisalCompanyDetailsViewModel> companyDetailsViewModel)
		{
			_branchesService = ValidationUtil.CheckOnNullAndThrowIfNull(branchesService);
			_branchAcceses = new BranchAcceses(ValidationUtil.CheckOnNullAndThrowIfNull(companyDetailsViewModel));
		}