Compare commits
No commits in common. "5355d3677165365925e5e77b6f9c3dd5d0d022ec" and "abc556e3d2543686ab50eac3cc21e55dbff42197" have entirely different histories.
5355d36771
...
abc556e3d2
@ -1,10 +1,9 @@
|
|||||||
annotation.processing.enabled=true
|
annotation.processing.enabled=true
|
||||||
annotation.processing.enabled.in.editor=false
|
annotation.processing.enabled.in.editor=false
|
||||||
|
annotation.processing.processor.options=
|
||||||
annotation.processing.processors.list=
|
annotation.processing.processors.list=
|
||||||
annotation.processing.run.all.processors=true
|
annotation.processing.run.all.processors=true
|
||||||
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
||||||
application.title=GSBapplication
|
|
||||||
application.vendor=medhi.rodrigues
|
|
||||||
build.classes.dir=${build.dir}/classes
|
build.classes.dir=${build.dir}/classes
|
||||||
build.classes.excludes=**/*.java,**/*.form
|
build.classes.excludes=**/*.java,**/*.form
|
||||||
# This directory is removed when the project is cleaned:
|
# This directory is removed when the project is cleaned:
|
||||||
@ -33,7 +32,6 @@ dist.jar=${dist.dir}/GSBapplication.jar
|
|||||||
dist.javadoc.dir=${dist.dir}/javadoc
|
dist.javadoc.dir=${dist.dir}/javadoc
|
||||||
dist.jlink.dir=${dist.dir}/jlink
|
dist.jlink.dir=${dist.dir}/jlink
|
||||||
dist.jlink.output=${dist.jlink.dir}/GSBapplication
|
dist.jlink.output=${dist.jlink.dir}/GSBapplication
|
||||||
endorsed.classpath=
|
|
||||||
excludes=
|
excludes=
|
||||||
file.reference.mysql-connector-j-8.3.0.jar=C:\\Users\\medhi.rodrigues\\Documents\\NetBeansProjects\\Driver\\mysql-connector-j-8.3.0.jar
|
file.reference.mysql-connector-j-8.3.0.jar=C:\\Users\\medhi.rodrigues\\Documents\\NetBeansProjects\\Driver\\mysql-connector-j-8.3.0.jar
|
||||||
includes=**
|
includes=**
|
||||||
@ -83,6 +81,10 @@ platform.active=default_platform
|
|||||||
run.classpath=\
|
run.classpath=\
|
||||||
${javac.classpath}:\
|
${javac.classpath}:\
|
||||||
${build.classes.dir}
|
${build.classes.dir}
|
||||||
|
# Space-separated list of JVM arguments used when running the project.
|
||||||
|
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
|
||||||
|
# To set system properties for unit tests define test-sys-prop.name=value:
|
||||||
|
run.jvmargs=
|
||||||
run.modulepath=\
|
run.modulepath=\
|
||||||
${javac.modulepath}
|
${javac.modulepath}
|
||||||
run.test.classpath=\
|
run.test.classpath=\
|
||||||
|
@ -19,11 +19,7 @@ public class testMain {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
Connection connexionTest = connexionSQL.getConnect("10.121.38.196","bdgsb","adminGSB","mdpGSB");
|
Connection connexionTest = connexionSQL.getConnect("10.121.38.196","bdgsb","adminGSB","mdpGSB");
|
||||||
//Elio
|
|
||||||
//Connection connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
|
|
||||||
//Yann
|
|
||||||
//Connection connexionTest = connexionSQL.getConnect("10.121.38.69","bdgsb","appliGSB","(Uq1XV0Tr01s2H9Z");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,10 +51,10 @@ public class connexionSQL {
|
|||||||
* @return connection établie
|
* @return connection établie
|
||||||
*/
|
*/
|
||||||
public static Connection getConnect(String serveur, String bdd, String nomUtil, String mdp) {
|
public static Connection getConnect(String serveur, String bdd, String nomUtil, String mdp) {
|
||||||
|
System.out.println("Connexion validé");
|
||||||
if (connect == null) {
|
if (connect == null) {
|
||||||
new connexionSQL(serveur, bdd, nomUtil, mdp);
|
new connexionSQL(serveur, bdd, nomUtil, mdp);
|
||||||
}
|
}
|
||||||
System.out.println("Connexion validé");
|
|
||||||
return connect;
|
return connect;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,44 +4,10 @@
|
|||||||
*/
|
*/
|
||||||
package acces_aux_donnes;
|
package acces_aux_donnes;
|
||||||
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.sql.Statement;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author emile.lalorcey
|
* @author emile.lalorcey
|
||||||
*/
|
*/
|
||||||
public class praticienSQL {
|
public class praticienSQL {
|
||||||
private Connection connexionTest;
|
|
||||||
private Statement stmt = null;
|
|
||||||
private ResultSet result = null;
|
|
||||||
|
|
||||||
public praticienSQL() {
|
|
||||||
connexionTest = connexionSQL.getConnect("10.121.38.173","bdmagasin", "adminBDMag", "mdpBDMag");
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] rechercherPraticien(String login, String mdp) {
|
|
||||||
String[] praticienCherche = new String [2];
|
|
||||||
try {
|
|
||||||
stmt = connexionTest.createStatement();
|
|
||||||
// Accès à la table client
|
|
||||||
result = stmt.executeQuery("SELECT * FROM client WHERE nom='"+login+
|
|
||||||
"' AND mdp='"+mdp + "';");
|
|
||||||
if (result.next()) { // Le client a été touvé
|
|
||||||
praticienCherche[0] = result.getString(1);
|
|
||||||
praticienCherche[1] = result.getString(2);
|
|
||||||
|
|
||||||
}
|
|
||||||
result.close();
|
|
||||||
stmt.close();
|
|
||||||
} catch (SQLException ex) {
|
|
||||||
System.out.println("SQLException : " + ex.getMessage());
|
|
||||||
System.out.println("SQLState : " + ex.getSQLState());
|
|
||||||
System.out.println("Code erreur : " + ex.getErrorCode());
|
|
||||||
}
|
|
||||||
return praticienCherche;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
*/
|
*/
|
||||||
package presentation;
|
package presentation;
|
||||||
|
|
||||||
import acces_aux_donnes.praticienSQL;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author emile.lalorcey
|
* @author emile.lalorcey
|
||||||
@ -156,9 +154,8 @@ public class jffConnexion extends javax.swing.JFrame {
|
|||||||
}//GEN-LAST:event_jPFmdpActionPerformed
|
}//GEN-LAST:event_jPFmdpActionPerformed
|
||||||
|
|
||||||
private void jBValiderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBValiderActionPerformed
|
private void jBValiderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBValiderActionPerformed
|
||||||
String identifiant = jTFIdentifiant.getText();
|
String identifiant = "DIDIER";
|
||||||
String motPasse = jPFmdp.getText();
|
String motPasse = "123";
|
||||||
praticienSQL testPraticien = new praticienSQL();
|
|
||||||
|
|
||||||
if (jTFIdentifiant.getText().equals(identifiant) && jPFmdp.getText().equals(motPasse)){
|
if (jTFIdentifiant.getText().equals(identifiant) && jPFmdp.getText().equals(motPasse)){
|
||||||
System.out.println("Gagner");
|
System.out.println("Gagner");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user