Observation Fini de l'affichage à l'insertion SQL

This commit is contained in:
2025-03-13 09:51:28 +01:00
parent 4813c5d4af
commit 85c17dbe6f
4 changed files with 212 additions and 8 deletions

View File

@@ -4,17 +4,22 @@
*/
package presentation;
import acces_aux_donnes.observationSQL;
/**
*
* @author emile.lalorcey
*/
public class jffAjoutObservation extends javax.swing.JFrame {
private String idMedoc;
private int idPraticien;
/**
* Creates new form jffAjoutObservation
*/
public jffAjoutObservation() {
public jffAjoutObservation(String idMedoc,int idPraticien) {
initComponents();
this.idMedoc = idMedoc;
this.idPraticien = idPraticien;
}
/**
@@ -26,22 +31,73 @@ public class jffAjoutObservation extends javax.swing.JFrame {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLTitre = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jTAobservation = new javax.swing.JTextArea();
jBsoumettre = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/logodetoure.gif"))); // NOI18N
jLTitre.setText("Soumettez votre observation");
jTAobservation.setColumns(20);
jTAobservation.setRows(5);
jScrollPane1.setViewportView(jTAobservation);
jBsoumettre.setText("Soumettre");
jBsoumettre.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jBsoumettreActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLTitre)
.addGap(65, 65, 65)
.addComponent(jLabel1))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(23, 23, 23)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 348, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(158, 158, 158)
.addComponent(jBsoumettre)))
.addGap(0, 23, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel1)
.addComponent(jLTitre))
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jBsoumettre)
.addContainerGap(46, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jBsoumettreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBsoumettreActionPerformed
observationSQL observ = new observationSQL();
observ.ajouterObservation(this.idMedoc, this.idPraticien, jTAobservation.getText());
}//GEN-LAST:event_jBsoumettreActionPerformed
/**
* @param args the command line arguments
*/
@@ -72,11 +128,16 @@ public class jffAjoutObservation extends javax.swing.JFrame {
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new jffAjoutObservation().setVisible(true);
//new jffAjoutObservation().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jBsoumettre;
private javax.swing.JLabel jLTitre;
private javax.swing.JLabel jLabel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextArea jTAobservation;
// End of variables declaration//GEN-END:variables
}