Correccion de cosas .w. No estoy seguro que e hecho
This commit is contained in:
@@ -290,14 +290,12 @@ public class IngresosController {
|
||||
private boolean validateInput(String nroZInicial, String nroZFinal, String nroInicial, String nroFinal, TipoIngreso tipoIngreso, Caja caja) {
|
||||
this.hideErrorMessages();
|
||||
|
||||
boolean nroZInicialValidation = this.validateNroZInicial(nroZInicial);
|
||||
boolean nroZFinalValidation = this.validateNroZFinal(nroZFinal);
|
||||
boolean nroInicialValidation = this.validateNroInicial(nroInicial);
|
||||
boolean nroFinalValidation = this.validateNroFinal(nroFinal);
|
||||
boolean tipoIngresoValidation = this.validateTipoIngreso(tipoIngreso);
|
||||
boolean cajaValidation = this.validateCaja(caja);
|
||||
|
||||
return nroZInicialValidation && nroZFinalValidation && nroInicialValidation && nroFinalValidation && tipoIngresoValidation && cajaValidation;
|
||||
return nroInicialValidation && nroFinalValidation && tipoIngresoValidation && cajaValidation;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,50 +307,6 @@ public class IngresosController {
|
||||
return caja != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable nroInicial contra los casos
|
||||
* - Es null
|
||||
* - Esta vacio
|
||||
* Cuando el primer caso sea true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
* @return Si cualquiera de estos casos son true se retornara false, si no, se retorna true
|
||||
*/
|
||||
private boolean validateNroZInicial(String nroZInicial){
|
||||
if (nroZInicial == null) {
|
||||
this.view.getErrorNroInicial().setText("Hubo un problema con los datos");
|
||||
this.view.getErrorNroInicial().setVisible(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (nroZInicial.isEmpty()) {
|
||||
this.view.getErrorNroInicial().setText("El campo esta vacio");
|
||||
this.view.getErrorNroInicial().setVisible(true);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable nroFinal contra los casos
|
||||
* - Es null
|
||||
* - Esta vacio
|
||||
* Cuando el primer caso sea true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
* @return Si cualquiera de estos casos son true se retornara false, si no, se retorna true
|
||||
*/
|
||||
private boolean validateNroZFinal(String nroZFinal){
|
||||
if (nroZFinal == null) {
|
||||
this.view.getErrorNroFinal().setText("Hubo un problema con los datos");
|
||||
this.view.getErrorNroFinal().setVisible(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (nroZFinal.isEmpty()) {
|
||||
this.view.getErrorNroFinal().setText("El campo esta vacio");
|
||||
this.view.getErrorNroFinal().setVisible(true);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable nroInicial contra los casos
|
||||
* - Es null
|
||||
@@ -417,8 +371,6 @@ public class IngresosController {
|
||||
*/
|
||||
private void hideErrorMessages() {
|
||||
this.view.getErrorTipoIngreso().setVisible(false);
|
||||
this.view.getErrorNroZInicial().setVisible(false);
|
||||
this.view.getErrorNroZFinal().setVisible(false);
|
||||
this.view.getErrorNroInicial().setVisible(false);
|
||||
this.view.getErrorNroFinal().setVisible(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user