Esempio n. 1
0
        private void btnEditProduct_Click(object sender, EventArgs e)
        {
            int id      = int.Parse(dataGridEstoque.SelectedRows[0].Cells[0].Value.ToString());
            var product = viewModel.Products.Find(m => m.ProductID == id);

            Dialogs.FrmItemBox dialog = new Dialogs.FrmItemBox(Dialogs.FrmItemBox.ItemOperation.Edit, product);
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                viewModel.EditProduct(dialog.Product);
            }
        }