Skip to content

Commit

Permalink
Concessionária ASJ DONE
Browse files Browse the repository at this point in the history
  • Loading branch information
LoriaLawrenceZ committed Nov 24, 2023
1 parent 2996719 commit 56c3579
Show file tree
Hide file tree
Showing 22 changed files with 16 additions and 19 deletions.
2 changes: 0 additions & 2 deletions JDBCCarros/src/main/java/main/Main.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package main;

import main.view.FrameApp;
import main.view.PainelLogin;
import main.view.PainelCarros;

public class Main {
public static void main(String[] args) {
Expand Down
2 changes: 0 additions & 2 deletions JDBCCarros/src/main/java/main/view/PainelCarros.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package main.view;

import java.util.ArrayList;
import java.util.List;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
Expand Down
2 changes: 0 additions & 2 deletions JDBCCarros/src/main/java/main/view/PainelLogin.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package main.view;

import java.awt.CardLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.sql.SQLException;
import java.util.ArrayList;

import javax.swing.BoxLayout;
Expand Down
1 change: 0 additions & 1 deletion JDBCCarros/src/main/java/main/view/PainelPessoas.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package main.view;

import java.util.ArrayList;
import java.util.List;

import javax.swing.BoxLayout;
Expand Down
27 changes: 16 additions & 11 deletions JDBCCarros/src/main/java/main/view/PainelVendas.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
Expand All @@ -21,7 +22,6 @@
import java.awt.event.MouseEvent;

import main.control.CarrosDAO;
import main.control.LoginControl;
import main.control.PessoasDAO;
import main.control.VendasControl;
import main.control.VendasDAO;
Expand Down Expand Up @@ -156,16 +156,21 @@ public void mouseClicked(MouseEvent evt){
dataAtual = Calendar.getInstance().getTime();
dataAtualSql = new Date(dataAtual.getTime());

if(vendasControl.checkVendaCampos(String.valueOf(carrosComboBox.getSelectedItem()), String.valueOf(clientesComboBox.getSelectedItem()), String.valueOf(logado.getCpf()), dataAtualSql)){
// Resetando campos
clientesComboBox.setSelectedIndex(0);
infoCliente.setText("");
carrosComboBox.setSelectedIndex(0);
infoCarro.setText("");
atualizarClientesComboBox();
atualizarCarrosComboBox();

atualizarTabela();
if(carrosComboBox.getSelectedItem() == null || clientesComboBox.getSelectedItem() == null){
JOptionPane.showMessageDialog(null, "ATENÇÃO!\nExiste campos em branco");
}
else{
if(vendasControl.checkVendaCampos(String.valueOf(carrosComboBox.getSelectedItem()), String.valueOf(clientesComboBox.getSelectedItem()), String.valueOf(logado.getCpf()), dataAtualSql)){
// Resetando campos
clientesComboBox.setSelectedIndex(0);
infoCliente.setText("");
carrosComboBox.setSelectedIndex(0);
infoCarro.setText("");
atualizarClientesComboBox();
atualizarCarrosComboBox();

atualizarTabela();
}
}
}
});
Expand Down
1 change: 0 additions & 1 deletion JDBCCarros/src/main/java/main/view/TabbedApp.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main.view;

import javax.swing.JTabbedPane;
import javax.swing.event.ChangeListener;

import main.model.Login;

Expand Down
Binary file modified JDBCCarros/target/classes/main/Main.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelCarros$1.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelCarros$2.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelCarros$3.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelCarros$4.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelCarros.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelLogin$1.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelLogin.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelPessoas$1.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelPessoas$2.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelPessoas$3.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelPessoas$4.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelPessoas.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelVendas$3.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/PainelVendas.class
Binary file not shown.
Binary file modified JDBCCarros/target/classes/main/view/TabbedApp.class
Binary file not shown.

0 comments on commit 56c3579

Please sign in to comment.