Compare commits
6 Commits
d9a424bd6e
...
d8f091dcc3
Author | SHA1 | Date | |
---|---|---|---|
|
d8f091dcc3 | ||
abc556e3d2 | |||
e84ad59e10 | |||
002e6597c6 | |||
6ac02d3adf | |||
ba7e7c4b9b |
@ -1,9 +1,10 @@
|
|||||||
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:
|
||||||
@ -32,6 +33,7 @@ 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=**
|
||||||
@ -81,10 +83,6 @@ 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,7 +19,11 @@ 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,10 +4,44 @@
|
|||||||
*/
|
*/
|
||||||
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,17 +4,20 @@
|
|||||||
*/
|
*/
|
||||||
package presentation;
|
package presentation;
|
||||||
|
|
||||||
|
import acces_aux_donnes.praticienSQL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author emile.lalorcey
|
* @author emile.lalorcey
|
||||||
*/
|
*/
|
||||||
public class jffConnexion extends javax.swing.JFrame {
|
public class jffConnexion extends javax.swing.JFrame {
|
||||||
|
int profession;
|
||||||
/**
|
/**
|
||||||
* Creates new form jffConnexion
|
* Creates new form jffConnexion
|
||||||
*/
|
*/
|
||||||
public jffConnexion() {
|
public jffConnexion(int indice) {
|
||||||
initComponents();
|
initComponents();
|
||||||
|
this.profession = indice;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -153,9 +156,13 @@ 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 = "DIDIER";
|
String identifiant = jTFIdentifiant.getText();
|
||||||
|
String motPasse = jPFmdp.getText();
|
||||||
|
praticienSQL testPraticien = new praticienSQL();
|
||||||
|
|
||||||
if (jTFIdentifiant.getText() == identifiant){}
|
if (jTFIdentifiant.getText().equals(identifiant) && jPFmdp.getText().equals(motPasse)){
|
||||||
|
System.out.println("Gagner");
|
||||||
|
}
|
||||||
}//GEN-LAST:event_jBValiderActionPerformed
|
}//GEN-LAST:event_jBValiderActionPerformed
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -188,7 +195,7 @@ public class jffConnexion extends javax.swing.JFrame {
|
|||||||
/* Create and display the form */
|
/* Create and display the form */
|
||||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
new jffConnexion().setVisible(true);
|
new jffConnexion(1).setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,9 @@
|
|||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" value="visiteur medical"/>
|
<Property name="text" type="java.lang.String" value="visiteur medical"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jBvisiteurMedicalActionPerformed"/>
|
||||||
|
</Events>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JButton" name="jBquitter">
|
<Component class="javax.swing.JButton" name="jBquitter">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
@ -45,6 +45,11 @@ public class jffProfession extends javax.swing.JFrame {
|
|||||||
});
|
});
|
||||||
|
|
||||||
jBvisiteurMedical.setText("visiteur medical");
|
jBvisiteurMedical.setText("visiteur medical");
|
||||||
|
jBvisiteurMedical.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
jBvisiteurMedicalActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
jBquitter.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/quitter.png"))); // NOI18N
|
jBquitter.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/quitter.png"))); // NOI18N
|
||||||
jBquitter.setText("Quitter");
|
jBquitter.setText("Quitter");
|
||||||
@ -103,13 +108,17 @@ public class jffProfession extends javax.swing.JFrame {
|
|||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void jBpraticienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBpraticienActionPerformed
|
private void jBpraticienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBpraticienActionPerformed
|
||||||
// TODO add your handling code here:
|
new jffConnexion(0).setVisible(true);
|
||||||
}//GEN-LAST:event_jBpraticienActionPerformed
|
}//GEN-LAST:event_jBpraticienActionPerformed
|
||||||
|
|
||||||
private void jBquitterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBquitterActionPerformed
|
private void jBquitterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBquitterActionPerformed
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}//GEN-LAST:event_jBquitterActionPerformed
|
}//GEN-LAST:event_jBquitterActionPerformed
|
||||||
|
|
||||||
|
private void jBvisiteurMedicalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBvisiteurMedicalActionPerformed
|
||||||
|
new jffConnexion(1).setVisible(true);
|
||||||
|
}//GEN-LAST:event_jBvisiteurMedicalActionPerformed
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param args the command line arguments
|
* @param args the command line arguments
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user