Package maissocial.gui

Source Code of maissocial.gui.TurmaPisGUI

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

package maissocial.gui;

import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import maissocial.controle.Fachada;
import maissocial.controle.Pis;
import maissocial.controle.Profissao;
import maissocial.controle.TurmaPis;
import maissocial.controle.Uo;

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

    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();
        TurmaPis trp = null;

        try {
            uo = Fachada.getInstance().getUoControle().pesquisarUoPorCodigo(1);
            pf = Fachada.getInstance().getProfPisControle().pesquisarProfPisPorCodigo(1);
            pis = Fachada.getInstance().getPisControle().pesquisarPisPorCodigo(1);

            trp = new TurmaPis (uo, pf, pis, datainicio, datafim, horainic, horafim, 25, 1, data);
            Fachada.getInstance().getTurmaPisControle().salvarTurmaPis(trp);
            JOptionPane.showMessageDialog(null, "Turma de PIS cadastrado com sucesso!");
            TurmaPis trp2 = Fachada.getInstance().getTurmaPisControle().pesquisarTurmaPisPorCodigo(1);
            System.out.print(trp2.getCodTurmaPis());

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

    }

}
TOP

Related Classes of maissocial.gui.TurmaPisGUI

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.