private void dataGridViewProveedor_DoubleClick(object sender, EventArgs e) { var codigo = Convert.ToInt32(dataGridViewProveedor.CurrentRow.Cells[0].Value); Proveedor = proveedorBL.ObtenerProveedorPorId(codigo); this.DialogResult = DialogResult.OK; this.Close(); }