you should develop a Role-Base windows application. This tutorial describe what you need i hope it helps you
How to give the permission to each user in winforms using c#
-
21-09-2022 - |
Pregunta
How to give the User permission in winform?
For Example
My application is based on retail shops,so the every employee having username and password,the Super Admin(Manager) he needs to give the permission to each user
NOT all employees have the full rights to access all the forms.
In each forms they have to access only selected controls only for ex. User
x
have permission only for ADD and Edit only, but not To delete the record.The User
x
not suppose enter discount more than 25%The Super Admin Have the permission to allow access to every employee.
In this I need some logic references
may grateful.
Solución 2
Otros consejos
As Somewhere Mentioned above you need a role based architecture. In your database Of users you should include role column. At the time of user log in you have to get role of of the user having particular user name and password and store in some global static variable which can be used throughout application. And according to role,set visibility true or false for each form on form load method.