Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            TestMobileSMARTContext db = new TestMobileSMARTContext();
            Product product           = new Product()
            {
                Barcode  = barCodeItemInput.Text,
                Name     = nameProductItemInput.Text,
                Unit     = quantityProductItemInput.Text,
                Describe = describeProductItemInput.Text,
            };

            db.Products.Add(product);

            db.SaveChanges();

            barCodeItemInput.Clear();
            nameProductItemInput.Clear();
            quantityProductItemInput.Clear();
            describeProductItemInput.Clear();
        }