Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. btnModificarReg.addActionListener(new ActionListener() {
  2. public void actionPerformed(ActionEvent e) {
  3. try {
  4. int empleadono = Integer.parseInt(empno.getText());
  5. String fecha = fechaalt.getText().toString();
  6. DateFormat formato = new SimpleDateFormat("dd/MM/yyyy");
  7. formato.setLenient(false);
  8. Date mifecha = (Date) formato.parse(fecha);
  9. java.sql.Date sqlDate1 = new java.sql.Date(mifecha.getTime());
  10. String mensaje= OperacionesEmple.modificaremple(
  11. conexion, Integer.parseInt(empno.getText()),
  12. apellido.getText(), oficio.getText(),
  13. Float.parseFloat(salario.getText()),
  14. Float.parseFloat(comision.getText()),
  15. sqlDate1,
  16. Integer.parseInt(deptno.getText()),
  17. Integer.parseInt(director.getText()));
  18. textArea.setText(mensaje);
  19. }catch(NumberFormatException e2){
  20. textArea.setText("ERROR EL DEPARTAMENTO TECLEADO TIENE QUE SER NUMÉRICO");
  21. } catch (ParseException e1) {
  22. // TODO Auto-generated catch block
  23. e1.printStackTrace();
  24. }
  25. }
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement