Ejemplo 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;
            TradeDepartment           selected   = db.TradeDepartments.Find(selectedId);
            TradeDepartmentDetailForm add        = new TradeDepartmentDetailForm(this.db, selected);

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

            add.Show();
        }