Beispiel #1
0
        //double click on product row and opens details form
        private void productClick(object sender, EventArgs e)
        {
            int productId = int.Parse(productListView.SelectedItems[0].SubItems[0].Text);

            Product.Product product = productManager.getProductById(productId, loggedUser.email, loggedUser.password);
            productEdit     detail  = new productEdit(product, this);

            detail.Show();
        }
Beispiel #2
0
        //product create button
        private void createProduct_Click(object sender, EventArgs e)
        {
            //create empty product
            Product.Product newProduct = new Product.Product();
            newProduct.ID          = 0;
            newProduct.brand       = new Product.Brand();
            newProduct.brand.ID    = 0;
            newProduct.category    = new Product.Category();
            newProduct.category.ID = 0;
            productEdit editProductForm = new productEdit(newProduct, this);

            editProductForm.Show();
        }