Advertisement
Metziop

completar

May 22nd, 2021
764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1.  private void btnStopActionPerformed(java.awt.event.ActionEvent evt) {                                        
  2.         this.btnStart.setEnabled(true);
  3.  
  4.         tiempo.stop();
  5.  
  6.         try {
  7.  
  8.             int fila = jtAsignaciones.getSelectedRow();
  9.             String idTrabajo = jtAsignaciones.getValueAt(fila, 0).toString();
  10.  
  11.             String querry = "UPDATE pedidosempleado SET horaTermino=?, estatus=? WHERE idPedidoEmpleado=?";
  12.             Connection conn = MySQLConection.getConnection();
  13.             PreparedStatement ps = conn.prepareStatement(querry);
  14.             String estatus = "terminado";
  15.  
  16.             ps.setTime(1, Time.valueOf(LocalTime.now()));
  17.             ps.setString(2, estatus);
  18.             ps.setString(3, idTrabajo);
  19.             ps.executeUpdate();
  20.             actualizarTiempoTotal(idTrabajo);
  21.         } catch (Exception e) {
  22.             JOptionPane.showMessageDialog(null, "error" + e);
  23.         }
  24.         String user = loginSesion.user;
  25.         actualizartabla(user);
  26.         calcularComision(user);
  27.  
  28.  
  29.     }                                      
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement