Exemple #1
0
        private static Item GetItem(IItemsService itemService)
        {
            Console.Write("Podaj EAN: ");
            string      query = Console.ReadLine();
            List <Item> items = itemService.Search(query);

            if (items.Any())
            {
                foreach (Item item in items)
                {
                    Console.WriteLine($"{items.IndexOf(item) + 1} \t- {item}");
                }

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

            return(null);
        }
 public UnitsController(IUnitsService unitsService, IItemsService itemsService, IUnit_ItemsService unitsItems, IUserLogFileService userLogFileService)
 {
     this.unitsService       = unitsService;
     this.itemsService       = itemsService;
     this.unitsItems         = unitsItems;
     this.userLogFileService = userLogFileService;
 }
        public BookItemViewModel(Book book, IItemsService <Book> booksService)
            : base(book)
        {
            _booksService = booksService ?? throw new ArgumentNullException(nameof(booksService));

            DeleteBookCommand = new DelegateCommand(OnDeleteBook);
        }
        public EditableItemViewModel(
            IItemsService <TItem> itemsService,
            IShowProgressInfo showProgressInfo,
            ILoggerFactory loggerFactory)
            : base(showProgressInfo)
        {
            _itemsService = itemsService ?? throw new ArgumentNullException(nameof(itemsService));
            _logger       = loggerFactory?.CreateLogger(GetType()) ?? throw new ArgumentNullException(nameof(loggerFactory));

            _logger.LogTrace("ctor EditableItemViewModel");

            _itemsService.SelectedItemChanged += OnSelectedItemChanged;

            PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == nameof(Item))
                {
                    _logger.LogTrace($"PropertyChanged event with Item received, firing change event on EditItem");
                    RaisePropertyChanged(nameof(EditItem));
                }
            };

            EditCommand   = new DelegateCommand(BeginEdit, () => IsReadMode);
            CancelCommand = new DelegateCommand(CancelEdit, () => IsEditMode);
            SaveCommand   = new DelegateCommand(EndEdit, () => IsEditMode);
            AddCommand    = new DelegateCommand(OnAdd, () => IsReadMode);
            DeleteCommand = new DelegateCommand(OnDelete);
        }
 public itemsController(IItemsService itemsService, IUserService userService, IBillMasterService billMasterService, IUserLogFileService userLogFileService)
 {
     this.itemsService       = itemsService;
     this.userService        = userService;
     this.billMasterService  = billMasterService;
     this.userLogFileService = userLogFileService;
 }
Exemple #6
0
        public MasterDetailViewModel(IItemsService <TItem> itemsService)
        {
            _itemsService = itemsService;

            RefreshCommand = new RelayCommand(OnRefresh);
            AddCommand     = new RelayCommand(OnAdd);
        }
        public SchemaViewModel(ISchemasService schemasService, IItemsService itemsService)
        {
            this.schemasService = schemasService;
            this.itemsService   = itemsService;

            Load();
        }
 public HomeController(IOperationService operationService, IRatesService ratesService, IItemsService itemsService, IAccountService accountService)
 {
     _operationService = operationService;
     _ratesService     = ratesService;
     _itemsService     = itemsService;
     _accountService   = accountService;
 }
 public AssetCompanyDetailsController(IAssetCompanyDetailsService AssetCompanyDetailsService, IItemsService itemsService, IUnit_ItemsService AssetCompanyDetailsItems, IUserLogFileService userLogFileService)
 {
     this.AssetCompanyDetailsService = AssetCompanyDetailsService;
     this.itemsService             = itemsService;
     this.AssetCompanyDetailsItems = AssetCompanyDetailsItems;
     this.userLogFileService       = userLogFileService;
 }
        public MasterDetailViewModel(
            IItemsService <TItem> itemsService,
            IItemToViewModelMap <TItem, TItemViewModel> viewModelMap,
            IShowProgressInfo showProgressInfo,
            ILoggerFactory loggerFactory)
            : base(showProgressInfo)
        {
            _itemsService = itemsService ?? throw new ArgumentNullException(nameof(itemsService));
            _viewModelMap = viewModelMap ?? throw new ArgumentNullException(nameof(viewModelMap));
            _logger       = loggerFactory?.CreateLogger(GetType()) ?? throw new ArgumentNullException(nameof(loggerFactory));

            _logger.LogTrace("ctor MasterDetailViewModel");

            _itemsService.SelectedItemChanged += ItemsService_SelectedItemChanged;

            _itemsService.Items.CollectionChanged += (sender, e) =>
            {
                RaisePropertyChanged(nameof(Items));
            };

            _itemsService.PropertyChanged += ItemsService_PropertyChanged;

            RefreshCommand = new DelegateCommand(OnRefresh);
            AddCommand     = new DelegateCommand(OnAdd);
        }
 public ClientsDataController(IItemsDetailService itemDetailService, IItemsService itemService, IOrganizeService organizeService, IRoleService roleService)
 {
     _itemDetailService = itemDetailService;
     _itemService       = itemService;
     _organizeService   = organizeService;
     _roleService       = roleService;
 }
 public BooksViewModel(
     IItemsService <Book> itemsService,
     IItemToViewModelMap <Book, BookItemViewModel> viewModelMap,
     IShowProgressInfo showProgressInfo, ILoggerFactory loggerFactory)
     : base(itemsService, viewModelMap, showProgressInfo, loggerFactory)
 {
 }
 protected BestSystemService(
     IItemsService itemsService,
     EveEchoesPlanetaryProductionApiDbContext dbContext)
 {
     this.ItemsService = itemsService;
     this.DbContext    = dbContext;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ItemsController"/> class.
 /// </summary>
 /// <param name="itemsService">
 /// The items Service.
 /// </param>
 /// <param name="formsAuthentication">
 /// The forms authentication.
 /// </param>
 public ItemsController(
     IItemsService itemsService,
     IFormsAuthentication formsAuthentication)
     : base(formsAuthentication)
 {
     this.itemsService = itemsService;
 }
 public UserController(IRoleManagerService roleManagerService, IUserManagerService userManagerService, IItemsService itemsService, IHostingEnvironment hostingEnvironment)
 {
     this._roleManagerService = roleManagerService;
     this._userManagerService = userManagerService;
     this._itemsService       = itemsService;
     this._hostingEnvironment = hostingEnvironment;
 }
Exemple #16
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="itemsRepository"></param>
        /// <param name="mappingRepository"></param>
        /// <param name="itemsService"></param>
        /// <param name="mappingManager"></param>
        /// <param name="importManager"></param>
        /// <param name="accountsService"></param>
        /// <param name="projectsService"></param>
        /// <param name="templateService"></param>
        /// <param name="cacheManager"></param>
        /// <param name="gcAccountSettings"></param>
        public UpdateManager(
            IItemsRepository itemsRepository,
            IMappingRepository mappingRepository,
            IItemsService itemsService,
            IMappingManager mappingManager,
            IImportManager importManager,
            IAccountsService accountsService,
            IProjectsService projectsService,
            ITemplatesService templateService,
            ICacheManager cacheManager,
            GCAccountSettings gcAccountSettings)
            : base(accountsService, projectsService, templateService, cacheManager)
        {
            ItemsRepository = itemsRepository;

            MappingRepository = mappingRepository;

            ItemsService = itemsService;

            MappingManager = mappingManager;

            ImportManager = importManager;

            GcAccountSettings = gcAccountSettings;
        }
 public ItemsController(BiEsProDbContext context,
                        IItemsService service,
                        IMapper mapper)
 {
     this._context = context;
     this.service  = service;
     this.mapper   = mapper;
 }
 public ItemsController(
     ILogger <ItemsController> logger,
     IItemsService itemsService
     )
 {
     _logger       = logger;
     _itemsService = itemsService;
 }
 public IEnumerable<Item> GetAllItems()
 {
     if (_service == null)
     {
         _service = DependencyResolver.Current.GetService<IItemsService>();
     }
     return _service.GetAllItems();
 }
 public ItemViewModel(IItemsService itemsService, IAlertsService alertsService, IHttpContextAccessor httpContextAccessor)
 {
     this.itemsService        = itemsService;
     this.alertsService       = alertsService;
     this.httpContextAccessor = httpContextAccessor;
     this.itemDetailsSubject  = new Subject <FullDetailItem>();
     this.alertsSubject       = new Subject <Alert[]>();
 }
 public TransactionsServiceExample()
 {
     _transactionsService = new TransactionsService();
     _customersService    = new CustomersService();
     _creditCardsService  = new CreditCardsService();
     _invoicesService     = new InvoicesService();
     _itemsService        = new ItemsService();
 }
 public RegionsService(
     IMemoryCache memoryCache,
     IItemsService itemsService,
     EveEchoesPlanetaryProductionApiDbContext dbContext)
     : base(itemsService, dbContext)
 {
     this.memoryCache = memoryCache;
 }
 public AchievementsController(IAchievementsService achievementsService,
                               IItemsService itemsService,
                               AuthorizerService authorizerService)
 {
     _achievementsService = achievementsService;
     _itemsService        = itemsService;
     _authorizerService   = authorizerService;
 }
Exemple #24
0
 public ItemsController(
     IItemsService itemsService,
     IManufacturersService manufacturersService)
 {
     this.itemsService             = itemsService;
     this.manufacturersService     = manufacturersService;
     this.imagesNameAndContentType = new Dictionary <string, string>();
 }
Exemple #25
0
 public OrdersService(IDeletableEntityRepository <Order> orderRepository, ICustomersService customersService, IOrderStatusService orderStatusService, IEmployeesService employeesService, IItemsService itemsService, IOrderItemsService orderItemsService)
 {
     this.orderRepository    = orderRepository;
     this.customersService   = customersService;
     this.orderStatusService = orderStatusService;
     this.employeesService   = employeesService;
     this.itemsService       = itemsService;
     this.orderItemsService  = orderItemsService;
 }
Exemple #26
0
 public OrdersController(IOrdersService ordersService, ICustomersService customersService, IGarageService garageService, IItemsService itemsService, IOrderItemsService orderItemsService, ICloudinaryService cloudinaryService)
 {
     this.ordersService     = ordersService;
     this.customersService  = customersService;
     this.garageService     = garageService;
     this.itemsService      = itemsService;
     this.orderItemsService = orderItemsService;
     this.cloudinaryService = cloudinaryService;
 }
Exemple #27
0
 public ItemsController(
     IItemsService itemService,
     IMapper mapper,
     IOptions <AppSettings> appSettings)
 {
     _itemService = itemService;
     _mapper      = mapper;
     _appSettings = appSettings.Value;
 }
Exemple #28
0
 public PlanetaryResourcesService(
     EveEchoesPlanetaryProductionApiDbContext dbContext,
     ISolarSystemsService solarSystemsService,
     IItemsService itemsService)
 {
     this.dbContext           = dbContext;
     this.solarSystemsService = solarSystemsService;
     this.itemsService        = itemsService;
 }
 public BookToBookItemViewModelMap(
     IItemsService <Book> itemsService,
     IShowProgressInfo showProgressInfo,
     ILoggerFactory loggerFactory)
 {
     _itemsService     = itemsService ?? throw new ArgumentNullException(nameof(itemsService));
     _showProgressInfo = showProgressInfo ?? throw new ArgumentNullException(nameof(showProgressInfo));
     _loggerFactory    = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
 }
Exemple #30
0
 public UserApiController(IRoleManagerService roleManagerService, IUserManagerService userManagerService, IItemsService itemsService,
                          IHostingEnvironment hostingEnvironment, IItemHelper itemHelper)
 {
     this._roleManagerService = roleManagerService;
     this._userManagerService = userManagerService;
     this._itemsService       = itemsService;
     this._hostingEnvironment = hostingEnvironment;
     this._itemHelper         = itemHelper;
 }
Exemple #31
0
 public InvoiceController(IUnitService unit, IStoreService store,
                          IItemsService item, IInvoiceItemsService invoiceItems, IInvoiceService invoice)
 {
     _itemService         = item;
     _storeService        = store;
     _unitService         = unit;
     _invoiceItemsService = invoiceItems;
     _invoiceService      = invoice;
 }
 public PlanetaryResourcesController(
     IPlanetaryResourcesService planetaryResourcesService,
     IItemsService itemsService,
     IOptions <ApiBehaviorOptions> apiBehaviorOptions)
 {
     this.planetaryResourcesService = planetaryResourcesService;
     this.itemsService       = itemsService;
     this.apiBehaviorOptions = apiBehaviorOptions;
 }
Exemple #33
0
        public BaseController()
        {
            this.data = new UoWData();
            this.itemsService = new ItemsService(this.data);
            this.articlesService = new ArticlesService(this.data);
            this.pagesService = new PagesService(this.data);

            LayoutModel model = new LayoutModel();
            model.ItemCategories = this.itemsService.GetItemCategories();
            model.Articles = this.articlesService.GetArticles().Take(5);
            model.Pages = this.pagesService.GetPages();

            ViewBag.LayoutModel = model;
        }
 public ItemsFactory()
 {
     _service = DependencyResolver.Current.GetService<IItemsService>();
 }
 public ItemCategoriesController()
 {
     this.uoWData = new UoWData();
     this.itemsService = new ItemsService(this.uoWData);
 }
Exemple #36
0
 public ItemsController()
 {
     this.data = new UoWData();
     this.itemsService = new ItemsService(this.data);
 }
Exemple #37
0
        public MainPageViewModel(
            IPageNavigationService pageNavigationService,
            IItemsService dataService,
            ITweetsService tweetsService,
            IVideosService youtubeChannelService,
            ISettingsService settingsService,
            IUnityContainer unityContainer,
            IItemsRepository itemsRepository,
            ITweetsRepository tweetsRepository,
            IImagesRepository imagesRepository,
            IVideosRepository videosRepository,
            ICarsRepository carsRepository,
            IFlickrService flickrService,
            ISharingService sharingService)
            : base(
                sharingService,
                pageNavigationService,
                unityContainer)
        {
            _pageNavigationService = pageNavigationService;
            _dataService = dataService;
            _tweetsService = tweetsService;
            _youtubeChannelService = youtubeChannelService;
            _unityContainer = unityContainer;
            _itemsRepository = itemsRepository;
            _tweetsRepository = tweetsRepository;
            _imagesRepository = imagesRepository;
            _videosRepository = videosRepository;
            _flickrService = flickrService;
            _carsRepository = carsRepository;

            //CarModelsCollection = carsRepository.GetAll();

#if WINDOWS_PHONE
            if (DesignerProperties.IsInDesignTool)
#else // !WINDOWS_PHONE
			if (DesignMode.DesignModeEnabled)
#endif
            {
                //InitializeDataForDesignMode();
                InitializeDataFromOnlineAsync();
            }
        }
 public ItemFeaturesController()
 {
     this.uoWData = new UoWData();
     this.itemsService = new ItemsService(this.uoWData);
 }