private void btnGuardar_Click(object sender, EventArgs e) { //Insertar if (Editar == false) { try { clienteOB.InsertarCliente(txtTelefono.Text, txtRedSocial.Text, txtContacto.Text, txtNombre.Text, txtApellido.Text, txtPuntaje.Text); MessageBox.Show("Tus datos se insertaron"); MostrarClientes(); Limpiar(); } catch (Exception) { MessageBox.Show("No se puedieron insertar los datos."); } } //Editar if (Editar == true) { try { clienteOB.EditarCliente(txtTelefono.Text, txtRedSocial.Text, txtContacto.Text, txtNombre.Text, txtApellido.Text, txtPuntaje.Text, IDcliente); MessageBox.Show("Tus datos se editaron"); MostrarClientes(); Limpiar(); Editar = false; } catch (Exception) { MessageBox.Show("No se pudo editar los datos."); } } }