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;
		}
Exemplo n.º 2
0
        public RegisterFormModel(IBranchesService brancService,
                                 ICompaniesService companyService)
        {
            this.brancService = brancService;
            var allBranches = this.brancService.AllAsync().Result.AsEnumerable();

            this.Branches = allBranches
                            .Select(b => new SelectListItem
            {
                Text  = b.FullAddress,
                Value = b.Id.ToString()
            })
                            .ToList();

            this.companyService = companyService;
            var allCompanies = this.companyService.AllAsync().Result.AsEnumerable();

            this.Companies = allCompanies
                             .Select(b => new SelectListItem
            {
                Text  = b.Name,
                Value = b.Id.ToString()
            })
                             .ToList();
        }
Exemplo n.º 3
0
		public SettingsController(IClientCompanyAppraiserSettingsService clientCompanyAppraiserSettingsService, IControllerPluginFactory controllerPluginFactory, IClientCompaniesListService clientCompaniesListService, IBranchesService branchesService)
			: base(controllerPluginFactory)
		{
			_clientCompanyAppraiserSettingsService = ValidationUtil.CheckOnNullAndThrowIfNull(clientCompanyAppraiserSettingsService);
			_clientCompaniesService = ValidationUtil.CheckOnNullAndThrowIfNull(clientCompaniesListService);
			_branchesService = branchesService;
		}
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="branchesService">Branches service.</param>
 /// <param name="authorizationService">Authorization service.</param>
 /// <param name="searchService">Search service.</param>
 public BranchesController(
     IBranchesService branchesService,
     IAuthorizationService authorizationService,
     ISearchService searchService)
 {
     _branchesService      = branchesService;
     _authorizationService = authorizationService;
     _searchService        = searchService;
 }
Exemplo n.º 5
0
 public VehiclesController(IVehicleService vehicleService,
                           IMapper mapper, IBranchesService branchService,
                           ICompaniesService employeerService,
                           IBrandService brandService)
 {
     this.vehicleService   = vehicleService;
     this.mapper           = mapper;
     this.branchService    = branchService;
     this.employeerService = employeerService;
     this.brandService     = brandService;
 }
Exemplo n.º 6
0
 public ExternalLoginModel(
     SignInManager <User> signInManager,
     UserManager <User> userManager,
     ILogger <ExternalLoginModel> logger,
     IBranchesService branchService,
     ICompaniesService companyService)
     : base(branchService, companyService)
 {
     _signInManager = signInManager;
     _userManager   = userManager;
     _logger        = logger;
 }
Exemplo n.º 7
0
        public HomeController(
            ILogger <HomeController> logger,
            IBranchesService branchesService,
            IInsurancesPoliciesService policyService,
            IVehicleService vehicleService
            )
        {
            this.branchesService = branchesService;
            this.policyService   = policyService;
            this.vehicleService  = vehicleService;

            _logger = logger;
        }
 public DocumentsService(
     IDocumentsClient documentsClient,
     IBranchesService branchService,
     IProjectsService projectsService,
     ICacheService cacheService,
     ILogger <DocumentsService> logger)
 {
     _documentsClient = documentsClient;
     _branchService   = branchService;
     _projectsService = projectsService;
     _cacheService    = cacheService;
     _logger          = logger;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="projectsService">Project service.</param>
 /// <param name="branchesService">Bran ches service.</param>
 /// <param name="searchService">Search service.</param>
 /// <param name="authorizationService">Authorization service.</param>
 /// <param name="usersService">Users service.</param>
 public ProjectsController(
     IProjectsService projectsService,
     IBranchesService branchesService,
     ISearchService searchService,
     IAuthorizationService authorizationService,
     IUsersService usersService)
 {
     _projectsService      = projectsService;
     _branchesService      = branchesService;
     _searchService        = searchService;
     _authorizationService = authorizationService;
     _usersService         = usersService;
 }
Exemplo n.º 10
0
        public RegisterModel(
            UserManager <User> userManager,
            SignInManager <User> signInManager,
            ILogger <RegisterModel> logger,
            IBranchesService branchService,
            ICompaniesService companyService
            )
            : base(branchService, companyService)

        {
            _userManager   = userManager;
            _signInManager = signInManager;
            _logger        = logger;
        }
Exemplo n.º 11
0
        public UsersController(IUsersService usersService,
                               UserManager <User> userManager,
                               RoleManager <IdentityRole> roleManager,
                               CarDbContext dbContext,
                               IBranchesService brancService,
                               ICompaniesService employerService,
                               IMapper mapper)
        {
            this.usersService    = usersService;
            this.userManager     = userManager;
            this.roleManager     = roleManager;
            this.brancService    = brancService;
            this.employerService = employerService;

            this.dbContext = dbContext;
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="documentsService">Documents service.</param>
 /// <param name="markdownService">Markdown service.</param>
 /// <param name="branchService">Branch service.</param>
 /// <param name="searchService">Search service.</param>
 /// <param name="authorizationService">Authorization service.</param>
 /// <param name="projectsService">Projects service.</param>
 /// <param name="logsService">Logs service.</param>
 public DocumentsController(
     IDocumentsService documentsService,
     IMarkdownService markdownService,
     IBranchesService branchService,
     ISearchService searchService,
     IAuthorizationService authorizationService,
     IProjectsService projectsService,
     ILogsService logsService)
 {
     _documentsService     = documentsService;
     _markdownService      = markdownService;
     _branchService        = branchService;
     _searchService        = searchService;
     _authorizationService = authorizationService;
     _projectsService      = projectsService;
     _logsService          = logsService;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="documentsService">Documents service.</param>
 /// <param name="branchService">Branch service.</param>
 /// <param name="searchService">Search service.</param>
 /// <param name="projectsService">Projects service.</param>
 /// <param name="logsService">Logs service.</param>
 /// <param name="logger">Logger service.</param>
 /// <param name="httpContextHeaders">Http context headers.</param>
 /// <param name="applicationParameters">Application parameters.</param>
 public UploaderJob(
     IDocumentsService documentsService,
     IBranchesService branchService,
     ISearchService searchService,
     IProjectsService projectsService,
     ILogsService logsService,
     ILogger <UploaderJob> logger,
     IHttpContextHeaders httpContextHeaders,
     IOptions <ApplicationParameters> applicationParameters)
 {
     _documentsService      = documentsService;
     _branchService         = branchService;
     _searchService         = searchService;
     _projectsService       = projectsService;
     _logsService           = logsService;
     _logger                = logger;
     _httpContextHeaders    = httpContextHeaders;
     _applicationParameters = applicationParameters.Value;
 }
Exemplo n.º 14
0
		public AppraisalCompanyDetailsController(IAppraisalCompanyService appraisalCompanyWizardService, IAppraisalCompanyBranchesService appraisalCompanyAdminManagement, IReferenceManagement referenceManagement, IUserAccessHelper userAccessHelper, IGeocodingValidation geocodingValidation)
		{
			_appraisalCompanyWizardService = appraisalCompanyWizardService;
			_referenceManagement = referenceManagement;
			_userAccessHelper = userAccessHelper;
			_geocodingValidation = geocodingValidation;

			var branchesDatabaseService = new BranchesDatabaseService(appraisalCompanyAdminManagement);
			_propertyCurrentCompanyService = new PropertyCurrentCompanyService();
			branchesDatabaseService.CurrentCompanyService = _propertyCurrentCompanyService;
			var branchesSecurityService = new BranchesServiceSecurity(branchesDatabaseService,
																																new Lazy<AppraisalCompanyDetailsViewModel>(
																																	() =>
																																	_appraisalCompanyWizardService.GetAppraisalCompanyDetails(
																																		_propertyCurrentCompanyService.CurrentCompany)));
			_branchesService = branchesSecurityService;
			_brancheMessagesService = new BrancheMessageService(() => Session, _propertyCurrentCompanyService)
			{
				BrancheAddedMessage = Constants.Notifications.BranchSaved,
				BranchesAddedMessage = Constants.Notifications.BranchesSaved,
				EmptyResult = string.Empty
			};
		}
Exemplo n.º 15
0
        public ProjectType(IBranchesService branchesService)
        {
            Field(x => x.Id).Description("The id of the project.");
            Field(x => x.Name, nullable: true).Description("The name of the project.");
            Field(x => x.Description, nullable: true).Description("The description of the project.");
            Field(x => x.DefaultBranch, nullable: true).Description("Project's default branch.");
            Field(x => x.Group).Description("The group of the project.");
            Field(x => x.ProjectSite).Description("The site of the project.");
            Field(x => x.AccessToken).Description("The access token of the project.");
            Field(x => x.IsAccessLimited).Description("The information about access to the project.");

            Field <ListGraphType <StringGraphType> >(
                "visibleBranches",
                resolve: context => context.Source.VisibleBranches
                );

            Field <ListGraphType <StringGraphType> >(
                "tags",
                resolve: context => context.Source.Tags
                );

            Field <ListGraphType <ContactPersonType> >(
                "contactPeople",
                resolve: context => context.Source.ContactPeople
                );

            Field <ListGraphType <EditLinkType> >(
                "editLinks",
                resolve: context => context.Source.EditLinks
                );

            Field <ListGraphType <BranchType> >(
                "branches",
                resolve: context => branchesService.GetBranchesAsync(context.Source.Id)
                );
        }
Exemplo n.º 16
0
 public BranchesTest(DatabaseFixture fixture)
 {
     this.fixture       = fixture;
     this.branchService = new BranchesService(fixture.Context);
 }
Exemplo n.º 17
0
 public HomeController(IUsersService userService, IBranchesService branchesService)
 {
     _userService     = userService;
     _branchesService = branchesService;
 }
 public BranchesController(IBranchesService branchesService)
 {
     _branchesService = branchesService;
 }
Exemplo n.º 19
0
 public UsersService(IUserRepository repository, IBranchesService branchesService)
 {
     _repository      = repository;
     _branchesService = branchesService;
 }
Exemplo n.º 20
0
 public BranchesResolver(IBranchesService branchesService)
 {
     _branchesService = branchesService;
 }
Exemplo n.º 21
0
		public BranchesServiceSecurity(IBranchesService branchesService, Lazy<AppraisalCompanyDetailsViewModel> companyDetailsViewModel)
		{
			_branchesService = ValidationUtil.CheckOnNullAndThrowIfNull(branchesService);
			_branchAcceses = new BranchAcceses(ValidationUtil.CheckOnNullAndThrowIfNull(companyDetailsViewModel));
		}
Exemplo n.º 22
0
		private static IQueryable<AppraisalCompanyBranchViewModel> BrancheForCompanyExistsQueryable(IBranchesService source, int companyId, string branchName)
		{
			if (source == null) throw new ArgumentNullException("source");

			return source.GetAllBranches().Where(e => e.Name.ToUpper() == branchName.ToUpper() && e.CompanyId == companyId);
		}
Exemplo n.º 23
0
 public BranchesController(IBranchesService branchesService,
                           UserManager <User> userManager)
 {
     this.branchesService = branchesService;
     this.userManager     = userManager;
 }