Exemplo n.º 1
0
 public void Setup()
 {
     this._transactionScope        = new TransactionScope();
     this._localityRepository      = new LocalityRepository(ConfigurationManager.ConnectionStrings["PAFContext"].ConnectionString);
     this._welshLocalityRepository =
         new WelshLocalityRepository(ConfigurationManager.ConnectionStrings["PAFContext"].ConnectionString);
 }
Exemplo n.º 2
0
        void IUnitOfWork.InitializeRepositories()
        {
            providerRepository = (ProviderRepository)base.Factory.RepositoryFactory.CreateRepository(typeof(ProviderRepository));
            stateRepository    = (StateRepository)base.Factory.RepositoryFactory.CreateRepository(typeof(StateRepository));
            countryRepository  = (CountryRepository)base.Factory.RepositoryFactory.CreateRepository(typeof(CountryRepository));
            cityRepository     = (CityRepository)base.Factory.RepositoryFactory.CreateRepository(typeof(CityRepository));
            localityRepository = (LocalityRepository)base.Factory.RepositoryFactory.CreateRepository(typeof(LocalityRepository));

            providerRepository.DataContext = base.Context;
            stateRepository.DataContext    = base.Context;
            countryRepository.DataContext  = base.Context;
            cityRepository.DataContext     = base.Context;
            localityRepository.DataContext = base.Context;
        }
Exemplo n.º 3
0
        private void InitializeRepositories()
        {
            CountryUnionRepository = new CountryUnionRepository(_context);
            CountryUnionRepository.OperationFailedEvent += OnOperationFailedEvent;

            BankGuaranteeRepository = new BankGuaranteeRepository(_context);
            BankGuaranteeRepository.OperationFailedEvent += OnOperationFailedEvent;

            BankGuaranteeTypeRepository = new BankGuaranteeTypeRepository(_context);
            BankGuaranteeTypeRepository.OperationFailedEvent += OnOperationFailedEvent;

            BudgetRepository = new BudgetRepository(_context);
            BudgetRepository.OperationFailedEvent += OnOperationFailedEvent;

            BudgetUnitRepository = new BudgetUnitRepository(_context);
            BudgetUnitRepository.OperationFailedEvent += OnOperationFailedEvent;

            ConstructorParametersListRepository = new ConstructorParametersListRepository(_context);
            ConstructorParametersListRepository.OperationFailedEvent += OnOperationFailedEvent;

            ConstructorsParametersRepository = new ConstructorsParametersRepository(_context);
            ConstructorsParametersRepository.OperationFailedEvent += OnOperationFailedEvent;

            CostsPercentsRepository = new CostsPercentsRepository(_context);
            CostsPercentsRepository.OperationFailedEvent += OnOperationFailedEvent;

            CreateNewProductTaskRepository = new CreateNewProductTaskRepository(_context);
            CreateNewProductTaskRepository.OperationFailedEvent += OnOperationFailedEvent;

            DirectumTaskRepository = new DirectumTaskRepository(_context);
            DirectumTaskRepository.OperationFailedEvent += OnOperationFailedEvent;

            DirectumTaskGroupRepository = new DirectumTaskGroupRepository(_context);
            DirectumTaskGroupRepository.OperationFailedEvent += OnOperationFailedEvent;

            DirectumTaskGroupFileRepository = new DirectumTaskGroupFileRepository(_context);
            DirectumTaskGroupFileRepository.OperationFailedEvent += OnOperationFailedEvent;

            DirectumTaskMessageRepository = new DirectumTaskMessageRepository(_context);
            DirectumTaskMessageRepository.OperationFailedEvent += OnOperationFailedEvent;

            DocumentNumberRepository = new DocumentNumberRepository(_context);
            DocumentNumberRepository.OperationFailedEvent += OnOperationFailedEvent;

            EventServiceUnitRepository = new EventServiceUnitRepository(_context);
            EventServiceUnitRepository.OperationFailedEvent += OnOperationFailedEvent;

            IncomingRequestRepository = new IncomingRequestRepository(_context);
            IncomingRequestRepository.OperationFailedEvent += OnOperationFailedEvent;

            LaborHourCostRepository = new LaborHourCostRepository(_context);
            LaborHourCostRepository.OperationFailedEvent += OnOperationFailedEvent;

            LaborHoursRepository = new LaborHoursRepository(_context);
            LaborHoursRepository.OperationFailedEvent += OnOperationFailedEvent;

            LogUnitRepository = new LogUnitRepository(_context);
            LogUnitRepository.OperationFailedEvent += OnOperationFailedEvent;

            LosingReasonRepository = new LosingReasonRepository(_context);
            LosingReasonRepository.OperationFailedEvent += OnOperationFailedEvent;

            MarketFieldRepository = new MarketFieldRepository(_context);
            MarketFieldRepository.OperationFailedEvent += OnOperationFailedEvent;

            PaymentActualRepository = new PaymentActualRepository(_context);
            PaymentActualRepository.OperationFailedEvent += OnOperationFailedEvent;

            PaymentConditionPointRepository = new PaymentConditionPointRepository(_context);
            PaymentConditionPointRepository.OperationFailedEvent += OnOperationFailedEvent;

            PaymentPlannedRepository = new PaymentPlannedRepository(_context);
            PaymentPlannedRepository.OperationFailedEvent += OnOperationFailedEvent;

            PenaltyRepository = new PenaltyRepository(_context);
            PenaltyRepository.OperationFailedEvent += OnOperationFailedEvent;

            PriceCalculationRepository = new PriceCalculationRepository(_context);
            PriceCalculationRepository.OperationFailedEvent += OnOperationFailedEvent;

            PriceCalculationFileRepository = new PriceCalculationFileRepository(_context);
            PriceCalculationFileRepository.OperationFailedEvent += OnOperationFailedEvent;

            PriceCalculationHistoryItemRepository = new PriceCalculationHistoryItemRepository(_context);
            PriceCalculationHistoryItemRepository.OperationFailedEvent += OnOperationFailedEvent;

            PriceCalculationItemRepository = new PriceCalculationItemRepository(_context);
            PriceCalculationItemRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductCategoryRepository = new ProductCategoryRepository(_context);
            ProductCategoryRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductCategoryPriceAndCostRepository = new ProductCategoryPriceAndCostRepository(_context);
            ProductCategoryPriceAndCostRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductIncludedRepository = new ProductIncludedRepository(_context);
            ProductIncludedRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductDesignationRepository = new ProductDesignationRepository(_context);
            ProductDesignationRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductTypeRepository = new ProductTypeRepository(_context);
            ProductTypeRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductTypeDesignationRepository = new ProductTypeDesignationRepository(_context);
            ProductTypeDesignationRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProjectTypeRepository = new ProjectTypeRepository(_context);
            ProjectTypeRepository.OperationFailedEvent += OnOperationFailedEvent;

            StandartMarginalIncomeRepository = new StandartMarginalIncomeRepository(_context);
            StandartMarginalIncomeRepository.OperationFailedEvent += OnOperationFailedEvent;

            StandartProductionTermRepository = new StandartProductionTermRepository(_context);
            StandartProductionTermRepository.OperationFailedEvent += OnOperationFailedEvent;

            StructureCostRepository = new StructureCostRepository(_context);
            StructureCostRepository.OperationFailedEvent += OnOperationFailedEvent;

            SupervisionRepository = new SupervisionRepository(_context);
            SupervisionRepository.OperationFailedEvent += OnOperationFailedEvent;

            AnswerFileTceRepository = new AnswerFileTceRepository(_context);
            AnswerFileTceRepository.OperationFailedEvent += OnOperationFailedEvent;

            ShippingCostFileRepository = new ShippingCostFileRepository(_context);
            ShippingCostFileRepository.OperationFailedEvent += OnOperationFailedEvent;

            TechnicalRequrementsRepository = new TechnicalRequrementsRepository(_context);
            TechnicalRequrementsRepository.OperationFailedEvent += OnOperationFailedEvent;

            TechnicalRequrementsFileRepository = new TechnicalRequrementsFileRepository(_context);
            TechnicalRequrementsFileRepository.OperationFailedEvent += OnOperationFailedEvent;

            TechnicalRequrementsTaskRepository = new TechnicalRequrementsTaskRepository(_context);
            TechnicalRequrementsTaskRepository.OperationFailedEvent += OnOperationFailedEvent;

            TechnicalRequrementsTaskHistoryElementRepository = new TechnicalRequrementsTaskHistoryElementRepository(_context);
            TechnicalRequrementsTaskHistoryElementRepository.OperationFailedEvent += OnOperationFailedEvent;

            UserGroupRepository = new UserGroupRepository(_context);
            UserGroupRepository.OperationFailedEvent += OnOperationFailedEvent;

            GlobalPropertiesRepository = new GlobalPropertiesRepository(_context);
            GlobalPropertiesRepository.OperationFailedEvent += OnOperationFailedEvent;

            AddressRepository = new AddressRepository(_context);
            AddressRepository.OperationFailedEvent += OnOperationFailedEvent;

            CountryRepository = new CountryRepository(_context);
            CountryRepository.OperationFailedEvent += OnOperationFailedEvent;

            DistrictRepository = new DistrictRepository(_context);
            DistrictRepository.OperationFailedEvent += OnOperationFailedEvent;

            LocalityRepository = new LocalityRepository(_context);
            LocalityRepository.OperationFailedEvent += OnOperationFailedEvent;

            LocalityTypeRepository = new LocalityTypeRepository(_context);
            LocalityTypeRepository.OperationFailedEvent += OnOperationFailedEvent;

            RegionRepository = new RegionRepository(_context);
            RegionRepository.OperationFailedEvent += OnOperationFailedEvent;

            SumRepository = new SumRepository(_context);
            SumRepository.OperationFailedEvent += OnOperationFailedEvent;

            CurrencyExchangeRateRepository = new CurrencyExchangeRateRepository(_context);
            CurrencyExchangeRateRepository.OperationFailedEvent += OnOperationFailedEvent;

            NoteRepository = new NoteRepository(_context);
            NoteRepository.OperationFailedEvent += OnOperationFailedEvent;

            OfferUnitRepository = new OfferUnitRepository(_context);
            OfferUnitRepository.OperationFailedEvent += OnOperationFailedEvent;

            PaymentConditionSetRepository = new PaymentConditionSetRepository(_context);
            PaymentConditionSetRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductBlockRepository = new ProductBlockRepository(_context);
            ProductBlockRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductDependentRepository = new ProductDependentRepository(_context);
            ProductDependentRepository.OperationFailedEvent += OnOperationFailedEvent;

            BankDetailsRepository = new BankDetailsRepository(_context);
            BankDetailsRepository.OperationFailedEvent += OnOperationFailedEvent;

            CompanyRepository = new CompanyRepository(_context);
            CompanyRepository.OperationFailedEvent += OnOperationFailedEvent;

            CompanyFormRepository = new CompanyFormRepository(_context);
            CompanyFormRepository.OperationFailedEvent += OnOperationFailedEvent;

            DocumentsRegistrationDetailsRepository = new DocumentsRegistrationDetailsRepository(_context);
            DocumentsRegistrationDetailsRepository.OperationFailedEvent += OnOperationFailedEvent;

            EmployeesPositionRepository = new EmployeesPositionRepository(_context);
            EmployeesPositionRepository.OperationFailedEvent += OnOperationFailedEvent;

            FacilityTypeRepository = new FacilityTypeRepository(_context);
            FacilityTypeRepository.OperationFailedEvent += OnOperationFailedEvent;

            ActivityFieldRepository = new ActivityFieldRepository(_context);
            ActivityFieldRepository.OperationFailedEvent += OnOperationFailedEvent;

            ContractRepository = new ContractRepository(_context);
            ContractRepository.OperationFailedEvent += OnOperationFailedEvent;

            MeasureRepository = new MeasureRepository(_context);
            MeasureRepository.OperationFailedEvent += OnOperationFailedEvent;

            ParameterRepository = new ParameterRepository(_context);
            ParameterRepository.OperationFailedEvent += OnOperationFailedEvent;

            ParameterGroupRepository = new ParameterGroupRepository(_context);
            ParameterGroupRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductRelationRepository = new ProductRelationRepository(_context);
            ProductRelationRepository.OperationFailedEvent += OnOperationFailedEvent;

            PersonRepository = new PersonRepository(_context);
            PersonRepository.OperationFailedEvent += OnOperationFailedEvent;

            ParameterRelationRepository = new ParameterRelationRepository(_context);
            ParameterRelationRepository.OperationFailedEvent += OnOperationFailedEvent;

            SalesUnitRepository = new SalesUnitRepository(_context);
            SalesUnitRepository.OperationFailedEvent += OnOperationFailedEvent;

            DocumentRepository = new DocumentRepository(_context);
            DocumentRepository.OperationFailedEvent += OnOperationFailedEvent;

            SumOnDateRepository = new SumOnDateRepository(_context);
            SumOnDateRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProductRepository = new ProductRepository(_context);
            ProductRepository.OperationFailedEvent += OnOperationFailedEvent;

            OfferRepository = new OfferRepository(_context);
            OfferRepository.OperationFailedEvent += OnOperationFailedEvent;

            EmployeeRepository = new EmployeeRepository(_context);
            EmployeeRepository.OperationFailedEvent += OnOperationFailedEvent;

            OrderRepository = new OrderRepository(_context);
            OrderRepository.OperationFailedEvent += OnOperationFailedEvent;

            PaymentConditionRepository = new PaymentConditionRepository(_context);
            PaymentConditionRepository.OperationFailedEvent += OnOperationFailedEvent;

            PaymentDocumentRepository = new PaymentDocumentRepository(_context);
            PaymentDocumentRepository.OperationFailedEvent += OnOperationFailedEvent;

            FacilityRepository = new FacilityRepository(_context);
            FacilityRepository.OperationFailedEvent += OnOperationFailedEvent;

            ProjectRepository = new ProjectRepository(_context);
            ProjectRepository.OperationFailedEvent += OnOperationFailedEvent;

            UserRoleRepository = new UserRoleRepository(_context);
            UserRoleRepository.OperationFailedEvent += OnOperationFailedEvent;

            SpecificationRepository = new SpecificationRepository(_context);
            SpecificationRepository.OperationFailedEvent += OnOperationFailedEvent;

            TenderRepository = new TenderRepository(_context);
            TenderRepository.OperationFailedEvent += OnOperationFailedEvent;

            TenderTypeRepository = new TenderTypeRepository(_context);
            TenderTypeRepository.OperationFailedEvent += OnOperationFailedEvent;

            UserRepository = new UserRepository(_context);
            UserRepository.OperationFailedEvent += OnOperationFailedEvent;
        }