Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Product product = new Product {
                Id          = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value),
                Name        = textBox6.Text,
                UnitPrice   = Convert.ToDecimal(textBox5.Text),
                StockAmount = Convert.ToInt32(textBox4.Text)
            };

            _productDal.update(product);
            ProductsLoad();
            MessageBox.Show("Updated!");
        }