Package maissocial.gui

Source Code of maissocial.gui.UsGUI

/*
* 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.controle.GrauEscolar;
import maissocial.controle.GrupoUs;
import maissocial.controle.Logradouro;
import maissocial.controle.Profissao;
import maissocial.controle.Setor;
import maissocial.controle.Uo;
import maissocial.controle.Us;

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

    public static void main(String[] args){


        Logradouro lg = null;
        GrauEscolar ge = null;
        Uo uo = null;
        Profissao pf = null;
        GrupoUs gu = null;
        Setor st = null;
        Us us = null;

     
        try {
            lg = Fachada.getInstance().getLogradouroControle().pesquisarLogradouroPorCodigo(1);
            ge = Fachada.getInstance().getGrauEscolarControle().pesquisarGrauEscolarPorCodigo(1);
            uo = Fachada.getInstance().getUoControle().pesquisarUoPorCodigo(1);
            pf = Fachada.getInstance().getProfissaoControle().pesquisarProfissaoPorCodigo(1);
            gu = Fachada.getInstance().getGrupoUsControle().pesquisarGrupoUsPorCodigo(1);
            st = Fachada.getInstance().getSetorControle().pesquisarSetorPorCodigo(1);

            us = new Us (lg, ge, uo, pf, gu, st, "TC", "TC01", "ABC", "12345678901", "12345", "SSP/PE", "123412341234", "123456", "1234567890", "0987654321", 0, 1);

             Fachada.getInstance().getUsControle().salvaruS(US);
            JOptionPane.showMessageDialog(null, "Usuario de Sistema cadastrado com sucesso!");
            Us us2 = Fachada.getInstance().getUsControle().pesquisarUsPorCodigo(1);
            System.out.print(us2.getNome());

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

    }

}
TOP

Related Classes of maissocial.gui.UsGUI

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.