예제 #1
0
        private void AddProduct_tool_Click(object sender, EventArgs e)
        {
            Product             product        = new Product();
            List <SerialNumber> serialist      = null;
            AddProduct          addproductform = new AddProduct(product, producttypelist, serialist, providerlist);

            if (addproductform.ShowDialog() == DialogResult.OK)
            {
                Save(product, serialist);
            }
        }
예제 #2
0
        private void EditProduct_tool_Click(object sender, EventArgs e)
        {
            if (productBS.Current == null)
            {
                return;
            }
            Product             product    = (Product)productBS.Current;
            List <SerialNumber> seriallist = new List <SerialNumber>();

            using (productlogic = productfactory.CreateNew())
            {
                product    = productlogic.GetById(product.Id);
                seriallist = product.SerialNumbers.ToList();
            }
            AddProduct addproductform = new AddProduct(product, producttypelist, seriallist, providerlist);

            if (addproductform.ShowDialog() == DialogResult.OK)
            {
                Update(product, seriallist);
            }
        }