daniel.zauli 2016-01-15 12:43:00 +00:00
parent d1c087a0ab
commit 4537ab3837
1 changed files with 18 additions and 9 deletions

View File

@ -1,9 +1,12 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.gr;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import javax.sql.DataSource;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
@ -110,6 +113,9 @@ public class EditarAidfController extends MyGenericForwardComposer {
private static Logger log = Logger.getLogger(EditarAidfController.class);
@Autowired
private DataSource dataSourceRead;
@Override
public void doAfterCompose(Component comp) throws Exception {
@ -176,20 +182,23 @@ public class EditarAidfController extends MyGenericForwardComposer {
txtForminicial.getValue();
txtFormfinal.getValue();
txtDocFiscal.getValue();
Comboitem inscEstadualSeleccionada = cmbInscestadual.getSelectedItem();
String _inscestadual = inscEstadualSeleccionada != null ? inscEstadualSeleccionada.getValue().toString() : "";
aidf.setInscestadual(_inscestadual);
Long x = aidfService.validarDocFiscalSerieFormInicialFinal(aidf);
if(x != -1){
Messagebox.show(
Labels.getLabel("editarAidfController.btnSalvar.MSG.conflitoFormIniFin", new Object[] { x }),
Labels.getLabel("editarAidfController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
Long x ;
try {
x = aidfService.validarDocFiscalSerieFormInicialFinal(aidf, dataSourceRead.getConnection());
if(x != -1){
Messagebox.show(
Labels.getLabel("editarAidfController.btnSalvar.MSG.conflitoFormIniFin", new Object[] { x }),
Labels.getLabel("editarAidfController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
} catch (SQLException e) {
e.printStackTrace();
}
aidf.setActivo(true);