Beispiel #1
0
        public void AddGroupToUI(Group group)
        {
            Control groupComponent;

            // Remove "NoGroups" panel
            if (AllGroups.Count == 0)
            {
                foreach (Control control in flPnlGroups.Controls)
                {
                    if (control is NoGroups)
                    {
                        flPnlGroups.Controls.Remove(control);
                    }
                }
            }

            if (Server.CurrentSession.Info.Admin)
            {
                groupComponent = new GroupDetailedComponent(group, User.Enumerate());
            }
            else
            {
                groupComponent = new GroupComponent(group);
            }

            AllGroups.Add(group);
            flPnlGroups.Controls.Add(groupComponent);
        }
Beispiel #2
0
        private void AddGroupToUI(Group group)
        {
            Control groupComponent;

            if (Server.CurrentSession.Info.Admin)
            {
                groupComponent = new GroupDetailedComponent(group, User.Enumerate());
            }
            else
            {
                groupComponent = new GroupComponent(group);
            }

            flPnlGroups.Controls.Add(groupComponent);
        }