Enabling/Disabling Buttons via function/method (C#) : 1. I have 8 buttons, each performs a different task, i.e. edit, delete, create etc, and a context​Menu for each of the task

2. I've a table called *Moderations* in DB, which consists of bools i.e. groupTitle, canEdit, canDelete, canCreate..... groupTitle is string not bool

3. I have a bool function *canDoIt(task, userid)* to check whether the logged in user (which will have specific groupTitle), can perform or can't (function return true or false for provided task, in short)

Suppose, I want to check whether a logged in user can perform the task or not, check via canDoit(task, userid), and If he cannot, the button will be disabled otherwise won't....
OnForm_Load I throw the function (or may be another time when I need it) and check for each button, i.e.

    btnEdit.Enabled = canDo("canEdit", userID)
    btnDelete.Enabled = canDo("canDelete", userID)
    btnCreate.Enabled = canDo("canCreat", userID)
    
    cnxMenuEdit.Enabled = canDo("canEdit", userID)
    cnxMenuDelete.Enabled = canDo("canDelete", userID)
    .
    .
    .
    .....and so on and so forth.

My method work fine and good but I have doubts and questions....

First question, is good to be so?
Second question, is it professional?
Another is, will that effect program or database performance?

Sorry if same has already asked/posted.....
