public NavigationViewModel(ICustomerLookupDataService customerLookupService, IProviderLookupDataService providerLookupService, IProductLookupDataService productLookupService, IOrderLookupDataService orderLookupService, IEventAggregator eventAggregator) { _customerLookupService = customerLookupService; _providerLookupService = providerLookupService; _productLookupService = productLookupService; _orderLookupService = orderLookupService; _eventAggregator = eventAggregator; Customers = new ObservableCollection <NavigationItemViewModel>(); Providers = new ObservableCollection <NavigationItemViewModel>(); Products = new ObservableCollection <NavigationItemViewModel>(); Orders = new ObservableCollection <NavigationItemViewModel>(); _eventAggregator.GetEvent <AfterDetailSavedEvent>().Subscribe(AfterDetailSaved); _eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); }
public ProductDetailViewModel(IEventAggregator eventAggregator, IMessageDialogService messageDialogService, IProductRepository productRepository, IProductTypeLookupDataService productTypeLookupDataService, IProductDiscountLookupDataService productDiscountLookupDataService, IProviderLookupDataService providerLookupDataService, IProductMeasureLookupDataService productMeasureLookupDataService) : base(eventAggregator, messageDialogService) { _productRepository = productRepository; _productTypeLookupDataService = productTypeLookupDataService; _productDiscountLookupDataService = productDiscountLookupDataService; _providerLookupDataService = providerLookupDataService; _productMeasureLookupDataService = productMeasureLookupDataService; eventAggregator.GetEvent <AfterCollectionSavedEvent>().Subscribe(AfterCollectionSaved); ProductTypes = new ObservableCollection <LookupItem>(); ProductDiscounts = new ObservableCollection <LookupItem>(); Providers = new ObservableCollection <LookupItem>(); ProductMeasures = new ObservableCollection <LookupItem>(); }