示例#1
0
 public static void updateProduct(Product product, ModifyProduct_Form form)
 {
     product.Name      = form.ProductsName;
     product.ProductID = Convert.ToInt32(form.ProductsID);
     product.Price     = Convert.ToDecimal(form.ProductsPrice);
     product.InStock   = Convert.ToInt32(form.ProductsInventory);
     product.Min       = Convert.ToInt32(form.ProductsMin);
     product.Max       = Convert.ToInt32(form.ProductsMax);
 }
示例#2
0
        private void productsModify_Button_Click(object sender, EventArgs e)
        {
            if (Inventory.productIndex == null)
            {
                MessageBox.Show("Must select product to modify.", "No selection");
                return;
            }

            var modifyProduct_Form = new ModifyProduct_Form();

            modifyProduct_Form.SaveClicked += new EventHandler(modifyProduct_Form_SaveClicked);
            modifyProduct_Form.Show();
        }