Correção do cadastro de cliente
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@22596 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
aca50907e3
commit
4741853acc
|
@ -12,6 +12,7 @@ import org.zkoss.zk.ui.Executions;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zul.Button;
|
import org.zkoss.zul.Button;
|
||||||
import org.zkoss.zul.Combobox;
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Datebox;
|
||||||
import org.zkoss.zul.Intbox;
|
import org.zkoss.zul.Intbox;
|
||||||
import org.zkoss.zul.Messagebox;
|
import org.zkoss.zul.Messagebox;
|
||||||
import org.zkoss.zul.Radio;
|
import org.zkoss.zul.Radio;
|
||||||
|
@ -59,6 +60,7 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
private MyTextbox txtDescColonia;
|
private MyTextbox txtDescColonia;
|
||||||
private MyTextbox txtDescEstado;
|
private MyTextbox txtDescEstado;
|
||||||
private MyTextbox txtCP;
|
private MyTextbox txtCP;
|
||||||
|
private Datebox dateFecNacimiento;
|
||||||
private Intbox txtCanthijos;
|
private Intbox txtCanthijos;
|
||||||
private Intbox txtEdad;
|
private Intbox txtEdad;
|
||||||
private Button btnApagar;
|
private Button btnApagar;
|
||||||
|
@ -226,6 +228,15 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
cmbOcupacion.setText(cliente.getTipoocupacionId().getDesctipo());
|
cmbOcupacion.setText(cliente.getTipoocupacionId().getDesctipo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(cliente.getIndsexo() != null){
|
||||||
|
if (cliente.getIndsexo().equals("F")) {
|
||||||
|
radFeminino.setChecked(true);
|
||||||
|
} else if (cliente.getIndsexo().equals("M")) {
|
||||||
|
radMasculino.setChecked(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(cliente.getLsClienteDireccion()!= null){
|
if(cliente.getLsClienteDireccion()!= null){
|
||||||
if(cliente.getLsClienteDireccion().get(0)!= null){
|
if(cliente.getLsClienteDireccion().get(0)!= null){
|
||||||
ClienteDireccion direccion = cliente.getLsClienteDireccion().get(0);
|
ClienteDireccion direccion = cliente.getLsClienteDireccion().get(0);
|
||||||
|
@ -268,7 +279,8 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
lsClienteDireccion = cliente.getLsClienteDireccion();
|
lsClienteDireccion = cliente.getLsClienteDireccion();
|
||||||
|
txtNombCliente.focus();
|
||||||
|
txtDireccionCalle.focus();
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -285,8 +297,17 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
|
||||||
public void setClienteDireccion(){
|
public void setClienteDireccion(){
|
||||||
|
ClienteDireccion direccion;
|
||||||
|
if(lsClienteDireccion.isEmpty()){
|
||||||
|
|
||||||
|
direccion = new ClienteDireccion();
|
||||||
|
|
||||||
|
}else{
|
||||||
|
direccion = lsClienteDireccion.get(0);
|
||||||
|
lsClienteDireccion.remove(0);
|
||||||
|
}
|
||||||
|
|
||||||
cmbDomicilio.getValue();
|
cmbDomicilio.getValue();
|
||||||
ClienteDireccion direccion = new ClienteDireccion();
|
|
||||||
direccion.setDesccalle(txtDireccionCalle.getValue());
|
direccion.setDesccalle(txtDireccionCalle.getValue());
|
||||||
direccion.setNumexterior(txtDireccionNumero.getValue());
|
direccion.setNumexterior(txtDireccionNumero.getValue());
|
||||||
direccion.setDesccallecomp(txtDireccionCompl.getValue());
|
direccion.setDesccallecomp(txtDireccionCompl.getValue());
|
||||||
|
@ -312,33 +333,31 @@ public class EditarClienteController extends MyGenericForwardComposer {
|
||||||
txtDescorreo.getValue();
|
txtDescorreo.getValue();
|
||||||
txtNumCurp.getValue();
|
txtNumCurp.getValue();
|
||||||
txtNumFax.getValue();
|
txtNumFax.getValue();
|
||||||
|
dateFecNacimiento.getValue();
|
||||||
numtelefonouno.getValue();
|
numtelefonouno.getValue();
|
||||||
numtelefonodos.getValue();
|
numtelefonodos.getValue();
|
||||||
cmbMotivacionViaje.getValue();
|
cmbMotivacionViaje.getValue();
|
||||||
cmbOcupacion.getValue();
|
cmbOcupacion.getValue();
|
||||||
|
|
||||||
|
|
||||||
|
if (cliente.getClienteId() == null) {
|
||||||
|
|
||||||
|
List<Cliente> lsCliente = clienteService.buscar(txtNombCliente.getValue());
|
||||||
|
if (!lsCliente.isEmpty()) {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("MSG.Registro.Existe"),
|
||||||
|
Labels.getLabel("editarClienteController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
setClienteDireccion();
|
||||||
try {
|
try {
|
||||||
if (cliente.getClienteId() == null) {
|
if (cliente.getClienteId() == null) {
|
||||||
|
|
||||||
List<Cliente> lsCliente =
|
|
||||||
clienteService.buscar(txtNombCliente.getValue());
|
|
||||||
|
|
||||||
if (!lsCliente.isEmpty()) {
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("MSG.Registro.Existe"),
|
|
||||||
Labels.getLabel("editarClienteController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// cliente.setEstadocivilId(0);
|
|
||||||
// cliente.setGradoestudioId(0);
|
|
||||||
// cliente.setMedioinformativoId(0);
|
|
||||||
setClienteDireccion();
|
|
||||||
if (cmbMotivacionViaje.getSelectedItem() != null) {
|
if (cmbMotivacionViaje.getSelectedItem() != null) {
|
||||||
cliente.setMotivoviajeId((MotivoViaje) cmbMotivacionViaje.getSelectedItem().getValue());
|
cliente.setMotivoviajeId((MotivoViaje) cmbMotivacionViaje.getSelectedItem().getValue());
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# <controler>. <id>. <propiedade> = XXX
|
# <controler>. <id>. <propiedade> = XXX
|
||||||
|
|
||||||
#Versao do VentaBoleto:
|
#Versao do VentaBoleto:
|
||||||
versao = ADM_20121113_1RC82
|
versao = ADM_20121113_1RC83
|
||||||
|
|
||||||
# MSG Defaut:
|
# MSG Defaut:
|
||||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||||
|
|
|
@ -71,29 +71,29 @@
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarClienteController.lbFecNacimiento.value')}"/>
|
<label value="${c:l('editarClienteController.lbFecNacimiento.value')}"/>
|
||||||
<datebox id="dateFecNacimiento" mold="rounded" lenient="false" constraint="no empty"
|
<datebox id="dateFecNacimiento" mold="rounded" lenient="false" constraint="no empty"
|
||||||
width="70%" />
|
width="70%" value="@{winEditarCliente$composer.cliente.fecnacimiento}"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarClienteController.lbNumRfc.value')}"/>
|
<label value="${c:l('editarClienteController.lbNumRfc.value')}"/>
|
||||||
<textbox id="txtNumRfc" width="70%" maxlength="20"
|
<textbox id="txtNumRfc" width="70%" maxlength="15"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
||||||
value="@{winEditarCliente$composer.cliente.numrfc}"/>
|
value="@{winEditarCliente$composer.cliente.numrfc}"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarClienteController.lbNumCurp.value')}"/>
|
<label value="${c:l('editarClienteController.lbNumCurp.value')}"/>
|
||||||
<textbox id="txtNumCurp" width="70%" maxlength="14"
|
<textbox id="txtNumCurp" width="70%" maxlength="18"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
||||||
value="@{winEditarCliente$composer.cliente.numcurp}"/>
|
value="@{winEditarCliente$composer.cliente.numcurp}"/>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarClienteController.lbEdad.value')}"/>
|
<label value="${c:l('editarClienteController.lbEdad.value')}"/>
|
||||||
<intbox id="txtEdad" width="70%" maxlength="60" constraint="no zero"
|
<intbox id="txtEdad" width="70%" maxlength="3" constraint="no zero"
|
||||||
value="@{winEditarCliente$composer.cliente.edad}"/>
|
value="@{winEditarCliente$composer.cliente.edad}"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarClienteController.lbCanthijos.value')}"/>
|
<label value="${c:l('editarClienteController.lbCanthijos.value')}"/>
|
||||||
<intbox id="txtCanthijos" width="70%" maxlength="60" constraint="no zero"
|
<intbox id="txtCanthijos" width="70%" maxlength="2" constraint="no zero"
|
||||||
value="@{winEditarCliente$composer.cliente.canthijos}"/>
|
value="@{winEditarCliente$composer.cliente.canthijos}"/>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue