Exemple #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddProduct addProduct = new AddProduct(lvProduct);

            addProduct.Show();
            this.Hide();
        }
Exemple #2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            int index = 0;

            try
            {
                index = lvProduct.SelectedIndices[0];
                this.pbProductBarcode.Image.Dispose();
                this.pbProductImage.Image.Dispose();
                Guid       id         = Guid.Parse(lvProduct.Items[index].SubItems[2].Text);
                AddProduct addProduct = new AddProduct(id);
                addProduct.Show();
                this.Hide();
            }
            catch (Exception)
            {
                index = 0;
                MessageBox.Show("Please select a product to edit.");
            }
        }