Package hsv.DAO

Examples of hsv.DAO.PagamentoDAO


        this.pagamento1 = pagamento1;
    }
   
    public void inserirPagamento() {
        try{
            PagamentoDAO dao = new PagamentoDAO();
            dao.salvarDados(pagamento);
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Dados Salvos com Sucesso!"));
        }
        catch(Exception e) {
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Já existe data de vigência para os valores em questão!",""));
        }
View Full Code Here


        }
    }
   
    public void editarPagamento() {
        try {
            PagamentoDAO obj = new PagamentoDAO();
            obj.editar(pagamento1);
            FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "O registro foi alterado!", "");
            FacesContext.getCurrentInstance().addMessage(null, message);
        } catch (Exception e) {
            FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Não foi possível editar o registro!", ""));
        }
View Full Code Here

        }
    }

    public PagamentoUnimed consultarPagamento() {
        try {
            PagamentoDAO obj = new PagamentoDAO();
            pagamento1 = obj.consultar(pagamento);
            if (pagamento1.getDataInsercao() != null) {
                pagamento1.setDataInsercao(pagamento1.getDataInsercao());
            }
            if (pagamento1 == null) {
                FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Não existe registro para a data desejada!", "Erro Consulta"));
View Full Code Here

TOP

Related Classes of hsv.DAO.PagamentoDAO

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.