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_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); } }
/// ////////////////////////////////////////// private void m_btnSelectionnerUtilisateur_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { CDonneesActeurUtilisateur user = (CDonneesActeurUtilisateur)CFormSelectUnObjetDonnee.SelectObjetDonnee( I.T("Select an application user|20739"), typeof(CDonneesActeurUtilisateur), null, "NomDestinataireMessage"); if (user != null) { m_txtFormule.Text = user.Id.ToString();; } }
//------------------------------------------------------------------------- private bool SelectObjetTest() { if (m_cmbTypeElement.TypeSelectionne != null) { CObjetDonnee objet = CFormSelectUnObjetDonnee.SelectObjetDonnee( I.T("Select an element for test|20735"), m_cmbTypeElement.TypeSelectionne); if (objet != null) { m_objetTest = objet; } return(objet != null); } return(false); }
//------------------------------------------------------------------------- private bool SelectObjetTest() { if (m_cmbTypeElements.SelectedValue is Type && m_cmbTypeElements.SelectedValue != typeof(DBNull)) { CObjetDonnee objet = CFormSelectUnObjetDonnee.SelectObjetDonnee( I.T("Select an element for test|20029"), (Type)m_cmbTypeElements.SelectedValue); if (objet != null) { m_objetTest = objet; } m_btnTest.Enabled = m_objetTest != null; return(objet != null); } return(false); }
//-------------------------------------------------------------------- private void m_lnkAddProfil_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { CProfilUtilisateur profil = (CProfilUtilisateur)CFormSelectUnObjetDonnee.SelectObjetDonnee( I.T("Select user profils|20734"), typeof(CProfilUtilisateur), null, "Libelle"); if (profil != null) { //Crée la relation du profil CRelationUtilisateur_Profil relation = profil.CreateNewRelationToRelation(m_relationEditee); CPanelUtilisateur_Profil panel = new CPanelUtilisateur_Profil(); panel.Parent = m_panelSousProfils; panel.CreateControl(); panel.Dock = DockStyle.Top; panel.Init(relation); Height = GetIdealHeight(); } }
//------------------------------------------------------------ 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(); } }
//------------------------------------- void txtSelectTemplate_OnSelectObject(object sender, CObjetDonneeEventArgs args) { CPhaseSpecifications phase = args.Objet as CPhaseSpecifications; if (phase != null) { CElementDeGanttProjet prj = m_gantt.SelectedElement as CElementDeGanttProjet; CProjet projetParent = prj != null ? prj.ProjetAssocie : null; if (projetParent != null) { if (CFormAlerte.Afficher(I.T("Apply template '@1' to project '@2'|20730", phase.Libelle, projetParent.Libelle), EFormAlerteBoutons.OuiNon, EFormAlerteType.Question) == DialogResult.Yes) { CListeObjetsDonnees lst = phase.Besoins; lst.Filtre = new CFiltreData(CBesoin.c_champTypeBesoin + "=@1 and " + CTypeProjet.c_champId + " is null", (int)ETypeDonneeBesoin.Projet); CTypeProjet typeProjetDefault = null; if (lst.Count > 0) { typeProjetDefault = CFormSelectUnObjetDonnee.SelectObjetDonnee( I.T("Select default project type (for needs without project type)|20737"), typeof(CTypeProjet), null, "Libelle") as CTypeProjet; if (typeProjetDefault == null) { return; } } using (CWaitCursor waiter = new CWaitCursor()) { projetParent.ApplySpecificationTemplate(phase, typeProjetDefault); Reinit(); } } } } }
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); } }