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

  1. NOT all employees have the full rights to access all the forms.

  2. 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.

  3. The User x not suppose enter discount more than 25%

  4. The Super Admin Have the permission to allow access to every employee.

In this I need some logic references

may grateful.

¿Fue útil?

Solución 2

you should develop a Role-Base windows application. This tutorial describe what you need i hope it helps you

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top