protected override void Dispose(bool disposing) { if (disposing) { if (contractorRepository != null) { contractorRepository.Dispose(); contractorRepository = null; } if (employeeRepository != null) { employeeRepository.Dispose(); employeeRepository = null; } if (employeeRelationshipTypeRepository != null) { employeeRelationshipTypeRepository.Dispose(); employeeRelationshipTypeRepository = null; } if (workflowMessageService != null) { workflowMessageService.Dispose(); workflowMessageService = null; } } base.Dispose(disposing); }
public ContractorEmployeesController(IContractorRepository contractorRepo, IEmployeeRepository employeeRepo, IEmployeeRelationshipTypeRepository employeeRelationshipTypeRepo, IWorkflowMessageService workflowMessageServ) { contractorRepository = contractorRepo; employeeRepository = employeeRepo; employeeRelationshipTypeRepository = employeeRelationshipTypeRepo; workflowMessageService = workflowMessageServ; }
protected virtual void Dispose(bool disposing) { if (disposing) { // Free managed resources if (contractorRepository != null) { contractorRepository.Dispose(); contractorRepository = null; } if (contractRepository != null) { contractRepository.Dispose(); contractRepository = null; } if (employeeRepository != null) { employeeRepository.Dispose(); employeeRepository = null; } if (vehicleRepository != null) { vehicleRepository.Dispose(); vehicleRepository = null; } } }
public RequirementService(IContractorRepository contractorRepo, IContractRepository contractRepo, IEmployeeRepository employeeRepo, IVehicleRepository vehicleRepo) { contractorRepository = contractorRepo; contractRepository = contractRepo; employeeRepository = employeeRepo; vehicleRepository = vehicleRepo; }
public ContractorsController(IContractorRepository contractorRepo, ILocalizationRepository localizationRepo, IBusinessTypeRepository businessTypeRepo, IEmployeeRepository employeeTypesRepo, IVehicleRepository vehicleRepo, IContractRepository contractRepo, IEmployeeRelationshipTypeRepository employeeRelationshipTypeRepo, IWorkflowMessageService workflowMessageServ, IIdentityMessageService emailServ) { contractorRepository = contractorRepo; localizationRepository = localizationRepo; businessTypeRepository = businessTypeRepo; employeeRepository = employeeTypesRepo; vehicleRepository = vehicleRepo; contractRepository = contractRepo; employeeRelationshipTypeRepository = employeeRelationshipTypeRepo; emailService = emailServ; workflowMessageService = workflowMessageServ; userManager = new UserManager <ContractorUser>(new UserStore <ContractorUser>(new ApplicationDbContext())); userManager.UserValidator = new UserValidator <ContractorUser>(userManager) { AllowOnlyAlphanumericUserNames = true, RequireUniqueEmail = true }; var provider = new DpapiDataProtectionProvider("SampleAppName"); userManager.UserTokenProvider = new DataProtectorTokenProvider <ContractorUser>(provider.Create("SampleTokenName")); userManager.EmailService = emailService; }
public void Validate(IContractorRepository contractorRepository) { if (string.IsNullOrEmpty(CompanyName)) { throw new EntityModelException(nameof(CompanyName), "The company name is mandatory."); } CasCode = CasCode?.Trim(); CspCode = CspCode?.Trim(); if (string.IsNullOrEmpty(CasCode) && string.IsNullOrEmpty(CspCode)) { throw new EntityModelException($"{nameof(CasCode)}+{nameof(CspCode)}", "The CASCode and the CSPCode can not be both empty."); } if (!string.IsNullOrEmpty(CasCode) && !string.IsNullOrEmpty(CspCode)) { throw new EntityModelException($"{nameof(CasCode)}+{nameof(CspCode)}", "The CASCode and the CSPCode can not have both values."); } if (!contractorRepository.IsUnique(this)) { throw new EntityModelException($"{nameof(CompanyName)}", "There is another contractor with the same company name."); } }
public ContractorController( IContractorRepository repository, IContractorFactory factory ) { _repository = repository; _factory = factory; }
public ContractorService(IContractorRepository repository, AbstractValidator <Contractor> addValidator) { Guard.ThrowIfArgumentIsNull(repository, nameof(repository)); Guard.ThrowIfArgumentIsNull(addValidator, nameof(addValidator)); _repository = repository; _addContractorValidator = addValidator; }
public HomeContractorController(IContractorRepository contractorRepo, IWorkflowMessageService workflowMessageServ) { contractorRepository = contractorRepo; workflowMessageService = workflowMessageServ; //ViewBag.UserFullname = base.CurrentUserFullname; ViewBag.UserFullname = base.CurrentCustomerID.ToString(); }
public MProjectController(IMProjectRepository repoMProject, ILogRepository repoLog, ICompanyRepository repoCompany, IContractorRepository repoContractor, IProjectRepository repoProject) : base(repoLog) { RepoMProject = repoMProject; RepoCompany = repoCompany; RepoContractor = repoContractor; RepoProject = repoProject; }
public MProjectController(IMProjectRepository repoMProject, ILogRepository repoLog, ICompanyRepository repoCompany,IContractorRepository repoContractor,IProjectRepository repoProject) : base(repoLog) { RepoMProject = repoMProject; RepoCompany = repoCompany; RepoContractor = repoContractor; RepoProject = repoProject; }
public DataManager(ICardRepository cardRepository, IStatusRepository statusRepository, IContractorRepository contractorRepository, ITypeCardRepository typeCardRepository, IRoleRepository roleRepository, IUserRepository userRepository) { Cards = cardRepository; Contractors = contractorRepository; Statuses = statusRepository; TypesCard = typeCardRepository; Roles = roleRepository; Users = userRepository; }
public void TestInitialize() { EntityFrameworkDbContextHelper.Instance.BeginTransaction(); _contractorRepository = new ContractorRepository(); _genericRepository = new EntityFrameworkGenericRepository <Guid>(); _root = new SstRegistrationTestHarnessSystem(Guid.NewGuid()); _genericRepository.Save(_root); }
public InventoryService(IInventoryRepository inventoryRepository, ICategoryRepository categoryRepository, IContractRepository contractRepository, IContractorRepository contractorRepository) { this.inventoryRepository = inventoryRepository; this.categoryRepository = categoryRepository; this.contractRepository = contractRepository; this.contractorRepository = contractorRepository; }
protected override void Dispose(bool disposing) { if (disposing) { if (contractorRepository != null) { contractorRepository.Dispose(); contractorRepository = null; } if (contractRepository != null) { contractRepository.Dispose(); contractRepository = null; } if (periodRepository != null) { periodRepository.Dispose(); periodRepository = null; } if (requirementRepository != null) { requirementRepository.Dispose(); requirementRepository = null; } if (presentationRepository != null) { presentationRepository.Dispose(); presentationRepository = null; } if (presentationServices != null) { presentationServices.Dispose(); presentationServices = null; } //documentFileService.Dispose(); if (workflowMessageService != null) { workflowMessageService.Dispose(); workflowMessageService = null; } if (entityTypeRepository != null) { entityTypeRepository.Dispose(); entityTypeRepository = null; } } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (contractorRepository != null) { contractorRepository.Dispose(); contractorRepository = null; } if (localizationRepository != null) { localizationRepository.Dispose(); localizationRepository = null; } if (businessTypeRepository != null) { businessTypeRepository.Dispose(); businessTypeRepository = null; } if (employeeRepository != null) { employeeRepository.Dispose(); employeeRepository = null; } if (vehicleRepository != null) { vehicleRepository.Dispose(); vehicleRepository = null; } if (employeeRelationshipTypeRepository != null) { employeeRelationshipTypeRepository.Dispose(); employeeRelationshipTypeRepository = null; } if (userManager != null) { userManager.Dispose(); userManager = null; } if (workflowMessageService != null) { workflowMessageService.Dispose(); workflowMessageService = null; } } base.Dispose(disposing); }
private void SetUpRepositories() { ContractorRepository = kernel.Get<IContractorRepository>(); DeviceRepository = kernel.Get<IDeviceRepository>(); FixedAssetRepository = kernel.Get<IFixedAssetRepository>(); KindRepository = kernel.Get<IKindRepository>(); LicenceRepository = kernel.Get<ILicenceRepository>(); PeripheralDeviceRepository = kernel.Get<IPeripheralDeviceRepository>(); PersonRepository = kernel.Get<IPersonRepository>(); SectionRepository = kernel.Get<ISectionRepository>(); SubgroupRepository = kernel.Get<ISubgroupRepository>(); MembershipRoleRepository = kernel.Get<IMembershipRoleRepository>(); MembershipUserRepository = kernel.Get<IMembershipUserRepository>(); }
protected override void Dispose(bool disposing) { if (disposing) { if (userManager != null) { userManager.Dispose(); userManager = null; } if (contractorRepository != null) { contractorRepository.Dispose(); contractorRepository = null; } } base.Dispose(disposing); }
public CustomerRequirementsController(IContractorRepository contractorRepo, IContractRepository contractRepo, IPeriodRepository periodRepo, IRequirementRepository requirementRepo, IPresentationRepository presentationRepo, IPresentationServices presentationServ, IDocumentFileService documentFileServ, IWorkflowMessageService workflowMessageServ) { contractorRepository = contractorRepo; contractRepository = contractRepo; periodRepository = periodRepo; requirementRepository = requirementRepo; presentationRepository = presentationRepo; presentationServices = presentationServ; documentFileService = documentFileServ; workflowMessageService = workflowMessageServ; }
public PrototypeService(ICategoryRepository categoryRepository, IContractorRepository contractorRepository, IContractRepository contractRepository, IImageRepository imageRepository, IInventoryRepository inventoryRepository, IOrderItemRepository orderItemRepository, IOrderRepository orderRepository, IShoppingCartItemRepository shoppingCartItemRepository, IShoppingCartRepository shoppingCartRepository, IUserRepository userRepository) { this.categoryRepository = categoryRepository; this.contractorRepository = contractorRepository; this.contractRepository = contractRepository; this.imageRepository = imageRepository; this.inventoryRepository = inventoryRepository; this.orderItemRepository = orderItemRepository; this.orderRepository = orderRepository; this.shoppingCartItemRepository = shoppingCartItemRepository; this.shoppingCartRepository = shoppingCartRepository; this.userRepository = userRepository; }
public RequirementsController(IRequirementRepository requirementRepo, IPresentationRepository presentationRepo, IDocumentFileService documentFileServ, ICustomerAuditorRespository customerAuditorRespo, IContractorRepository contractorRepo, IPresentationServices presentationServ, IWorkflowMessageService workflowMessageServ, IDocumentationBusinessTypeRepository documentationBusinessTypeRepo, IPeriodRepository periodRepo, IEntityTypeRepository entityTypeRepo) { requirementRepository = requirementRepo; presentationRepository = presentationRepo; documentFileService = documentFileServ; customerAuditorRespository = customerAuditorRespo; contractorRepository = contractorRepo; presentationServices = presentationServ; workflowMessageService = workflowMessageServ; documentationBusinessTypeRepository = documentationBusinessTypeRepo; periodRepository = periodRepo; entityTypeRepository = entityTypeRepo; }
protected override void Dispose(bool disposing) { if (disposing) { if (contractorRepository != null) { contractorRepository.Dispose(); contractorRepository = null; } if (vehicleRepository != null) { vehicleRepository.Dispose(); vehicleRepository = null; } if (workflowMessageService != null) { workflowMessageService.Dispose(); workflowMessageService = null; } } base.Dispose(disposing); }
public ContractorController(IContractorRepository repo) { repository = repo; }
public ContractorService(IUnitOfWork unitOfWork, IContractorRepository ContractorRepository) { _unitOfWork = unitOfWork; _ContractorRepository = ContractorRepository; }
public ContractorControllerTest() { _validator = new AddContractorValidator(); _repository = new InMemoryContractorRepository(); _service = new ContractorService(_repository, _validator); }
public ContractorController(IContractorRepository repoContractor, ILogRepository repoLog) : base(repoLog) { RepoContractor = repoContractor; }
public DashboardController(IPermitRepository projects, IContractorRepository contractor) { _projects = projects; _contractor = contractor; }
public ContractorService(IContractorRepository contractorRepository) { _contractorRepository = contractorRepository; }
public ContractorService(IContractorRepository repository) { this.repository = repository; }
public UserTablesService(IUserTablesRepository usertableRepository, IContractorRepository contractorRepository, IUnitOfWork unitOfWork) { this.contractorRepository = contractorRepository; this.usertableRepository = usertableRepository; this.unitOfWork = unitOfWork; }
public ContractorServiceTest() { _validator = new AddContractorValidator(); _repository = new InMemoryContractorRepository(); }
public ApiContractorController(IContractorRepository repository) { contractorRepository = repository; }
public ContractorsController(IContractorRepository contractorRepo, IProjectRepository projectRepo) { this.contractorRepo = contractorRepo; this.projectRepo = projectRepo; }
public ContractorController(IContractorRepository repo) { _repo = repo; }