private void cargarDatosIniciales() {
   logger.log(Level.INFO, "[TipoAbonoMttoCtrl][cargarDatosIniciales]");
   Boolean checked;
   Boolean optTodo = Boolean.FALSE;
   Boolean optClave = Boolean.FALSE;
   try {
     if (tipoAbonoSelected != null) {
       txtDescripcionTipoAbono.setValue(tipoAbonoSelected.getDescripcionTipoAbono());
       checked =
           (accion != null && accion == Constants.ACCION_MANTTO_NEW)
               ? Boolean.TRUE
               : (tipoAbonoSelected.getEstadoRegistro() != null
                   ? tipoAbonoSelected.getEstadoRegistro()
                   : Boolean.FALSE);
       checkEstadoTipoAbono.setChecked(checked);
     }
     optTodo =
         (accion != null && accion == Constants.ACCION_MANTTO_VER) ? Boolean.TRUE : Boolean.FALSE;
     optClave =
         (accion != null && accion == Constants.ACCION_MANTTO_NEW) ? Boolean.FALSE : Boolean.TRUE;
     txtDescripcionTipoAbono.setDisabled(optTodo);
     checkEstadoTipoAbono.setDisabled(optTodo);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
 public void onClick$btnBuscar() {
   if (txtHm.getValue().isEmpty()) {
     MensajeEmergente.mostrar("NOFINDED", asignarFocusBuscar);
   } else {
     paciente = servicioPaciente.buscarUno(txtHm.getValue(), 'A');
     veterinario = usuario.getPersona().getVeterinario();
     if (paciente == null) {
       MensajeEmergente.mostrar("NOTFOUND", asignarFocusBuscar);
     } else {
       txtHm.setDisabled(true);
       txtNombrePaciente.setValue(paciente.getNombre());
       txtRaza.setValue(paciente.getRaza().getNombre());
       txtEspecie.setValue(paciente.getRaza().getEspecie().getNombre());
       txtSexo.setValue(paciente.getSexo().getNombre());
       txtNombreResponsable.setValue(
           paciente.getResponsable().getPersona().getNombre()
               + " "
               + paciente.getResponsable().getPersona().getApellido());
       txtCi.setValue(String.valueOf(paciente.getResponsable().getCedula()));
       txtEdad.setValue(HelperDateAge.age(paciente.getFechaNac(), ' '));
       visibilidadSecciones(true, true, true);
       cargar();
       actividadBotones(false, false, true, false, false, false);
     }
   }
 }
 public void onClick$btnCancelarPrincipal() {
   paciente = new Paciente();
   veterinario = new Veterinario();
   dbFechaActual.setValue(HelperDate.now());
   visibilidadSecciones(true, false, false); // Ocultar sur y contenido
   // centro
   actividadBotones(true, true, false, true, true, true); // Desactivar
   // todos menos
   // buscar
   txtEdad.setValue("");
   txtNombrePaciente.setValue("");
   txtRaza.setValue("");
   txtEspecie.setValue("");
   txtSexo.setValue("");
   txtNombreResponsable.setValue("");
   txtCi.setValue("");
   txtHm.setValue("");
   txtHm.setDisabled(false);
 }
 public void habilitarTextClave() {
   if (txtRTF0005.isDisabled()) txtRTF0005.setDisabled(false);
   if (txtSYF0005.isDisabled()) txtSYF0005.setDisabled(false);
   if (txtKYF0005.isDisabled()) txtKYF0005.setDisabled(false);
 }
예제 #5
0
 protected void habilitarTextClave() {
   if (txtCodigo.isDisabled()) txtCodigo.setDisabled(false);
 }