示例#1
0
文件: config.java 项目: Angelmath/SIC
 private void jButton2MouseClicked(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jButton2MouseClicked
   try {
     if (c == null) {
       ServiceHb helper = new ServiceHb();
       helper.iniciarTransaccion();
       c = new Configuracion();
       c.setCampo(c1.getText());
       c.setDato(c2.getText());
       helper.crearObjeto(c);
       helper.confirmarTransaccion();
       helper.cerrarSesion();
     } else {
       ServiceHb helper = new ServiceHb();
       helper.iniciarTransaccion();
       c.setCampo(c1.getText());
       c.setDato(c2.getText());
       helper.actualizarObjeto(c);
       helper.confirmarTransaccion();
       helper.cerrarSesion();
     }
   } catch (Exception io) {
   }
   c1.setText(null);
   c2.setText(null);
   c = null;
   llenarreportes();
 } // GEN-LAST:event_jButton2MouseClicked
示例#2
0
文件: config.java 项目: Angelmath/SIC
 private void jButton3MouseClicked(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jButton3MouseClicked
   try {
     ServiceHb helper = new ServiceHb();
     helper.iniciarTransaccion();
     helper.eliminarObjeto(c);
     helper.confirmarTransaccion();
     helper.cerrarSesion();
     c1.setText(null);
     c2.setText(null);
     c = null;
     llenarreportes();
   } catch (Exception io) {
   }
 } // GEN-LAST:event_jButton3MouseClicked