Compare commits
No commits in common. "20497f31d39d4b63131cba7cf86cdff3db79fc0e" and "d8f091dcc3d391463c704f0a6d67b0302b47814d" have entirely different histories.
20497f31d3
...
d8f091dcc3
24
GSBapplication/src/TEST/test.java
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package TEST;
|
||||||
|
|
||||||
|
import acces_aux_donnes.connexionSQL;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.Statement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author emile.lalorcey
|
||||||
|
*/
|
||||||
|
public class test {
|
||||||
|
private Connection connexionTest;
|
||||||
|
private Statement stmt = null;
|
||||||
|
private ResultSet result = null;
|
||||||
|
|
||||||
|
|
||||||
|
connexionTest = connexionSQL.getConnect("10.121.38.196","bdgsb","admin","admin");
|
||||||
|
|
||||||
|
}
|
@ -5,7 +5,6 @@
|
|||||||
package TEST;
|
package TEST;
|
||||||
|
|
||||||
import acces_aux_donnes.connexionSQL;
|
import acces_aux_donnes.connexionSQL;
|
||||||
import acces_aux_donnes.praticienSQL;
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -19,14 +18,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
|
//Elio
|
||||||
//Connection connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
|
//Connection connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
|
||||||
//Yann
|
//Yann
|
||||||
//Connection connexionTest = connexionSQL.getConnect("10.121.38.69","bdgsb","appliGSB","(Uq1XV0Tr01s2H9Z");
|
//Connection connexionTest = connexionSQL.getConnect("10.121.38.69","bdgsb","appliGSB","(Uq1XV0Tr01s2H9Z");
|
||||||
praticienSQL a =new praticienSQL();
|
|
||||||
a.rechercherPraticien("Didier", "1234");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,17 +19,17 @@ public class praticienSQL {
|
|||||||
private ResultSet result = null;
|
private ResultSet result = null;
|
||||||
|
|
||||||
public praticienSQL() {
|
public praticienSQL() {
|
||||||
connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB");
|
connexionTest = connexionSQL.getConnect("10.121.38.173","bdmagasin", "adminBDMag", "mdpBDMag");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] rechercherPraticien(String login, String mdp) {
|
public String[] rechercherPraticien(String login, String mdp) {
|
||||||
String[] praticienCherche = new String [2];
|
String[] praticienCherche = new String [2];
|
||||||
try {
|
try {
|
||||||
stmt = connexionTest.createStatement();
|
stmt = connexionTest.createStatement();
|
||||||
// Accès à la table
|
// Accès à la table client
|
||||||
result = stmt.executeQuery("SELECT * FROM PRATICIENLOG WHERE id='"+login+
|
result = stmt.executeQuery("SELECT * FROM client WHERE nom='"+login+
|
||||||
"' AND mdp='"+mdp + "';");
|
"' AND mdp='"+mdp + "';");
|
||||||
if (result.next()) { // Le praticien a été touvé
|
if (result.next()) { // Le client a été touvé
|
||||||
praticienCherche[0] = result.getString(1);
|
praticienCherche[0] = result.getString(1);
|
||||||
praticienCherche[1] = result.getString(2);
|
praticienCherche[1] = result.getString(2);
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 194 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 552 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 232 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 6.6 KiB |
@ -157,11 +157,11 @@ public class jffConnexion extends javax.swing.JFrame {
|
|||||||
|
|
||||||
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 = jTFIdentifiant.getText();
|
||||||
String mdp = String.valueOf(jPFmdp.getPassword());
|
String motPasse = jPFmdp.getText();
|
||||||
praticienSQL testPraticien = new praticienSQL();
|
praticienSQL testPraticien = new praticienSQL();
|
||||||
String [] lePraticien = testPraticien.rechercherPraticien(identifiant,mdp);
|
|
||||||
if (lePraticien[0] != null){
|
if (jTFIdentifiant.getText().equals(identifiant) && jPFmdp.getText().equals(motPasse)){
|
||||||
System.out.print("TEST REUSSIE");
|
System.out.println("Gagner");
|
||||||
}
|
}
|
||||||
}//GEN-LAST:event_jBValiderActionPerformed
|
}//GEN-LAST:event_jBValiderActionPerformed
|
||||||
|
|
||||||
|
@ -23,30 +23,13 @@
|
|||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<EmptySpace min="0" pref="400" max="32767" attributes="0"/>
|
||||||
<EmptySpace pref="344" max="32767" attributes="0"/>
|
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace pref="262" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</Layout>
|
||||||
<SubComponents>
|
|
||||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
|
||||||
<Image iconType="3" name="/img/logodetoure.gif"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -26,27 +26,17 @@ public class jffFamilleMedoc extends javax.swing.JFrame {
|
|||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
jLabel1 = new javax.swing.JLabel();
|
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/logodetoure.gif"))); // NOI18N
|
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGap(0, 400, Short.MAX_VALUE)
|
||||||
.addContainerGap(344, Short.MAX_VALUE)
|
|
||||||
.addComponent(jLabel1)
|
|
||||||
.addContainerGap())
|
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGap(0, 300, Short.MAX_VALUE)
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(jLabel1)
|
|
||||||
.addContainerGap(262, Short.MAX_VALUE))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
@ -88,6 +78,5 @@ public class jffFamilleMedoc extends javax.swing.JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JLabel jLabel1;
|
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,11 @@
|
|||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="102" alignment="1" attributes="0">
|
||||||
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="jBpraticien" min="-2" pref="94" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace min="-2" pref="147" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace min="-2" pref="137" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="137" max="-2" attributes="0"/>
|
||||||
<Component id="jLChoixPro" min="-2" max="-2" attributes="0"/>
|
<Component id="jLChoixPro" min="-2" max="-2" attributes="0"/>
|
||||||
@ -33,11 +38,6 @@
|
|||||||
<Component id="jLLogo" min="-2" pref="73" max="-2" attributes="0"/>
|
<Component id="jLLogo" min="-2" pref="73" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="1" attributes="0">
|
|
||||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
|
||||||
<Component id="jBpraticien" min="-2" pref="94" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" pref="147" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<Component id="jBvisiteurMedical" min="-2" max="-2" attributes="0"/>
|
<Component id="jBvisiteurMedical" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="137" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="136" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
@ -68,9 +68,9 @@
|
|||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" pref="42" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="42" max="-2" attributes="0"/>
|
||||||
<Component id="jBpraticien" min="-2" pref="31" max="-2" attributes="0"/>
|
<Component id="jBpraticien" min="-2" pref="31" max="-2" attributes="0"/>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
|
||||||
<Component id="jBvisiteurMedical" min="-2" pref="31" max="-2" attributes="0"/>
|
<Component id="jBvisiteurMedical" min="-2" pref="31" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="37" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||||
<Component id="jBquitter" min="-2" max="-2" attributes="0"/>
|
<Component id="jBquitter" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="60" max="32767" attributes="0"/>
|
<EmptySpace pref="60" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
@ -65,16 +65,16 @@ public class jffProfession extends javax.swing.JFrame {
|
|||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
|
.addGap(0, 0, Short.MAX_VALUE)
|
||||||
|
.addComponent(jBpraticien, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addGap(147, 147, 147))
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addGap(137, 137, 137)
|
.addGap(137, 137, 137)
|
||||||
.addComponent(jLChoixPro)
|
.addComponent(jLChoixPro)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
|
||||||
.addComponent(jLLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jLLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
||||||
.addGap(0, 0, Short.MAX_VALUE)
|
|
||||||
.addComponent(jBpraticien, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGap(147, 147, 147))
|
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
@ -83,7 +83,7 @@ public class jffProfession extends javax.swing.JFrame {
|
|||||||
.addGap(149, 149, 149))
|
.addGap(149, 149, 149))
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addComponent(jBvisiteurMedical)
|
.addComponent(jBvisiteurMedical)
|
||||||
.addGap(137, 137, 137))))
|
.addGap(136, 136, 136))))
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
@ -97,9 +97,9 @@ public class jffProfession extends javax.swing.JFrame {
|
|||||||
.addComponent(jLLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
.addComponent(jLLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||||
.addGap(42, 42, 42)
|
.addGap(42, 42, 42)
|
||||||
.addComponent(jBpraticien, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jBpraticien, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(18, 18, 18)
|
.addGap(29, 29, 29)
|
||||||
.addComponent(jBvisiteurMedical, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jBvisiteurMedical, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addGap(37, 37, 37)
|
.addGap(26, 26, 26)
|
||||||
.addComponent(jBquitter)
|
.addComponent(jBquitter)
|
||||||
.addContainerGap(60, Short.MAX_VALUE))
|
.addContainerGap(60, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
@ -109,7 +109,6 @@ public class jffProfession extends javax.swing.JFrame {
|
|||||||
|
|
||||||
private void jBpraticienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBpraticienActionPerformed
|
private void jBpraticienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBpraticienActionPerformed
|
||||||
new jffConnexion(0).setVisible(true);
|
new jffConnexion(0).setVisible(true);
|
||||||
this.setVisible(false);
|
|
||||||
}//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
|
||||||
@ -118,7 +117,6 @@ public class jffProfession extends javax.swing.JFrame {
|
|||||||
|
|
||||||
private void jBvisiteurMedicalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBvisiteurMedicalActionPerformed
|
private void jBvisiteurMedicalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBvisiteurMedicalActionPerformed
|
||||||
new jffConnexion(1).setVisible(true);
|
new jffConnexion(1).setVisible(true);
|
||||||
this.setVisible(false);
|
|
||||||
}//GEN-LAST:event_jBvisiteurMedicalActionPerformed
|
}//GEN-LAST:event_jBvisiteurMedicalActionPerformed
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|