private void btnAjouterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAjouterActionPerformed
        // TODO add your handling code here:
        
        if(!taAdresse.getText().equals("") && !tbfax.getText().equals("") && !tbtel.getText().equals(""))
        {
        PharmacieDAO pdao= new PharmacieDAO();
        Pharmacie pp= new Pharmacie();
        pp.setNom_ph(tbNomph.getText());
        pp.setAdresse(taAdresse.getText());
        pp.setFax(Integer.parseInt(tbfax.getText()));
        pp.setTel(Integer.parseInt(tbtel.getText()));
        pp.setType((String) cbtype.getSelectedItem());
        pp.setGouvernorat((String) cbGvt.getSelectedItem());
//        pp.setGarde(rbOui.getText());
//        pp.setGarde(rbNon.getText());
        String garde ="";
        if(rbOui.isSelected())
            garde=rbOui.getText();
        if(rbNon.isSelected())
            garde=rbNon.getText();
        pp.setGarde(garde);
        JOptionPane.showMessageDialog(null,"Pharmacie ajoutée !");
         
        pdao.insertPharmacie(pp);
        
        
        
          new pharmacieView().setVisible(true);
        this.dispose();
        }else{
            JOptionPane.showMessageDialog(null,"Tout les champs sont obligatoires !");
        
        }
    }//GEN-LAST:event_btnAjouterActionPerformed