Ejemplo n.º 1
0
        public void Init()
        {
            Quan.Clear();
            Comp_name.Clear();

            OrderListData od = new OrderListData();

            dataGridView1.DataSource = od.GetOrderShowList();
        }
        private void SaveProductButton_Click(object sender, RoutedEventArgs e)
        {
            Product product = new Product();

            product.Name     = ProductName.Text;
            product.Kcal     = float.Parse((ProductKCAL.Text).ToString());
            product.Quantity = int.Parse((Quan.Text).ToString());
            product.Unit     = Unit.Text;
            DataBaseSolution.AddProduct(product);
            ProductName.Clear();
            ProductKCAL.Clear();
            Unit.ClearValue(NameProperty);
            Quan.Clear();
        }