Пример #1
0
    public void setLeadeermsg(string username, string groupname)
    {
        int leads;
        if ((username == "") || (groupname == ""))
            {  leads = 0; }
        else
            {  leads = groupManagement.has_group_leader(groupname, username); }
    

        if (leads != 0)
        {
            leadermsg.Text = "You have Leader Status in this group so you can delete the group, delete users, add users and change leader status on users.";
            btnCreateNewGroup.Enabled = true;
            btnDeleteGroup.Enabled = true;
            btnAddUser.Enabled = true;
        }
        else
        {
            leadermsg.Text = "You DO NOT have Leader Status in this group so you can change nothing. You can create a new group.";
            btnCreateNewGroup.Enabled = true;
            btnDeleteGroup.Enabled = false;
            btnAddUser.Enabled = false;
         }
        return;
    }
    public void setLeadeermsg(string username, string groupname)
    {
        int leads = groupManagement.has_group_leader(groupname, username);

        if (leads != 0)
        {
            leadermsg.Text = "You have Leader Status in this group so you can delete any model in the group.";
        }
        else
        {
            leadermsg.Text = "You DO NOT have Leader Status in this group so you can delete only models you added to the group.";
        }
        return;
    }