Exemple #1
0
        public CustomerController(ICustomerService customerServ,
                                  ICreditRatingRepository creditRatingRepo,
                                  IWorkflowMessageService workflowMessageServ,
                                  ICustomerProductRepository customerProductRepo,
                                  IContactRepository contactRepo,
                                  IContactTypeRepository contactTypeRepo,
                                  IGenericRepository <ContactClass> contactClassRepo,
                                  ISalesChannelRepository salesChannelRepo,
                                  ISalesChannelUserRepository salesChannelUserRepo)
        {
            customerService            = customerServ;
            creditRatingRepository     = creditRatingRepo;
            workflowMessageService     = workflowMessageServ;
            customerProductRepository  = customerProductRepo;
            contactRepository          = contactRepo;
            contactTypeRepository      = contactTypeRepo;
            contactClassRepository     = contactClassRepo;
            salesChannelRepository     = salesChannelRepo;
            salesChannelUserRepository = salesChannelUserRepo;

            userManager = new UserManager <CustomerUser>(new UserStore <CustomerUser>(new ApplicationDbContext()));
            userManager.UserValidator = new UserValidator <CustomerUser>(userManager)
            {
                //AllowOnlyAlphanumericUserNames = true,
                RequireUniqueEmail = true
            };
        }
Exemple #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (contactTypeRepository != null)
         {
             contactTypeRepository.Dispose();
             contactTypeRepository = null;
         }
         if (contactRepository != null)
         {
             contactRepository.Dispose();
             contactRepository = null;
         }
         if (customerService != null)
         {
             customerService.Dispose();
             customerService = null;
         }
         if (creditRatingRepository != null)
         {
             creditRatingRepository.Dispose();
             creditRatingRepository = null;
         }
         if (userManager != null)
         {
             userManager.Dispose();
             userManager = null;
         }
         if (workflowMessageService != null)
         {
             workflowMessageService.Dispose();
             workflowMessageService = null;
         }
         if (customerProductRepository != null)
         {
             customerProductRepository.Dispose();
             customerProductRepository = null;
         }
         if (contactClassRepository != null)
         {
             contactClassRepository.Dispose();
             contactClassRepository = null;
         }
         if (salesChannelRepository != null)
         {
             salesChannelRepository.Dispose();
             salesChannelRepository = null;
         }
         if (salesChannelUserRepository != null)
         {
             salesChannelUserRepository.Dispose();
             salesChannelUserRepository = null;
         }
     }
     base.Dispose(disposing);
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing && salesChannelUserRepository != null)
     {
         salesChannelUserRepository.Dispose();
         salesChannelUserRepository = null;
     }
     base.Dispose(disposing);
 }
Exemple #4
0
 public ProductQuoteApiController(IProductQuoteService productQuoteServ, IProductQuoteRepository productQuoteRepo, IProductRepository productRepo, ISaleModalityRepository saleModalityRepo, IGeographicAreaRepository geographicAreaRepo, ISaleModalityProductRepository saleModalityProductRepo, IGeographicAreaTransportTypeRepository geographicAreaTransportTypeRepo, ICreditRatingPaymentDeadlineRepository creditRatingPaymentDeadlineRepo, IExchangeTypeRepository exchangeTypeRepo, IStockTimeRepository stockTimeRepo, IDeliveryAmountRepository deliveryAmountRepo, ICustomerProductRepository customerProductRepo, ICustomerRepository customerRepo, IGlobalVariableRepository globalVariableRepo, ILogRecordRepository logRecordRepo, ISalesChannelUserRepository salesChannelUserRepo)
 {
     productQuoteService                   = productQuoteServ;
     productQuoteRepository                = productQuoteRepo;
     productRepository                     = productRepo;
     saleModalityRepository                = saleModalityRepo;
     geographicAreaRepository              = geographicAreaRepo;
     saleModalityProductRepository         = saleModalityProductRepo;
     geographicAreaTransportTypeRepository = geographicAreaTransportTypeRepo;
     creditRatingPaymentDeadlineRepository = creditRatingPaymentDeadlineRepo;
     exchangeTypeRepository                = exchangeTypeRepo;
     stockTimeRepository                   = stockTimeRepo;
     deliveryAmountRepository              = deliveryAmountRepo;
     customerProductRepository             = customerProductRepo;
     customerRepository                    = customerRepo;
     globalVariableRepository              = globalVariableRepo;
     logRecordRepository                   = logRecordRepo;
     salesChannelUserRepository            = salesChannelUserRepo;
 }
        public ProductQuoteServiceBuilder()
        {
            _logger                                = new Logger();
            _productRepository                     = new ProductRepository(_logger, new ProductDocumentRepository(_logger));
            _saleModalityRepository                = new SaleModalityRepository(_logger);
            _geographicAreaRepository              = new GeographicAreaRepository(_logger);
            _saleModalityProductRepository         = new SaleModalityProductRepository(_logger);
            _geographicAreaTransportTypeRepository = new GeographicAreaTransportTypeRepository(_logger);
            _creditRatingPaymentDeadlineRepository = new CreditRatingPaymentDeadlineRepository(_logger);
            _exchangeTypeRepository                = new ExchangeTypeRepository(_logger);
            _stockTimeRepository                   = new StockTimeRepository(_logger);
            _deliveryAmountRepository              = new DeliveryAmountRepository(_logger);

            _productQuoteRepository    = new ProductQuoteRepository(_logger);
            _emailManager              = new EmailManager();
            _emailAccountRepository    = new EmailAccountRepository(_logger);
            _adminUserRepository       = new AdminUserRepository();
            _applicationUserRepository = new ApplicationUserRepository();
            _workflowMessageService    = new WorkflowMessageService(_emailManager, _emailAccountRepository, _adminUserRepository, _applicationUserRepository);
            _pdfService = new PdfService();
            _saleModalityCreditRatingRepository = new SaleModalityCreditRatingRepository(_logger);
            _globalVariableRepository           = new GlobalVariableRepository(_logger);
            _customerOrderRepository            = new CustomerOrderRepository(_logger);
            _customerRepository         = new CustomerRepository(_logger);
            _transportTypeRepository    = new TransportTypeRepository(_logger);
            _packagingRepository        = new PackagingRepository(_logger);
            _rofexRepository            = new RofexRepository(_logger);
            _paymentDeadlineRepository  = new PaymentDeadlineRepository(_logger);
            _shipmentTrackingRepository = new ShipmentTrackingRepository(_logger);
            _customerProductRepository  = new CustomerProductRepository(_logger);
            _logRecordRepository        = new LogRecordRepository();
            _customerOrderService       = new CustomerOrderService(_customerOrderRepository, _workflowMessageService);
            _transportService           = new TransportServices(_geographicAreaTransportTypeRepository);
            _marginServices             = new MarginServices();
            _wayOfExceptionRepository   = new WayOfExceptionRepository(_logger);
            _wayOfExceptionServices     = new WayOfExceptionServices(_wayOfExceptionRepository);
            _salesChannelUserRepository = new SalesChannelUserRepository(_logger);
        }
 public SalesChannelUserApiController(ISalesChannelUserRepository salesChannelUserRepo)
 {
     salesChannelUserRepository = salesChannelUserRepo;
 }
Exemple #7
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (productQuoteService != null)
         {
             productQuoteService.Dispose();
             productQuoteService = null;
         }
         if (productQuoteRepository != null)
         {
             productQuoteRepository.Dispose();
             productQuoteRepository = null;
         }
         if (productRepository != null)
         {
             productRepository.Dispose();
             productRepository = null;
         }
         if (saleModalityRepository != null)
         {
             saleModalityRepository.Dispose();
             saleModalityRepository = null;
         }
         if (geographicAreaRepository != null)
         {
             geographicAreaRepository.Dispose();
             geographicAreaRepository = null;
         }
         if (saleModalityProductRepository != null)
         {
             saleModalityProductRepository.Dispose();
             saleModalityProductRepository = null;
         }
         if (geographicAreaTransportTypeRepository != null)
         {
             geographicAreaTransportTypeRepository.Dispose();
             geographicAreaTransportTypeRepository = null;
         }
         if (creditRatingPaymentDeadlineRepository != null)
         {
             creditRatingPaymentDeadlineRepository.Dispose();
             creditRatingPaymentDeadlineRepository = null;
         }
         if (exchangeTypeRepository != null)
         {
             exchangeTypeRepository.Dispose();
             exchangeTypeRepository = null;
         }
         if (stockTimeRepository != null)
         {
             stockTimeRepository.Dispose();
             stockTimeRepository = null;
         }
         if (deliveryAmountRepository != null)
         {
             deliveryAmountRepository.Dispose();
             deliveryAmountRepository = null;
         }
         if (customerProductRepository != null)
         {
             customerProductRepository.Dispose();
             customerProductRepository = null;
         }
         if (customerRepository != null)
         {
             customerRepository.Dispose();
             customerRepository = null;
         }
         if (globalVariableRepository != null)
         {
             globalVariableRepository.Dispose();
             customerRepository = null;
         }
         if (logRecordRepository != null)
         {
             logRecordRepository.Dispose();
             logRecordRepository = null;
         }
         if (salesChannelUserRepository != null)
         {
             salesChannelUserRepository.Dispose();
             salesChannelUserRepository = null;
         }
         if (globalVariableRepository != null)
         {
             globalVariableRepository.Dispose();
             globalVariableRepository = null;
         }
     }
     base.Dispose(disposing);
 }