public static bool EditeModele(CModeleAffectationUtilisateurs modele)
        {
            CFormEditeModeleAffectationPopup form = new CFormEditeModeleAffectationPopup();

            if (!modele.IsNew())
            {
                modele.BeginEdit();
            }
            form.m_modele = modele;
            bool bResult = form.ShowDialog() == DialogResult.OK;

            form.Dispose();
            return(bResult);
        }
Ejemplo n.º 2
0
 //--------------------------------------------------------------------------
 private void m_lnkEditModeleAffectation_LinkClicked(object sender, EventArgs e)
 {
     if (m_wndListeAffectations.SelectedItems.Count == 1)
     {
         ListViewItem item = m_wndListeAffectations.SelectedItems[0];
         CModeleAffectationUtilisateurs modele = item.Tag as CModeleAffectationUtilisateurs;
         if (modele != null)
         {
             if (CFormEditeModeleAffectationPopup.EditeModele(modele))
             {
                 FillItemModeleAffectation(item, modele);
             }
         }
     }
 }
Ejemplo n.º 3
0
        //--------------------------------------------------------------------------
        private void m_lnkAddModeleAffectation_LinkClicked(object sender, EventArgs e)
        {
            CModeleAffectationUtilisateurs modele = new CModeleAffectationUtilisateurs(CSc2iWin32DataClient.ContexteCourant);

            modele.CreateNew();
            modele.Libelle = m_txtFiltreAffectations.Text;
            if (CFormEditeModeleAffectationPopup.EditeModele(modele))
            {
                ListViewItem item = new ListViewItem();
                FillItemModeleAffectation(item, modele);
                m_wndListeAffectations.Items.Add(item);
                item.Selected = true;
                m_wndListeAffectations.EnsureVisible(item.Index);
            }
        }