예제 #1
0
        private void lblProductName_Click(object sender, EventArgs e)
        {
            var             productforinfo  = _repo.GetProduct(Id, _repo.prods);
            FormProductInfo productinfoform = new FormProductInfo(productforinfo);

            productinfoform.Show();
        }
예제 #2
0
 private void AddToCartClickedInUserControl(object sender, EventArgs e)
 {
     if (sender is UserControlShop userControl)
     {
         var product = _repo.GetProduct(userControl.Id, _repo.prods);
         _cart.AddProductToCart(product);
         lblItemsInCart.Visible      = true;
         picCartButtonCircle.Visible = true;
         lblItemsInCart.Text         = $"{_cart.ShoppingList.Count}";
     }
 }