//------------------------------------------------------------ private void m_btnAjouter_Click(object sender, EventArgs e) { if (m_elementAIntervention == null) { return; } CTypeIntervention typeIntervention = (CTypeIntervention)CFormSelectUnObjetDonnee.SelectionRechercheRapide( I.T("Sélectionnez une intervention|20732"), typeof(CTypeIntervention), null, "", "", ""); if (typeIntervention != null) { CIntervention tache = new CIntervention(m_contexteDonnee); tache.CreateNewInCurrentContexte(); tache.TypeIntervention = typeIntervention; tache.ElementAIntervention = (CObjetDonneeAIdNumerique)m_elementAIntervention; tache.DureePrevisionnelle = typeIntervention.DureeStandardHeures; CFractionIntervention fraction = new CFractionIntervention(m_contexteDonnee); fraction.CreateNewInCurrentContexte(); fraction.DateDebutPlanifie = m_controlPlanning.DateDebut; fraction.DateFinPlanifiee = fraction.DateDebutPlanifie.AddHours(tache.DureePrevisionnelle); fraction.Intervention = tache; m_controlPlanning.Refresh(); //m_controlPlanning.SelectTranche(fraction); } }
void m_lnkLinkToLogique_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { if (Equipement == null) { return; } if (Equipement.EmplacementSite == null) { CFormAlerte.Afficher(I.T("Equipment should be in a site|20081")); return; } CEquipementLogique eqptLogique = CFormSelectUnObjetDonnee.SelectionRechercheRapide( I.T("Select logical equipment to link|20733"), typeof(CEquipementLogique), new CFiltreData(CSite.c_champId + "=@1", Equipement.EmplacementSite.Id), "", "Libelle", "") as CEquipementLogique; if (eqptLogique != null) { Equipement.EquipementLogique = eqptLogique; InitChamps(Equipement); } m_lnkCreateNewLogique.Visible = EquipementLogique == null; }
//------------------------------------------------------------ private void m_btnIntervenant_Click(object sender, EventArgs e) { CActeur part = (CActeur)CFormSelectUnObjetDonnee.SelectionRechercheRapide( I.T("Select an operator|20738"), typeof(CActeur), CFournisseurFiltreRapide.GetFiltreRapideForType(typeof(CActeur)), "", "", ""); if (part != null) { CActeur part2 = new CActeur(m_contexteDonnee); part2.ReadIfExists(part.Id); part = part2; m_fournisseurEntreesPlanning.AddRessource(part); m_controlPlanning.Refresh(); Refresh(); } }
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); } }