private void btnSauvegardeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSauvegardeMouseClicked
        // TODO add your handling code here:
        boolean existance = false;
        lesInfos = new Vector<>();
        completerClient();
        lesInfos.add(unClient.getTitre());
        lesInfos.add(unClient.getNom());
        lesInfos.add(unClient.getPrenom());
        lesInfos.add(unClient.getType());
        lesInfos.add(unClient.getTel_port());
        lesInfos.add(unClient.getTel_fix());
        lesInfos.add(unClient.getFax());
        lesInfos.add(unClient.getEmail());
        lesInfos.add(unClient.getVendeur());
        lesInfos.add(unClient.getSite_web());
        lesInfos.add(unClient.getRemise());
        lesInfos.add(unClient.getNum_siret());
        lesInfos.add(unClient.getDivers());
        lesInfos.add(unClient.getRue());
        lesInfos.add(unClient.getCode_postal());
        lesInfos.add(unClient.getVille());
        lesInfos.add(unClient.getNb_commande());
        for (Client c : lesClient) {
            if (cbbTitre.getSelectedItem().toString().compareTo("Revendeur") == 0) {
                if (txtNom.getText().compareTo(c.getNom()) == 0) {
                    existance = true;
                    unClient.setId_client(lesClient.get(lesClient.indexOf(c)).getId_client());
                    lesClient.setElementAt(unClient, lesClient.indexOf(c));

                }
            } else {
                if (txtNom.getText().compareTo(c.getNom()) == 0) {
                    if (c.getPrenom() == null) {
                        existance = true;
                        unClient.setId_client(lesClient.get(lesClient.indexOf(c)).getId_client());
                        lesClient.setElementAt(unClient, lesClient.indexOf(c));
                    } else {
                        if (TxtPrenom.getText().compareTo(c.getPrenom()) == 0) {
                            existance = true;
                            unClient.setId_client(lesClient.get(lesClient.indexOf(c)).getId_client());
                            lesClient.setElementAt(unClient, lesClient.indexOf(c));
                        }
                    }

                }
            }
        }

        try {
            ClientOperation.verificationNom(unClient);
            if (existance) {
                lesInfos.add(unClient.getId_client());
                DialogueBdd.update(UPDATECLIENT, lesInfos);
                JOptionPane.showMessageDialog(this, "le client est modifier");
            } else {
                rs = DialogueBdd.insert(ADDCLIENT, lesInfos);
                while (rs.next()) {
                    unClient.setId_client(rs.getInt(1));
                }
                lesClient.add(unClient);
                lst = new DefaultListModel();
                lstClient.setModel(lst);
                for (Client c : lesClient) {
                    lst.addElement(c.getNom());
                }
                JOptionPane.showMessageDialog(this, "le client est ajouter");
            }

        } catch (Exception ex) {
            Logger.getLogger(GestionClient.class.getName()).log(Level.SEVERE, null, ex);
            JOptionPane.showMessageDialog(this, ex);
        }
        Collections.sort(lesClient, tri);
    }//GEN-LAST:event_btnSauvegardeMouseClicked