public static CObjetDonnee SelectionRechercheRapide(
            string strInstructions,
            Type type,
            CFiltreData filtreDeBase,
            string strTexteRechercheRapide,
            string strChampAffiche,
            string strContexte)
        {
            if (type == null || !type.IsSubclassOf(typeof(CObjetDonnee)))
            {
                CFormAlerte.Afficher(I.T("Can not select an element from this type|30035"), EFormAlerteType.Erreur);
                return(null);
            }
            CFormSelectUnObjetDonnee form = new CFormSelectUnObjetDonnee();

            form.m_filtre          = filtreDeBase;
            form.m_strInstructions = strInstructions;
            InitVariablesDeForm(form, type);
            form.m_txtRecherche.Text     = strTexteRechercheRapide;
            form.TypeObjets              = type;
            form.m_filtreRechercheRapide = CFournisseurFiltreRapide.GetFiltreRapideForType(type);
            if (strChampAffiche == "")
            {
                strChampAffiche = DescriptionFieldAttribute.GetDescriptionField(type, "Libelle", true);
            }
            form.m_strProprieteAffichee = strChampAffiche;
            form.m_wndListeElements.Columns[0].Propriete = form.m_strProprieteAffichee;
            CObjetDonnee objet = null;

            form.RefreshListe();
            bool bOk = true;

            if (form.m_listeObjets == null || form.m_listeObjets.Count != 1)
            {
                bOk = form.ShowDialog() == DialogResult.OK;
            }
            if (bOk)
            {
                objet = form.ObjetDonnee;
            }
            form.Dispose();
            return(objet);
        }
        public static CObjetDonnee SelectObjetDonnee(string strInstructions, CListeObjetsDonnees liste, string strPropriete)
        {
            CFormSelectUnObjetDonnee form = new CFormSelectUnObjetDonnee();

            form.m_listeObjets          = liste;
            form.m_strInstructions      = strInstructions;
            form.m_filtre               = liste.Filtre;
            form.TypeObjets             = liste.TypeObjets;
            form.m_strProprieteAffichee = strPropriete;
            InitVariablesDeForm(form, form.TypeObjets);
            form.m_wndListeElements.Columns[0].Propriete = strPropriete;
            CObjetDonnee objet = null;

            if (form.ShowDialog() == DialogResult.OK)
            {
                objet = form.ObjetDonnee;
            }
            form.Dispose();
            return(objet);
        }
        public static CObjetDonnee SelectObjetDonnee(string strInstructions, Type type, CFiltreData filtre, string strPropriete)
        {
            if (!type.IsSubclassOf(typeof(CObjetDonnee)))
            {
                CFormAlerte.Afficher(I.T("Impossible to select an element from this type|30035"), EFormAlerteType.Erreur);
                return(null);
            }
            CFormSelectUnObjetDonnee form = new CFormSelectUnObjetDonnee();

            form.m_filtre               = filtre;
            form.m_strInstructions      = strInstructions;
            form.TypeObjets             = type;
            form.m_strProprieteAffichee = strPropriete;
            InitVariablesDeForm(form, type);
            form.m_wndListeElements.Columns[0].Propriete = strPropriete;
            CObjetDonnee objet = null;

            if (form.ShowDialog() == DialogResult.OK)
            {
                objet = form.ObjetDonnee;
            }
            form.Dispose();
            return(objet);
        }