public SupplierPricesWidgetViewModel(Counterparty entity, IUnitOfWork uow, ITdiTab dialogTab, ICommonServices commonServices, IEmployeeService employeeService, ICounterpartyJournalFactory counterpartySelectorFactory, INomenclatureJournalFactory nomenclatureSelectorFactory, INomenclatureRepository nomenclatureRepository, IUserRepository userRepository) : base(entity, commonServices) { this.dialogTab = dialogTab ?? throw new ArgumentNullException(nameof(dialogTab)); UoW = uow ?? throw new ArgumentNullException(nameof(uow)); this.employeeService = employeeService ?? throw new ArgumentNullException(nameof(employeeService)); this.nomenclatureRepository = nomenclatureRepository ?? throw new ArgumentNullException(nameof(nomenclatureRepository)); this.userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); this.counterpartySelectorFactory = counterpartySelectorFactory ?? throw new ArgumentNullException(nameof(counterpartySelectorFactory)); _nomenclatureSelectorFactory = nomenclatureSelectorFactory ?? throw new ArgumentNullException(nameof(nomenclatureSelectorFactory)); CreateCommands(); RefreshPrices(); Search = new SearchViewModel(); Search.OnSearch += (sender, e) => RefreshPrices(); Entity.ObservableSuplierPriceItems.ElementAdded += (aList, aIdx) => RefreshPrices(); Entity.ObservableSuplierPriceItems.ElementRemoved += (aList, aIdx, aObject) => RefreshPrices(); }
public SearchHelper(IJournalSearch journalSearch) { this.journalSearch = journalSearch ?? throw new ArgumentNullException(nameof(journalSearch)); }