Package maissocial.gui

Source Code of maissocial.gui.UoGUI

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

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

    public static void main(String[] args){


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



        try {
            org = Fachada.getInstance().getOrgControle().pesquisarOrgPorCodigo(1);
            lg = Fachada.getInstance().getLogradouroControle().pesquisarLogradouroPorCodigo(1);
            uo = new Uo (org, lg, "CRAS Boa Vista", "12345434567654", "7765767", data, 1, "1122223333", "1144443333");
            Fachada.getInstance().getUoControle().salvarUo(uo);
            JOptionPane.showMessageDialog(null, "Unidade Organizacional cadastrada com sucesso!");
            Uo uo2 = Fachada.getInstance().getUoControle().pesquisarUoPorCodigo(1);
            System.out.print(uo2.getNome());

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

    }

}
TOP

Related Classes of maissocial.gui.UoGUI

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.