G
grawsha2000
Greetings,
I'm developing this windows application (typical MIS, N-tier business
app) in vb.net 2005, and I'm wondering about a good method where I can
enable/disable buttons and menus based on user levels.
Users in Managers group are allowed to have r/w permissions, operators
only read permissions..etc.
I thought of using block of codes where one block would disable/enable
the whole set of buttons if user in manager group, another block would
the same thing BUT for operation group..etc.
CODE
dim strUserGroup as string
IF strUserGroup ="Mangers" then
cmdAdd.enable=true
cmdUpdate.enable=true
cmdQuery.enable=true
..
..
..
IF strUserGroup ="Operator" then
cmdAdd.enable=false
cmdUpdate.enable=false
cmdQuery.enable=true
..
..
..
Any Idea/s about a better way of doing this?
MTIA,
Grawsha
I'm developing this windows application (typical MIS, N-tier business
app) in vb.net 2005, and I'm wondering about a good method where I can
enable/disable buttons and menus based on user levels.
Users in Managers group are allowed to have r/w permissions, operators
only read permissions..etc.
I thought of using block of codes where one block would disable/enable
the whole set of buttons if user in manager group, another block would
the same thing BUT for operation group..etc.
CODE
dim strUserGroup as string
IF strUserGroup ="Mangers" then
cmdAdd.enable=true
cmdUpdate.enable=true
cmdQuery.enable=true
..
..
..
IF strUserGroup ="Operator" then
cmdAdd.enable=false
cmdUpdate.enable=false
cmdQuery.enable=true
..
..
..
Any Idea/s about a better way of doing this?
MTIA,
Grawsha