예제 #1
0
        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;
        }
예제 #2
0
 public PickUpProductPresenter CreatePickUpProductPresenter(IPickUpProductView pickUpProductView, PriceListViewModel priceListViewModel,
                                                            IEnumerable<OrderItemViewModel> orderItemViewModels)
 {
     return new PickUpProductPresenter(pickUpProductView, _repositoryFactory, _lookUpService, priceListViewModel, orderItemViewModels);
 }
예제 #3
0
        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;
        }