Package Entity

Examples of Entity.Usuario


    }
    @Test
    public void Prueba9operacionvalida() {
        int tipoid=1;
        long identificacion=1L;
        Usuario u=canje.Usuarioexiste(identificacion, tipoid);
        Usuario user = new Usuario();
            if (tipoid == 1) {
                user.setIdentificacion(identificacion);
            } else {
                user.setCodigo(identificacion);
            }
        String b=canje.hacercanje(canjeactual,u,100,canje,tipoid,user,"Bono Consumo","Texaco 8","Bogota","Bono Consumo",0,0);
        assertEquals(b,operacionvalida);
    }
View Full Code Here


        String b=cuenta.comprobacion2(u,x);
        assertEquals(b,Usuario_Existe);
    }
    @Test
    public void Prueba4operacionexitosa() {
        Usuario u=new Usuario();
        Usuario x=new Usuario();
        x.setIdentificacion(7L);
        x.setCodigo(9L);
        ArrayList<String> placa=new ArrayList();
        placa.add("cri-778");
        u.setApellidos("Torres");
        u.setCelular(2763L);
        u.setCodigo(1L);
View Full Code Here

    }//GEN-LAST:event_IdentificacionTActionPerformed

    private void AceptarBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AceptarBActionPerformed
        CanjearPuntos canjepuntos = new CanjearPuntos();
        int tipoid = identificacion.getSelectedIndex();
        Usuario UsuarioPrueba = canjepuntos.Usuarioexiste(Long.parseLong(IdentificacionT.getText()), tipoid);
        Canjes canjeactual = new Canjes();
        CanjearPuntos realizarcanje = new CanjearPuntos();
        String estadolabel;
        if (realizarcanje.id(UsuarioPrueba).equals("El usuario no existe")) {
            JOptionPane.showMessageDialog(null, realizarcanje.id(UsuarioPrueba), "Error", JOptionPane.ERROR_MESSAGE);
            IdentificacionT.setText("0");
        } else {           
            String estado;
            String nombrepremio;
            int can = Integer.parseInt(cantidadTF.getText());
            nombrepremio = (String) PremiosLD.getSelectedItem();
            Usuario user = new Usuario();
            if (tipoid == 1) {
                user.setIdentificacion(Long.parseLong(IdentificacionT.getText()));
            } else {
                user.setCodigo(Long.parseLong(IdentificacionT.getText()));
            }
            if (nombrepremio.equals(city.getEstaciones().get(y).getPremios().get(1).getNombre())) {
                premio = city.getEstaciones().get(y).getPremios().get(1).getNombre();
                estado = canjepuntos.premiosDispd(c, y, can, nombrepremio,ciudad);
                if (estado.equals("Continue")) {
View Full Code Here

    }

    public Usuario leer(long identificacion, long codigo) {
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        Usuario usuario = new Usuario();
        Query cons = null;
        if (codigo == 0) {
            cons = em.createQuery("SELECT u FROM Usuario u "
                    + "WHERE u.identificacion = :identificacion").setParameter("identificacion", identificacion);
        } else {
View Full Code Here

TOP

Related Classes of Entity.Usuario

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.