Cotas - Poltronas ocupadas (fixed bug #5042)

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@34436 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2014-03-28 14:55:19 +00:00
parent 7614357af4
commit def50d552b
1 changed files with 9 additions and 8 deletions

View File

@ -51,6 +51,8 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
@Scope("prototype") @Scope("prototype")
public class EditarCorridaAsientoController extends MyGenericForwardComposer { public class EditarCorridaAsientoController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired @Autowired
private EsquemaCorridaService esquemaCorridaService; private EsquemaCorridaService esquemaCorridaService;
@Autowired @Autowired
@ -236,24 +238,23 @@ public class EditarCorridaAsientoController extends MyGenericForwardComposer {
public void onClick$btnCeder(Event ev) throws InterruptedException { public void onClick$btnCeder(Event ev) throws InterruptedException {
try { try {
Parada origen = (cmbOrigen.getSelectedItem() == null)?null:(Parada) cmbOrigen.getSelectedItem().getValue(); Parada origen = (cmbOrigen.getSelectedItem() == null) ? null : (Parada) cmbOrigen.getSelectedItem().getValue();
Parada destino = (cmbDestino.getSelectedItem() == null)?null:(Parada) cmbDestino.getSelectedItem().getValue(); Parada destino = (cmbDestino.getSelectedItem() == null) ? null : (Parada) cmbDestino.getSelectedItem().getValue();
if (poltronaOcupada.isSelected()) { if (poltronaOcupada.isSelected()) {
esquemaAsientoService.bloqueoAsientoOcupacion(esquemaCorrida, txtAsiento.getText(), origen, destino, txtMotivo.getText()); esquemaAsientoService.bloqueoAsientoOcupacion(esquemaCorrida, txtAsiento.getText(), origen, destino, Integer.parseInt(txtTiempoLiberacion.getText()), txtMotivo.getText());
} else { } else {
esquemaAsientoService.bloqueoAsientoExclusivo(esquemaCorrida, txtAsiento.getText(), origen, Integer.parseInt(txtTiempoLiberacion.getText())); esquemaAsientoService.bloqueoAsientoExclusivo(esquemaCorrida, txtAsiento.getText(), origen, Integer.parseInt(txtTiempoLiberacion.getText()));
txtMotivo.setText(""); txtMotivo.setText("");
} }
colorirAsientos(); colorirAsientos();
txtAsiento.setValue(""); txtAsiento.setValue("");
Messagebox.show(Labels.getLabel("editarConfiguracionCorridaAsientoController.MSG.salvo"), Messagebox.show(Labels.getLabel("editarConfiguracionCorridaAsientoController.MSG.salvo"),
Labels.getLabel("editarConfiguracionCorridaAsientoController.window.title"), Labels.getLabel("editarConfiguracionCorridaAsientoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION); Messagebox.OK, Messagebox.INFORMATION);
} catch (WrongValueException e) { } catch (WrongValueException e) {
throw e; throw e;
} catch (BusinessException e) { } catch (BusinessException e) {