private void BtnEditar_Click(object sender, EventArgs e) { _nuevo = false; if (btnEditar.Text == "Cancelar") { LimpiarControl(gbDatos); ActivarControlDatos(gbDatos, false); ActivarButton(true); dgvDatos.Enabled = true; btnEditar.Text = "Editar"; } else { if (dgvDatos.RowCount > 0) { c = bLCliente.TraerPorId((string)dgvDatos[0, dgvDatos.CurrentRow.Index].Value); txtNombre.Text = c.Nombre; txtPrimerApellido.Text = c.PrimerApellido; textSegundoApellido.Text = c.SegundoApellido; textTelefonoFijo.Text = c.TelefonoFijo; textCelular.Text = c.Celular; textCorreo.Text = c.Correo; textFechaNacimiento.Text = c.FechaNacimiento; textNoTarjetaCredito.Text = c.NoTarjetaCredito; ActivarControlDatos(gbDatos, true); ActivarButton(false); dgvDatos.Enabled = false; btnEditar.Text = "Cancelar"; } } }