Package maissocial.gui

Source Code of maissocial.gui.PisGUI

/*
* 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.entidade.Pis;
import maissocial.entidade.Us;

/**
*
* @author luciano
*/
public class PisGUI {
    private static Pis pis;

    public static void main(String[] args){


        Us us = null;
        Date data = new Date();
        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);
        }

    }

}
TOP

Related Classes of maissocial.gui.PisGUI

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.