Package entidades

Examples of entidades.Pabellon


        guardarButt.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (JOptionPane.showConfirmDialog(PabellonController.this, "Desea Guardar?","Guardar",JOptionPane.YES_NO_OPTION) == 0){
                    if (p == null){
                        p = new Pabellon();
                        copyUItoModel(p);
                        ec.persist(p, true);
                    }else{
                        copyUItoModel(p);
                        //Que es lo que esta actualizando?
View Full Code Here


    }

    private void obtenerPabellones() {
        pabellones = ec.createQuery("select p from Pabellon p", Pabellon.class).getResultList();
        for (int i = 0; i < pabellones.size(); i++) {
            Pabellon pabellon = pabellones.get(i);
            pabellonCombo.addItem(pabellon.getCodigo());
        }
    }
View Full Code Here

            }
        });
        pabellonCombo.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                Pabellon pabe = pabellones.get(pabellonCombo.getSelectedIndex());
                if (pabe != null) {
                    obtenerCeldas(pabe, CarcelConstants.INTERNA);
                }
            }
        });
View Full Code Here

   
    private void createPabellonTable(boolean externaDS, List<Pabellon> pabellons){
        EntityTable<Pabellon> table = new EntityTable<Pabellon>(Pabellon.class, new TableEntityHelper() {

            public void getProperties(Serializable entity, HashMap<String, String> dataField) {
                Pabellon p = (Pabellon) entity;
                dataField.put(VistasCarceles.CODIGO_PABELLON, p.getCodigo());
                dataField.put(VistasCarceles.DESCRIPCION_PABELLON, p.getDescripcion());
            }
        });
        table.setDatabaseSource(externaDS);
        if (!externaDS){
            table.setDataColection(pabellons);
View Full Code Here

        createPabellonTable(false, listaR);
    }
   
    private void limpiarLista(List<Pabellon> listaR){
        for (int i = 0; i < listaR.size(); i++) {
            Pabellon preso = listaR.get(i);
            for (int j = 0; j < listaR.size(); j++) {
                Pabellon preso1 = listaR.get(j);
                    if (i!=j){
                        if (preso.equals(preso1)){
                            listaR.remove(j);
                        }
                    }
View Full Code Here

                        responsable.setFechaEntrada(fechaDateChooser.getDate());
                        responsable.setHoraEntrada(Time.valueOf(horaEntradaField.getText()+ ":00"));
                        responsable.setHoraSalida(Time.valueOf(horaSalidaField.getText()+ ":00"));
                       
                        String codigo = pabellonesComboBox.getSelectedItem().toString().split(" - ")[0];
                        Pabellon pabellon = (Pabellon) ec.createQuery("select p from Pabellon p where p.codigo = :codigo", Pabellon.class).setParameter("codigo", codigo).getSingleResult();
                        responsable.setPabellon(pabellon);
                      
                        ec.persist(responsable, true);
                       
                        listener.onPanelClose();
View Full Code Here

    }
   
    private void cargarCombo(){
        List<Pabellon> lista = ec.createQuery("select p from Pabellon p", Pabellon.class).getResultList();
        for (int i = 0; i < lista.size(); i++) {
            Pabellon pabellon = lista.get(i);
            pabellonesComboBox.addItem(pabellon.getCodigo()+" - "+ pabellon.getDescripcion());
        }
    }
View Full Code Here

                try{
                    validarDatos();
                    if (JOptionPane.showConfirmDialog(PrincipalController.instanciaControllerPrincipal(), "Desea Guardar?", "Movimientos a Comedor", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION){
                        //Selecciono lo que dice el comboBox
                        //el split es para dividir el sstring en "partes" a partir del caracter/es que le paso por parametro
                        Pabellon p = new Pabellon(comboBox.getSelectedItem().toString().split(" - ")[0],comboBox.getSelectedItem().toString().split(" - ")[1]);
                        MovimientoAComedor mc = new MovimientoAComedor();

                        mc.setPabellon(p);
                        mc.setUsuario(UsuarioActualLogueado.getUserLogueado());
                        mc.setFechaMovimiento(fechaDateChooser.getDate());
View Full Code Here

    }

    private void cargarCombo(){
        List<Pabellon> lista = ec.createQuery("select p from Pabellon p", Pabellon.class).getResultList();
        for (int i = 0; i < lista.size(); i++) {
            Pabellon pabellon = lista.get(i);
            comboBox.addItem(pabellon.getCodigo()+" - "+ pabellon.getDescripcion());
        }
    }
View Full Code Here

                try{
                    validarDatos();
                    if (JOptionPane.showConfirmDialog(PrincipalController.instanciaControllerPrincipal(), "Desea Guardar?", "Gestión Celdas", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION){
                        //Selecciono lo que dice el comboBox
                        //el split es para dividir el sstring en "partes" a partir del caracter/es que le paso por parametro
                        Pabellon p = new Pabellon(comboBox.getSelectedItem().toString().split(" - ")[0],comboBox.getSelectedItem().toString().split(" - ")[1]);
                        ci.setPabellon(p);
                       
                        ci.setCelda(celda);
                        ci.setEnable(true);
                        ci.setNombreCelda(String.valueOf(nombreCeldaField.getText()));
                        ci.setTamanio(Integer.valueOf(tamanioField.getText()));
                       
                        ci.setTotal(Integer.valueOf(espacioTotalField.getText()));
                        ci.setOcupado(0);
                        ec.persist(ci, true);
                        JOptionPane.showMessageDialog(CeldaInternaController.this, "Celda cargada satisfactoriamente");
                        listener.onPanelClose();
                    }
                } catch (UIValidateException ex) {
                    JOptionPane.showMessageDialog(CeldaInternaController.this,ex.getMessage());
                }
            }
        });

        modificarButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                try{
                    validarDatos();
                    if (JOptionPane.showConfirmDialog(PrincipalController.instanciaControllerPrincipal(), "Desea Guardar?", "Gestión Celdas", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION){
                        //Selecciono lo que dice el comboBox
                        //el split es para dividir el sstring en "partes" a partir del caracter/es que le paso por parametro
                        Pabellon p = new Pabellon(comboBox.getSelectedItem().toString().split(" - ")[0],comboBox.getSelectedItem().toString().split(" - ")[1]);
                        ci.setPabellon(p);

                        ci.setCelda(celda);
                        ci.setEnable(true);
                        ci.setNombreCelda(String.valueOf(nombreCeldaField.getText()));
View Full Code Here

TOP

Related Classes of entidades.Pabellon

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.