public PurchaseOrdersPageViewModel(IPageNavigator pageNavigator, ILogger logger, IUserDialogs userDialogs, IRequestExceptionHandler requestExceptionHandler, IEventAggregator eventAggregator, IPurchaseOrderManager purchaseOrderManager) : base(pageNavigator, logger, userDialogs, requestExceptionHandler, eventAggregator) { _purchaseOrderManager = purchaseOrderManager; Title = AppResources.TitlePurchaseOrders; TappedMenuCommand = new DelegateCommand(() => EventAggregator.GetEvent <HamburgerTappedEvent>().Publish()); PurchaseOrders = new ObservableCollection <PurchaseOrderEntity>(); AddCommand = new DelegateCommand(async() => await OnAdd()); }
public PurchaseOrderCreatePageViewModel(IPageNavigator pageNavigator, ILogger logger, IUserDialogs userDialogs, IRequestExceptionHandler requestExceptionHandler, IPurchaseOrderManager purchaseOrderManager, ICustomerManager customerManager, IProductManager productManager) : base(pageNavigator, logger, userDialogs, requestExceptionHandler) { _purchaseOrderManager = purchaseOrderManager; _customerManager = customerManager; _productManager = productManager; BackCommand = new DelegateCommand(async() => await PageNavigator.GoBackAsync()); SubmitCommand = new DelegateCommand(async() => await OnSubmit(), () => OnSubmitCanExecute()); SelectCustomerCommand = new DelegateCommand(async() => await OnSelectCustomer()); AddProductCommand = new DelegateCommand(async() => await OnAddProduct()); Title = AppResources.TitleCreatePurchaseOrder; _products = new List <ProductEntity>(); PurchaseOrderProducts = new ObservableCollection <PurchaseOrderProductItemModel>(); }