diff --git a/GSBapplication/src/Metier/Medicament.java b/GSBapplication/src/Metier/Medicament.java index c5bc964..fd58ad8 100644 --- a/GSBapplication/src/Metier/Medicament.java +++ b/GSBapplication/src/Metier/Medicament.java @@ -17,12 +17,12 @@ public class Medicament { * contreindication = les contreindications du médicament * prix = le prix en unité du médicament */ - private int id; + private String id; private String nom; private String composition; private String effet; private String contreindication; - private float prix; + private String img; /** LE CONSTRUCTEUR DEFAULT @@ -32,24 +32,22 @@ public class Medicament { * @param composition * @param effet * @param contreindication - * @param prix */ - public Medicament(int id, String nom, String composition, String effet, String contreindication, float prix) { + public Medicament(String id, String nom, String composition, String effet, String contreindication, String img) { this.id = id; this.nom = nom; this.composition = composition; this.effet = effet; this.contreindication = contreindication; - this.prix = prix; + this.img = img; } - /** LES GUETTEUR * @return the id */ - public int getId() { + public String getId(){ return id; } @@ -81,17 +79,15 @@ public class Medicament { return contreindication; } - /** - * @return the prix - */ - public float getPrix() { - return prix; + public String getImg() { + return img; } - @Override public String toString() { - return "Medicament{" + "id=" + id + ", nom=" + nom + ", composition=" + composition + ", effet=" + effet + ", contreindication=" + contreindication + ", prix=" + prix + '}'; + return "Medicament{" + "id=" + id + ", nom=" + nom + ", composition=" + composition + ", effet=" + effet + ", contreindication=" + contreindication + ",img=" + img + '}'; } } + + diff --git a/GSBapplication/src/TEST/testMain.java b/GSBapplication/src/TEST/testMain.java index a2bfa13..c6eadc1 100644 --- a/GSBapplication/src/TEST/testMain.java +++ b/GSBapplication/src/TEST/testMain.java @@ -4,11 +4,6 @@ */ package TEST; -import acces_aux_donnes.ConnexionSQL; -import acces_aux_donnes.PraticienSQL; -import acces_aux_donnes.MedicamentSQL; -import java.sql.Connection; - /** * * @author medhi.rodrigues diff --git a/GSBapplication/src/acces_aux_donnes/MedicamentSQL.java b/GSBapplication/src/acces_aux_donnes/MedicamentSQL.java index 39f8a75..baa8764 100644 --- a/GSBapplication/src/acces_aux_donnes/MedicamentSQL.java +++ b/GSBapplication/src/acces_aux_donnes/MedicamentSQL.java @@ -19,7 +19,7 @@ public class MedicamentSQL { private ResultSet result = null; public MedicamentSQL() { - connexionTest = ConnexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB"); + connexionTest = connexionSQL.getConnect("10.121.38.75","bdgsb","adminGSB","mdpGSB"); } public ArrayList rechercherMedicament (String nomCo){ diff --git a/GSBapplication/src/presentation/jffAjoutObservation.java b/GSBapplication/src/presentation/jffAjoutObservation.java index ade7b60..52c9f73 100644 --- a/GSBapplication/src/presentation/jffAjoutObservation.java +++ b/GSBapplication/src/presentation/jffAjoutObservation.java @@ -4,7 +4,7 @@ */ package presentation; -import acces_aux_donnes.ObservationSQL; +import acces_aux_donnes.observationSQL; /** * @@ -94,7 +94,7 @@ public class jffAjoutObservation extends javax.swing.JFrame { }// //GEN-END:initComponents private void jBsoumettreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBsoumettreActionPerformed - ObservationSQL observ = new ObservationSQL(); + observationSQL observ = new observationSQL(); observ.ajouterObservation(this.idMedoc, this.idPraticien, jTAobservation.getText()); }//GEN-LAST:event_jBsoumettreActionPerformed diff --git a/GSBapplication/src/presentation/jffConnexion.java b/GSBapplication/src/presentation/jffConnexion.java index cb2abd9..aa1c02a 100644 --- a/GSBapplication/src/presentation/jffConnexion.java +++ b/GSBapplication/src/presentation/jffConnexion.java @@ -4,7 +4,7 @@ */ package presentation; -import acces_aux_donnes.PraticienSQL; +import acces_aux_donnes.praticienSQL; /** * @@ -158,7 +158,7 @@ public class jffConnexion extends javax.swing.JFrame { private void jBValiderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBValiderActionPerformed String identifiant = jTFIdentifiant.getText(); String mdp = String.valueOf(jPFmdp.getPassword()); - PraticienSQL testPraticien = new PraticienSQL(); + praticienSQL testPraticien = new praticienSQL(); String [] lePraticien = testPraticien.rechercherPraticien(identifiant,mdp); if (lePraticien[0] != null){ System.out.print("TEST REUSSIE"); diff --git a/GSBapplication/src/presentation/jffFamilleMedoc.java b/GSBapplication/src/presentation/jffFamilleMedoc.java index aa0d791..6639e20 100644 --- a/GSBapplication/src/presentation/jffFamilleMedoc.java +++ b/GSBapplication/src/presentation/jffFamilleMedoc.java @@ -102,9 +102,8 @@ public class jffFamilleMedoc extends javax.swing.JFrame { String compositionTrouve = rechercheMedoc.get(2); String effetTrouve = rechercheMedoc.get(3); String contreIndicationTrouve = rechercheMedoc.get(4); - String imgTrouve = "../img/"+ idTrouve +".jpg"; - Medicament medocTrouve = new Medicament(idTrouve, nomTrouve , compositionTrouve, effetTrouve - , contreIndicationTrouve,imgTrouve); + String imgTrouve = "/img/"+ idTrouve +".jpg"; + Medicament medocTrouve = new Medicament(idTrouve, nomTrouve , compositionTrouve, effetTrouve, contreIndicationTrouve,imgTrouve); new jffInfoMedoc(medocTrouve).setVisible(true);