Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void btnStartActionPerformed(java.awt.event.ActionEvent evt) {
- this.btnStart.setEnabled(false);
- this.btnStop.setEnabled(true);
- int fila = jtAsignaciones.getSelectedRow();
- String idTrabajo = jtAsignaciones.getValueAt(fila, 0).toString();
- String tiempoEstimado = jtAsignaciones.getValueAt(fila, 2).toString();
- //----------------parte sql--------------------//
- try {
- String querry = "UPDATE pedidosempleado SET horaInicio=?, estatus=? WHERE idPedidoEmpleado=?";
- String estatus = "en elaboracion";
- Connection conn = MySQLConection.getConnection();
- PreparedStatement ps = conn.prepareStatement(querry);
- ps.setTime(1, Time.valueOf(LocalTime.now()));
- ps.setString(2, estatus);
- ps.setString(3, idTrabajo);
- ps.executeUpdate();
- } catch (Exception e) {
- JOptionPane.showMessageDialog(null, "error" + e);
- }
- //----------------llamando al hilo--------------------//
- cronometro crono = new cronometro(00, 00, 00);
- tiempo = new Thread(crono);
- crono.addObserver(this);
- tiempo.start();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement