Examples of Pis


Examples of maissocial.controle.Pis

    public static void main(String[] args){

        Uo uo = null;
        Profissao pf = null;
        Pis pis = null;
        Date datainicio = new Date();
        Date datafim = new Date();
        Date horainic = new Date();
        Date horafim = new Date();
        Date data = new Date();
View Full Code Here

Examples of maissocial.entidade.Pis

        Date dataInicio = new Date();
        Date dataFim = new Date();

        try {
            us = Fachada.getInstance().getUsControle().pesquisarUsPorCodigo(1);
            pis = new Pis(us, "Oficina de Biscuit", dataInicio, dataFim, 10, 1, data, 18, 22, 1, 10,00, "", 1);
            Fachada.getInstance().getPisControle().salvarPis(pis);
            JOptionPane.showMessageDialog(null, "pis cadastrado com sucesso!");
            Pis pis2 = Fachada.getInstance().getPisControle().pesquisarPisPorCodigo(1);
            System.out.print(pis2.getDescricao());

        } catch (Exception ex) {
            Logger.getLogger(PisGUI.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

Examples of maissocial.entidade.Pis

    public void salvarPis(Pis pis) throws Exception, PisJaCadastradaException{
        if( pis == null || pis.getDescricao() == null || pis.getDescricao().equals("") || pis.getStatus() == 0){
            throw  new Exception("Parâmetros Inválidos!");
        }

        Pis pis2 = this.pisRep.pesquisarPisPorDescricao(pis.getDescricao());
        if(pis2 == null){
            this.pisRep.salvarPis(pis);
        }else{
            throw new PisJaCadastradaException("Pis já cadastrado!");
        }
View Full Code Here

Examples of maissocial.entidade.Pis

    public void alterarPis(Pis pis) throws Exception, PisJaCadastradaException{
        if( pis == null || pis.getDescricao() == null || pis.getDescricao().equals("") || pis.getStatus() == 0){
            throw  new Exception("Parâmetros Inválidos!");
        }

        Pis pis2 = this.pisRep.pesquisarPisPorDescricao(pis.getDescricao());
        if(pis2 == null){
            this.pisRep.alterarPis(pis);
        }else{
            throw new PisJaCadastradaException("Pis já cadastrado!");
        }
View Full Code Here

Examples of maissocial.entidade.Pis

            throw new PisJaCadastradaException("Pis já cadastrado!");
        }
    }

    public Pis pesquisarPisPorCodigo(int cod){
        Pis br = this.pisRep.pesquisarPisPorCodigo(cod);
        return br;
    }
View Full Code Here

Examples of maissocial.entidade.Pis

        Pis br = this.pisRep.pesquisarPisPorCodigo(cod);
        return br;
    }

    public Pis pesquisarPisPorDescricao(String desc){
        Pis pis = this.pisRep.pesquisarPisPorDescricao(desc);
        return pis;
    }
View Full Code Here

Examples of maissocial.entidade.Pis

        Session session = factory.openSession();
        Transaction trans = session.beginTransaction();

        trans.begin();

        Pis pis = pesquisarPisPorCodigo(cod);
        session.delete(pis);

        trans.commit();
        session.close();
    }
View Full Code Here

Examples of maissocial.entidade.Pis

        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {pis.*} FROM pis {pis} WHERE cod_pis = "+cod);

        query.addEntity("pis", Pis.class);

        Pis pis = null;
        if(query.list().size() > 0){
            pis = (Pis) query.list().get(0);
        }
        session.close();
        return pis;
View Full Code Here

Examples of maissocial.entidade.Pis

        Session session = factory.openSession();
        SQLQuery query = session.createSQLQuery("SELECT {pis.*} FROM pis {pis} WHERE nome like '"+desc+"'");

        query.addEntity("pis", Pis.class);

        Pis pis = null;
        if(query.list().size() > 0){
            pis = (Pis) query.list().get(0);
        }
        session.close();
        return pis;
View Full Code Here

Examples of maissocial.entidade.Pis

        Session session = factory.openSession();
        Transaction trans = session.beginTransaction();

        trans.begin();

        Pis pis2 = pesquisarPisPorCodigo(pis.getCodPis());
        pis.setCodPis(pis2.getCodPis());
        session.update(pis);

        trans.commit();
        session.close();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.