Exemplo n.º 1
0
        private void BtnChange_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count != 1)
            {
                MessageBox.Show("Выберите одну строку");
                return;
            }

            var                    selectedId = this.dataGridView1.SelectedRows[0].Cells["Id"].Value;
            ProductGroup           selected   = db.ProductGroups.Find(selectedId);
            ProductGroupDetailForm add        = new ProductGroupDetailForm(this.db, selected);

            add.Show();
        }
Exemplo n.º 2
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            ProductGroupDetailForm add = new ProductGroupDetailForm(this.db);

            add.Show();
        }