用户管理的设计模式/示例代码 [英] Design pattern / sample code for user management

查看:127
本文介绍了用户管理的设计模式/示例代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在为零售店开发C#Winforms 3.0应用程序.所有网点将通过Web服务登录到中央数据库.每个出口将有一个超级用户加上多个普通用户,所有这些用户都存储在中央数据库的一个表中.普通用户将根据他们可以查看的屏幕而分配各种权限.

我有3个要求:能够关闭登录名,仅使用PIN码登录,以及使用用户名和密码登录.

因此,我需要添加/编辑/删除用户,存储每个用户的详细信息,他们属于哪个出口,基于超级用户分配的权限查看应用程序中不同屏幕的权限,使用户处于活动状态/不活动状态等.还需要在应用程序级别上指定登录类型,即无,仅PIN或完整的用户名和密码.

有没有通用的设计模式或任何模板可以用于此...也许有标准代码库或可以用作指导的预先编写的文件?有人知道在线上有任何与此情况相关的好文章吗?


谢谢,

Ciaran.

Hi all,

I''m developing a C# Winforms 3.0 app for retail outlets. All the outlets will log in to a central database through a web service. Each outlet will have a superuser plus multiple ordinary users, all stored in a table in the central database. The ordinary users will have various rights assigned to them based on what screens they can view.

I have 3 requirements: to be able to turn off login, to have login with a PIN number only, and have login with username and password.

So I need to add/edit/delete users, store details of each user, what outlet they are part of, the rights to view different screens in the application based on rights assigned by the superuser, make users active/inactive, etc etc. Also need to specify the type of login on an application level i.e. none, PIN only, or full username and password.

Is there a common design pattern or any kind of template that I can use for this...maybe there''s a standard code library or something pre-wriiten that I can use as a guide? Does anyone know of any good articles online relating to this scenario?


Thanks,

Ciaran.

推荐答案

我最常用的设计模式是SWC模式( S tart W riting C ode).它为我服务了近30年.
My most often used design pattern is the SWC pattern (Start Writing Code). It has served me well for almost 30 years.


这篇关于用户管理的设计模式/示例代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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