Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- btnModificarReg.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- try {
- int empleadono = Integer.parseInt(empno.getText());
- String fecha = fechaalt.getText().toString();
- DateFormat formato = new SimpleDateFormat("dd/MM/yyyy");
- formato.setLenient(false);
- Date mifecha = (Date) formato.parse(fecha);
- java.sql.Date sqlDate1 = new java.sql.Date(mifecha.getTime());
- String mensaje= OperacionesEmple.modificaremple(
- conexion, Integer.parseInt(empno.getText()),
- apellido.getText(), oficio.getText(),
- Float.parseFloat(salario.getText()),
- Float.parseFloat(comision.getText()),
- sqlDate1,
- Integer.parseInt(deptno.getText()),
- Integer.parseInt(director.getText()));
- textArea.setText(mensaje);
- }catch(NumberFormatException e2){
- textArea.setText("ERROR EL DEPARTAMENTO TECLEADO TIENE QUE SER NUMÉRICO");
- } catch (ParseException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement