/// <summary> /// Set current OrderViewModel if _sendData is set to False and Editor /// is ready to get data from other source /// </summary> private void SetCurrentOrder(IOrderViewModel viewModel) { if (!_sendData) { OrderViewModel = viewModel; } }
public void CadastroTest() { IOrderViewModel targetSale = _container.Resolve <IOrderViewModel>("VM_PedidoVenda"); IOrderViewModel targetPurchase = _container.Resolve <IOrderViewModel>("VM_PedidoCompra"); AssertVMOrder(targetSale); AssertVMOrder(targetPurchase); Cadastro cadastro = targetSale.Cadastro; targetSale.Cadastro = new Cadastro(); Assert.IsNotNull(targetSale.Cadastro); Assert.AreNotEqual <Cadastro>(targetSale.Cadastro, cadastro); cadastro = targetPurchase.Cadastro; targetPurchase.Cadastro = new Cadastro(); Assert.IsNotNull(targetPurchase.Cadastro); Assert.AreNotEqual <Cadastro>(targetPurchase.Cadastro, cadastro); }
public CashierListItemsPresenter(CashierListItemsView view, IOrderViewModel orderViewModel, IUnityContainer container) { if (view == null) { throw new ArgumentNullException("view"); } if (orderViewModel == null) { throw new ArgumentNullException("orderViewModel"); } if (container == null) { throw new ArgumentNullException("container"); } this._orderViewModel = orderViewModel; this._container = container; this._view = view; this._view.SetPresenter(this); }
public CashierPresenter(ICashierView view, IUnityContainer container) { if (view == null) { throw new ArgumentNullException("view"); } if (container == null) { throw new ArgumentNullException("container"); } this.SubmitCommand = new DelegateCommand <object>(this.Submit, this.CanSubmit); this.CancelCommand = new DelegateCommand <object>(this.Cancel); this._view = view; this._view.SetPresenter(this); this._container = container; IOrderFactory orderFactory = this._container.Resolve <IOrderFactory>(); this._orderViewModel = new OrderViewModel(container, orderFactory.CreateOrder(OrderType.SalesOrder)); this._container.RegisterInstance <IOrderViewModel>(this._orderViewModel, new ExternallyControlledLifetimeManager()); }
public CashierItemsPresenter(ICashierItemsView view, IOrderViewModel orderViewModel, IUnityContainer container) { if (view == null) { throw new ArgumentNullException("view"); } if (orderViewModel == null) { throw new ArgumentNullException("orderViewModel"); } if (container == null) { throw new ArgumentNullException("container"); } this.SearchProductCommand = new DelegateCommand <object>(this.SearchProduct); this._orderViewModel = orderViewModel; this._container = container; this._view = view; this._view.SetPresenter(this); }
public void SetOrderWindowReference(IOrderViewModel orderViewModel) { _orderWindow = orderViewModel; }
public void AddNewOrder() { _dialogOrderWindow = _orderViewModelFactory.GetOrderViewModel(); ActivateItem(_dialogOrderWindow); }
public void SetTargetMessage(IOrderViewModel orderViewModel) { _orderNotyficator.SetTarget(orderViewModel); }
public void SetOrderWindowReference(OrderViewModel orderViewModel) { _orderViewModel = orderViewModel; }
public EditOrderEvent(IOrderViewModel currentOrder) { CurrentOrder = currentOrder; }
public void SetTargetMessage(IOrderViewModel orderViewModel) { _orderNotyficator.SetTarget(orderViewModel); }
public void SetTarget(IOrderViewModel orderViewModel) { _orderViewModel = orderViewModel; }
public OrderView(IOrderViewModel orderViewModel) { InitializeComponent(); DataContext = orderViewModel; }
private void AssertVMOrder(IOrderViewModel orderViewModel) { Assert.IsNotNull(orderViewModel); Assert.IsNotNull(orderViewModel.Cadastro); }