public PickUpProductView(IPresentersFactory presentersFactory, ILocalizationManager localizationManager, PriceListViewModel priceListViewModel, IEnumerable<OrderItemViewModel> orderItemViewModels) : base(localizationManager) { InitializeComponent(); _presentersFactory = presentersFactory; _priceListViewModel = priceListViewModel; _orderItemViewModels = orderItemViewModels; Text = localizationManager.Localization.GetLocalizedValue(Text); _productPriceListBox.LocalizationManager = LocalizationManager; searchPanel.LocalizationManager = LocalizationManager; _productPickUpExtraPanel.LocalizationManager = LocalizationManager; }
public PickUpProductPresenter CreatePickUpProductPresenter(IPickUpProductView pickUpProductView, PriceListViewModel priceListViewModel, IEnumerable<OrderItemViewModel> orderItemViewModels) { return new PickUpProductPresenter(pickUpProductView, _repositoryFactory, _lookUpService, priceListViewModel, orderItemViewModels); }
public IEnumerable<PickUpProductViewModel> PickUpProducts(PriceListViewModel priceListViewModel, IEnumerable<OrderItemViewModel> orderItems) { IEnumerable<PickUpProductViewModel> pickedUpProducts = null; using (var pickUpProductView = new PickUpProductView(_presentersFactory, _localizationManager, priceListViewModel, orderItems)) { if (pickUpProductView.ShowDialog() == DialogResult.OK) { pickedUpProducts = pickUpProductView.PickedUpProducts; } } return pickedUpProducts; }