Quote:
One set of checkboxes are all saved to the AccountUser table, AccessTable field.
This is wrong approach!
Imagine, you've got 4 menu items:
{A, B, C D}
.
There are 2 users in
AccountUser
table:
{1, 2}
, who can access menu items as follow:
[1]
-
{A, B, D}
[2]
-
{B, C, D}
So, you have to define another table to store menu items, which every user can access (
User_Menu
table):
UserId MenuId
1 A
1 B
1 D
2 B
2 C
2 D
To get menu related to user #1:
SELECT MenuId
FROM User_Menu
WHERE UserId = 1;
Finally, i'd suggest to read about authentication and authorization.
Here is sample implementation:
Controls Based Security in a Windows Forms Application - Simple Talk[
^]