Windows窗体应用程序中的用户角色 [英] user role in windows form application

查看:105
本文介绍了Windows窗体应用程序中的用户角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是C#的新手,我想管理我的桌面应用程序的角色.现在,当基于用户权限登录并存储在数据库中时,我想使控件可见或启用.知道如何执行此操作吗?
PS:该表是每种形式的每个控件的用户权限,我在想这样的表,它有4列PROFILE-这是用户配置文件TYPE-可能是按钮菜单...模块-我的应用程序引用-可能是buttonAdd或ButtonSearch ...以及最后一列VALUE-每个模块中每个引用的true或false
提前thnx

hi i''m new to C# and i want to manage role for my desktop application. now when a user login based on his right that are stored in database i want to make the control visible or enabled. any idea how to do this ?
P.S: the table in which are the user right for each control in each form i was thinking something like this a table with 4 columns PROFILE- which is user profile TYPE- which may be button menu... Module - my application forms REFERENCE - which may be buttonAdd or ButtonSearch ... and the last Column VALUE - that is true or false for each Reference in each Module
thnx in advance

推荐答案

我想使控件可见或启用.不知道该怎么做
您需要在注册/创建帐户时为每个用户分配一个定义的角色.根据登录凭据,您可以获取用户所属的角色.
现在,为每个角色定义UI.根据角色,显示/隐藏控件并根据设计授予访问权限.
i want to make the control visible or enabled. any idea how to do this
You need to assign every user a defined role at the time of registration/creation of account. Based on login credentials, you can get what role that user belongs to.
Now, have defined UI''s for each role. Based on role, show/hide the controls and give access as per design.


这篇关于Windows窗体应用程序中的用户角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆