private void txtIdRubro_Validating(object sender, CancelEventArgs e) { try { string mensaje = ""; if (Accion == Cl_Enumeradores.eTipo_action.grabar) { if (Bus.VericarCodigoExiste(param.IdEmpresa, txtIdRubro.Text.Trim(), ref mensaje) == true) { MessageBox.Show("Por favor cambie de código , Código asignado a: " + mensaje, "SISTEMA", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtIdRubro.Text = ""; } } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString()); } }