Esempio n. 1
0
        public GroupView(int groupID, int personID)
        {
            InitializeComponent();
            controller     = new MainController();
            groupFacade    = new GroupFacade();
            activeGroupID  = groupID;
            activePersonID = personID;
            fillTheFields();
            fillTheMessagesDataGrid();
            fillTheType();

            // Vérification si l'utilisateur est administrateur du groupe
            bool isThisPersonTheGroupAdmin = groupFacade.PersonIsGroupAdmin(activePersonID, activeGroupID);

            if (isThisPersonTheGroupAdmin)
            {
                btnCloseGroup.Visible     = true;
                btnDeleteFollower.Visible = true;
            }
            else
            {
                btnCloseGroup.Visible     = false;
                btnDeleteFollower.Visible = false;
            }
        }