public SearchService(IOrdersService ordersService, IProductsService productsService, ICustomersService customersService) { this.ordersService = ordersService; this.productsService = productsService; this.customersService = customersService; }
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 }); }
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; }
public BillProfitController(ICustomersService customerService, ICompanyStoresService companyStoreService, IEmployeeService employeeService, ICostCentersService costCenterService) { this.customerService = customerService; this.companyStoreService = companyStoreService; this.employeeService = employeeService; this.costCenterService = costCenterService; }
public CustomerResolver( ICustomersService customersService, IWorkContextAccessor workContextAccessor) { _customersService = customersService; _workContextAccessor = workContextAccessor; }
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); }
public CustomerResolver( ICustomersService customersService, IWorkContextAccessor workContextAccessor) { _customersService = customersService; _workContextAccessor = workContextAccessor; }
public SearchController(ICustomersService customersService, IProductsService productsService, ISalesService salesService) { _customersService = customersService; _productsService = productsService; _salesService = salesService; }
public DepartmentController(IDepartmentService departmentService, IEmployeeService employeeService, ICustomersService customersService, IUserLogFileService userLogFileService) { this.departmentService = departmentService; this.employeeService = employeeService; this.customersService = customersService; this.userLogFileService = userLogFileService; }
public CustomerViewModel(ICustomersService _CustomersService) { this._CustomersService = _CustomersService; //_Customer = new Customer("Witek"); Load(); }
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); }); }); }
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)); }
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; }); }); }
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); }
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(); }
public MainLayoutComponent(IAuthService authService, IIdentityService identityService, ICustomersService customersService) { _authService = authService; _identityService = identityService; _customersService = customersService; }
public SearchService(IOrdersService ordersService, IProductsService productsService, ICustomersService customersService, ILogger <SearchService> logger) { this.ordersService = ordersService; this.productsService = productsService; this.customersService = customersService; this.logger = logger; }
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 CustomerCreatedHandler(ICustomersRepository customersRepository, ICustomersService customersService, ICache cache) { _customersRepository = customersRepository; _customersService = customersService; _cache = cache; }
public MainPresenter(IMainView mainView, ICustomersService customersService, IWindowManager windowManager) : base(mainView) { this.customersService = customersService; this.windowManager = windowManager; LoadData(); }
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()); }
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)); }
public CustomersViewModel(ICustomersService customersService) { this.customersService = customersService; Load(); }
public BasketsService(DataContext context, IMapper mapper, ILogger <BasketsService> logger, ICustomersService customerService, IBasketItemsService basketItemService) { _context = context; _mapper = mapper; _logger = logger; _customerService = customerService; _basketItemService = basketItemService; }
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; }
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; }); }); }
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; }
public MyApplicationLogic(ICustomersService CustService) { _custService = CustService; }
public CustomersController(ICustomersService customersService) { CustomersService = customersService; }
public AccountController(IWorkContext workContext,ICustomersService customersService,IAuthenticationService authenticationService) { this._workContext = workContext; this._customersService = customersService; this._authenticationService = authenticationService; }