private void Button_modifier_Click(object sender, EventArgs e)
        {
            if (_previous == "ShowAllRaports")
            {
                RapportVisite rapport_modif = new RapportVisite(_colNom, _colMatricule, "Modif", _numRap);
                Hide();
                rapport_modif.Show();
            }
            else
            {
                int Error = Verif_error("Modif");

                if (Error == 0)
                {
                    string        dateJour        = DateTime.Today.ToString("yyyy-MM-dd H:mm:ss");
                    List <string> Recup_All_Value = new List <string>();
                    Recup_All_Value = Recup_All();
                    string requete = "";

                    string rapBilan = Recup_All_Value[0];
                    string rapMotif = Recup_All_Value[1];
                    string rapConnaissancePraticien = Recup_All_Value[2];
                    string rapConnaissanceLabo      = Recup_All_Value[3];
                    string rapDate               = Recup_All_Value[4];
                    string rapDateProVisite      = Recup_All_Value[5];
                    string rapPresenceConcurence = Recup_All_Value[6];
                    string praNum = Recup_All_Value[7];
                    string rapNum = Recup_All_Value[8];

                    requete = "UPDATE `rapport_visite` " +
                              "SET `COL_MATRICULE`='" + _colMatricule + "',`RAP_NUM`='" + rapNum + "',`RAP_DATE`='" + dateJour + "',`RAP_BILAN`='" + rapBilan + "',`RAP_MOTIF`='" + rapMotif + "',`RAP_CONNAISSANCE_PRACTICIEN`=" + rapConnaissancePraticien + ",`RAP_CONFIANCE_LABO`=" + rapConnaissanceLabo + ",`RAP_DATE_VISITE`='" + rapDate + "',`RAP_DATE_PROCHAINE_VISITE`= ";
                    requete += comboBox_NewRDV.Text == "Oui"
                       ? "'" + rapDateProVisite + "'"
                       : rapDateProVisite;
                    requete += ", `RAP_PRESENCE_CONCURENCE`=" + rapPresenceConcurence + ",`PRA_NUM`='" + praNum + "' WHERE `COL_MATRICULE` = '" + _colMatricule + "' AND `RAP_NUM` ='" + rapNum + "'";

                    Curs cs = new Curs(connection);
                    cs.ReqAdmin(requete);
                    cs.Fermer();

                    requete = "DELETE FROM `distribuer`" +
                              " WHERE `distribuer`.`COL_MATRICULE` ='" + _colMatricule + "'" +
                              " AND `distribuer`.`RAP_NUM` =" + rapNum;

                    Curs cs2 = new Curs(connection);
                    cs2.ReqAdmin(requete);
                    cs2.Fermer();

                    Insert_distribuer(echantillonsOffert, rapNum, true);
                    Insert_distribuer(echantillonsPresente, rapNum, false);

                    MessageBox.Show("Votre rapport à été modifié !");
                    Form.ActiveForm.Close();
                }
            }
        }
        private void Button_Nouveau_Click(object sender, EventArgs e)
        {
            int Error = Verif_error("Creer");

            if (Error == 0)
            {
                string        dateJour        = DateTime.Today.ToString("yyyy-MM-dd H:mm:ss");
                List <string> Recup_All_Value = new List <string>();
                Recup_All_Value = Recup_All();
                string requete = "";

                string rapBilan = Recup_All_Value[0];
                string rapMotif = Recup_All_Value[1];
                string rapConnaissancePraticien = Recup_All_Value[2];
                string rapConnaissanceLabo      = Recup_All_Value[3];
                string rapDate               = Recup_All_Value[4];
                string rapDateProVisite      = Recup_All_Value[5];
                string rapPresenceConcurence = Recup_All_Value[6];
                string praNum = Recup_All_Value[7];
                string rapNum = Recup_All_Value[8];

                requete = "INSERT INTO `rapport_visite`(`COL_MATRICULE`, `RAP_NUM`, `RAP_DATE`, `RAP_BILAN`, `RAP_MOTIF`, `RAP_CONNAISSANCE_PRACTICIEN`," +
                          " `RAP_CONFIANCE_LABO`, `RAP_DATE_VISITE`, `RAP_DATE_PROCHAINE_VISITE`, `RAP_PRESENCE_CONCURENCE`, `PRA_NUM`)" +
                          " VALUES ('" + _colMatricule + "', '" + rapNum + "', '" + dateJour + "', '" + rapBilan + "', '" + rapMotif + "', " + rapConnaissancePraticien +
                          ", " + rapConnaissanceLabo + ", '" + rapDate + "',";
                requete += comboBox_NewRDV.Text == "Oui"
                    ? "'" + rapDateProVisite + "'"
                    : rapDateProVisite;
                requete += ", " + rapPresenceConcurence + ", " + praNum + ")";

                Curs cs = new Curs(connection);
                cs.ReqAdmin(requete);
                cs.Fermer();

                Insert_distribuer(echantillonsPresente, rapNum, false);
                Insert_distribuer(echantillonsOffert, rapNum, true);

                MessageBox.Show("Votre rapport à été enregistré !");
                Form.ActiveForm.Close();
            }
        }
        // Lors de l'appui sur le bouton modifier
        private void btn_modifier_Click(object sender, EventArgs e)
        {
            string nom, prenom, adresse, ville, cp, secteur, labo;

            // Récupération des champs
            nom     = txb_nom.Text.Trim();
            prenom  = txb_prenom.Text.Trim();
            adresse = txb_adresse.Text.Trim();
            ville   = txb_ville.Text.Trim();
            cp      = txb_cp.Text.Trim();

            if (_role == "responsable")
            {
                secteur = cbx_secteur.SelectedItem.ToString();
            }
            else
            {
                secteur = null;
            }

            labo = cbx_labo.SelectedItem.ToString();

            // Remplis les erreurs si il y en a
            dispatchErrors(nom, prenom, adresse, ville, cp, secteur, labo);

            // Vérification de champs vides
            if (nom.Length != 0 && prenom.Length != 0 && ville.Length != 0 && cp.Length != 0 && labo.Length != 0)
            {
                bool error = false;

                // Try parse en numérique
                if (!int.TryParse(cp, out int codePostal))
                {
                    lbl_error_cp.Text = "Veuillez renseigner une valeur numérique";
                    error             = true;
                }

                // Si pas d'erreurs
                if (!error)
                {
                    Curs cs = new Curs(chaineConnexion);
                    // Récupération du labo dans le dictionnaire
                    labo = this.labo.FirstOrDefault(x => x.Value == labo).Key;

                    string req;

                    if (_role == "responsable")
                    {
                        // Récupération du secteur dans le dictionnaire
                        secteur = this.secteur.FirstOrDefault(x => x.Value == secteur).Key;

                        req = "UPDATE collaborateur SET COL_NOM = '" + nom + "', COL_PRENOM = '" + prenom + "', COL_ADRESSE = '" + adresse + "'" +
                              ", COL_VILLE = '" + ville + "', COL_CP = '" + cp + "', LAB_CODE = '" + labo + "', SEC_CODE = '" + secteur + "'" +
                              " WHERE COL_MATRICULE = '" + _matricule + "';";
                    }
                    else
                    {
                        req = "UPDATE collaborateur SET COL_NOM = '" + nom + "', COL_PRENOM = '" + prenom + "', COL_ADRESSE = '" + adresse + "'" +
                              ", COL_VILLE = '" + ville + "', COL_CP = '" + cp + "', LAB_CODE = '" + labo + "'" +
                              " WHERE COL_MATRICULE = '" + _matricule + "';";
                    }

                    try
                    {
                        // Update de l'utilisateur
                        cs.ReqAdmin(req);
                        cs.Fermer();

                        // Message de confirmation
                        MessageBox.Show("Mise à jour effectué", "Success lors de la mise à jour", MessageBoxButtons.OK, MessageBoxIcon.Information);

                        Close();
                    }
                    catch (Exception)
                    {
                        // Erreur lors de la maj
                        lbl_error_general.Text = "Erreur lors de la mise à jour";
                    }
                }
            }
        }
        //Modification des informations suite à la pression du bouton "mettre à jour"
        private void btn_maj_Click(object sender, EventArgs e)
        {
            string numero, nom, prenom, adresse, cp, ville, coefnot, typePraticiens;

            //Récupération des champs et suppression des espaces blancs ("trim()")
            numero         = textBox_num.Text.Trim();
            nom            = textBox_nom.Text.Trim();
            prenom         = textBox_prenom.Text.Trim();
            adresse        = textBox_adresse.Text.Trim();
            ville          = textBox_ville.Text.Trim();
            cp             = textBox_CP.Text.Trim();
            coefnot        = textBox_coef.Text.Trim().Replace(',', '.');
            typePraticiens = cbx_tp.SelectedItem.ToString();

            // Remplis les erreurs si il y en a
            dispatchErrors(numero, nom, prenom, adresse, ville, cp, coefnot, typePraticiens);

            // Vérification de champs vides
            if (numero.Length != 0 && nom.Length != 0 && prenom.Length != 0 && adresse.Length != 0 && ville.Length != 0 && cp.Length != 0 && coefnot.Length != 0 && typePraticiens.Length != 0)
            {
                bool error = false;

                // Try parse en numérique
                if (!int.TryParse(cp, out int codePostal))
                {
                    lbl_error_cp.Text = "Veuillez renseigner une valeur numérique";
                    error             = true;
                }

                // Si pas d'erreurs
                if (!error)
                {
                    Curs cs = new Curs(connection);

                    // Récupération du type de praticien dans le dictionnaire
                    typePraticiens = this.typePraticiens.FirstOrDefault(x => x.Value == typePraticiens).Key;

                    string req;

                    req = "UPDATE praticien SET PRA_NUM = " + numero + ", PRA_NOM = '" + nom + "', PRA_PRENOM = '" + prenom + "'" +
                          ", PRA_ADRESSE = '" + adresse + "', PRA_VILLE = '" + ville + "', PRA_CP = '" + cp + "', PRA_COEFNOTORIETE = " + coefnot + ", TYP_CODE = '" + typePraticiens + "'" +
                          " WHERE PRA_NUM = " + _NumPraticiens.ToString() + ";";

                    try
                    {
                        //Envoie de la requête pour effectuer la mise à jour
                        cs.ReqAdmin(req);
                        cs.Fermer();

                        //Message de validation si la mise à jour est bonne
                        MessageBox.Show("Mise à jour effectué", "Success lors de la mise à jour", MessageBoxButtons.OK, MessageBoxIcon.Information);

                        Close();
                    }
                    catch (Exception)
                    {
                        //Message d'erreur si la mise à jour est ratée
                        lbl_error_general.Text = "Erreur lors de la mise à jour";
                    }
                }
            }
        }