//--------------------------------------------------------
 private void m_wndAddColumn_LinkClicked(object sender, EventArgs e)
 {
     CDefinitionProprieteDynamique[] defs = CFormSelectChampPourStructure.SelectProprietes
                                            (
         m_tableFromFramework.TypeSource,
         CFormSelectChampPourStructure.TypeSelectionAttendue.ChampParent |
         CFormSelectChampPourStructure.TypeSelectionAttendue.ChampFille |
         CFormSelectChampPourStructure.TypeSelectionAttendue.UniquementElementDeBaseDeDonnees |
         CFormSelectChampPourStructure.TypeSelectionAttendue.InclureChampsCustom,
         null);
     // Créé le nouveau champ de requete
     foreach (CDefinitionProprieteDynamique def in defs)
     {
         CColumnDeEasyQueryChampDeRequete champUnique = new CColumnDeEasyQueryChampDeRequete();
         champUnique.NomChamp = def.Nom;
         champUnique.TypeDonneeAvantAgregation = def.TypeDonnee.TypeDotNetNatif;
         champUnique.OperationAgregation       = OperationsAgregation.None;
         champUnique.GroupBy = false;
         List <CSourceDeChampDeRequete> listeSources = new List <CSourceDeChampDeRequete>();
         CSourceDeChampDeRequete        source       = new CSourceDeChampDeRequete(def.NomChampCompatibleCComposantFiltreChamp);
         listeSources.Add(source);
         champUnique.Sources = listeSources.ToArray();
         ListViewItem item = new ListViewItem(champUnique.NomChamp);
         item.Tag = champUnique;
         m_wndListeColonnes.Items.Add(item);
     }
 }
Exemplo n.º 2
0
 //--------------------------------------------------------------------------
 private void m_menuAjouterChampDonnee_Click(object sender, EventArgs e)
 {
     CDefinitionProprieteDynamique[] defs = CFormSelectChampPourStructure.SelectProprietes(m_typeObjet, CFormSelectChampPourStructure.TypeSelectionAttendue.ChampParent, m_champOrigine);
     foreach (CDefinitionProprieteDynamique def in defs)
     {
         C2iChampExport champ = new C2iChampExport();
         champ.Origine  = new C2iOrigineChampExportChamp(def);
         champ.NomChamp = def.Nom;
         ListViewItem item = new ListViewItem();
         FillItemForChamp(item, champ);
         m_wndListeChamps.Items.Add(item);
     }
 }