Package org.salamanca.commands

Examples of org.salamanca.commands.ICommand


                "Intruduzca el nombre del nuevo usuario");
        if (name != null && name.length() > 0) {
            User user = new User();
            user.setName(name);
            user.setRole(getRole());
            ICommand insertar = CommandFactory.createInsertarUsuario(user);
            try {
                insertar.execute();
            } catch (MessageException ex) {
                JOptionPane.showMessageDialog(this, ex.getMessage());
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this, "Entrada no valida");
            }
View Full Code Here


        String nombre = (String) jList1.getSelectedValue();
        Vector v = BrokerServer.instance().query(User.class,
                                                 "name==\"" + nombre + "\"");
        if (v.size() > 0) {
            User user = (User) v.firstElement();
            ICommand eliminarUsuario = CommandFactory.createEliminarUsuario(user);
            try {
                eliminarUsuario.execute();
            } catch (Exception ex) {
                  JOptionPane.showMessageDialog(this, ex.getMessage());
            }
            load();
        }
View Full Code Here

        String concepto = ((String) ((Vector) e.getVector()).elementAt(0));
        double porcentaje = ((Double) ((Vector) e.getVector()).elementAt(1)).
                            doubleValue();
        recargo.setConcepto(concepto);
        recargo.setPorcentaje(porcentaje);
        ICommand insertarVale = CommandFactory.createInsertarRecargoTarjeta(
                recargo);
        try {
            insertarVale.execute();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
        loadList();
    }
View Full Code Here

        kodo.util.Id oid = new kodo.util.Id(oidStr);

        Recargo recargo = (Recargo) BrokerServer.instance().getPMF().
                          getPersistenceManager().getObjectById(oid, true);

        ICommand eiminarRecargo = CommandFactory.createEliminarRecargoTarjeta(
                recargo);
        try {
            eiminarRecargo.execute();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
            loadList();

        }
View Full Code Here

                          getPersistenceManager().getObjectById(oid, true);
        String concepto = (String) ((Vector) e.getVector()).elementAt(0);
        double porcentaje = ((Double) ((Vector) e.getVector()).elementAt(1)).
                            doubleValue();

        ICommand modificarRecargo = CommandFactory.createModificarRecargoTarjeta(recargo,concepto,porcentaje);
        try {
            modificarRecargo.execute();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
            loadList();
        }
View Full Code Here

        }
        if (persona != null && ultimoCursoSeleccionado != null) {
            if(this.jCheckBoxVerificaSolapamiento.isSelected()){
                comrroborarNoSolapamientoDeCursos(persona); //verifica que no est� inscripto en un curso en ese mismo periodo
            }
            ICommand insertarAlumno = CommandFactory.createInsertarAlumno(
                    ultimoCursoSeleccionado,
                    persona);
            try {
                insertarAlumno.execute();
            } catch (Exception ex1) {
                JOptionPane.showMessageDialog(this, ex1.getMessage());
            }

        }
View Full Code Here

        Vector v = BrokerServer.instance().query(Persona.class, "dni==" + dni);
        if (v.size() > 0) {
            persona = (Persona) v.firstElement();
        }
        if (persona != null && ultimoCursoSeleccionado != null) {
            ICommand anularAlumno = CommandFactory.createAnularAlumno(
                    ultimoCursoSeleccionado,
                    persona);
            try {
                anularAlumno.execute();
            } catch (Exception ex1) {
                JOptionPane.showMessageDialog(this, ex1.getMessage());
            }

        }
View Full Code Here

                                    getText());
            conceptodescuento = pago.getNombreDescuento();
            importedescuento = this.jLabelDescuentoSumaFija.getText();
        }

        ICommand insertarCurso = CommandFactory.createInsertarPago(pago,
                cuotaBasica, alumno);
        try {
            insertarCurso.execute();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());

        }
View Full Code Here

                            getSelectedValue();
            Vector v = BrokerServer.instance().query(Descuento.class,
                    "nombre==\"" + nombre + "\"");
            if (v.size() > 0) {
                Descuento descuento = (Descuento) v.firstElement();
                ICommand agregarDescuentoAPersona = CommandFactory.
                        createAgregarDescuentoAPersona(
                                persona, descuento);
                try {
                    agregarDescuentoAPersona.execute();
                } catch (Exception ex) {
                    JOptionPane.showMessageDialog(this, ex.getMessage());
                }
//actualizo la persona con las modificaciones
                persona = (Persona) BrokerServer.instance().getPMF().
View Full Code Here

                        elDescuento=descuento;
                        }
                    }
             if (elDescuento!=null) {

                ICommand desAgregarDescuentoAPersona = CommandFactory.createDesAgregarDescuentoAPersona(
                                persona, elDescuento);
                try {
                    desAgregarDescuentoAPersona.execute();
                } catch (Exception ex) {
                    JOptionPane.showMessageDialog(this, ex.getMessage());
                }
//actualizo la persona con las modificaciones
                persona = (Persona) BrokerServer.instance().getPMF().
View Full Code Here

TOP

Related Classes of org.salamanca.commands.ICommand

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.