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