/// ////////////////////////////////////////// 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(); } }
//------------------------------------- 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(); } } } } }