Skip to content

Commit

Permalink
ajustes
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellekc24 committed Nov 5, 2024
1 parent e62296b commit 45b3d22
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
20 changes: 16 additions & 4 deletions src/controle/FornecedorController.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void abrirListagemFornecedor() {


public void cadastroFornecedor() {
limparCamposCadFornecedor();
viewc.setVisible(true);
viewl.dispose();
}
Expand Down Expand Up @@ -251,14 +252,25 @@ public boolean validarCamposCadastroFornecedores() {
return true;
}

public ActionListener limparCamposCadastroFornecedor() {
// TODO Auto-generated method stub
return new ActionListener() {
public void actionPerformed(ActionEvent e) {

public void limparCamposCadFornecedor() {

viewc.txtNome.setText("");
viewc.txtEmail.setText("");
viewc.txtTelefone.setText("");
viewc.txtCnpj.setText("");


}




public ActionListener limparCamposCadastroFornecedor() {
// TODO Auto-generated method stub
return new ActionListener() {
public void actionPerformed(ActionEvent e) {
limparCamposCadFornecedor();
}
};
}
Expand Down
17 changes: 13 additions & 4 deletions src/controle/FuncionarioController.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class FuncionarioController {
CadastroFuncionario janelaLoginCadastro = new CadastroFuncionario(this);

public void iniciarCadastroFunc() {
limparCamposCadFuncionario();
janelaCadastro.setVisible(true);
janelaListagem.dispose();
}
Expand Down Expand Up @@ -206,17 +207,25 @@ public void actionPerformed(ActionEvent e) {

};
}

public ActionListener limparCamposCadastroFuncionario() {
public void limparCamposCadFuncionario() {
// TODO Auto-generated method stub
return new ActionListener() {
public void actionPerformed(ActionEvent e) {

janelaCadastro.txtNomeCompleto.setText("");
janelaCadastro.txtEmail.setText("");
janelaCadastro.txtCelular.setText("");
janelaCadastro.txtCPF.setText("");
janelaCadastro.txtLogin.setText("");
janelaCadastro.txtSenha.setText("");

}


public ActionListener limparCamposCadastroFuncionario() {
// TODO Auto-generated method stub
return new ActionListener() {
public void actionPerformed(ActionEvent e) {
limparCamposCadFuncionario();
}
};
}
Expand Down
11 changes: 11 additions & 0 deletions src/visao/ListagemFuncionarios.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

import controle.FornecedorController;
import controle.FuncionarioController;
import controle.FuncionarioDAO;
import modelo.Funcionario;
Expand Down Expand Up @@ -226,6 +227,16 @@ public ListagemFuncionarios(FuncionarioController funcionarioController) {
contentPane.add(lblCaminhao, "cell 1 15,alignx left,aligny center");

JLabel lblFornecedor = new JLabel("Fornecedores");
lblFornecedor.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
FornecedorController fornecedorController = new FornecedorController();
ListagemFornecedor forn = new ListagemFornecedor(fornecedorController);
forn.setVisible(true);

dispose();
}
});
lblFornecedor.setForeground(new Color(255, 255, 255));
lblFornecedor.setFont(fontBold.deriveFont(Font.PLAIN, 20));
contentPane.add(lblFornecedor, "cell 2 15");
Expand Down

0 comments on commit 45b3d22

Please sign in to comment.