gleimar 2013-10-19 15:16:38 +00:00
parent 975a9e37ae
commit 5bd4c0bb85
4 changed files with 1266 additions and 1249 deletions

View File

@ -12,6 +12,7 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Combobox; import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem; import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Datebox; import org.zkoss.zul.Datebox;
import org.zkoss.zul.Intbox;
import org.zkoss.zul.Messagebox; import org.zkoss.zul.Messagebox;
import com.rjconsultores.ventaboletos.entidad.Estado; import com.rjconsultores.ventaboletos.entidad.Estado;
@ -34,6 +35,7 @@ public class AtualizarCorridaFecHusoFecVeranoController extends MyGenericForward
private Datebox datInicial; private Datebox datInicial;
private Combobox cmbEstado; private Combobox cmbEstado;
private List<Estado> lsEstados; private List<Estado> lsEstados;
private Intbox ibxCorridaId;
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
@ -56,15 +58,20 @@ public class AtualizarCorridaFecHusoFecVeranoController extends MyGenericForward
if (cbiEstado != null) { if (cbiEstado != null) {
Estado estado = (Estado) cbiEstado.getValue(); Estado estado = (Estado) cbiEstado.getValue();
Date dataAPartirDe = datInicial.getValue(); Date dataAPartirDe = datInicial.getValue();
Integer corridaId = ibxCorridaId.getValue();
Boolean sucesso = false;
if (corridaId == null) {
sucesso = corridaService.atualizarCorridaFecHusoFecVerano(estado, dataAPartirDe);
} else {
sucesso = corridaService.atualizarCorridaFecHusoFecVerano(estado, dataAPartirDe, corridaId);
}
if (corridaService.atualizarCorridaFecHusoFecVerano(estado, dataAPartirDe)) { if (sucesso) {
Messagebox.show( Messagebox.show(
Labels.getLabel("atualizarCorridaFecHusoFecVeranoController.MSG.borrarOK"), Labels.getLabel("atualizarCorridaFecHusoFecVeranoController.MSG.borrarOK"),
Labels.getLabel("atualizarCorridaFecHusoFecVeranoController.window.title"), Labels.getLabel("atualizarCorridaFecHusoFecVeranoController.window.title"),
Messagebox.OK, Messagebox.INFORMATION); Messagebox.OK, Messagebox.INFORMATION);
closeWindow();
} else { } else {
Messagebox.show( Messagebox.show(
Labels.getLabel("MSG.Error"), Labels.getLabel("MSG.Error"),

File diff suppressed because it is too large Load Diff

View File

@ -4556,3 +4556,6 @@ editarConexionConfController.window.title = Editar Configuração de Conexão
editarConexionConfController.MSG.suscribirOK = Configuração de Conexão salva com sucesso. editarConexionConfController.MSG.suscribirOK = Configuração de Conexão salva com sucesso.
editarConexionConfController.MSG.desativarOK = Conexão desativada com sucesso. editarConexionConfController.MSG.desativarOK = Conexão desativada com sucesso.
editarConexionConfController.MSG.ativarOK = Conexao ativada com sucesso. editarConexionConfController.MSG.ativarOK = Conexao ativada com sucesso.
#atualizaCorridaFecHusoFecVerano
atualizaCorridaFecHusoFecVerano.numcorrida=Serviço

View File

@ -25,20 +25,24 @@
</row> </row>
<row> <row>
<label <label
value="${c:l('atualizarCorridaFecHusoFecVeranoController.label.datInicial')}" /> value="* ${c:l('atualizarCorridaFecHusoFecVeranoController.label.datInicial')}" />
<datebox id="datInicial" width="70%" mold="rounded" <datebox id="datInicial" width="70%" mold="rounded"
format="dd/MM/yyyy" lenient="false" constraint="no empty" format="dd/MM/yyyy" lenient="false" constraint="no empty"
maxlength="10" /> maxlength="10" />
</row> </row>
<row> <row>
<label <label
value="${c:l('editarEmpresaController.estado.label')}" /> value="* ${c:l('editarEmpresaController.estado.label')}" />
<combobox id="cmbEstado" <combobox id="cmbEstado"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
constraint="no empty" mold="rounded" buttonVisible="true" constraint="no empty" mold="rounded" buttonVisible="true"
width="70%" width="70%"
model="@{winAtualizaCorridaHusoVerano$composer.lsEstados}" /> model="@{winAtualizaCorridaHusoVerano$composer.lsEstados}" />
</row> </row>
<row>
<label value="${c:l('atualizaCorridaFecHusoFecVerano.numcorrida')}" />
<intbox id="ibxCorridaId" />
</row>
</rows> </rows>
</grid> </grid>