[fixes bug#5265]
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@35221 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
3899f4338e
commit
80aff2ee97
|
@ -120,28 +120,25 @@ public class EditarArticuloController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
|
||||||
int resp = Messagebox.show(
|
int resp = Messagebox.show(
|
||||||
Labels.getLabel("editarArticuloController.MSG.borrarPergunta"),
|
Labels.getLabel("editarArticuloController.MSG.borrarPergunta"),
|
||||||
|
Labels.getLabel("editarArticuloController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
articuloService.borrar(articulo);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarArticuloController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarArticuloController.window.title"),
|
Labels.getLabel("editarArticuloController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
articuloList.removeItem(articulo);
|
||||||
|
|
||||||
articuloService.borrar(articulo);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarArticuloController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarArticuloController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
articuloList.removeItem(articulo);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,27 +190,24 @@ public class EditarAsociacionClaseServicioMarcaController extends MyGenericForwa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
|
||||||
int resp = Messagebox.show(
|
int resp = Messagebox.show(
|
||||||
Labels.getLabel("editarAsociacionClaseServicioMarcaController.MSG.borrarPergunta"),
|
Labels.getLabel("editarAsociacionClaseServicioMarcaController.MSG.borrarPergunta"),
|
||||||
|
Labels.getLabel("editarAsociacionClaseServicioMarcaController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
marcaClaseServicioService.borrar(marcaClaseServicio);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarAsociacionClaseServicioMarcaController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarAsociacionClaseServicioMarcaController.window.title"),
|
Labels.getLabel("editarAsociacionClaseServicioMarcaController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
marcaClaseServicioList.removeItem(marcaClaseServicio);
|
||||||
marcaClaseServicioService.borrar(marcaClaseServicio);
|
|
||||||
|
|
||||||
Messagebox.show(
|
closeWindow();
|
||||||
Labels.getLabel("editarAsociacionClaseServicioMarcaController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarAsociacionClaseServicioMarcaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
marcaClaseServicioList.removeItem(marcaClaseServicio);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,29 +138,27 @@ public class EditarCategoriaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
|
||||||
int resp = Messagebox.show(
|
int resp = Messagebox.show(
|
||||||
Labels.getLabel("editarCategoriaController.MSG.borrarPergunta"),
|
Labels.getLabel("editarCategoriaController.MSG.borrarPergunta"),
|
||||||
|
Labels.getLabel("editarCategoriaController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
categoriaService.borrar(categoria);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarCategoriaController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarCategoriaController.window.title"),
|
Labels.getLabel("editarCategoriaController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
categoriaList.removeItem(categoria);
|
||||||
|
|
||||||
categoriaService.borrar(categoria);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarCategoriaController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarCategoriaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
categoriaList.removeItem(categoria);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Categoria getCategoria() {
|
public Categoria getCategoria() {
|
||||||
|
|
|
@ -143,28 +143,25 @@ public class EditarCiudadController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
|
||||||
int resp = Messagebox.show(
|
int resp = Messagebox.show(
|
||||||
Labels.getLabel("editarCiudadController.MSG.borrarPergunta"),
|
Labels.getLabel("editarCiudadController.MSG.borrarPergunta"),
|
||||||
|
Labels.getLabel("editarCiudadController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
ciudadService.borrar(ciudad);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarCiudadController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarCiudadController.window.title"),
|
Labels.getLabel("editarCiudadController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
ciudadList.removeItem(ciudad);
|
||||||
|
|
||||||
ciudadService.borrar(ciudad);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarCiudadController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarCiudadController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
ciudadList.removeItem(ciudad);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,27 +119,23 @@ public class EditarClaseServicioController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
int resp = Messagebox.show(
|
||||||
int resp = Messagebox.show(
|
Labels.getLabel("editarClaseServicioController.MSG.borrarPergunta"),
|
||||||
Labels.getLabel("editarClaseServicioController.MSG.borrarPergunta"),
|
Labels.getLabel("editarClaseServicioController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
claseServicioService.borrar(claseServicio);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarClaseServicioController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarClaseServicioController.window.title"),
|
Labels.getLabel("editarClaseServicioController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
claseServicioList.removeItem(claseServicio);
|
||||||
claseServicioService.borrar(claseServicio);
|
|
||||||
|
|
||||||
Messagebox.show(
|
closeWindow();
|
||||||
Labels.getLabel("editarClaseServicioController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarClaseServicioController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
claseServicioList.removeItem(claseServicio);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,28 +183,24 @@ public class EditarColoniaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
int resp = Messagebox.show(
|
||||||
int resp = Messagebox.show(
|
Labels.getLabel("editarColoniaController.MSG.borrarPergunta"),
|
||||||
Labels.getLabel("editarColoniaController.MSG.borrarPergunta"),
|
Labels.getLabel("editarColoniaController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
coloniaService.borrar(colonia);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarColoniaController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarColoniaController.window.title"),
|
Labels.getLabel("editarColoniaController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
coloniaList.removeItem(colonia);
|
||||||
|
|
||||||
coloniaService.borrar(colonia);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarColoniaController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarColoniaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
coloniaList.removeItem(colonia);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,28 +153,24 @@ public class EditarCuponConvenioController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
int resp = Messagebox.show(
|
||||||
int resp = Messagebox.show(
|
Labels.getLabel("editarCuponConvenioController.MSG.BorrarPergunta"),
|
||||||
Labels.getLabel("editarCuponConvenioController.MSG.BorrarPergunta"),
|
Labels.getLabel("editarCuponConvenioController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
cuponConService.borrar(cc);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarCuponConvenioController.MSG.BorrarOK"),
|
||||||
Labels.getLabel("editarCuponConvenioController.window.title"),
|
Labels.getLabel("editarCuponConvenioController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
CuponConvenioList.removeItem(cc);
|
||||||
|
|
||||||
cuponConService.borrar(cc);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarCuponConvenioController.MSG.BorrarOK"),
|
|
||||||
Labels.getLabel("editarCuponConvenioController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
CuponConvenioList.removeItem(cc);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ public class EditarDetDiagramaAutobusController extends MyGenericForwardComposer
|
||||||
|
|
||||||
closeWindow();
|
closeWindow();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(Labels.getLabel("MSG.Error"), Labels.getLabel("editarDiagramaAutobusController.window.title"), Messagebox.ERROR);
|
Clients.alert(Labels.getLabel("MSG.Error"), Labels.getLabel("editarDiagramaAutobusController.window.title"), Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,25 +153,22 @@ public class EditarEmpleadoController extends MyGenericForwardComposer {
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
|
||||||
int resp = Messagebox.show(
|
int resp = Messagebox.show(
|
||||||
Labels.getLabel("editarEmpleadoController.MSG.borrarPergunta"),
|
Labels.getLabel("editarEmpleadoController.MSG.borrarPergunta"),
|
||||||
|
Labels.getLabel("editarEmpleadoController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
empleadoService.borrar(empleado);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarEmpleadoController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarEmpleadoController.window.title"),
|
Labels.getLabel("editarEmpleadoController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
closeWindow();
|
||||||
empleadoService.borrar(empleado);
|
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarEmpleadoController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarEmpleadoController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -212,28 +212,25 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
|
||||||
int resp = Messagebox.show(
|
int resp = Messagebox.show(
|
||||||
Labels.getLabel("editarEmpresaController.MSG.borrarPergunta"),
|
Labels.getLabel("editarEmpresaController.MSG.borrarPergunta"),
|
||||||
|
Labels.getLabel("editarEmpresaController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
empresaService.borrar(empresa);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarEmpresaController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarEmpresaController.window.title"),
|
Labels.getLabel("editarEmpresaController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
empresaList.removeItem(empresa);
|
||||||
|
|
||||||
empresaService.borrar(empresa);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarEmpresaController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarEmpresaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
empresaList.removeItem(empresa);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,7 +342,7 @@ public class EditarConfiguracionCancelacionController extends MyGenericForwardCo
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarCategoriaController.window.title"),
|
Labels.getLabel("editarCategoriaController.window.title"),
|
||||||
|
@ -371,7 +371,7 @@ public class EditarConfiguracionCancelacionController extends MyGenericForwardCo
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarCategoriaController.window.title"),
|
Labels.getLabel("editarCategoriaController.window.title"),
|
||||||
|
|
|
@ -555,7 +555,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -582,7 +582,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -721,7 +721,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -791,7 +791,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -820,7 +820,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -890,7 +890,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -923,7 +923,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -966,7 +966,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -992,7 +992,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -1054,7 +1054,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -1080,7 +1080,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -1123,7 +1123,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -1149,7 +1149,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
@ -1169,7 +1169,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
Labels.getLabel("editarConfiguracionCategoriaController.window.title"),
|
||||||
|
|
|
@ -421,26 +421,22 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRemoverPuntoVenta(Event ev) {
|
public void onClick$btnRemoverPuntoVenta(Event ev) throws InterruptedException {
|
||||||
try {
|
ReservacionPuntoVenta reservacioPuntoVenta = (ReservacionPuntoVenta) reservacionPuntoVentaList.getSelected();
|
||||||
ReservacionPuntoVenta reservacioPuntoVenta = (ReservacionPuntoVenta) reservacionPuntoVentaList.getSelected();
|
if (reservacioPuntoVenta != null) {
|
||||||
if (reservacioPuntoVenta != null) {
|
lsReservacionPuntoVenta.remove(reservacioPuntoVenta);
|
||||||
lsReservacionPuntoVenta.remove(reservacioPuntoVenta);
|
reservacioPuntoVenta.setFecmodif(Calendar.getInstance().getTime());
|
||||||
reservacioPuntoVenta.setFecmodif(Calendar.getInstance().getTime());
|
reservacioPuntoVenta.setActivo(Boolean.FALSE);
|
||||||
reservacioPuntoVenta.setActivo(Boolean.FALSE);
|
reservacioPuntoVenta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
reservacioPuntoVenta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
lsReservacionPuntoVenta.add(reservacioPuntoVenta);
|
||||||
lsReservacionPuntoVenta.add(reservacioPuntoVenta);
|
reservacionPuntoVentaList.updateItem(reservacioPuntoVenta);
|
||||||
reservacionPuntoVentaList.updateItem(reservacioPuntoVenta);
|
reservacionPuntoVentaList.removeItem(reservacioPuntoVenta);
|
||||||
reservacionPuntoVentaList.removeItem(reservacioPuntoVenta);
|
reservacionCtrl.setReservacionPuntoVentaList(lsReservacionPuntoVenta);
|
||||||
reservacionCtrl.setReservacionPuntoVentaList(lsReservacionPuntoVenta);
|
} else {
|
||||||
} else {
|
Messagebox.show(
|
||||||
Messagebox.show(
|
Labels.getLabel("editarConfiguracionReservacionController.MSG.selectItem"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.MSG.selectItem"),
|
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,49 +463,41 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRemoverClase(Event ev) {
|
public void onClick$btnRemoverClase(Event ev) throws InterruptedException {
|
||||||
try {
|
ReservacionClase reservacioClase = (ReservacionClase) reservacionClaseList.getSelected();
|
||||||
ReservacionClase reservacioClase = (ReservacionClase) reservacionClaseList.getSelected();
|
if (reservacioClase != null) {
|
||||||
if (reservacioClase != null) {
|
lsReservacionClase.remove(reservacioClase);
|
||||||
lsReservacionClase.remove(reservacioClase);
|
reservacioClase.setFecmodif(Calendar.getInstance().getTime());
|
||||||
reservacioClase.setFecmodif(Calendar.getInstance().getTime());
|
reservacioClase.setActivo(Boolean.FALSE);
|
||||||
reservacioClase.setActivo(Boolean.FALSE);
|
reservacioClase.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
reservacioClase.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
lsReservacionClase.add(reservacioClase);
|
||||||
lsReservacionClase.add(reservacioClase);
|
reservacionClaseList.updateItem(reservacioClase);
|
||||||
reservacionClaseList.updateItem(reservacioClase);
|
reservacionClaseList.removeItem(reservacioClase);
|
||||||
reservacionClaseList.removeItem(reservacioClase);
|
reservacionCtrl.setReservacionClaseList(lsReservacionClase);
|
||||||
reservacionCtrl.setReservacionClaseList(lsReservacionClase);
|
} else {
|
||||||
} else {
|
Messagebox.show(
|
||||||
Messagebox.show(
|
Labels.getLabel("editarConfiguracionReservacionController.MSG.selectItem"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.MSG.selectItem"),
|
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRemoverMarca(Event ev) {
|
public void onClick$btnRemoverMarca(Event ev) throws InterruptedException {
|
||||||
try {
|
ReservacionMarca rMarca = (ReservacionMarca) reservacionMarcaList.getSelected();
|
||||||
ReservacionMarca rMarca = (ReservacionMarca) reservacionMarcaList.getSelected();
|
if (rMarca != null) {
|
||||||
if (rMarca != null) {
|
lsReservacionMarca.remove(rMarca);
|
||||||
lsReservacionMarca.remove(rMarca);
|
rMarca.setFecmodif(Calendar.getInstance().getTime());
|
||||||
rMarca.setFecmodif(Calendar.getInstance().getTime());
|
rMarca.setActivo(Boolean.FALSE);
|
||||||
rMarca.setActivo(Boolean.FALSE);
|
rMarca.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
rMarca.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
lsReservacionMarca.add(rMarca);
|
||||||
lsReservacionMarca.add(rMarca);
|
reservacionMarcaList.updateItem(rMarca);
|
||||||
reservacionMarcaList.updateItem(rMarca);
|
reservacionMarcaList.removeItem(rMarca);
|
||||||
reservacionMarcaList.removeItem(rMarca);
|
reservacionCtrl.setReservacionMarcaList(lsReservacionMarca);
|
||||||
reservacionCtrl.setReservacionMarcaList(lsReservacionMarca);
|
} else {
|
||||||
} else {
|
Messagebox.show(
|
||||||
Messagebox.show(
|
Labels.getLabel("editarConfiguracionReservacionController.MSG.selectItem"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.MSG.selectItem"),
|
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,12 +543,8 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
||||||
|
|
||||||
|
|
||||||
if (fecInicio.getValue().after(fecFinal.getValue())) {
|
if (fecInicio.getValue().after(fecFinal.getValue())) {
|
||||||
try {
|
|
||||||
Messagebox.show(Labels.getLabel("editarPeriodoVacacionalController.MSG.busquedaPeriodo"),
|
Messagebox.show(Labels.getLabel("editarPeriodoVacacionalController.MSG.busquedaPeriodo"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
Labels.getLabel("editarConfiguracionReservacionController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
||||||
} catch (InterruptedException ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -677,28 +661,24 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
int resp = Messagebox.show(
|
||||||
int resp = Messagebox.show(
|
Labels.getLabel("editarConfiguracionReservacionController.MSG.borrarPergunta"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.MSG.borrarPergunta"),
|
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
reservacionCtrlService.borrar(reservacionCtrl);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarConfiguracionReservacionController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
reservacionCtrlList.removeItem(reservacionCtrl);
|
||||||
|
|
||||||
reservacionCtrlService.borrar(reservacionCtrl);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
reservacionCtrlList.removeItem(reservacionCtrl);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -365,7 +365,7 @@ public class EditarConvenioController extends MyGenericForwardComposer {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnAdicionarConvenioDet(Event ev) {
|
public void onClick$btnAdicionarConvenioDet(Event ev) throws InterruptedException {
|
||||||
txtPorcdescuento.setConstraint("no empty");
|
txtPorcdescuento.setConstraint("no empty");
|
||||||
txtPorcdescuento.getValue();
|
txtPorcdescuento.getValue();
|
||||||
|
|
||||||
|
@ -381,81 +381,77 @@ public class EditarConvenioController extends MyGenericForwardComposer {
|
||||||
txtNumfoliofinal.getValue();
|
txtNumfoliofinal.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
BigDecimal porcdescuento = txtPorcdescuento.getValueDecimal();
|
||||||
BigDecimal porcdescuento = txtPorcdescuento.getValueDecimal();
|
Long numfolioinicio = txtNumfolioinicio.getValue();
|
||||||
Long numfolioinicio = txtNumfolioinicio.getValue();
|
Long numfoliofinal = txtNumfoliofinal.getValue();
|
||||||
Long numfoliofinal = txtNumfoliofinal.getValue();
|
|
||||||
|
|
||||||
if (chkValidaFolio.isChecked() && (numfolioinicio > numfoliofinal)) {
|
if (chkValidaFolio.isChecked() && (numfolioinicio > numfoliofinal)) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Folios"),
|
Labels.getLabel("MSG.Folios"),
|
||||||
Labels.getLabel("editarConvenioController.window.title"),
|
Labels.getLabel("editarConvenioController.window.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Boolean achou = Boolean.FALSE;
|
Boolean achou = Boolean.FALSE;
|
||||||
for (ConvenioDet cds : convenio.getConvenioDetList()) {
|
for (ConvenioDet cds : convenio.getConvenioDetList()) {
|
||||||
if (cds.getNumfoliofinal() != null
|
if (cds.getNumfoliofinal() != null
|
||||||
&& cds.getNumfolioinicial() != null) {
|
&& cds.getNumfolioinicial() != null) {
|
||||||
if (cds.getNumfoliofinal().equals(numfoliofinal)
|
if (cds.getNumfoliofinal().equals(numfoliofinal)
|
||||||
&& cds.getNumfolioinicial().equals(numfolioinicio)
|
&& cds.getNumfolioinicial().equals(numfolioinicio)
|
||||||
&& cds.getPorcdescuento().equals(porcdescuento)) {
|
&& cds.getPorcdescuento().equals(porcdescuento)) {
|
||||||
achou = Boolean.TRUE;
|
achou = Boolean.TRUE;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!achou) {
|
if (!achou) {
|
||||||
ConvenioDet cd = new ConvenioDet();
|
ConvenioDet cd = new ConvenioDet();
|
||||||
cd.setActivo(Boolean.TRUE);
|
cd.setActivo(Boolean.TRUE);
|
||||||
cd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
cd.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
cd.setFecmodif(Calendar.getInstance().getTime());
|
cd.setFecmodif(Calendar.getInstance().getTime());
|
||||||
cd.setPorcdescuento(porcdescuento);
|
cd.setPorcdescuento(porcdescuento);
|
||||||
cd.setNumfolioinicial(numfolioinicio);
|
cd.setNumfolioinicial(numfolioinicio);
|
||||||
cd.setNumfoliofinal(numfoliofinal);
|
cd.setNumfoliofinal(numfoliofinal);
|
||||||
|
|
||||||
if (chkValidaFolio.isChecked()) {
|
if (chkValidaFolio.isChecked()) {
|
||||||
int resp = registroDuplicado(numfolioinicio, numfoliofinal);
|
int resp = registroDuplicado(numfolioinicio, numfoliofinal);
|
||||||
|
|
||||||
if (resp != 0) {
|
if (resp != 0) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
(resp == 1) ? Labels.getLabel("MSG.Registro.Existe") : Labels.getLabel("editarConvenioController.MSG.registroTraslapado"),
|
(resp == 1) ? Labels.getLabel("MSG.Registro.Existe") : Labels.getLabel("editarConvenioController.MSG.registroTraslapado"),
|
||||||
Labels.getLabel("editarConvenioController.window.title"),
|
Labels.getLabel("editarConvenioController.window.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (lsConvenioDets.size() >= 1) {
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarConvenioController.MSG.pocentaje"),
|
|
||||||
Labels.getLabel("editarConvenioController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
lsConvenioDets.add(cd);
|
|
||||||
convenioDetList.setData(lsConvenioDets);
|
|
||||||
convenio.setConvenioDetList(lsConvenioDets);
|
|
||||||
|
|
||||||
chkValidaFolio.setDisabled(Boolean.TRUE);
|
|
||||||
|
|
||||||
txtPorcdescuento.setConstraint("");
|
|
||||||
txtNumfolioinicio.setConstraint("");
|
|
||||||
txtNumfoliofinal.setConstraint("");
|
|
||||||
|
|
||||||
txtPorcdescuento.setText("");
|
|
||||||
txtNumfolioinicio.setValue(null);
|
|
||||||
txtNumfoliofinal.setValue(null);
|
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(
|
if (lsConvenioDets.size() >= 1) {
|
||||||
Labels.getLabel("MSG.Registro.Existe"),
|
Messagebox.show(
|
||||||
Labels.getLabel("editarConvenioController.window.title"),
|
Labels.getLabel("editarConvenioController.MSG.pocentaje"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Labels.getLabel("editarConvenioController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
lsConvenioDets.add(cd);
|
||||||
log.error(ex);
|
convenioDetList.setData(lsConvenioDets);
|
||||||
|
convenio.setConvenioDetList(lsConvenioDets);
|
||||||
|
|
||||||
|
chkValidaFolio.setDisabled(Boolean.TRUE);
|
||||||
|
|
||||||
|
txtPorcdescuento.setConstraint("");
|
||||||
|
txtNumfolioinicio.setConstraint("");
|
||||||
|
txtNumfoliofinal.setConstraint("");
|
||||||
|
|
||||||
|
txtPorcdescuento.setText("");
|
||||||
|
txtNumfolioinicio.setValue(null);
|
||||||
|
txtNumfoliofinal.setValue(null);
|
||||||
|
} else {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("MSG.Registro.Existe"),
|
||||||
|
Labels.getLabel("editarConvenioController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,7 +279,7 @@ public class EditarSecretariaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarSecretariaController.window.title"),
|
Labels.getLabel("editarSecretariaController.window.title"),
|
||||||
|
@ -309,7 +309,7 @@ public class EditarSecretariaController extends MyGenericForwardComposer {
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarSecretariaController.window.title"),
|
Labels.getLabel("editarSecretariaController.window.title"),
|
||||||
|
@ -409,7 +409,7 @@ public class EditarSecretariaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarSecretariaController.window.title"),
|
Labels.getLabel("editarSecretariaController.window.title"),
|
||||||
|
|
|
@ -75,44 +75,39 @@ public class EditarProdPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
cmbPuntoVenta.getValue();
|
cmbPuntoVenta.getValue();
|
||||||
|
|
||||||
try {
|
if (prodPuntoVenta.getPuntoVenta() == null) {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("MSG.Error.combobox"),
|
||||||
|
Labels.getLabel("editarProdPuntoVentaController.winEditarProdPuntoVenta.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (prodPuntoVenta.getPuntoVenta() == null) {
|
if (prodPuntoVenta.getProdpuntoventaId() != null) {
|
||||||
|
if (registroDuplicado()) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error.combobox"),
|
Labels.getLabel("editarPricingController.MSG.categoriaExiste"),
|
||||||
Labels.getLabel("editarProdPuntoVentaController.winEditarProdPuntoVenta.title"),
|
Labels.getLabel("editarProdPuntoVentaController.winEditarProdPuntoVenta.title"),
|
||||||
Messagebox.OK, Messagebox.ERROR);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
prodPuntoVentaService.actualizacion(prodPuntoVenta);
|
||||||
if (prodPuntoVenta.getProdpuntoventaId() != null) {
|
prodPuntoVentaList.updateItem(prodPuntoVenta);
|
||||||
if (registroDuplicado()) {
|
lsProdPuntoVenta.add(prodPuntoVenta);
|
||||||
Messagebox.show(
|
} else {
|
||||||
Labels.getLabel("editarPricingController.MSG.categoriaExiste"),
|
if (registroDuplicado()) {
|
||||||
Labels.getLabel("editarProdPuntoVentaController.winEditarProdPuntoVenta.title"),
|
Messagebox.show(
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Labels.getLabel("editarPricingController.MSG.categoriaExiste"),
|
||||||
return;
|
Labels.getLabel("editarProdPuntoVentaController.winEditarProdPuntoVenta.title"),
|
||||||
}
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
prodPuntoVentaService.actualizacion(prodPuntoVenta);
|
return;
|
||||||
prodPuntoVentaList.updateItem(prodPuntoVenta);
|
|
||||||
lsProdPuntoVenta.add(prodPuntoVenta);
|
|
||||||
} else {
|
|
||||||
if (registroDuplicado()) {
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarPricingController.MSG.categoriaExiste"),
|
|
||||||
Labels.getLabel("editarProdPuntoVentaController.winEditarProdPuntoVenta.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
prodPuntoVentaService.suscribir(prodPuntoVenta);
|
|
||||||
prodPuntoVentaList.addItem(prodPuntoVenta);
|
|
||||||
lsProdPuntoVenta.add(prodPuntoVenta);
|
|
||||||
}
|
}
|
||||||
|
prodPuntoVentaService.suscribir(prodPuntoVenta);
|
||||||
closeWindow();
|
prodPuntoVentaList.addItem(prodPuntoVenta);
|
||||||
} catch (Exception ex) {
|
lsProdPuntoVenta.add(prodPuntoVenta);
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean registroDuplicado() throws InterruptedException {
|
private boolean registroDuplicado() throws InterruptedException {
|
||||||
|
|
|
@ -280,14 +280,10 @@ public class EditarAltaCortesiaRHController extends MyGenericForwardComposer {
|
||||||
txtNome.getValue();
|
txtNome.getValue();
|
||||||
|
|
||||||
if (fecinicio.getValue().after(fecfinal.getValue())) {
|
if (fecinicio.getValue().after(fecfinal.getValue())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("editarAltaCortesiaRHController.MSG.CortesiaAlta"),
|
||||||
Messagebox.show(Labels.getLabel("editarAltaCortesiaRHController.MSG.CortesiaAlta"),
|
Labels.getLabel("editarAltaCortesiaRHController.window.title"),
|
||||||
Labels.getLabel("editarAltaCortesiaRHController.window.title"),
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
} catch (InterruptedException ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
if (cortesia.getEmpleado() == null) {
|
if (cortesia.getEmpleado() == null) {
|
||||||
|
@ -389,7 +385,7 @@ public class EditarAltaCortesiaRHController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarAltaCortesiaRHController.window.title"),
|
Labels.getLabel("editarAltaCortesiaRHController.window.title"),
|
||||||
|
@ -479,7 +475,7 @@ public class EditarAltaCortesiaRHController extends MyGenericForwardComposer {
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarAltaCortesiaRHController.window.title"),
|
Labels.getLabel("editarAltaCortesiaRHController.window.title"),
|
||||||
|
@ -499,7 +495,7 @@ public class EditarAltaCortesiaRHController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(
|
Clients.alert(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarAltaCortesiaRHController.window.title"),
|
Labels.getLabel("editarAltaCortesiaRHController.window.title"),
|
||||||
|
|
|
@ -313,29 +313,25 @@ public class EditarBancoController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
int resp = Messagebox
|
||||||
int resp = Messagebox
|
.show(Labels
|
||||||
.show(Labels
|
.getLabel("editarBancoController.MSG.borrarPergunta"),
|
||||||
.getLabel("editarBancoController.MSG.borrarPergunta"),
|
|
||||||
Labels.getLabel("editarBancoController.window.title"),
|
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
|
||||||
|
|
||||||
bancoService.borrar(banco);
|
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarBancoController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarBancoController.window.title"),
|
Labels.getLabel("editarBancoController.window.title"),
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
bancoList.removeItem(banco);
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
closeWindow();
|
bancoService.borrar(banco);
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
Messagebox.show(
|
||||||
log.error(ex);
|
Labels.getLabel("editarBancoController.MSG.borrarOK"),
|
||||||
|
Labels.getLabel("editarBancoController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
|
bancoList.removeItem(banco);
|
||||||
|
|
||||||
|
closeWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -530,25 +530,21 @@ public class EditarTarjetaViajeController extends MyGenericForwardComposer {
|
||||||
this.closeWindow();
|
this.closeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
int resp = Messagebox.show(Labels.getLabel("editarTarjetaViajeController.MSG.borrarPergunta"),
|
||||||
int resp = Messagebox.show(Labels.getLabel("editarTarjetaViajeController.MSG.borrarPergunta"),
|
Labels.getLabel("editarTarjetaViajeController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
tarjetaViajeService.borrar(tarjetaViaje);
|
||||||
|
|
||||||
|
Messagebox.show(Labels.getLabel("editarTarjetaViajeController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarTarjetaViajeController.window.title"),
|
Labels.getLabel("editarTarjetaViajeController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
tarjetaViajeList.updateItem(tarjetaViaje);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
closeWindow();
|
||||||
|
|
||||||
tarjetaViajeService.borrar(tarjetaViaje);
|
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("editarTarjetaViajeController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarTarjetaViajeController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
tarjetaViajeList.updateItem(tarjetaViaje);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,65 +59,55 @@ public class EditarPricingClaseController extends MyGenericForwardComposer {
|
||||||
public void onClick$btnAdicionarClase(Event ev) throws Exception {
|
public void onClick$btnAdicionarClase(Event ev) throws Exception {
|
||||||
cmbClase.getValue();
|
cmbClase.getValue();
|
||||||
|
|
||||||
try {
|
if (pricingClase.getClaseServicio() == null) {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("MSG.Error.combobox"),
|
||||||
|
Labels.getLabel("editarPricingController.windowClase.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
} else {
|
||||||
|
|
||||||
if (pricingClase.getClaseServicio() == null) {
|
Boolean existe = pricingClaseService.obtenerPricingClase(pricingClase.getPricing(), (ClaseServicio) cmbClase.getSelectedItem().getValue());
|
||||||
|
if (existe) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error.combobox"),
|
Labels.getLabel("MSG.Registro.Existe"),
|
||||||
Labels.getLabel("editarPricingController.windowClase.title"),
|
Labels.getLabel("editarPricingController.windowClase.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
} else {
|
} else {
|
||||||
|
if (pricingClase.getPricingclaseId() != null) {
|
||||||
Boolean existe = pricingClaseService.obtenerPricingClase(pricingClase.getPricing(), (ClaseServicio) cmbClase.getSelectedItem().getValue());
|
pricingClaseService.actualizacion(pricingClase);
|
||||||
if (existe) {
|
pricingClaseList.updateItem(pricingClase);
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("MSG.Registro.Existe"),
|
|
||||||
Labels.getLabel("editarPricingController.windowClase.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
} else {
|
} else {
|
||||||
if (pricingClase.getPricingclaseId() != null) {
|
pricingClaseService.suscribir(pricingClase);
|
||||||
pricingClaseService.actualizacion(pricingClase);
|
pricingClaseList.addItem(pricingClase);
|
||||||
pricingClaseList.updateItem(pricingClase);
|
|
||||||
} else {
|
|
||||||
pricingClaseService.suscribir(pricingClase);
|
|
||||||
pricingClaseList.addItem(pricingClase);
|
|
||||||
}
|
|
||||||
closeWindow();
|
|
||||||
}
|
}
|
||||||
|
closeWindow();
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRemoverClase(Event ev) {
|
public void onClick$btnRemoverClase(Event ev) throws InterruptedException {
|
||||||
try {
|
PricingClase pClase = (PricingClase) pricingClaseList.getSelected();
|
||||||
PricingClase pClase = (PricingClase) pricingClaseList.getSelected();
|
if (pClase != null) {
|
||||||
if (pClase != null) {
|
int resp = Messagebox.show(
|
||||||
int resp = Messagebox.show(
|
Labels.getLabel("editarPricingController.MSG.borrarPerguntaClase"),
|
||||||
Labels.getLabel("editarPricingController.MSG.borrarPerguntaClase"),
|
Labels.getLabel("editarPricingController.windowClase.title"),
|
||||||
Labels.getLabel("editarPricingController.windowClase.title"),
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
if (resp == Messagebox.YES) {
|
||||||
pricingClase.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
pricingClase.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
pricingClase.setFecmodif(Calendar.getInstance().getTime());
|
pricingClase.setFecmodif(Calendar.getInstance().getTime());
|
||||||
pricingClase.setActivo(Pricing.INATIVO);
|
pricingClase.setActivo(Pricing.INATIVO);
|
||||||
|
|
||||||
pricingClaseList.removeItem(pricingClase);
|
pricingClaseList.removeItem(pricingClase);
|
||||||
pricingClaseService.borrar(pricingClase);
|
pricingClaseService.borrar(pricingClase);
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
|
||||||
Labels.getLabel("editarPricingController.windowClase.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} else {
|
||||||
log.error(ex);
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarPricingController.MSG.selectItem"),
|
||||||
|
Labels.getLabel("editarPricingController.windowClase.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PricingClase getPricingClase() {
|
public PricingClase getPricingClase() {
|
||||||
|
|
|
@ -1183,17 +1183,13 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
||||||
Labels.getLabel("editarPricingController.windowImporte.title"), args, MODAL);
|
Labels.getLabel("editarPricingController.windowImporte.title"), args, MODAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnModificarImporte(Event ev) {
|
public void onClick$btnModificarImporte(Event ev) throws InterruptedException {
|
||||||
PricingImporte pImporte = (PricingImporte) pricingImporteList.getSelected();
|
PricingImporte pImporte = (PricingImporte) pricingImporteList.getSelected();
|
||||||
|
|
||||||
if (pImporte != null) {
|
if (pImporte != null) {
|
||||||
verPricingImporte(pImporte);
|
verPricingImporte(pImporte);
|
||||||
} else {
|
} else {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.windowImporte.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.windowImporte.title"), Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
} catch (InterruptedException ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1579,20 +1575,18 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
private void verPricingRuta(PricingRuta pRuta) {
|
private void verPricingRuta(PricingRuta pRuta) throws InterruptedException {
|
||||||
if (pricing.getPricingId() == null) {
|
if (pricing.getPricingId() == null) {
|
||||||
pricingService.suscribir(pricing);
|
pricingService.suscribir(pricing);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
if(pricing.getEmpresa() != null){
|
if(pricing.getEmpresa() != null){
|
||||||
Map args = new HashMap();
|
Map args = new HashMap();
|
||||||
args.put("pricingRuta", pRuta);
|
args.put("pricingRuta", pRuta);
|
||||||
args.put("pricingRutaList", pricingRutaList);
|
args.put("pricingRutaList", pricingRutaList);
|
||||||
|
|
||||||
openWindow("/gui/pricing/editarPricingRuta.zul",
|
openWindow("/gui/pricing/editarPricingRuta.zul",
|
||||||
Labels.getLabel("editarPricingController.windowRuta.title"), args, MODAL);
|
Labels.getLabel("editarPricingController.windowRuta.title"), args, MODAL);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
|
@ -1600,14 +1594,9 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
||||||
Labels.getLabel("editarPricingController.windowRuta.title"),
|
Labels.getLabel("editarPricingController.windowRuta.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnModificarRuta(Event ev) {
|
public void onClick$btnModificarRuta(Event ev) throws InterruptedException {
|
||||||
PricingRuta pRuta = (PricingRuta) pricingRutaList.getSelected();
|
PricingRuta pRuta = (PricingRuta) pricingRutaList.getSelected();
|
||||||
|
|
||||||
if (pRuta != null) {
|
if (pRuta != null) {
|
||||||
|
|
|
@ -126,46 +126,42 @@ public class EditarPricingCorridaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnAdicionarCorrida(Event ev) throws Exception {
|
public void onClick$btnAdicionarCorrida(Event ev) throws Exception {
|
||||||
try {
|
List<PricingCorrida> lsPricingViagem = (pricing.getPricingCorridaList() == null) ? new ArrayList<PricingCorrida>() : pricing.getPricingCorridaList();
|
||||||
List<PricingCorrida> lsPricingViagem = (pricing.getPricingCorridaList() == null) ? new ArrayList<PricingCorrida>() : pricing.getPricingCorridaList();
|
List<Object> ls = corridaList.getSelectedsItens();
|
||||||
List<Object> ls = corridaList.getSelectedsItens();
|
if (!ls.isEmpty()) {
|
||||||
if (!ls.isEmpty()) {
|
for (Object o : ls) {
|
||||||
for (Object o : ls) {
|
Boolean achou = Boolean.FALSE;
|
||||||
Boolean achou = Boolean.FALSE;
|
Corrida corrida = (Corrida) o;
|
||||||
Corrida corrida = (Corrida) o;
|
if (corrida.getCorridaCtrl() == null) {
|
||||||
if (corrida.getCorridaCtrl() == null) {
|
CorridaCtrl cc = corridaCtrlService.obtenerID(corrida.getId().getCorridaId());
|
||||||
CorridaCtrl cc = corridaCtrlService.obtenerID(corrida.getId().getCorridaId());
|
if (cc != null) {
|
||||||
if (cc != null) {
|
corrida.setCorridaCtrl(cc);
|
||||||
corrida.setCorridaCtrl(cc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (PricingCorrida pc : lsPricingViagem) {
|
}
|
||||||
if (pc.getCorridaCtrl().getCorridaId().equals(corrida.getCorridaCtrl().getCorridaId())) {
|
for (PricingCorrida pc : lsPricingViagem) {
|
||||||
achou = Boolean.TRUE;
|
if (pc.getCorridaCtrl().getCorridaId().equals(corrida.getCorridaCtrl().getCorridaId())) {
|
||||||
}
|
achou = Boolean.TRUE;
|
||||||
}
|
|
||||||
|
|
||||||
if (!achou) {
|
|
||||||
PricingCorrida p = new PricingCorrida();
|
|
||||||
p.setActivo(Pricing.ATIVO);
|
|
||||||
|
|
||||||
p.setCorridaCtrl(corrida.getCorridaCtrl());
|
|
||||||
|
|
||||||
p.setFecmodif(Calendar.getInstance().getTime());
|
|
||||||
p.setPricing(pricing);
|
|
||||||
p.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
||||||
|
|
||||||
lsPricingViagem.add(p);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pricing.setPricingCorridaList(lsPricingViagem);
|
if (!achou) {
|
||||||
pricingCorridaList.setData(lsPricingViagem);
|
PricingCorrida p = new PricingCorrida();
|
||||||
|
p.setActivo(Pricing.ATIVO);
|
||||||
|
|
||||||
closeWindow();
|
p.setCorridaCtrl(corrida.getCorridaCtrl());
|
||||||
|
|
||||||
|
p.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
p.setPricing(pricing);
|
||||||
|
p.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
|
||||||
|
lsPricingViagem.add(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
pricing.setPricingCorridaList(lsPricingViagem);
|
||||||
|
pricingCorridaList.setData(lsPricingViagem);
|
||||||
|
|
||||||
|
closeWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,37 +234,32 @@ public class EditarPricingDiaController extends MyGenericForwardComposer {
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Clients.alert(Labels.getLabel("MSG.Error"),
|
Clients.alert(Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarPricingController.windowDia.title"), Messagebox.ERROR);
|
Labels.getLabel("editarPricingController.windowDia.title"), Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRemoverDia(Event ev) {
|
public void onClick$btnRemoverDia(Event ev) throws InterruptedException {
|
||||||
try {
|
PricingDia pDia = (PricingDia) pricingDiaList.getSelected();
|
||||||
PricingDia pDia = (PricingDia) pricingDiaList.getSelected();
|
if (pDia != null) {
|
||||||
if (pDia != null) {
|
int resp = Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarPerguntaDia"), Labels.getLabel("editarPricingController.windowDia.title"),
|
||||||
int resp = Messagebox.show(Labels.getLabel("editarPricingController.MSG.borrarPerguntaDia"), Labels.getLabel("editarPricingController.windowDia.title"),
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
if (resp == Messagebox.YES) {
|
||||||
pricingDia.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
pricingDia.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
pricingDia.setFecmodif(Calendar.getInstance().getTime());
|
pricingDia.setFecmodif(Calendar.getInstance().getTime());
|
||||||
pricingDia.setActivo(Pricing.INATIVO);
|
pricingDia.setActivo(Pricing.INATIVO);
|
||||||
|
|
||||||
pricingDiaList.removeItem(pricingDia);
|
pricingDiaList.removeItem(pricingDia);
|
||||||
pricingDiaService.borrar(pricingDia);
|
pricingDiaService.borrar(pricingDia);
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.windowDia.title"), Messagebox.OK,
|
|
||||||
Messagebox.EXCLAMATION);
|
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} else {
|
||||||
log.error(ex);
|
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.windowDia.title"), Messagebox.OK,
|
||||||
|
Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PricingDia getPricingDia() {
|
public PricingDia getPricingDia() {
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class EditarPricingImporteController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarPricingController.windowImporte.title"),
|
Labels.getLabel("editarPricingController.windowImporte.title"),
|
||||||
|
|
|
@ -90,16 +90,13 @@ public class EditarParamCompraPuntoController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
if (podeSalvar) {
|
if (podeSalvar) {
|
||||||
if (fecInicio.getValue().after(fecFinal.getValue())) {
|
if (fecInicio.getValue().after(fecFinal.getValue())) {
|
||||||
try {
|
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarParamCompraPuntoController.MSG.busquedaPeriodo"),
|
Labels.getLabel("editarParamCompraPuntoController.MSG.busquedaPeriodo"),
|
||||||
Labels.getLabel("editarParamCompraPuntoController.window.title"),
|
Labels.getLabel("editarParamCompraPuntoController.window.title"),
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
} catch (InterruptedException ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
try {
|
|
||||||
paramCompraPunto.setActivo(true);
|
paramCompraPunto.setActivo(true);
|
||||||
paramCompraPunto.setFecmodif(Calendar.getInstance().getTime());
|
paramCompraPunto.setFecmodif(Calendar.getInstance().getTime());
|
||||||
paramCompraPunto.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
paramCompraPunto.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
@ -119,9 +116,6 @@ public class EditarParamCompraPuntoController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
busquedaParamCompraPuntoController.refreshLista();
|
busquedaParamCompraPuntoController.refreshLista();
|
||||||
closeWindow();
|
closeWindow();
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
|
@ -131,28 +125,24 @@ public class EditarParamCompraPuntoController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
int resp = Messagebox.show(
|
||||||
int resp = Messagebox.show(
|
Labels.getLabel("editarParamCompraPuntoController.MSG.borrarPergunta"),
|
||||||
Labels.getLabel("editarParamCompraPuntoController.MSG.borrarPergunta"),
|
Labels.getLabel("editarParamCompraPuntoController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
paramCompraPuntoService.borrar(paramCompraPunto);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarParamCompraPuntoController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarParamCompraPuntoController.window.title"),
|
Labels.getLabel("editarParamCompraPuntoController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
paramCompraPuntoList.removeItem(paramCompraPunto);
|
||||||
|
|
||||||
paramCompraPuntoService.borrar(paramCompraPunto);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarParamCompraPuntoController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarParamCompraPuntoController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
paramCompraPuntoList.removeItem(paramCompraPunto);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,55 +72,50 @@ public class EditarParamCostoTarjetaController extends MyGenericForwardComposer
|
||||||
cmbEmpresa.focus();
|
cmbEmpresa.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
|
|
||||||
cmbEmpresa.getSelectedItem().getValue();
|
cmbEmpresa.getSelectedItem().getValue();
|
||||||
vlrInicial.getValue();
|
vlrInicial.getValue();
|
||||||
|
|
||||||
try {
|
paramCostoTarjeta.setActivo(true);
|
||||||
paramCostoTarjeta.setActivo(true);
|
paramCostoTarjeta.setFecmodif(Calendar.getInstance().getTime());
|
||||||
paramCostoTarjeta.setFecmodif(Calendar.getInstance().getTime());
|
paramCostoTarjeta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
paramCostoTarjeta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
||||||
|
|
||||||
List<ParamCostoTarjeta> lsParam = paramCostoTarjetaService.buscar(paramCostoTarjeta);
|
List<ParamCostoTarjeta> lsParam = paramCostoTarjetaService.buscar(paramCostoTarjeta);
|
||||||
|
|
||||||
boolean podeSalvar = false;
|
boolean podeSalvar = false;
|
||||||
if (lsParam.isEmpty()) {
|
if (lsParam.isEmpty()) {
|
||||||
podeSalvar = true;
|
podeSalvar = true;
|
||||||
} else {
|
} else {
|
||||||
if (paramCostoTarjeta.getParamcostotarjetaId() != null) {
|
if (paramCostoTarjeta.getParamcostotarjetaId() != null) {
|
||||||
for (ParamCostoTarjeta p : lsParam) {
|
for (ParamCostoTarjeta p : lsParam) {
|
||||||
if (p.getParamcostotarjetaId().equals(paramCostoTarjeta.getParamcostotarjetaId())) {
|
if (p.getParamcostotarjetaId().equals(paramCostoTarjeta.getParamcostotarjetaId())) {
|
||||||
podeSalvar = true;
|
podeSalvar = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (podeSalvar) {
|
|
||||||
if (paramCostoTarjeta.getParamcostotarjetaId() == null) {
|
|
||||||
paramCostoTarjetaService.suscribir(paramCostoTarjeta);
|
|
||||||
paramCostoTarjetaList.addItem(paramCostoTarjeta);
|
|
||||||
} else {
|
|
||||||
paramCostoTarjetaService.actualizacion(paramCostoTarjeta);
|
|
||||||
paramCostoTarjetaList.updateItem(paramCostoTarjeta);
|
|
||||||
}
|
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarParamCostoTarjetaController.MSG.suscribirOK"),
|
|
||||||
Labels.getLabel("editarParamCostoTarjetaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
closeWindow();
|
|
||||||
} else {
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("MSG.Registro.Existe"),
|
|
||||||
Labels.getLabel("editarParamCostoTarjetaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (podeSalvar) {
|
||||||
|
if (paramCostoTarjeta.getParamcostotarjetaId() == null) {
|
||||||
|
paramCostoTarjetaService.suscribir(paramCostoTarjeta);
|
||||||
|
paramCostoTarjetaList.addItem(paramCostoTarjeta);
|
||||||
|
} else {
|
||||||
|
paramCostoTarjetaService.actualizacion(paramCostoTarjeta);
|
||||||
|
paramCostoTarjetaList.updateItem(paramCostoTarjeta);
|
||||||
|
}
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarParamCostoTarjetaController.MSG.suscribirOK"),
|
||||||
|
Labels.getLabel("editarParamCostoTarjetaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
closeWindow();
|
||||||
|
} else {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("MSG.Registro.Existe"),
|
||||||
|
Labels.getLabel("editarParamCostoTarjetaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) {
|
||||||
|
|
|
@ -165,28 +165,24 @@ public class EditarTipoOcupacionController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
try {
|
int resp = Messagebox.show(
|
||||||
int resp = Messagebox.show(
|
Labels.getLabel("editarTipoOcupacionController.MSG.borrarPergunta"),
|
||||||
Labels.getLabel("editarTipoOcupacionController.MSG.borrarPergunta"),
|
Labels.getLabel("editarTipoOcupacionController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
tipoOcupacionService.borrar(tipoOcupacion);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarTipoOcupacionController.MSG.borrarOK"),
|
||||||
Labels.getLabel("editarTipoOcupacionController.window.title"),
|
Labels.getLabel("editarTipoOcupacionController.window.title"),
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
if (resp == Messagebox.YES) {
|
tipoOcupacionList.removeItem(tipoOcupacion);
|
||||||
|
|
||||||
tipoOcupacionService.borrar(tipoOcupacion);
|
closeWindow();
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarTipoOcupacionController.MSG.borrarOK"),
|
|
||||||
Labels.getLabel("editarTipoOcupacionController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
tipoOcupacionList.removeItem(tipoOcupacion);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,11 +199,11 @@ public class BusquedaTarifaController extends MyGenericForwardComposer {
|
||||||
this.cmbTipoPontoVenta = cmbTipoPontoVenta;
|
this.cmbTipoPontoVenta = cmbTipoPontoVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnPesquisa(Event ev) {
|
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||||
refreshLista();
|
refreshLista();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRefresh(Event ev) {
|
public void onClick$btnRefresh(Event ev) throws InterruptedException {
|
||||||
refreshLista();
|
refreshLista();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ public class BusquedaTarifaController extends MyGenericForwardComposer {
|
||||||
Labels.getLabel("editarTarifaController.window.title"), args, MODAL);
|
Labels.getLabel("editarTarifaController.window.title"), args, MODAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshLista() {
|
private void refreshLista() throws InterruptedException {
|
||||||
Moneda moneda = (Moneda) (cmbMoneda.getSelectedItem() != null ? cmbMoneda.getSelectedItem().getValue() : null);
|
Moneda moneda = (Moneda) (cmbMoneda.getSelectedItem() != null ? cmbMoneda.getSelectedItem().getValue() : null);
|
||||||
Marca marca = (Marca) (cmbMarca.getSelectedItem() != null ? cmbMarca.getSelectedItem().getValue() : null);
|
Marca marca = (Marca) (cmbMarca.getSelectedItem() != null ? cmbMarca.getSelectedItem().getValue() : null);
|
||||||
ClaseServicio claseServicio = (ClaseServicio) (cmbClaseServicio.getSelectedItem() != null ? cmbClaseServicio.getSelectedItem().getValue() : null);
|
ClaseServicio claseServicio = (ClaseServicio) (cmbClaseServicio.getSelectedItem() != null ? cmbClaseServicio.getSelectedItem().getValue() : null);
|
||||||
|
@ -274,63 +274,44 @@ public class BusquedaTarifaController extends MyGenericForwardComposer {
|
||||||
Parada destino = (Parada) (cmbDestino.getSelectedItem() != null ? cmbDestino.getSelectedItem().getValue() : null);
|
Parada destino = (Parada) (cmbDestino.getSelectedItem() != null ? cmbDestino.getSelectedItem().getValue() : null);
|
||||||
|
|
||||||
if ((moneda == null) && (!cmbMoneda.getText().isEmpty())) {
|
if ((moneda == null) && (!cmbMoneda.getText().isEmpty())) {
|
||||||
try {
|
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Moneda.",
|
|
||||||
Labels.getLabel("editarTarifaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Moneda.",
|
||||||
} catch (Exception ex) {
|
Labels.getLabel("editarTarifaController.window.title"),
|
||||||
log.error(ex);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((marca == null) && (!cmbMarca.getText().isEmpty())) {
|
if ((marca == null) && (!cmbMarca.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Marca.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Marca.",
|
Labels.getLabel("editarTarifaController.window.title"),
|
||||||
Labels.getLabel("editarTarifaController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((claseServicio == null) && (!cmbClaseServicio.getText().isEmpty())) {
|
if ((claseServicio == null) && (!cmbClaseServicio.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Clase servicio.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Clase servicio.",
|
Labels.getLabel("editarTarifaController.window.title"),
|
||||||
Labels.getLabel("editarTarifaController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((vigenciaTarifa == null) && (!cmbVigenciaTarifa.getText().isEmpty())) {
|
if ((vigenciaTarifa == null) && (!cmbVigenciaTarifa.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Vigencia Tarifa.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Vigencia Tarifa.",
|
Labels.getLabel("editarTarifaController.window.title"),
|
||||||
Labels.getLabel("editarTarifaController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((origem == null) && (!cmbOrigem.getText().isEmpty())) {
|
if ((origem == null) && (!cmbOrigem.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Origen.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Origen.",
|
Labels.getLabel("editarTarifaController.window.title"),
|
||||||
Labels.getLabel("editarTarifaController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((destino == null) && (!cmbDestino.getText().isEmpty())) {
|
if ((destino == null) && (!cmbDestino.getText().isEmpty())) {
|
||||||
|
@ -346,27 +327,19 @@ public class BusquedaTarifaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tipoPuntoVenta == null) && (!cmbTipoPontoVenta.getText().isEmpty())) {
|
if ((tipoPuntoVenta == null) && (!cmbTipoPontoVenta.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Tipo Punto de Venta.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Tipo Punto de Venta.",
|
Labels.getLabel("editarTarifaController.window.title"),
|
||||||
Labels.getLabel("editarTarifaController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((categoria == null) && (!cmbCategoria.getText().isEmpty())) {
|
if ((categoria == null) && (!cmbCategoria.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Tipo de Pasajero.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Tipo de Pasajero.",
|
Labels.getLabel("editarTarifaController.window.title"),
|
||||||
Labels.getLabel("editarTarifaController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HibernateSearchObject<Tarifa> tarifaBusqueda =
|
HibernateSearchObject<Tarifa> tarifaBusqueda =
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class EditarTaxaEmbarqueKmController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarTaxaEmbarqueKmController.window.title"),
|
Labels.getLabel("editarTaxaEmbarqueKmController.window.title"),
|
||||||
|
@ -185,7 +185,7 @@ public class EditarTaxaEmbarqueKmController extends MyGenericForwardComposer {
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("MSG.Error"),
|
Labels.getLabel("MSG.Error"),
|
||||||
Labels.getLabel("editarTaxaEmbarqueKmController.window.title"),
|
Labels.getLabel("editarTaxaEmbarqueKmController.window.title"),
|
||||||
|
|
|
@ -107,58 +107,42 @@ public class EditarVigenciaTarifaController extends MyGenericForwardComposer {
|
||||||
fecInicio.focus();
|
fecInicio.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
fecInicio.getValue();
|
fecInicio.getValue();
|
||||||
fecFinal.getValue();
|
fecFinal.getValue();
|
||||||
//fecVenta.getValue();
|
//fecVenta.getValue();
|
||||||
try {
|
|
||||||
java.util.Date inicio = vigenciaTarifa.getFeciniciovigencia();
|
|
||||||
java.util.Date fim = vigenciaTarifa.getFecfinvigencia();
|
|
||||||
|
|
||||||
inicio.setSeconds(0);
|
java.util.Date inicio = vigenciaTarifa.getFeciniciovigencia();
|
||||||
fim.setSeconds(0);
|
java.util.Date fim = vigenciaTarifa.getFecfinvigencia();
|
||||||
|
|
||||||
List<VigenciaTarifa> lsVT1 =
|
inicio.setSeconds(0);
|
||||||
vigenciaTarifaService.buscarVigenciasIntervalo(vigenciaTarifa);
|
fim.setSeconds(0);
|
||||||
|
|
||||||
// checando se o fim da vigencia eh menor que o inicio:
|
List<VigenciaTarifa> lsVT1 =
|
||||||
if (!fim.before(inicio)) {
|
vigenciaTarifaService.buscarVigenciasIntervalo(vigenciaTarifa);
|
||||||
// checando se a vigencia pode ser salva. A data de inicio de uma
|
|
||||||
// nova vigencia tem q ser maior que a da fim da vigencia anterior
|
|
||||||
// para que não tenha tarifas com duas vigencias:
|
|
||||||
|
|
||||||
Boolean podeSalvar = lsVT1.isEmpty() ? true : false;
|
// checando se o fim da vigencia eh menor que o inicio:
|
||||||
//Se for ele mesmo pode salvar.
|
if (!fim.before(inicio)) {
|
||||||
if (lsVT1.size() == 1) {
|
// checando se a vigencia pode ser salva. A data de inicio de uma
|
||||||
//Somente edição
|
// nova vigencia tem q ser maior que a da fim da vigencia anterior
|
||||||
if (vigenciaTarifa.getVigenciatarifaId() != null) {
|
// para que não tenha tarifas com duas vigencias:
|
||||||
if (vigenciaTarifa.getVigenciatarifaId().equals(lsVT1.get(0).getVigenciatarifaId())) {
|
|
||||||
podeSalvar = true;
|
Boolean podeSalvar = lsVT1.isEmpty() ? true : false;
|
||||||
}
|
//Se for ele mesmo pode salvar.
|
||||||
|
if (lsVT1.size() == 1) {
|
||||||
|
//Somente edição
|
||||||
|
if (vigenciaTarifa.getVigenciatarifaId() != null) {
|
||||||
|
if (vigenciaTarifa.getVigenciatarifaId().equals(lsVT1.get(0).getVigenciatarifaId())) {
|
||||||
|
podeSalvar = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (podeSalvar) {
|
if (podeSalvar) {
|
||||||
if (vigenciaTarifa.getVigenciatarifaId() == null) {
|
if (vigenciaTarifa.getVigenciatarifaId() == null) {
|
||||||
if (lsVT1.isEmpty()) {
|
if (lsVT1.isEmpty()) {
|
||||||
vigenciaTarifaService.suscribir(vigenciaTarifa);
|
vigenciaTarifaService.suscribir(vigenciaTarifa);
|
||||||
vigenciaList.addItem(vigenciaTarifa);
|
vigenciaList.addItem(vigenciaTarifa);
|
||||||
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.SuscbrirOK"),
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
|
|
||||||
closeWindow();
|
|
||||||
} else {
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("MSG.Registro.Existe"),
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
vigenciaTarifaService.actualizacion(vigenciaTarifa);
|
|
||||||
vigenciaList.updateItem(vigenciaTarifa);
|
|
||||||
|
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.SuscbrirOK"),
|
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.SuscbrirOK"),
|
||||||
|
@ -166,60 +150,70 @@ public class EditarVigenciaTarifaController extends MyGenericForwardComposer {
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
closeWindow();
|
closeWindow();
|
||||||
|
} else {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("MSG.Registro.Existe"),
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
vigenciaTarifaService.actualizacion(vigenciaTarifa);
|
||||||
|
vigenciaList.updateItem(vigenciaTarifa);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.SuscbrirOK"),
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
|
closeWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.MSG.conflitoVigencias"),
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarVigenciaTarifaController.MSG.FimMenorInicio"),
|
Labels.getLabel("editarVigenciaTarifaController.MSG.conflitoVigencias"),
|
||||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} else {
|
||||||
log.error(ex);
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.MSG.FimMenorInicio"),
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException {
|
||||||
vigenciaTarifa.setFecmodif(Calendar.getInstance().getTime());
|
vigenciaTarifa.setFecmodif(Calendar.getInstance().getTime());
|
||||||
vigenciaTarifa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
vigenciaTarifa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
vigenciaTarifa.setActivo(Boolean.FALSE);
|
vigenciaTarifa.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
try {
|
|
||||||
int opcao = Messagebox.show(
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.Deseja.Borrar"),
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
|
||||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
|
||||||
|
|
||||||
if (opcao == Messagebox.YES) {
|
int opcao = Messagebox.show(
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.Deseja.Borrar"),
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
//Não posso eliminar uma vigencia se existir tarifa!!!
|
if (opcao == Messagebox.YES) {
|
||||||
List<Tarifa> tarifa = tarifaService.buscarExisteVigencia(vigenciaTarifa);
|
|
||||||
if (!tarifa.isEmpty()) {
|
|
||||||
Messagebox.show(
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.MSG.podeApagar"),
|
|
||||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
} else {
|
|
||||||
vigenciaTarifaService.borrar(vigenciaTarifa);
|
|
||||||
vigenciaList.removeItem(vigenciaTarifa);
|
|
||||||
|
|
||||||
Messagebox.show(
|
//Não posso eliminar uma vigencia se existir tarifa!!!
|
||||||
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.borrarOK"),
|
List<Tarifa> tarifa = tarifaService.buscarExisteVigencia(vigenciaTarifa);
|
||||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
if (!tarifa.isEmpty()) {
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.MSG.podeApagar"),
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
|
} else {
|
||||||
|
vigenciaTarifaService.borrar(vigenciaTarifa);
|
||||||
|
vigenciaList.removeItem(vigenciaTarifa);
|
||||||
|
|
||||||
closeWindow();
|
Messagebox.show(
|
||||||
}
|
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.borrarOK"),
|
||||||
|
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
|
closeWindow();
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -488,7 +488,7 @@ public class TarifaOficialExcelController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
fNomeArquivo.delete();
|
fNomeArquivo.delete();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error("",ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Escala
|
//Escala
|
||||||
|
|
Loading…
Reference in New Issue