Package maissocial.gui

Source Code of maissocial.gui.ProfissaoGUI

/*
* 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.Profissao;

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

    public static void main(String[] args){

        Profissao pf = new Profissao("Mecanico", 1);

        try {
            Fachada.getInstance().getProfissaoControle().salvarProfissao(pf);
            JOptionPane.showMessageDialog(null, "Profissao cadastrada com sucesso!");
            Profissao pf2 = Fachada.getInstance().getProfissaoControle().pesquisarProfissaoPorCodigo(1);
            System.out.print(pf2.getDescricao());

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

    }

}
TOP

Related Classes of maissocial.gui.ProfissaoGUI

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.