You must build your application in the format "Rules-based" (role-based in English).
To do this, you can cause your Forms to inherit some specific access control behaviors.
Here you find a detailed tutorial on how to do this (in English).
With everything, this tutorial does not reach the field level (form only). This part you will need to implement "at hand" through the property Visible
of the components.
Another way to implement is to do the access control before opening the form itself.
Normally a database-based menu is used and this data can be set whether the menu option will be displayed or not.
But still, field-level permissions should be implemented manually.
Setar the property Visibile
for false
may lead to layout problems if you are not using specific layout classes (containers
) in your form.
If not already using, I advise reading Flowlayoutpanel and Tablelayoutpanel
Hi buddy, good night, recommend reading https://www.codeproject.com/kb/miscctrl/application_login.aspx https://www.codeproject.com/kb/cs/securebaseform.aspx
– olavooneto
Very complex what you want for a simple question...
– Marco Souza