public OrderView(IPresentersFactory presentersFactory, ILocalizationManager localizationManager, OrderViewModel orderViewModel) : this(localizationManager) { _presentersFactory = presentersFactory; _orderViewModel = orderViewModel; }
public ReadOnlyOrderView(IPresentersFactory presentersFactory, ILocalizationManager localizationManager, RoutePointViewModel routePointViewModel, OrderViewModel orderViewModel) : this(localizationManager) { _presentersFactory = presentersFactory; _routePointViewModel = routePointViewModel; _orderViewModel = orderViewModel; }
private void OrderViewLoad(object sender, EventArgs e) { if (_presenter == null) { if (_orderViewModel != null && _routePointViewModel != null) _presenter = _presentersFactory.CreateOrderPresenter(this, _routePointViewModel, _orderViewModel); else { if (_routePointViewModel != null) _presenter = _presentersFactory.CreateOrderPresenter(this, _routePointViewModel); else _presenter = _presentersFactory.CreateOrderPresenter(this, _orderViewModel); } _viewModel = _presenter.Initialize(); _orderDateTextBox.Text = _viewModel.OrderDate.ToString(_localizationManager.Localization.GetLocalizedValue("dateformat")); _shippingDatePicker.Value = _viewModel.ShippingDate; _customerTextBox.Text = _viewModel.CustomerName; _shippingAddressTextBox.Text = _viewModel.ShippingAddressName; _priceListTextBox.Text = _viewModel.PriceListName; _warehouseTextBox.Text = _viewModel.WarehouseName; _amountValueLable.Text = _viewModel.Amount.ToString(_localizationManager.Localization.GetLocalizedValue("decimalformat")); _notesTextBox.Text = _viewModel.Note; orderItemListBox.ItemDataNeeded += ItemDataNeeded; orderItemListBox.ItemSelected += ItemSelected; orderItemListBox.SetListSize(_presenter.InitializeListSize()); ViewContainer.RegisterLeftAction(new Save(_presenter)); ViewContainer.RegisterRightAction(new Cancel(_presenter)); } }
public OrderPresenter CreateOrderPresenter(IOrderView orderView, OrderViewModel orderViewModel) { return new OrderPresenter(orderView, _unitOfWorkFactory, _repositoryFactory, _configurationManager, _navigator, _lookUpService, orderViewModel); }
public void GoToEditRoutePointsOrder(RoutePointViewModel routePointViewModel, OrderViewModel orderViewModel) { _container.SetView(new OrderView(_presentersFactory, _localizationManager, routePointViewModel, orderViewModel)); }
public void GoToEditOrder(OrderViewModel orderViewModel) { _container.SetView(new OrderView(_presentersFactory, _localizationManager, orderViewModel)); }