private void dgvCustomer_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { String id = dgvCustomer.Rows[dgvCustomer.CurrentRow.Index].Cells[0].Value.ToString(); String name = dgvCustomer.Rows[dgvCustomer.CurrentRow.Index].Cells[1].Value.ToString(); String surname = dgvCustomer.Rows[dgvCustomer.CurrentRow.Index].Cells[2].Value.ToString(); String dni = dgvCustomer.Rows[dgvCustomer.CurrentRow.Index].Cells[3].Value.ToString(); String address = dgvCustomer.Rows[dgvCustomer.CurrentRow.Index].Cells[4].Value.ToString(); String phone = dgvCustomer.Rows[dgvCustomer.CurrentRow.Index].Cells[5].Value.ToString(); String email = dgvCustomer.Rows[dgvCustomer.CurrentRow.Index].Cells[6].Value.ToString(); String refzipcodescities = dgvCustomer.Rows[dgvCustomer.CurrentRow.Index].Cells[7].Value.ToString(); DtoCustomer dtoC = new DtoCustomer(id, name, surname, address, phone, email, refzipcodescities, dni); if (observer != null) { observer.updateCustomer(dtoC); Dispose(); } if (observerMod != null) { observerMod.updateCustomer(dtoC); Dispose(); } }