Ejemplo n.º 1
0
 public SearchService(IOrdersService ordersService,
                      IProductsService productsService, ICustomersService customersService)
 {
     this.ordersService    = ordersService;
     this.productsService  = productsService;
     this.customersService = customersService;
 }
Ejemplo n.º 2
0
        private static void LinqTest(ICustomersService customersService)
        {
            var customers = customersService.Get();

            var query = customers.GroupBy(c => c.FirstName)
                        .Select(g => new { FirstName = g.Key, Qty = g });
        }
Ejemplo n.º 3
0
 public OrdersService(WHMSDbContext context, IInventoryService inventoryService, ICustomersService customersService)
 {
     this.context          = context;
     this.inventoryService = inventoryService;
     this.customersService = customersService;
     this.mapper           = AutoMapperConfig.MapperInstance;
 }
 public CustomerController(ICustomersService customerService, IBillMasterService billMasterService, IEntryMasterService entryMasterService, IUserLogFileService userLogFileService)
 {
     this.customerService    = customerService;
     this.entryMasterService = entryMasterService;
     this.billMasterService  = billMasterService;
     this.userLogFileService = userLogFileService;
 }
Ejemplo n.º 5
0
 public BillProfitController(ICustomersService customerService, ICompanyStoresService companyStoreService, IEmployeeService employeeService, ICostCentersService costCenterService)
 {
     this.customerService     = customerService;
     this.companyStoreService = companyStoreService;
     this.employeeService     = employeeService;
     this.costCenterService   = costCenterService;
 }
Ejemplo n.º 6
0
 public CustomerResolver(
     ICustomersService customersService,
     IWorkContextAccessor workContextAccessor)
 {
     _customersService    = customersService;
     _workContextAccessor = workContextAccessor;
 }
Ejemplo n.º 7
0
        private static Customer GetFoundCustomer(ICustomersService customerService)
        {
            Console.Write("Podaj NIP: ");
            string          query          = Console.ReadLine();
            List <Customer> foundCustomers = customerService.Search(query);

            if (foundCustomers.Any())
            {
                foreach (Customer customer in foundCustomers)
                {
                    Console.WriteLine($"{foundCustomers.IndexOf(customer) + 1} \t- {customer}");
                }

                Console.Write("Podaj klienta: ");
                if (int.TryParse(Console.ReadLine(), out int index))
                {
                    return(foundCustomers[index - 1]);
                }
                else
                {
                    Console.WriteLine("Nieprawidłowe dane.");
                }
            }
            else
            {
                Console.WriteLine("Brak wyników.");
            }

            return(null);
        }
Ejemplo n.º 8
0
 public CustomerResolver(
     ICustomersService customersService,
     IWorkContextAccessor workContextAccessor)
 {
     _customersService = customersService;
     _workContextAccessor = workContextAccessor;
 }
 public SearchController(ICustomersService customersService, IProductsService productsService,
                         ISalesService salesService)
 {
     _customersService = customersService;
     _productsService  = productsService;
     _salesService     = salesService;
 }
Ejemplo n.º 10
0
 public DepartmentController(IDepartmentService departmentService, IEmployeeService employeeService, ICustomersService customersService, IUserLogFileService userLogFileService)
 {
     this.departmentService  = departmentService;
     this.employeeService    = employeeService;
     this.customersService   = customersService;
     this.userLogFileService = userLogFileService;
 }
Ejemplo n.º 11
0
        public CustomerViewModel(ICustomersService _CustomersService)
        {
            this._CustomersService = _CustomersService;

            //_Customer = new Customer("Witek");
            Load();
        }
Ejemplo n.º 12
0
        public CustomerAddressPartHandler(
            ICustomersService customersService,
            ILocationsService locationService,
            IRepository <CustomerAddressPartRecord> repository
            )
        {
            _customersService = customersService;
            _locationService  = locationService;

            Filters.Add(StorageFilter.For(repository));

            OnActivated <CustomerAddressPart>((context, part) => {
                part._customer.Loader(customer => _customersService.GetCustomer(part.CustomerId));
                part._customer.Setter(customer => {
                    part.CustomerId = customer != null ? customer.Id : 0;
                    return(customer);
                });

                part._country.Loader(country => _locationService.GetCountry(part.CountryId));
                part._country.Setter(country => {
                    part.CountryId = country != null ? country.Id : 0;
                    return(country);
                });

                part._state.Loader(state => _locationService.GetState(part.StateId));
                part._state.Setter(state => {
                    part.StateId = state != null ? state.Id : 0;
                    return(state);
                });
            });
        }
Ejemplo n.º 13
0
        public CustomerPartHandler(
            IContentManager contentManager,
            ICustomersService customersService,
            IRepository<CustomerPartRecord> repository
            )
        {
            Filters.Add(StorageFilter.For(repository));

            OnActivated<CustomerPart>((context, part) => {
                // User field
                part._user.Loader(user => contentManager.Get<IUser>(part.UserId));
                part._user.Setter(user => {
                    part.UserId = (user != null ? user.Id : 0);
                    return user;
                });

                // Default address field
                part._defaultAddress.Loader(address => customersService.GetAddress(part.DefaultAddressId));
                part._defaultAddress.Setter(address => {
                    part.DefaultAddressId = (address != null ? address.Id : 0);
                    return address;
                });

                // Addresses field
                part._addresses.Loader(addresses => customersService.GetAddressesForCustomer(part));
            });

            OnRemoving<CustomerPart>((context, part) => {
                foreach (var address in part.Addresses) {
                    contentManager.Remove(address.ContentItem);
                }
            });
        }
 public ProfileController(IMapper mapper, UserManager <User> userManager, ICustomersService customerService, IQuestHistoryService questHistoryService)
 {
     _mapper              = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _userManager         = userManager ?? throw new ArgumentNullException(nameof(userManager));
     _customerService     = customerService ?? throw new ArgumentNullException(nameof(customerService));
     _questHistoryService = questHistoryService ?? throw new ArgumentNullException(nameof(questHistoryService));
 }
Ejemplo n.º 15
0
        public CustomerAddressPartHandler(
            ICustomersService customersService,
            ILocationsService locationService,
            IRepository<CustomerAddressPartRecord> repository
            )
        {
            _customersService = customersService;
            _locationService = locationService;

            Filters.Add(StorageFilter.For(repository));

            OnActivated<CustomerAddressPart>((context, part) => {
                part._customer.Loader(customer => _customersService.GetCustomer(part.CustomerId));
                part._customer.Setter(customer => {
                    part.CustomerId = customer != null ? customer.Id : 0;
                    return customer;
                });

                part._country.Loader(country => _locationService.GetCountry(part.CountryId));
                part._country.Setter(country => {
                    part.CountryId = country != null ? country.Id : 0;
                    return country;
                });

                part._state.Loader(state => _locationService.GetState(part.StateId));
                part._state.Setter(state => {
                    part.StateId = state != null ? state.Id : 0;
                    return state;
                });
            });
        }
Ejemplo n.º 16
0
 public SearchController(ICustomersService customersService, IProductsService productsService,
                         ISalesService salesService)
 {
     this.customersService = customersService;
     this.productsService  = productsService;
     this.salesService     = salesService;
 }
 public WalletLinker(IWalletLinkingRequestsRepository requestsRepository,
                     ILogFactory logFactory,
                     int linkCodeLength,
                     IPrivateBlockchainFacadeClient pbfClient,
                     ISettingsService settingsService,
                     IRabbitPublisher <WalletLinkingStatusChangeRequestedEvent> requestedPublisher,
                     IRabbitPublisher <WalletLinkingStatusChangeCompletedEvent> completedPublisher,
                     IRabbitPublisher <WalletLinkingStatusChangeFinalizedEvent> finalizedPublisher,
                     ISignatureValidator signatureValidator,
                     IWalletLinkingRequestsCounterRepository countersRepository,
                     ICustomersService customersService,
                     IWalletManagementClient walletManagementClient,
                     ITransactionRunner transactionRunner)
 {
     _requestsRepository     = requestsRepository;
     _linkCodeLength         = linkCodeLength;
     _pbfClient              = pbfClient;
     _settingsService        = settingsService;
     _requestedPublisher     = requestedPublisher;
     _completedPublisher     = completedPublisher;
     _signatureValidator     = signatureValidator;
     _countersRepository     = countersRepository;
     _customersService       = customersService;
     _walletManagementClient = walletManagementClient;
     _transactionRunner      = transactionRunner;
     _finalizedPublisher     = finalizedPublisher;
     _log = logFactory.CreateLog(this);
 }
Ejemplo n.º 18
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Initialize();

            ICustomersService customerService = MyServiceProvider.GetServiceProvider().GetService <ICustomersService>();

            foreach (Customer customer in customerService.Get())
            {
                Console.WriteLine(customer);
            }

            Console.WriteLine("-------------------------------------------------------");
            List <Customer> foundCustomers = customerService.SearchByCountry("Poland");

            foreach (Customer customer in foundCustomers)
            {
                Console.WriteLine(customer);
            }
            Console.WriteLine("-------------------------------------------------------");

            //GenerateItems();

            //ICustomersService fakeCustomerService = new FakeCustomerService();
            //List<Customer> customers = fakeCustomerService.Get();
            //
            //foreach (Customer customer in customers)
            //{
            //    customerService.Add(customer);
            //}
            // FakeApproach();
        }
Ejemplo n.º 19
0
 public MainLayoutComponent(IAuthService authService, IIdentityService identityService,
                            ICustomersService customersService)
 {
     _authService      = authService;
     _identityService  = identityService;
     _customersService = customersService;
 }
Ejemplo n.º 20
0
 public SearchService(IOrdersService ordersService, IProductsService productsService, ICustomersService customersService, ILogger <SearchService> logger)
 {
     this.ordersService    = ordersService;
     this.productsService  = productsService;
     this.customersService = customersService;
     this.logger           = logger;
 }
Ejemplo n.º 21
0
        public CustomerPartHandler(
            IContentManager contentManager,
            ICustomersService customersService,
            IRepository <CustomerPartRecord> repository
            )
        {
            Filters.Add(StorageFilter.For(repository));

            OnActivated <CustomerPart>((context, part) => {
                // User field
                part._user.Loader(user => contentManager.Get <IUser>(part.UserId));
                part._user.Setter(user => {
                    part.UserId = (user != null ? user.Id : 0);
                    return(user);
                });

                // Default address field
                part._defaultAddress.Loader(address => customersService.GetAddress(part.DefaultAddressId));
                part._defaultAddress.Setter(address => {
                    part.DefaultAddressId = (address != null ? address.Id : 0);
                    return(address);
                });

                // Addresses field
                part._addresses.Loader(addresses => customersService.GetAddressesForCustomer(part));
            });

            OnRemoving <CustomerPart>((context, part) => {
                foreach (var address in part.Addresses)
                {
                    contentManager.Remove(address.ContentItem);
                }
            });
        }
Ejemplo n.º 22
0
 public CustomerCreatedHandler(ICustomersRepository customersRepository,
                               ICustomersService customersService,
                               ICache cache)
 {
     _customersRepository = customersRepository;
     _customersService    = customersService;
     _cache = cache;
 }
Ejemplo n.º 23
0
        public MainPresenter(IMainView mainView, ICustomersService customersService, IWindowManager windowManager)
            : base(mainView)
        {
            this.customersService = customersService;
            this.windowManager    = windowManager;

            LoadData();
        }
Ejemplo n.º 24
0
 public OrderCreatedHandler(MailKitOptions options,
                            ICustomersService customersService,
                            IMessagesService messageServices)
 {
     _options          = options;
     _customersService = customersService;
     _messageService   = messageServices;
 }
 public IActionResult Post([FromServices] ICustomersService localService, Customer customer)
 {
     if (this.User.HasClaim(p => p.Type == "Phone"))
     {
         var phone = this.User.Claims.First(p => p.Type == "Phone").Value;
     }
     return(Ok());
 }
Ejemplo n.º 26
0
        public MockOrdersService(ICustomersService customersService, IOrderDetailsService orderDetailsService)
        {
            _customersService    = customersService;
            _orderDetailsService = orderDetailsService;
            _random = new Random();

            GenerateMockData();
        }
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="userManager"></param>
 /// <param name="signInManager"></param>
 /// <param name="roleManager"></param>
 /// <param name="dbContext"></param>
 /// <param name="setting"></param>
 public AccountController(UserManager <User> userManager, SignInManager <User> signInManager, ICustomersService customersService, IProviderService providerService, IEmailService emailService)
 {
     _userManager      = userManager ?? throw new ArgumentNullException(nameof(userManager));
     _signInManager    = signInManager ?? throw new ArgumentNullException(nameof(signInManager));
     _customersService = customersService ?? throw new ArgumentNullException(nameof(customersService));
     _providersService = providerService ?? throw new ArgumentNullException(nameof(providerService));
     _emailService     = emailService ?? throw new ArgumentNullException(nameof(emailService));
 }
Ejemplo n.º 28
0
        public CustomersViewModel(ICustomersService customersService)
        {
            this.customersService = customersService;



            Load();
        }
Ejemplo n.º 29
0
 public BasketsService(DataContext context, IMapper mapper, ILogger <BasketsService> logger, ICustomersService customerService, IBasketItemsService basketItemService)
 {
     _context           = context;
     _mapper            = mapper;
     _logger            = logger;
     _customerService   = customerService;
     _basketItemService = basketItemService;
 }
Ejemplo n.º 30
0
        public CustomerViewModel(ICustomersService customersService)
        {
            this.customersService = customersService;

            SaveCommand = new RelayCommand(p => Save());

            Load();
        }
 public CreateOrderHandler(IOrdersRepository orderRepository
                           , ICustomersService customersService
                           , IBusPublisher busPublisher)
 {
     _orderRepository  = orderRepository;
     _customersService = customersService;
     _busPublisher     = busPublisher;
 }
 public TransactionsServiceExample()
 {
     _transactionsService = new TransactionsService();
     _customersService    = new CustomersService();
     _creditCardsService  = new CreditCardsService();
     _invoicesService     = new InvoicesService();
     _itemsService        = new ItemsService();
 }
 public ManagerService(IPreOrdersService preOrdersService,
                       ISalesService salesService,
                       ICustomersService customersService
                       )
 {
     PreOrdersService = preOrdersService;
     SalesService     = salesService;
     CustomersService = customersService;
 }
Ejemplo n.º 34
0
        public CustomerOrderPartHandler(
            ICustomersService customersService,
            IRepository<CustomerOrderPartRecord> repository
            )
        {
            _customersService = customersService;

            Filters.Add(StorageFilter.For(repository));

            OnActivated<CustomerOrderPart>((context, part) => {
                part._customer.Loader(customer => _customersService.GetCustomer(part.CustomerId));
                part._customer.Setter(customer => {
                    part.CustomerId = customer.Id;
                    return customer;
                });
            });
        }
Ejemplo n.º 35
0
 public CheckoutController(
     ICustomersService customersService,
     IShoppingCartService shoppingCartService,
     IOrdersService ordersService,
     IOrchardServices services,
     IShapeFactory shapeFactory,
     IEnumerable<IPaymentProvider> paymentProviders,
     IShippingService shippingService = null)
 {
     _customersService = customersService;
     _shoppingCartService = shoppingCartService;
     _ordersService = ordersService;
     _shapeFactory = shapeFactory;
     _shippingService = shippingService;
     _paymentProviders = paymentProviders.OrderByDescending(p => p.Priority);
     Services = services;
     T = NullLocalizer.Instance;
 }
 public WebWorkContext(ICustomersService customersService,IAuthenticationService authenticationService)
 {
     this._customersService = customersService;
     this._authenticationService = authenticationService;
 }
 //
 // GET: /Customer/
 public CustomerController(ICustomersService customerService)
 {
     this._customerService = customerService;
 }
 public WebWorkContext(ICustomersService customersService)
 {
     this._customersService = customersService;
 }
Ejemplo n.º 39
0
 public MyApplicationLogic(ICustomersService CustService)
 {
     _custService = CustService;
 }
Ejemplo n.º 40
0
 public CustomersController(ICustomersService customersService) {
     CustomersService = customersService;
 }
 public AccountController(IWorkContext workContext,ICustomersService customersService,IAuthenticationService authenticationService)
 {
     this._workContext = workContext;
     this._customersService = customersService;
     this._authenticationService = authenticationService;
 }