Package maissocial.gui

Source Code of maissocial.gui.ProfPisGUI

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package maissocial.gui;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import maissocial.controle.Fachada;
import maissocial.entidade.Logradouro;
import maissocial.entidade.ProfPis;
import maissocial.entidade.Profissao;

/**
*
* @author luciano
*/
public class ProfPisGUI {

    public static void main(String[] args){


        Profissao pf = null;
        Logradouro lg = null;
        ProfPis pp = null;

        try {
            pf = Fachada.getInstance().getProfissaoControle().pesquisarProfissaoPorCodigo(1);
            lg = Fachada.getInstance().getLogradouroControle().pesquisarLogradouroPorCodigo(1);

            pp = new ProfPis (pf, lg, "TOINHO DAS MENINAS", "12312312312", "12121211", "SSP/PE", 11111111, 22222222, 1);

            Fachada.getInstance().getProfPisControle().salvarProfPis(pp);
            JOptionPane.showMessageDialog(null, "Profissional Pis cadastrado com sucesso!");
            ProfPis pp2 = Fachada.getInstance().getProfPisControle().pesquisarProfPisPorCodigo(1);
            System.out.print(pp2.getNome());

        } catch (Exception ex) {
            Logger.getLogger(ProfPisGUI.class.getName()).log(Level.SEVERE, null, ex);
        }

    }

}
TOP

Related Classes of maissocial.gui.ProfPisGUI

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.