Hi, Jeff:
Microsoft has a MVC implementation (UIPAB), but this is not the solution
for your problem, but it can help on some other things.
I've made something like what you want to do. My suggestion is to create
your own controls, like a custom button, in a class that is derived from
standart button. This control should check something to see if it should be
enabled or not (make it customizable and extendable, using interfaces and
implementations to perform these checks)... This control SHOULD NOT access
database itself. It should call a security class, that will call a checking
class, that will call a DAL, that will access any storing place (a database,
in your case)...
There are some tricks to create controls, but nothing really painfull.
Make some google checking for that, or ask here again if you can't find
nothing usefull (I had the source code of a retail manufacturer, so it was
easy for me to know how to do custom controls)...
Good luck,
Ravi Wallau.
"Jeff S" <A@B.COM> wrote in message
news:uv**************@TK2MSFTNGP11.phx.gbl...
I'm implementing the Model View Presenter (MVP) pattern in a Windows Forms
application. There is a need to control which forms (views) are accessible
by specific users, and for some forms (views) to enable/disable/hide
controls for certain users or groups.
For sake of this question, please go with the model being a Person object
and the view enabling users to modify Person properties.
1. What would be a good way to have the view appear with certain UI
controls enabled/disabled/hidden for different users?
2. Same question as #1, but for enabling/disabling entire forms for
different users.
Thanks for your time and consideration.
-Jeff