Exemple #1
0
        private void m_cmbArbreHierarchique_SelectedValueChanged(object sender, EventArgs e)
        {
            CConsultationHierarchique consultation = m_cmbArbreHierarchique.ElementSelectionne as CConsultationHierarchique;

            if (consultation != null)
            {
                CFolderConsultationHierarchique racine = consultation.FolderRacine;
                if (m_elementEdite != null)
                {
                    CFolderConsultationRacineFromElement racineElt = racine as CFolderConsultationRacineFromElement;
                    racineElt.InitConsultation(m_elementEdite);
                }
                CTreeViewNodeKeeper keeper = new CTreeViewNodeKeeper(m_arbreConsultation);
                m_arbreConsultation.InitChamps(racine, CSc2iWin32DataClient.ContexteCourant, true);
                keeper.Apply(m_arbreConsultation);
                if (m_bCmbArbreInitialisee)
                {
                    Type typeConsulte = null;
                    if (m_elementEdite != null)
                    {
                        typeConsulte = m_elementEdite.GetType();
                    }
                    new CTimosAppRegistre().SetLastIdConsultationHierarchiqueForGED(typeConsulte, consultation.Id);
                }
            }
        }
        //---------------------------------------------------------------------
        private void m_cmbArbreHierarchique_SelectedIndexChanged(object sender, EventArgs e)
        {
            CConsultationHierarchique consultation = m_cmbArbreHierarchique.ElementSelectionne as CConsultationHierarchique;

            if (consultation != null)
            {
                CFolderConsultationHierarchique racine = consultation.FolderRacine;
                if (m_schemaReseau.SiteApparenance != null)
                {
                    CFolderConsultationRacineFromElement racineElt = racine as CFolderConsultationRacineFromElement;
                    racineElt.InitConsultation(m_schemaReseau.SiteApparenance);

                    CFolderConsultationFolder folderCablage = new CFolderConsultationFolder(racineElt);
                    folderCablage.Libelle = I.T("Wiring|10055");
                    racineElt.AddFolder(folderCablage);
                    CFolderConsultationCablage cablage = new CFolderConsultationCablage(folderCablage);
                    cablage.SchemaCablage = m_schemaReseau;
                    folderCablage.AddFolder(cablage);
                }
                m_arbreConsultation.InitChamps(racine, CSc2iWin32DataClient.ContexteCourant);
                if (m_bCmbArbreInitialisee)
                {
                    Type typeConsulte = null;
                    if (m_schemaReseau != null && m_schemaReseau.SiteApparenance != null)
                    {
                        typeConsulte = typeof(CSite);
                    }
                    new CTimosAppRegistre().SetLastIdConsultationHierarchiqueInSchema(typeConsulte, consultation.Id);
                }
            }
        }
Exemple #3
0
 private void m_lnkTester_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (m_panelEditionConsultation.Folder != null)
     {
         m_panelEditionConsultation.MajChamps();
         CFolderConsultationRacineFromElement racine = m_panelEditionConsultation.Folder as CFolderConsultationRacineFromElement;
         if (racine != null)
         {
             CObjetDonnee objet = CFormSelectUnObjetDonnee.SelectionRechercheRapide(
                 I.T("Select an element for test|20735"),
                 racine.TypeRacine,
                 null,
                 "",
                 DescriptionFieldAttribute.GetDescriptionField(racine.TypeRacine, "Description"),
                 "FORTESTCONSULT");
             if (objet == null)
             {
                 return;
             }
             racine.InitConsultation(objet);
         }
         CFormTestConsultationHierarchique.TestFolder(m_panelEditionConsultation.Folder);
     }
 }