internal void DisplaySearchResults(InventorySearchResults inventorySearchResults)
        {
            EventAggregator.Instance.Publish(new InventoryShowSearchResultView());

            flpSearchMatches.Controls.Clear();

            decimal itemCount = inventorySearchResults.InventoryItems.Count();

            for (var i = 0; i < itemCount; i++)
            {
                var row = (int)Math.Floor((decimal)i / 6);
                var col = (int)itemCount % 6;

                var pb = new PictureBox();
                pb.Name     = inventorySearchResults.InventoryItems[i].SKU;
                pb.Size     = new Size(175, 175);
                pb.SizeMode = PictureBoxSizeMode.StretchImage;

                Image thumb = inventorySearchResults.InventoryItems[i].PrimaryPicture.GetThumbnailImage(175, 175, null, IntPtr.Zero);
                pb.Image = thumb;

                pb.Click += new EventHandler(OnImageClick);

                pb.Tag = inventorySearchResults.InventoryItems[i];

                // Add Image to FlowLayoutPanel
                flpSearchMatches.Controls.Add(pb);
            }
        }
Пример #2
0
        public InventorySearchResultsPresenter(UCInventorySearchResults isr)
        {
            ucInventorySearchResults = isr;
            inventorySearchResults   = new InventorySearchResults();
            ConnectionString         = ConfigurationManager.ConnectionStrings["ProductManager.Properties.Settings.BTDataConnectionString"].ConnectionString;

            // Query DB using search string, populate inventorySearchResults.InventoryItems
            EventAggregator.Instance.Subscribe <InventoryProductSearch>(OnSearchTextChanged);
        }
        private async void UpdateInventoryItemsSearchResult()
        {
            if (InventorySearchResults != null)
            {
                var itemIds = InventorySearchResults.Select(x => x.InventoryModel.ItemId);

                var output = await _inventoryProcessor.GetInventoryItemsById(itemIds);

                LoadInventoryItemsSearchResult(output);
            }
        }
Пример #4
0
 public void DisplayResultsInProductEditor(InventorySearchResults inventorySearchResults)
 {
     throw new NotImplementedException();
 }