public void chercher_entreprise(int id, out string erreur, out entreprise_class ent, out Boolean exist)
        {
            erreur = null;
            ent    = new entreprise_class();
            exist  = false;
            rsql   = "select * from entreprise where id_ent=" + id + " ";
            cnx.select(rsql, out erreur, out dr);
            if (erreur == null)
            {
                if (dr.HasRows == true)
                {
                    exist = true;
                    dr.Read();

                    ent = new entreprise_class();
                    ent.id_entreprise        = dr.GetInt32(0);
                    ent.designiation_ent     = dr.GetString(1);
                    ent.adresse              = dr.GetString(2);
                    ent.email_entreprise     = dr.GetString(3);
                    ent.telephone_entreprise = dr.GetString(4);
                    ent.fax_entreprise       = dr.GetString(5);
                    ent.matricule_fiscale    = dr.GetString(6);
                    ent.nbjoursmois          = dr.GetInt32(7);
                    ent.nbheurjours          = dr.GetInt32(8);
                    ent.cnsss  = dr.GetInt32(9);
                    ent.DCreat = dr.GetString(10);
                    ent.CodeCP = dr.GetInt32(11);

                    ent.Ville  = dr.GetString(12);
                    ent.Repot1 = dr.GetString(13);
                    ent.Repot2 = dr.GetString(14);
                }
                dr.Close();
            }
        }
        public void modifier_En(entreprise_class en, out String erreur)
        {
            erreur = null;
            //  rsql = "update entreprise set desg_ent ='" + en.designiation_ent + "',adr_ent='"+en.adresse+ "',email_ent='"+en.email_entreprise+ "',mat_fisc='" + en.matricule_fiscale + "', tel_ent='" + en.telephone_entreprise+ "',fax_ent='"+en.fax_entreprise+ "',nb_jour_mois="+en.nbjoursmois+ ",nb_heur_jour="+en.nbheurjours+ ",cnss="+en.cnsss+ ",date_creation='"+en.DCreat.ToString("dd-MM-yyyy")+ "',codepostal="+en.CodeCP+ ",ville='"+en.Ville+"' where id_ent=" + en.id_entreprise + " ";
            rsql = "update entreprise set desg_ent ='" + en.designiation_ent + "',adr_ent='" + en.adresse + "',email_ent='" + en.email_entreprise + "',mat_fisc='" + en.matricule_fiscale + "', tel_ent='" + en.telephone_entreprise + "',fax_ent='" + en.fax_entreprise + "',nb_jour_mois=" + en.nbjoursmois + ",nb_heur_jour=" + en.nbheurjours + ",cnss=" + en.cnsss + ",date_creation='" + en.DCreat + "',codepostal=" + en.CodeCP + ",ville='" + en.Ville + "' where id_ent=" + en.id_entreprise + " ";

            cnx.maj(rsql, out erreur);
        }