public InventoryInfoViewModel(InventoryInfo inventoryInfo)
 {
     this.inventoryInfo = inventoryInfo;
     if (this.inventoryInfo.Product == null)
     {
         throw new ArgumentNullException("inventoryInfo.Product", "The inventoryInfo's Product object is null");
     }
     else
     {
         this.product = new ProductViewModel() { Id = this.inventoryInfo.Product.Id, Name = this.inventoryInfo.Product.Name };
     }
 }
        private void RemoveProduct(ProductViewModel product)
        {
            this.productModel.DeleteProductForUserAsync(product, (error) =>
            {
                if (error != null)
                {
                    // Display error, normally this would be done through a property
                    MessageBox.Show(error.Message);
                    return;
                }

                this.UserProducts.Remove(product);
                foreach (UserProductViewModel userProduct in this.SearchResults)
                {
                    if (userProduct.Id == product.Id)
                    {
                        userProduct.UsedByUser = false;
                    }
                }
                //MessageBox.Show("Success");
            });
        }
 public InventoryRequestHelper(StoreViewModel storeViewModel, ProductViewModel productViewModel)
 {
     // TODO: Complete member initialization
     this.storeViewModel = storeViewModel;
     this.productViewModel = productViewModel;
 }