Package entidades

Examples of entidades.Visita


            public void actionPerformed(ActionEvent e) {
                try {
                    validarDatos();
                   
                    if (JOptionPane.showConfirmDialog(VisitasController.this, "Desea Guardar?", "Gestion Visitas", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
                        Visita visita = new Visita();
                       
                        Integer nro = Integer.valueOf(nroPresoField.getText());
                        Preso p = (Preso) ec.createQuery("select p from Preso p where p.nroPreso = :nro", Preso.class).setParameter("nro", nro).getSingleResult();
                       
                        visita.setPreso(p);
                        visita.setApellidoVisita(apellidoField.getText());
                        visita.setNombreVisita(nombreField.getText());
                        visita.setFechaVisita(fechaDateChooser.getDate());
                        visita.setHoraIngreso(Time.valueOf(horaEntradaField.getText() + ":00"));
                       
                        if (!horaSalidaField.getText().isEmpty())
                            visita.setHoraEgreso(Time.valueOf(horaSalidaField.getText() + ":00"));

                        ec.persist(visita, true);
                   
                        listener.onPanelClose();
                    }
View Full Code Here

TOP

Related Classes of entidades.Visita

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.