Esempio 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;
            Customer           selected   = db.Customers.Find(selectedId);
            CustomerDetailForm add        = new CustomerDetailForm(this.db, selected);

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

            add.Show();
        }