Exemple #1
0
 public void Display(Domain.Profil profil)
 {
     this.Profil = profil;
     foreach (Right right in this.Profil.rightsListChangeHandler.Items)
     {
         foreach (RightGroup group in Groups)
         {
             group.Select(right);
         }
     }
 }
Exemple #2
0
        public void updateProfil(Domain.Profil profil1, Domain.Profil profil)
        {
            int    index        = 0;
            int    pos          = 0;
            int    pos1         = 0;
            bool   found        = false;
            bool   found1       = false;
            string newName      = profil1.name;
            string oldTableName = profil.name;

            Domain.Profil input = null;
            foreach (Domain.Profil inputtable in this.liste)
            {
                if (!found)
                {
                    if (inputtable.name == profil1.name)
                    {
                        inputtable.name = profil.name;
                        found           = true;
                        input           = inputtable;
                        pos             = index;
                    }
                }
                if (!found1)
                {
                    if (inputtable.name == profil.name)
                    {
                        pos1   = index;
                        found1 = true;
                    }
                }
                index++;
            }
            this.liste[pos] = input;
            this.cvs.DeferRefresh();
        }
Exemple #3
0
 /// <summary>
 /// Retire un profil de la liste
 /// </summary>
 /// <param name="user">Le profil à modifier</param>
 public void RemoveProfil(Domain.Profil profil)
 {
     this.liste.Remove(profil);
     this.cvs.DeferRefresh();
 }
Exemple #4
0
 /// <summary>
 /// Rajoute un profil
 /// </summary>
 /// <param name="inputTable">Le profil à modifier</param>
 public void AddProfil(Domain.Profil profil)
 {
     this.liste.Add(profil);
     this.cvs.DeferRefresh();
 }
Exemple #5
0
 public void Fill(Domain.Profil profil)
 {
     profil.active = activeBox.IsChecked.Value;
     profil.name   = nameTextBox.Text;
 }
Exemple #6
0
 public void Display(Domain.Profil profil)
 {
     nameTextBox.Text    = profil.name;
     activeBox.IsChecked = profil.active;
     this.RightsPanel.Display(profil);
 }