Compare commits
No commits in common. "35043c5d5466643c341fbecbf88cb9b497c0e46c" and "6b89fb950dc8ac5ee43ab27bac40fae87aa6a06c" have entirely different histories.
35043c5d54
...
6b89fb950d
@ -8,7 +8,6 @@ import java.sql.Connection;
|
|||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Statement;
|
import java.sql.Statement;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -23,16 +22,16 @@ public class praticienSQL {
|
|||||||
connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
|
connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<String> rechercherPraticien(String login, String mdp) {
|
public String[] rechercherPraticien(String login, String mdp) {
|
||||||
ArrayList<String> praticienCherche = new ArrayList<String>();
|
String[] praticienCherche = new String [2];
|
||||||
try {
|
try {
|
||||||
stmt = connexionTest.createStatement();
|
stmt = connexionTest.createStatement();
|
||||||
// Accès à la table
|
// Accès à la table
|
||||||
result = stmt.executeQuery("SELECT * FROM PRATICIENLOG WHERE id='"+login+
|
result = stmt.executeQuery("SELECT * FROM PRATICIENLOG WHERE id='"+login+
|
||||||
"' AND mdp='"+mdp + "';");
|
"' AND mdp='"+mdp + "';");
|
||||||
if (result.next()) { // Le praticien a été touvé
|
if (result.next()) { // Le praticien a été touvé
|
||||||
praticienCherche.add(result.getString(1));
|
praticienCherche[0] = result.getString(1);
|
||||||
praticienCherche.add(result.getString(2));
|
praticienCherche[1] = result.getString(2);
|
||||||
|
|
||||||
}
|
}
|
||||||
result.close();
|
result.close();
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
package presentation;
|
package presentation;
|
||||||
|
|
||||||
import acces_aux_donnes.praticienSQL;
|
import acces_aux_donnes.praticienSQL;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -160,10 +159,9 @@ public class jffConnexion extends javax.swing.JFrame {
|
|||||||
String identifiant = jTFIdentifiant.getText();
|
String identifiant = jTFIdentifiant.getText();
|
||||||
String mdp = String.valueOf(jPFmdp.getPassword());
|
String mdp = String.valueOf(jPFmdp.getPassword());
|
||||||
praticienSQL testPraticien = new praticienSQL();
|
praticienSQL testPraticien = new praticienSQL();
|
||||||
ArrayList<String>lePraticien = testPraticien.rechercherPraticien(identifiant,mdp);
|
String [] lePraticien = testPraticien.rechercherPraticien(identifiant,mdp);
|
||||||
if (lePraticien.get(0) != null){
|
if (lePraticien[0] != null){
|
||||||
System.out.print("TEST REUSSIE");
|
System.out.print("TEST REUSSIE");
|
||||||
new jffFamilleMedoc().setVisible(true);
|
|
||||||
}else {
|
}else {
|
||||||
System.out.print("TEST EMILE RACISTE");
|
System.out.print("TEST EMILE RACISTE");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user