private void buttonUpd_Click(object sender, EventArgs e) { if (dataGridViewClients.SelectedRows.Count == 1) { var form = new FormCustomer { Id = Convert.ToInt32(dataGridViewClients.SelectedRows[0].Cells[0].Value) }; form.ShowDialog(); } }
private void buttonAdd_Click(object sender, EventArgs e) { var form = new FormCustomer(); form.ShowDialog(); }