Ejemplo n.º 1
0
 private void btnAdd_Click(object sender, System.EventArgs e)
 {
     frmNewProduct newProductForm = new frmNewProduct();
     Product product = newProductForm.GetNewProduct();
     if (product != null)
     {
         products.Add(product);
         ProductDB.SaveProducts(products);
         FillProductListBox();
     }
 }
Ejemplo n.º 2
0
        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            frmNewProduct newProductForm = new frmNewProduct();
            Product       product        = newProductForm.GetNewProduct();

            if (product != null)
            {
                products.Add(product);
                ProductDB.SaveProducts(products);
                FillProductListBox();
            }
        }
Ejemplo n.º 3
0
        private void btnAddProduct_Click(object sender, EventArgs e)
        {
            frmNewProduct newProduct = new frmNewProduct();

            newProduct.ShowDialog();
            Product p = newProduct.GetNewProduct();

            if (p != null)
            {
                products += p;
            }
        }
        private void btnAddProduct_Click(object sender, EventArgs e)
        {
            frmNewProduct addProduct = new frmNewProduct();

            addProduct.ShowDialog();
            Product p = addProduct.GetNewProduct();

            if (p != null)
            {
                //products.Add(p);
                products += p;  //products = products + p;
            }
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            //the form to add new product is displayed
            frmNewProduct newProductForm = new frmNewProduct();

            Product product = newProductForm.GetNewProduct();

            if (product != null)
            {
                products.Add(product);
                ProductDB.SaveProducts(products);
                FillProductListBox();
            }
        }
Ejemplo n.º 6
0
        private void btnAddProduct_Click(object sender, EventArgs e)
        {
            frmNewProduct addProduct = new frmNewProduct();

            addProduct.ShowDialog();
            Product p = addProduct.GetNewProduct();

            if (p != null)
            {
                products.Add(p);
                ProductDB.SaveProducts(products);
                FillProductListBox();
            }
        }