git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@20629 d1611594-4594-4d17-8e1d-87c2c4800839
parent
9ff6c47065
commit
161ae920e3
|
@ -42,6 +42,7 @@ import org.zkoss.zul.Radio;
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class BusquedaAlertaCtrlController extends MyGenericForwardComposer {
|
public class BusquedaAlertaCtrlController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
private transient PagedListWrapper<AlertaCtrl> plwAlertaCtrl;
|
private transient PagedListWrapper<AlertaCtrl> plwAlertaCtrl;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -59,47 +60,6 @@ public class BusquedaAlertaCtrlController extends MyGenericForwardComposer {
|
||||||
private Intbox txtIdCorrida;
|
private Intbox txtIdCorrida;
|
||||||
private Radio rdAlta;
|
private Radio rdAlta;
|
||||||
private Radio rdBaja;
|
private Radio rdBaja;
|
||||||
private Radio rdAmbas;
|
|
||||||
|
|
||||||
public MyListbox getAlertaCtrlList() {
|
|
||||||
return alertaCtrlList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAlertaCtrlList(MyListbox alertaCtrlList) {
|
|
||||||
this.alertaCtrlList = alertaCtrlList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Combobox getCmbClaseServicio() {
|
|
||||||
return cmbClaseServicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCmbClaseServicio(Combobox cmbClaseServicio) {
|
|
||||||
this.cmbClaseServicio = cmbClaseServicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Combobox getCmbDestino() {
|
|
||||||
return cmbDestino;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCmbDestino(Combobox cmbDestino) {
|
|
||||||
this.cmbDestino = cmbDestino;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Combobox getCmbOrigem() {
|
|
||||||
return cmbOrigem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCmbOrigem(Combobox cmbOrigem) {
|
|
||||||
this.cmbOrigem = cmbOrigem;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Combobox getCmbRuta() {
|
|
||||||
return cmbRuta;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCmbRuta(Combobox cmbRuta) {
|
|
||||||
this.cmbRuta = cmbRuta;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Ruta> getLsRuta() {
|
public List<Ruta> getLsRuta() {
|
||||||
return lsRuta;
|
return lsRuta;
|
||||||
|
@ -109,22 +69,6 @@ public class BusquedaAlertaCtrlController extends MyGenericForwardComposer {
|
||||||
this.lsRuta = lsRuta;
|
this.lsRuta = lsRuta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Paging getPagingAlertaCtrl() {
|
|
||||||
return pagingAlertaCtrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPagingAlertaCtrl(Paging pagingAlertaCtrl) {
|
|
||||||
this.pagingAlertaCtrl = pagingAlertaCtrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Intbox getTxtIdCorrida() {
|
|
||||||
return txtIdCorrida;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTxtIdCorrida(Intbox txtIdCorrida) {
|
|
||||||
this.txtIdCorrida = txtIdCorrida;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
@ -150,6 +94,7 @@ public class BusquedaAlertaCtrlController extends MyGenericForwardComposer {
|
||||||
cmbClaseServicio.focus();
|
cmbClaseServicio.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
private void verAlertaCtrl(AlertaCtrl a) {
|
private void verAlertaCtrl(AlertaCtrl a) {
|
||||||
if (a == null) {
|
if (a == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -54,7 +54,8 @@ import org.zkoss.zul.Tab;
|
||||||
*/
|
*/
|
||||||
@Controller("editarAlertaCtrlController")
|
@Controller("editarAlertaCtrlController")
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class EditarAlertaCtrlController extends MyGenericForwardComposer implements ListitemRenderer {
|
public class EditarAlertaCtrlController extends MyGenericForwardComposer
|
||||||
|
implements ListitemRenderer {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -112,38 +113,6 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
this.alertaCtrl = alertaCtrl;
|
this.alertaCtrl = alertaCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MyListbox getAlertaCtrlList() {
|
|
||||||
return alertaCtrlList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAlertaCtrlList(MyListbox alertaCtrlList) {
|
|
||||||
this.alertaCtrlList = alertaCtrlList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Button getBtnApagar() {
|
|
||||||
return btnApagar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBtnApagar(Button btnApagar) {
|
|
||||||
this.btnApagar = btnApagar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Combobox getCmbClaseServicio() {
|
|
||||||
return cmbClaseServicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCmbClaseServicio(Combobox cmbClaseServicio) {
|
|
||||||
this.cmbClaseServicio = cmbClaseServicio;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Combobox getCmbRuta() {
|
|
||||||
return cmbRuta;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCmbRuta(Combobox cmbRuta) {
|
|
||||||
this.cmbRuta = cmbRuta;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ClaseServicio> getLsClaseServicio() {
|
public List<ClaseServicio> getLsClaseServicio() {
|
||||||
return lsClaseServicio;
|
return lsClaseServicio;
|
||||||
}
|
}
|
||||||
|
@ -160,14 +129,6 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
this.lsRuta = lsRuta;
|
this.lsRuta = lsRuta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Intbox getTxtIdCorrida() {
|
|
||||||
return txtIdCorrida;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTxtIdCorrida(Intbox txtIdCorrida) {
|
|
||||||
this.txtIdCorrida = txtIdCorrida;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
@ -189,7 +150,6 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
btnApagar.setVisible(Boolean.FALSE);
|
btnApagar.setVisible(Boolean.FALSE);
|
||||||
tabGenerico.setVisible(Boolean.FALSE);
|
tabGenerico.setVisible(Boolean.FALSE);
|
||||||
tabCorrida.setVisible(Boolean.FALSE);
|
tabCorrida.setVisible(Boolean.FALSE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (alertaCtrl.getCorrida() != null) {
|
if (alertaCtrl.getCorrida() != null) {
|
||||||
List<Corrida> lsCorridas = new ArrayList<Corrida>();
|
List<Corrida> lsCorridas = new ArrayList<Corrida>();
|
||||||
|
@ -227,9 +187,11 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
if (alertaCtrl.getInddomingo() == Boolean.TRUE) {
|
if (alertaCtrl.getInddomingo() == Boolean.TRUE) {
|
||||||
rdDom.setChecked(true);
|
rdDom.setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
corrida();
|
corrida();
|
||||||
} else {
|
} else {
|
||||||
generico();
|
generico();
|
||||||
|
|
||||||
if (alertaCtrl.getOrigem() != null) {
|
if (alertaCtrl.getOrigem() != null) {
|
||||||
cmbOrigem.setText(alertaCtrl.getOrigem().getDescparada());
|
cmbOrigem.setText(alertaCtrl.getOrigem().getDescparada());
|
||||||
}
|
}
|
||||||
|
@ -292,11 +254,13 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
txtPorcCorrida.getValue();
|
txtPorcCorrida.getValue();
|
||||||
txtTiempoCorrida.getValue();
|
txtTiempoCorrida.getValue();
|
||||||
if (alertaCtrl.getCorrida() == null) {
|
if (alertaCtrl.getCorrida() == null) {
|
||||||
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.seleccionar.corrida"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.seleccionar.corrida"),
|
||||||
Messagebox.EXCLAMATION);
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
if (!rdLun.isChecked() && !rdMar.isChecked() && !rdMie.isChecked() && !rdJue.isChecked() && !rdVie.isChecked() && !rdSab.isChecked() && !rdDom.isChecked()) {
|
if (!rdLun.isChecked() && !rdMar.isChecked() && !rdMie.isChecked() && !rdJue.isChecked() && !rdVie.isChecked() && !rdSab.isChecked() && !rdDom.isChecked()) {
|
||||||
Clients.alert(Labels.getLabel("editarAlertaCtrlController.MSG.obligatorioDia"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.EXCLAMATION);
|
Clients.alert(Labels.getLabel("editarAlertaCtrlController.MSG.obligatorioDia"),
|
||||||
|
Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -304,8 +268,9 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
try {
|
try {
|
||||||
if (isGenerico) {
|
if (isGenerico) {
|
||||||
if (!rdAlta.isChecked() && !rdBaja.isChecked()) {
|
if (!rdAlta.isChecked() && !rdBaja.isChecked()) {
|
||||||
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.necessitaTipo"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.necessitaTipo"),
|
||||||
Messagebox.EXCLAMATION);
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
return;
|
return;
|
||||||
} else if (rdAlta.isChecked()) {
|
} else if (rdAlta.isChecked()) {
|
||||||
alertaCtrl.setPorcalta(txtPorc.getValueDecimal());
|
alertaCtrl.setPorcalta(txtPorc.getValueDecimal());
|
||||||
|
@ -324,7 +289,10 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
if (origem != null) {
|
if (origem != null) {
|
||||||
alertaCtrl.setOrigem(origem);
|
alertaCtrl.setOrigem(origem);
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("MSG.necesita.origen"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.show(Labels.getLabel("MSG.necesita.origen"),
|
||||||
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +300,10 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
if (destino != null) {
|
if (destino != null) {
|
||||||
alertaCtrl.setDestino(destino);
|
alertaCtrl.setDestino(destino);
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("MSG.necesita.destino"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.show(Labels.getLabel("MSG.necesita.destino"),
|
||||||
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,8 +318,10 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!rdAltaCorrida.isChecked() && !rdBajaCorrida.isChecked()) {
|
if (!rdAltaCorrida.isChecked() && !rdBajaCorrida.isChecked()) {
|
||||||
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.necessitaTipo"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.necessitaTipo"),
|
||||||
Messagebox.EXCLAMATION);
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else if (rdAltaCorrida.isChecked()) {
|
} else if (rdAltaCorrida.isChecked()) {
|
||||||
alertaCtrl.setPorcalta(txtPorcCorrida.getValueDecimal());
|
alertaCtrl.setPorcalta(txtPorcCorrida.getValueDecimal());
|
||||||
|
@ -363,6 +336,7 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
alertaCtrl.setTiempoalta(null);
|
alertaCtrl.setTiempoalta(null);
|
||||||
alertaCtrl.setTiempobaja(txtTiempoCorrida.getValue());
|
alertaCtrl.setTiempobaja(txtTiempoCorrida.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
alertaCtrl.setRuta(alertaCtrl.getCorrida().getRuta());
|
alertaCtrl.setRuta(alertaCtrl.getCorrida().getRuta());
|
||||||
alertaCtrl.setClaseServicio(alertaCtrl.getCorrida().getClaseServicio());
|
alertaCtrl.setClaseServicio(alertaCtrl.getCorrida().getClaseServicio());
|
||||||
alertaCtrl.setOrigem(alertaCtrl.getCorrida().getOrigem());
|
alertaCtrl.setOrigem(alertaCtrl.getCorrida().getOrigem());
|
||||||
|
@ -380,7 +354,8 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
BigDecimal percAlta = alertaCtrl.getPorcalta();
|
BigDecimal percAlta = alertaCtrl.getPorcalta();
|
||||||
BigDecimal percBaja = alertaCtrl.getPorcbaja();
|
BigDecimal percBaja = alertaCtrl.getPorcbaja();
|
||||||
|
|
||||||
lsAlertaCtrl = arlertaCtrlService.buscar(alertaCtrl.getOrigem(), alertaCtrl.getDestino(), alertaCtrl.getRuta(), alertaCtrl.getClaseServicio(), tiempoAlta,
|
lsAlertaCtrl = arlertaCtrlService.buscar(alertaCtrl.getOrigem(), alertaCtrl.getDestino(),
|
||||||
|
alertaCtrl.getRuta(), alertaCtrl.getClaseServicio(), tiempoAlta,
|
||||||
tiempoBaja, percAlta, percBaja);
|
tiempoBaja, percAlta, percBaja);
|
||||||
|
|
||||||
boolean podeSalvar = false;
|
boolean podeSalvar = false;
|
||||||
|
@ -397,7 +372,10 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!podeSalvar) {
|
if (!podeSalvar) {
|
||||||
Messagebox.show(Labels.getLabel("MSG.Registro.Existe"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.show(Labels.getLabel("MSG.Registro.Existe"),
|
||||||
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -410,8 +388,10 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
alertaCtrl.setInddomingo(rdDom.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
alertaCtrl.setInddomingo(rdDom.isChecked() ? Boolean.TRUE : Boolean.FALSE);
|
||||||
|
|
||||||
if (!noTraslapa()) {
|
if (!noTraslapa()) {
|
||||||
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.traslapa"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.traslapa"),
|
||||||
Messagebox.EXCLAMATION);
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -422,30 +402,37 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
alertaCtrlList.updateItem(alertaCtrl);
|
alertaCtrlList.updateItem(alertaCtrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.suscribirOK"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.suscribirOK"),
|
||||||
Messagebox.INFORMATION);
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
closeWindow();
|
closeWindow();
|
||||||
|
|
||||||
} catch (BusinessException ex) {
|
} catch (BusinessException ex) {
|
||||||
Messagebox.show(ex.getLocalizedMessage(), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
Messagebox.show(ex.getLocalizedMessage(),
|
||||||
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error("editarAlertaCtrlController: " + ex, ex);
|
log.error("editarAlertaCtrlController: " + ex, ex);
|
||||||
Messagebox.show(Labels.getLabel("MSG.Error"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK, Messagebox.ERROR);
|
Messagebox.show(Labels.getLabel("MSG.Error"),
|
||||||
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) {
|
||||||
try {
|
try {
|
||||||
int resp = Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.borrarPergunta"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.YES
|
int resp = Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.borrarPergunta"),
|
||||||
| Messagebox.NO, Messagebox.QUESTION);
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
arlertaCtrlService.borrar(alertaCtrl);
|
arlertaCtrlService.borrar(alertaCtrl);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.borrarOK"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK,
|
Messagebox.show(Labels.getLabel("editarAlertaCtrlController.MSG.borrarOK"),
|
||||||
Messagebox.INFORMATION);
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
alertaCtrlList.removeItem(alertaCtrl);
|
alertaCtrlList.removeItem(alertaCtrl);
|
||||||
|
|
||||||
|
@ -482,7 +469,9 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
List<Corrida> lsCorrida = corridaService.buscarPorId(idCorrida);
|
List<Corrida> lsCorrida = corridaService.buscarPorId(idCorrida);
|
||||||
|
|
||||||
if (lsCorrida.isEmpty()) {
|
if (lsCorrida.isEmpty()) {
|
||||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||||
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
} else {
|
} else {
|
||||||
alertaCtrl.setCorrida(lsCorrida.get(0));
|
alertaCtrl.setCorrida(lsCorrida.get(0));
|
||||||
horaCorrida.setValue(alertaCtrl.getCorrida().getFechorsalida());
|
horaCorrida.setValue(alertaCtrl.getCorrida().getFechorsalida());
|
||||||
|
@ -505,7 +494,9 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
List<Corrida> lsCorrida = corridaService.buscarFiltro(ori, des, hora, cs);
|
List<Corrida> lsCorrida = corridaService.buscarFiltro(ori, des, hora, cs);
|
||||||
|
|
||||||
if (lsCorrida.isEmpty()) {
|
if (lsCorrida.isEmpty()) {
|
||||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Labels.getLabel("editarAlertaCtrlController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||||
|
Labels.getLabel("editarAlertaCtrlController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
} else {
|
} else {
|
||||||
alertaCtrl.setCorrida(lsCorrida.get(0));
|
alertaCtrl.setCorrida(lsCorrida.get(0));
|
||||||
horaCorrida.setValue(alertaCtrl.getCorrida().getFechorsalida());
|
horaCorrida.setValue(alertaCtrl.getCorrida().getFechorsalida());
|
||||||
|
@ -514,31 +505,6 @@ public class EditarAlertaCtrlController extends MyGenericForwardComposer impleme
|
||||||
cmbTipoServicio.setText(alertaCtrl.getCorrida().getClaseServicio().getDescclase());
|
cmbTipoServicio.setText(alertaCtrl.getCorrida().getClaseServicio().getDescclase());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HibernateSearchObject<Corrida> corridaBusqueda =
|
|
||||||
// new HibernateSearchObject<Corrida>(Corrida.class,
|
|
||||||
// pagingCorrida.getPageSize());
|
|
||||||
// corridaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
|
||||||
//
|
|
||||||
// Date dataCorrida = fecCorrida.getValue();
|
|
||||||
// if (dataCorrida != null) {
|
|
||||||
// corridaBusqueda.addFilterEqual("id.feccorrida", dataCorrida);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// Integer idCorrida = txtIdCorrida.getValue();
|
|
||||||
// if (idCorrida != null) {
|
|
||||||
// corridaBusqueda.addFilterEqual("id.corridaId", idCorrida);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// plwCorrida.init(corridaBusqueda, corridaList, pagingCorrida);
|
|
||||||
// if (corridaList.getData().length == 0) {
|
|
||||||
// try {
|
|
||||||
// Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
|
||||||
// Labels.getLabel("editarAlertaCtrlController.window.title"),
|
|
||||||
// Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
// } catch (InterruptedException ex) {
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean noTraslapa() {
|
public boolean noTraslapa() {
|
||||||
|
|
|
@ -4,18 +4,9 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
|
||||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEstacion;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
|
@ -32,6 +23,14 @@ import org.zkoss.zul.Longbox;
|
||||||
import org.zkoss.zul.Paging;
|
import org.zkoss.zul.Paging;
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEstacion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
|
@ -40,23 +39,18 @@ import org.zkoss.zul.Textbox;
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class BusquedaEstacionController extends MyGenericForwardComposer {
|
public class BusquedaEstacionController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
private transient PagedListWrapper<Estacion> plwEstacion;
|
private transient PagedListWrapper<Estacion> plwEstacion;
|
||||||
@Autowired
|
|
||||||
private PuntoVentaService puntoVentaService;
|
|
||||||
private List<PuntoVenta> lsPuntoVenta;
|
|
||||||
private MyListbox estacionList;
|
private MyListbox estacionList;
|
||||||
private Paging pagingEstacion;
|
private Paging pagingEstacion;
|
||||||
private Textbox txtDescEstacion;
|
private Textbox txtDescEstacion;
|
||||||
//private Textbox txtDescMac;
|
|
||||||
private Combobox cmbPuntoVenta;
|
private Combobox cmbPuntoVenta;
|
||||||
private Longbox txtNumCaja;
|
private Longbox txtNumCaja;
|
||||||
private static Logger log = Logger.getLogger(BusquedaEstacionController.class);
|
private static Logger log = Logger.getLogger(BusquedaEstacionController.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
lsPuntoVenta = new ArrayList<PuntoVenta>();
|
|
||||||
|
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
estacionList.setItemRenderer(new RenderEstacion());
|
estacionList.setItemRenderer(new RenderEstacion());
|
||||||
|
@ -74,6 +68,7 @@ public class BusquedaEstacionController extends MyGenericForwardComposer {
|
||||||
txtDescEstacion.focus();
|
txtDescEstacion.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
private void verEstacion(Estacion e) {
|
private void verEstacion(Estacion e) {
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -89,13 +84,9 @@ public class BusquedaEstacionController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
private void refreshLista() {
|
private void refreshLista() {
|
||||||
HibernateSearchObject<Estacion> estacionBusqueda =
|
HibernateSearchObject<Estacion> estacionBusqueda =
|
||||||
new HibernateSearchObject<Estacion>(Estacion.class,
|
new HibernateSearchObject<Estacion>(Estacion.class, pagingEstacion.getPageSize());
|
||||||
pagingEstacion.getPageSize());
|
|
||||||
|
|
||||||
estacionBusqueda.addFilterLike("descestacion",
|
estacionBusqueda.addFilterLike("descestacion", "%" + txtDescEstacion.getText().trim().concat("%"));
|
||||||
"%" + txtDescEstacion.getText().trim().concat("%"));
|
|
||||||
// estacionBusqueda.addFilterLike("descmac",
|
|
||||||
// "%" + txtDescMac.getText().trim().concat("%"));
|
|
||||||
|
|
||||||
Comboitem cbiPuntoVenta = cmbPuntoVenta.getSelectedItem();
|
Comboitem cbiPuntoVenta = cmbPuntoVenta.getSelectedItem();
|
||||||
if (cbiPuntoVenta != null) {
|
if (cbiPuntoVenta != null) {
|
||||||
|
|
|
@ -4,19 +4,8 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.UsuarioBancario;
|
|
||||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
|
||||||
import com.rjconsultores.ventaboletos.service.EstacionService;
|
|
||||||
import com.rjconsultores.ventaboletos.service.UsuarioBancarioService;
|
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
|
@ -28,13 +17,16 @@ import org.zkoss.zk.ui.Executions;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.util.Clients;
|
import org.zkoss.zk.ui.util.Clients;
|
||||||
import org.zkoss.zul.Button;
|
import org.zkoss.zul.Button;
|
||||||
import org.zkoss.zul.Checkbox;
|
|
||||||
import org.zkoss.zul.Combobox;
|
|
||||||
import org.zkoss.zul.Comboitem;
|
|
||||||
import org.zkoss.zul.Label;
|
|
||||||
import org.zkoss.zul.Longbox;
|
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
||||||
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
|
import com.rjconsultores.ventaboletos.service.EstacionService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
|
@ -43,32 +35,17 @@ import org.zkoss.zul.Textbox;
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class EditarEstacionController extends MyGenericForwardComposer {
|
public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
private EstacionService estacionService;
|
private EstacionService estacionService;
|
||||||
@Autowired
|
|
||||||
private UsuarioBancarioService usuarioBancarioService;
|
|
||||||
private MyListbox estacionList;
|
private MyListbox estacionList;
|
||||||
private Button btnApagar;
|
private Button btnApagar;
|
||||||
private Textbox txtDescEstacion;
|
private Textbox txtDescEstacion;
|
||||||
private Textbox txtDescMac;
|
private Textbox txtDescMac;
|
||||||
private Longbox txtNumCaja;
|
|
||||||
private Estacion estacion;
|
private Estacion estacion;
|
||||||
private List<PuntoVenta> lsPuntoVenta;
|
|
||||||
private List<UsuarioBancario> lsUsuarioBancario;
|
|
||||||
private MyComboboxPuntoVenta cmbPuntoVenta;
|
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||||
private Combobox cmbConexion;
|
|
||||||
private Checkbox chkPinPad;
|
|
||||||
private Label lbPinPad;
|
|
||||||
private static Logger log = Logger.getLogger(EditarEstacionController.class);
|
private static Logger log = Logger.getLogger(EditarEstacionController.class);
|
||||||
|
|
||||||
public Button getBtnApagar() {
|
|
||||||
return btnApagar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBtnApagar(Button btnApagar) {
|
|
||||||
this.btnApagar = btnApagar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Estacion getEstacion() {
|
public Estacion getEstacion() {
|
||||||
return estacion;
|
return estacion;
|
||||||
}
|
}
|
||||||
|
@ -77,59 +54,13 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
this.estacion = estacion;
|
this.estacion = estacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Textbox getTxtDescEstacion() {
|
|
||||||
return txtDescEstacion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTxtDescEstacion(Textbox txtDescEstacion) {
|
|
||||||
this.txtDescEstacion = txtDescEstacion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PuntoVenta> getLsPuntoVenta() {
|
|
||||||
return lsPuntoVenta;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLsPuntoVenta(List<PuntoVenta> lsPuntoVenta) {
|
|
||||||
this.lsPuntoVenta = lsPuntoVenta;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Textbox getTxtDescMac() {
|
|
||||||
return txtDescMac;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTxtDescMac(Textbox txtDescMac) {
|
|
||||||
this.txtDescMac = txtDescMac;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Longbox getTxtNumCaja() {
|
|
||||||
return txtNumCaja;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTxtNumCaja(Longbox txtNumCaja) {
|
|
||||||
this.txtNumCaja = txtNumCaja;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<UsuarioBancario> getLsUsuarioBancario() {
|
|
||||||
return lsUsuarioBancario;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLsUsuarioBancario(List<UsuarioBancario> lsUsuarioBancario) {
|
|
||||||
this.lsUsuarioBancario = lsUsuarioBancario;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
lsUsuarioBancario = usuarioBancarioService.obtenerTodos();
|
|
||||||
lsPuntoVenta = new ArrayList<PuntoVenta>();
|
|
||||||
|
|
||||||
estacion = (Estacion) Executions.getCurrent().getArg().get("estacion");
|
estacion = (Estacion) Executions.getCurrent().getArg().get("estacion");
|
||||||
estacionList = (MyListbox) Executions.getCurrent().getArg().get("estacionList");
|
estacionList = (MyListbox) Executions.getCurrent().getArg().get("estacionList");
|
||||||
|
|
||||||
lbPinPad.setVisible(Boolean.FALSE);
|
|
||||||
chkPinPad.setVisible(Boolean.FALSE);
|
|
||||||
|
|
||||||
if (estacion.getEstacionId() == null) {
|
if (estacion.getEstacionId() == null) {
|
||||||
btnApagar.setVisible(Boolean.FALSE);
|
btnApagar.setVisible(Boolean.FALSE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -146,32 +77,14 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
txtDescMac.setText(descMac.toUpperCase());
|
txtDescMac.setText(descMac.toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (estacion.getConexionBancaria() != null) {
|
|
||||||
if (estacion.getConexionBancaria().equals("S")) {
|
|
||||||
lbPinPad.setVisible(Boolean.TRUE);
|
|
||||||
chkPinPad.setVisible(Boolean.TRUE);
|
|
||||||
|
|
||||||
if (estacion.getPinPadImpresoraPropia() != null) {
|
|
||||||
chkPinPad.setChecked(estacion.getPinPadImpresoraPropia());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
txtDescEstacion.focus();
|
txtDescEstacion.focus();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
|
|
||||||
cmbPuntoVenta.getValue(true);
|
cmbPuntoVenta.getValue(true);
|
||||||
cmbConexion.getValue();
|
|
||||||
|
|
||||||
if (cmbConexion.getValue().equals("")) {
|
|
||||||
estacion.setConexionBancaria(null);
|
|
||||||
estacion.setUsuarioBancario(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
String descMac = txtDescMac.getText();
|
String descMac = txtDescMac.getText();
|
||||||
|
|
||||||
|
@ -179,30 +92,34 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
estacion.setFecmodif(Calendar.getInstance().getTime());
|
estacion.setFecmodif(Calendar.getInstance().getTime());
|
||||||
estacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
estacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
estacion.setDescmac(estacionService.getDecimalMAC(descMac).toString());
|
estacion.setDescmac(estacionService.getDecimalMAC(descMac).toString());
|
||||||
estacion.setPinPadImpresoraPropia(chkPinPad.isChecked());
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
estacionService.suscribirActualizar(estacion);
|
estacionService.suscribirActualizar(estacion);
|
||||||
Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"),
|
Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"),
|
||||||
Labels.getLabel("editarEstacionController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
Labels.getLabel("editarEstacionController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
|
estacionList.updateItem(estacion);
|
||||||
|
|
||||||
closeWindow();
|
closeWindow();
|
||||||
|
|
||||||
} catch (BusinessException e) {
|
} catch (BusinessException e) {
|
||||||
Messagebox.show(e.getMessage(), Labels.getLabel("editarEstacionController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.show(e.getMessage(), Labels.getLabel("editarEstacionController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) {
|
||||||
try {
|
try {
|
||||||
int resp = Messagebox.show(Labels.getLabel("editarEstacionController.MSG.borrarPergunta"),
|
int resp = Messagebox.show(Labels.getLabel("editarEstacionController.MSG.borrarPergunta"),
|
||||||
Labels.getLabel("editarEstacionController.window.title"), Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Labels.getLabel("editarEstacionController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
if (resp == Messagebox.YES) {
|
||||||
estacionService.borrar(estacion);
|
estacionService.borrar(estacion);
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarEstacionController.MSG.borrarOK"),
|
Messagebox.show(Labels.getLabel("editarEstacionController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarEstacionController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
Labels.getLabel("editarEstacionController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
estacionList.removeItem(estacion);
|
estacionList.removeItem(estacion);
|
||||||
|
|
||||||
|
@ -210,31 +127,8 @@ public class EditarEstacionController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Clients.alert(Labels.getLabel("MSG.Error"), Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION);
|
Clients.alert(Labels.getLabel("MSG.Error"),
|
||||||
}
|
Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION);
|
||||||
}
|
|
||||||
|
|
||||||
public void onChange$cmbConexion(Event ev) {
|
|
||||||
habilitarCombo();
|
|
||||||
if (cmbConexion.getValue().equals("")) {
|
|
||||||
estacion.setConexionBancaria(null);
|
|
||||||
estacion.setUsuarioBancario(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void habilitarCombo() {
|
|
||||||
Comboitem cbi = cmbConexion.getSelectedItem();
|
|
||||||
if (cbi != null) {
|
|
||||||
String valor = (String) cbi.getValue();
|
|
||||||
|
|
||||||
if (valor.equals("S")) {
|
|
||||||
lbPinPad.setVisible(Boolean.TRUE);
|
|
||||||
chkPinPad.setVisible(Boolean.TRUE);
|
|
||||||
} else {
|
|
||||||
lbPinPad.setVisible(Boolean.FALSE);
|
|
||||||
chkPinPad.setVisible(Boolean.FALSE);
|
|
||||||
chkPinPad.setChecked(Boolean.FALSE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# <controler>. <id>. <propiedade> = XXX
|
# <controler>. <id>. <propiedade> = XXX
|
||||||
|
|
||||||
#Versao do VentaBoleto:
|
#Versao do VentaBoleto:
|
||||||
versao = ADM_20120820_1RC49
|
versao = ADM_20120821_1RC50
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -5,18 +5,22 @@
|
||||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winBusquedaEstacion" title="${c:l('busquedaEstacionController.window.title')}"
|
<window id="winBusquedaEstacion"
|
||||||
|
title="${c:l('busquedaEstacionController.window.title')}"
|
||||||
apply="${busquedaEstacionController}" contentStyle="overflow:auto"
|
apply="${busquedaEstacionController}" contentStyle="overflow:auto"
|
||||||
height="500px" width="860px" border="normal">
|
height="500px" width="860px" border="normal">
|
||||||
|
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<button id="btnRefresh" image="/gui/img/refresh.png" width="35px"
|
<button id="btnRefresh" image="/gui/img/refresh.png"
|
||||||
|
width="35px"
|
||||||
tooltiptext="${c:l('busquedaEstacionController.btnRefresh.tooltiptext')}" />
|
tooltiptext="${c:l('busquedaEstacionController.btnRefresh.tooltiptext')}" />
|
||||||
<separator orient="vertical" />
|
<separator orient="vertical" />
|
||||||
<button id="btnNovo" image="/gui/img/add.png" width="35px"
|
<button id="btnNovo" image="/gui/img/add.png" width="35px"
|
||||||
tooltiptext="${c:l('busquedaEstacionController.btnNovo.tooltiptext')}" />
|
tooltiptext="${c:l('busquedaEstacionController.btnNovo.tooltiptext')}" />
|
||||||
<separator orient="vertical" />
|
<separator orient="vertical" />
|
||||||
<button id="btnCerrar" onClick="winBusquedaEstacion.detach()" image="/gui/img/exit.png" width="35px"
|
<button id="btnCerrar"
|
||||||
|
onClick="winBusquedaEstacion.detach()" image="/gui/img/exit.png"
|
||||||
|
width="35px"
|
||||||
tooltiptext="${c:l('busquedaEstacionController.btnCerrar.tooltiptext')}" />
|
tooltiptext="${c:l('busquedaEstacionController.btnCerrar.tooltiptext')}" />
|
||||||
</toolbar>
|
</toolbar>
|
||||||
|
|
||||||
|
@ -27,19 +31,21 @@
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaEstacionController.lhDescEstacion.label')}"/>
|
<label
|
||||||
<textbox id="txtDescEstacion" width="300px" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" maxlength="60"/>
|
value="${c:l('busquedaEstacionController.lhDescEstacion.label')}" />
|
||||||
</row>
|
<textbox id="txtDescEstacion" width="300px"
|
||||||
<!--row>
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
||||||
<label value="${c:l('busquedaEstacionController.lhDescMac.label')}"/>
|
maxlength="60" />
|
||||||
<textbox id="txtDescMac" width="300px" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
|
||||||
</row-->
|
|
||||||
<row>
|
|
||||||
<label value="${c:l('busquedaEstacionController.lhNumCaja.label')}"/>
|
|
||||||
<longbox id="txtNumCaja" width="300px" maxlength="10"/>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaEstacionController.lhPuntoVenta.label')}"/>
|
<label
|
||||||
|
value="${c:l('busquedaEstacionController.lhNumCaja.label')}" />
|
||||||
|
<longbox id="txtNumCaja" width="300px"
|
||||||
|
maxlength="10" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('busquedaEstacionController.lhPuntoVenta.label')}" />
|
||||||
<combobox id="cmbPuntoVenta"
|
<combobox id="cmbPuntoVenta"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||||
mold="rounded" buttonVisible="true" width="300px" />
|
mold="rounded" buttonVisible="true" width="300px" />
|
||||||
|
@ -53,7 +59,8 @@
|
||||||
</toolbar>
|
</toolbar>
|
||||||
|
|
||||||
<paging id="pagingEstacion" pageSize="15" />
|
<paging id="pagingEstacion" pageSize="15" />
|
||||||
<listbox id="estacionList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
<listbox id="estacionList"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
multiple="false" height="55%">
|
multiple="false" height="55%">
|
||||||
<listhead sizable="true">
|
<listhead sizable="true">
|
||||||
<listheader image="/gui/img/create_doc.gif" width="50px"
|
<listheader image="/gui/img/create_doc.gif" width="50px"
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winEditarEstacion" border="normal" apply="${editarEstacionController}"
|
<window id="winEditarEstacion" border="normal"
|
||||||
width="500px" height="300px" contentStyle="overflow:auto"
|
apply="${editarEstacionController}" width="500px" height="300px"
|
||||||
|
contentStyle="overflow:auto"
|
||||||
title="${c:l('editarEstacionController.window.title')}">
|
title="${c:l('editarEstacionController.window.title')}">
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<hbox spacing="5px" style="padding:1px" align="right">
|
<hbox spacing="5px" style="padding:1px" align="right">
|
||||||
|
@ -30,45 +31,37 @@
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaEstacionController.lhDescEstacion.label')}"/>
|
<label
|
||||||
|
value="${c:l('busquedaEstacionController.lhDescEstacion.label')}" />
|
||||||
<textbox id="txtDescEstacion" width="90%" rows="3"
|
<textbox id="txtDescEstacion" width="90%" rows="3"
|
||||||
constraint="no empty" maxlength="60"
|
constraint="no empty" maxlength="60"
|
||||||
value="@{winEditarEstacion$composer.estacion.descestacion}"
|
value="@{winEditarEstacion$composer.estacion.descestacion}"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaEstacionController.lhDescMac.label')}"/>
|
<label
|
||||||
|
value="${c:l('busquedaEstacionController.lhDescMac.label')}" />
|
||||||
<textbox id="txtDescMac" width="90%"
|
<textbox id="txtDescMac" width="90%"
|
||||||
constraint="${c:new('com.rjconsultores.ventaboletos.web.utilerias.MACConstraint')}" maxlength="17"
|
constraint="${c:new('com.rjconsultores.ventaboletos.web.utilerias.MACConstraint')}"
|
||||||
|
maxlength="17"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaEstacionController.lhNumCaja.label')}"/>
|
<label
|
||||||
<longbox id="txtNumCaja" width="90%" constraint="no empty" maxlength="10"
|
value="${c:l('busquedaEstacionController.lhNumCaja.label')}" />
|
||||||
|
<longbox id="txtNumCaja" width="90%"
|
||||||
|
constraint="no empty" maxlength="10"
|
||||||
value="@{winEditarEstacion$composer.estacion.numcaja}" />
|
value="@{winEditarEstacion$composer.estacion.numcaja}" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaEstacionController.lhPuntoVenta.label')}"/>
|
<label
|
||||||
|
value="${c:l('busquedaEstacionController.lhPuntoVenta.label')}" />
|
||||||
<combobox id="cmbPuntoVenta" constraint="no empty"
|
<combobox id="cmbPuntoVenta" constraint="no empty"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||||
initialValue="@{winEditarEstacion$composer.estacion.puntoVenta}"
|
initialValue="@{winEditarEstacion$composer.estacion.puntoVenta}"
|
||||||
selectedItem="@{winEditarEstacion$composer.estacion.puntoVenta}"
|
selectedItem="@{winEditarEstacion$composer.estacion.puntoVenta}"
|
||||||
mold="rounded" buttonVisible="true" width="90%" />
|
mold="rounded" buttonVisible="true" width="90%" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
|
||||||
<label value="${c:l('editarEstacionController.conexion')}"/>
|
|
||||||
<combobox id="cmbConexion" width="90%" mold="rounded" buttonVisible="true" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
|
||||||
selectedItem="@{winEditarEstacion$composer.estacion.conexionBancaria}">
|
|
||||||
<!--comboitem value="B" label="${c:l('editarEstacionController.IndTipo.1')}" /-->
|
|
||||||
<comboitem value="M" label="${c:l('editarEstacionController.IndTipo.2')}" />
|
|
||||||
<comboitem value="S" label="${c:l('editarEstacionController.IndTipo.3')}" />
|
|
||||||
</combobox>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label id="lbPinPad" value="${c:l('editarEstacionController.pinPad')}"/>
|
|
||||||
<checkbox id="chkPinPad" />
|
|
||||||
</row>
|
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</window>
|
</window>
|
||||||
|
|
Loading…
Reference in New Issue