Package maissocial.gui

Source Code of maissocial.gui.OrgGUI

/*
* 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.Logradouro;
import maissocial.entidade.Org;

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

    public static void main(String[] args){


        Logradouro lg = null;
        Org org = null;
        Date data = new Date();

        try {
            lg = Fachada.getInstance().getLogradouroControle().pesquisarLogradouroPorCodigo(1);
            org = new Org (lg, "SECRETARIA DE ACAO SOCIAL DE PESQUEIRA", "12345678912123", "11111111", data, 1);
            Fachada.getInstance().getOrgControle().salvarOrg(org);
            JOptionPane.showMessageDialog(null, "Organização cadastrada com sucesso!");
            Org org2 = Fachada.getInstance().getOrgControle().pesquisarOrgPorCodigo(1);
            System.out.print(org2.getNome());

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

    }

}
TOP

Related Classes of maissocial.gui.OrgGUI

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.